Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
datatypes.cpp File Reference
#include "datatypes.hpp"

Go to the source code of this file.

Functions

std::pair< int, std::string > const & getType (CLBCommonHeader const &header)
 
std::string const & getType (uint32_t datatype)
 

Variables

unsigned int const ttdc = 1414808643
 
unsigned int const taes = 1413563731
 
unsigned int const tmch = 1414349640
 
unsigned int const unkn = 0
 

Function Documentation

◆ getType() [1/2]

std::pair< int, std::string > const & getType ( CLBCommonHeader const & header)

Definition at line 12 of file datatypes.cpp.

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}
unsigned int const unkn
Definition datatypes.cpp:10
unsigned int const ttdc
Definition datatypes.cpp:7
unsigned int const tmch
Definition datatypes.cpp:9
unsigned int const taes
Definition datatypes.cpp:8

◆ getType() [2/2]

std::string const & getType ( uint32_t datatype)

Definition at line 34 of file datatypes.cpp.

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}

Variable Documentation

◆ ttdc

unsigned int const ttdc = 1414808643
Author
cpellegrino

Definition at line 7 of file datatypes.cpp.

◆ taes

unsigned int const taes = 1413563731

Definition at line 8 of file datatypes.cpp.

◆ tmch

unsigned int const tmch = 1414349640

Definition at line 9 of file datatypes.cpp.

◆ unkn

unsigned int const unkn = 0

Definition at line 10 of file datatypes.cpp.