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
5
6#include <optional>
7#include <string>
8
9namespace iv::units
10{
11
12inline 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_
Definition AbstractChannel.hpp:16
std::optional< eUnitType > getUnitTypeFromUnitDataHwVersion(const std::string_view &hwVersion)
Definition utils.hpp:12