Nix (Dev)
3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
utils.hpp
Go to the documentation of this file.
1
#ifndef IV_SRC_UNITS_MODEL_UTILS_HPP_
2
#define IV_SRC_UNITS_MODEL_UTILS_HPP_
3
4
#include "
units/model/enums.hpp
"
5
6
#include <optional>
7
#include <string>
8
9
namespace
iv::units
10
{
11
12
inline
std::optional<eUnitType>
getUnitTypeFromUnitDataHwVersion
(
const
std::string_view &hwVersion)
13
{
14
if
(hwVersion ==
"DIM36"
)
15
{
16
return
eUnitType::Dim36
;
17
}
18
19
if
(hwVersion ==
"AIM18"
)
20
{
21
return
eUnitType::Aim18
;
22
}
23
24
if
(hwVersion ==
"DIOM24"
)
25
{
26
return
eUnitType::Diom24
;
27
}
28
29
if
(hwVersion ==
"LUM"
)
30
{
31
return
eUnitType::Lum
;
32
}
33
34
if
(hwVersion ==
"TIM28"
)
35
{
36
return
eUnitType::Tim28
;
37
}
38
39
if
(hwVersion ==
"PMM"
)
40
{
41
return
eUnitType::Pmm
;
42
}
43
44
if
(hwVersion ==
"SLIM"
)
45
{
46
return
eUnitType::SLim
;
47
}
48
49
if
(hwVersion ==
"KLIM"
)
50
{
51
return
eUnitType::Rms
;
52
}
53
54
return
std::nullopt;
55
}
56
57
}
// namespace iv::units
58
59
#endif
//IV_SRC_UNITS_MODEL_UTILS_HPP_
iv::units
Definition
AbstractChannel.hpp:16
iv::units::eUnitType::Lum
@ Lum
iv::units::eUnitType::Diom24
@ Diom24
iv::units::eUnitType::Aim18
@ Aim18
iv::units::eUnitType::Rms
@ Rms
iv::units::eUnitType::Dim36
@ Dim36
iv::units::eUnitType::SLim
@ SLim
iv::units::eUnitType::Tim28
@ Tim28
iv::units::eUnitType::Pmm
@ Pmm
iv::units::getUnitTypeFromUnitDataHwVersion
std::optional< eUnitType > getUnitTypeFromUnitDataHwVersion(const std::string_view &hwVersion)
Definition
utils.hpp:12
enums.hpp
src
units
model
utils.hpp
Generated by
1.12.0