Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CEnumCommon.hpp
Go to the documentation of this file.
1#ifndef LIBS_BASIC_CENUMCOMMON_HPP_
2#define LIBS_BASIC_CENUMCOMMON_HPP_
3
4#include "channels/enums.hpp"
5#include "core/defines.hpp"
6#include "core/enums.hpp"
7#include "diamar/enums.hpp"
8#include "model/enums.hpp"
9#include "tanks/enums.hpp"
10
11#include <map>
12#include <string>
13#include <utility>
14
16{
17public:
18 enum class ECompare
19 {
20 Less = -1,
21 Equal = 0,
22 Greater = 1
23 };
24
25 //Tipo para el elemento gráfico label (ubicación provisional)
26 enum class eType
27 {
28 Title,
29 Value
30 };
31
34
35 static std::string strAnalogSensorType(iv::channels::eAnalogSensorType analogSensorType, bool shortName = false);
36 static std::string strCommTypeConfig(iv::comms::eInterfaceType eCommTypeConfig);
37 static std::string strLanguageValue(iv::eLanguage eLanguage);
38 static std::string strLanguageSuffix(iv::eLanguage eLanguage);
39 static std::string strChannelArea(iv::channels::eChannelArea channelArea);
40 static std::string strShipArea(iv::model::eShipArea eShipArea);
41 static std::string strUserProfileValue(iv::diamar::eUserProfileType eUserProfileType);
42 static std::string strUserProfileImage(iv::diamar::eUserProfileType eUserProfileType);
43 static std::string strTankContentsType(iv::tanks::eTankContentsType eTankContentsType);
44 static std::string strTankSoundingUnits(iv::tanks::eTanksSoundingUnits eTanksSoundingUnits);
45
46 static iv::comms::eHeartbeatState heartbeatCodeToState(uint8_t heartbeatCode);
47
48 static inline const std::map<iv::channels::eAnalogSensorType, const std::pair<std::string, std::string>>
50 {iv::channels::eAnalogSensorType::Current, {"Curr", "Current"}},
51 {iv::channels::eAnalogSensorType::ActiveIntensity, {"AInt", "ActiveIntensity"}},
52 {iv::channels::eAnalogSensorType::PassiveIntensity, {"PInt", "PassiveIntensity"}},
65 {iv::channels::eAnalogSensorType::Voltage, {"Volt", "Voltage"}},
66 {iv::channels::eAnalogSensorType::Time, {"Time", "Time"}},
67 {iv::channels::eAnalogSensorType::TimeUtc, {"TimeUTC", "Time UTC"}}};
68
69 static inline const std::map<iv::eLanguage, const std::pair<std::string, std::string>> stringsLanguage {
70 {iv::eLanguage::English, {"en", _("English")}},
71 {iv::eLanguage::German, {"de", _("German")}},
72 {iv::eLanguage::French, {"fr", _("French")}},
73 {iv::eLanguage::Spanish, {"es", _("Spanish")}},
74 {iv::eLanguage::Portuguese, {"pt", _("Portuguese")}}};
75
76 static inline const std::map<iv::diamar::eUserProfileType, const std::pair<std::string, std::string>>
79 {"EngAdvMgmt", _("Engine Adv. Management")}},
80 {iv::diamar::eUserProfileType::DeckAdvancedManagement, {"DeckAdvMgmt", _("Deck Adv. Management")}},
81 {iv::diamar::eUserProfileType::EngineManagement, {"EngMgmt", _("Engine Management")}},
82 {iv::diamar::eUserProfileType::DeckManagement, {"DeckMgmt", _("Deck Management")}},
83 {iv::diamar::eUserProfileType::Monitor, {"Monitor", _("Monitor")}},
84 {iv::diamar::eUserProfileType::Root, {"Root", _("Root")}}};
85
86 static inline const std::map<iv::model::eShipArea, const std::pair<std::string, std::string>> stringsShipArea {
87 {iv::model::eShipArea::Ecr, {"Ecr", _("ECR")}},
88 {iv::model::eShipArea::Bridge, {"Bridge", _("Bridge")}},
89 {iv::model::eShipArea::Accommodation, {"Accommodation", _("Accommodation")}},
90 {iv::model::eShipArea::Cargo, {"Cargo", _("Cargo")}}};
91};
92
93#endif /* LIBS_BASIC_CENUMCOMMON_HPP_ */
Definition CEnumCommon.hpp:16
static std::string strAnalogSensorType(iv::channels::eAnalogSensorType analogSensorType, bool shortName=false)
Definition CEnumCommon.cpp:53
static std::string strUserProfileValue(iv::diamar::eUserProfileType eUserProfileType)
Definition CEnumCommon.cpp:120
static std::string strLanguageSuffix(iv::eLanguage eLanguage)
Definition CEnumCommon.cpp:98
ECompare
Definition CEnumCommon.hpp:19
static std::string strChannelArea(iv::channels::eChannelArea channelArea)
Definition CEnumCommon.cpp:211
static std::string strUserProfileImage(iv::diamar::eUserProfileType eUserProfileType)
Definition CEnumCommon.cpp:129
static std::string strCommTypeConfig(iv::comms::eInterfaceType eCommTypeConfig)
Definition CEnumCommon.cpp:73
static const std::map< iv::model::eShipArea, const std::pair< std::string, std::string > > stringsShipArea
Definition CEnumCommon.hpp:86
eType
Definition CEnumCommon.hpp:27
static const std::map< iv::eLanguage, const std::pair< std::string, std::string > > stringsLanguage
Definition CEnumCommon.hpp:69
static std::string strTankContentsType(iv::tanks::eTankContentsType eTankContentsType)
Definition CEnumCommon.cpp:158
static std::string strLanguageValue(iv::eLanguage eLanguage)
Definition CEnumCommon.cpp:89
static iv::eMeasurementUnit tankSoundingUnitsToEngineeringUnits(iv::tanks::eTanksSoundingUnits tanksSoundingUnits)
Definition CEnumCommon.cpp:38
static const std::map< iv::channels::eAnalogSensorType, const std::pair< std::string, std::string > > stringsAnalogSensorType
Definition CEnumCommon.hpp:49
static const std::map< iv::diamar::eUserProfileType, const std::pair< std::string, std::string > > stringsUserProfileType
Definition CEnumCommon.hpp:77
static std::string strTankSoundingUnits(iv::tanks::eTanksSoundingUnits eTanksSoundingUnits)
Definition CEnumCommon.cpp:195
static std::string strShipArea(iv::model::eShipArea eShipArea)
Definition CEnumCommon.cpp:111
static iv::tanks::eTanksSoundingUnits engineeringUnitsToTankSoundingUnits(iv::eMeasurementUnit engineeringUnits)
Definition CEnumCommon.cpp:22
static iv::comms::eHeartbeatState heartbeatCodeToState(uint8_t heartbeatCode)
Definition CEnumCommon.cpp:144
#define _(string)
Definition defines.hpp:169
eAnalogSensorType
Definition enums.hpp:17
eChannelArea
Definition enums.hpp:55
eInterfaceType
Definition enums.hpp:240
eHeartbeatState
Definition enums.hpp:297
eUserProfileType
Definition enums.hpp:34
eShipArea
Definition enums.hpp:11
eTanksSoundingUnits
Definition enums.hpp:15
eTankContentsType
Definition enums.hpp:26
eLanguage
Definition enums.hpp:37
eMeasurementUnit
Definition enums.hpp:103