Jpp
test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
software
DataQueue
util
clb_swiss_knife
datatypes.cpp
Go to the documentation of this file.
1
#include "datatypes.hpp"
2
3
/**
4
* \author cpellegrino
5
*/
6
7
unsigned
int
const
ttdc
= 1414808643;
8
unsigned
int
const
taes
= 1413563731;
9
unsigned
int
const
tmch
= 1414349640;
10
unsigned
int
const
unkn
= 0;
11
12
std::pair<int, std::string>
const
&
getType
(
CLBCommonHeader
const
& header)
13
{
14
std::pair<int, std::string>
const
static
unknown = std::make_pair(
unkn
,
"unknown"
);
15
std::pair<int, std::string>
const
static
acoustic = std::make_pair(
taes
,
"acoustic data"
);
16
std::pair<int, std::string>
const
static
optical = std::make_pair(
ttdc
,
"optical data"
);
17
std::pair<int, std::string>
const
static
monitoring = std::make_pair(
tmch
,
"monitoring data"
);
18
19
if
(header.
dataType
() ==
tmch
) {
20
return
monitoring;
21
}
22
23
if
(header.
dataType
() ==
ttdc
) {
24
return
optical;
25
}
26
27
if
(header.
dataType
() ==
taes
) {
28
return
acoustic;
29
}
30
31
return
unknown;
32
}
33
34
std::string
const
&
getType
(uint32_t datatype)
35
{
36
std::string
const
static
unknown =
"unknown"
;
37
std::string
const
static
acoustic =
"acoustic"
;
38
std::string
const
static
optical =
"optical"
;
39
std::string
const
static
monitoring =
"monitoring"
;
40
41
if
(datatype ==
tmch
) {
42
return
monitoring;
43
}
44
45
if
(datatype ==
ttdc
) {
46
return
optical;
47
}
48
49
if
(datatype ==
taes
) {
50
return
acoustic;
51
}
52
53
return
unknown;
54
}
std::pair
Definition
JSTDTypes.hh:18
unkn
unsigned int const unkn
Definition
datatypes.cpp:10
ttdc
unsigned int const ttdc
Definition
datatypes.cpp:7
tmch
unsigned int const tmch
Definition
datatypes.cpp:9
getType
std::pair< int, std::string > const & getType(CLBCommonHeader const &header)
Definition
datatypes.cpp:12
taes
unsigned int const taes
Definition
datatypes.cpp:8
CLBCommonHeader
Definition
clb_common_header.hh:18
CLBCommonHeader::dataType
uint32_t dataType() const
Definition
clb_common_header.hh:29
Generated by
1.12.0