Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
enums.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_MODEL_ENUMS_HPP_
2#define IV_SRC_MODEL_ENUMS_HPP_
3
4#include <cstdint>
5#include <string>
6
7namespace iv::model
8{
9
10enum class eShipArea
11{
12 Accommodation = 0x4,
13 Bridge = 0x1,
14 Ecr = 0x0,
15 Cargo = 0x9,
16};
17
18// TODO: Mover estas funciones a sitios mas adecuados
19bool isIntoAreaStation(iv::model::eShipArea areaStation, uint64_t typeZone);
21
23{
24 posixTime,// One field, Basically a iv::types::timestamp
25 RMCLike, // Two fields hhmmss.sss, ddmmyy
26 ZDALike // Four fields hhmmss, day, month, year
27};
28
29namespace diamar
30{
31
39
40inline void getScreenLimitsFromResolution(eMimicAspectRatio aspectRatio, double *xMin, double *xMax, double *yMin,
41 double *yMax)
42{
43 switch (aspectRatio)
44 {
46 *xMin = 0;
47 *xMax = 1280;
48 *yMin = -1024;
49 *yMax = 0;
50 break;
52 *xMin = 0;
53 *xMax = 1024;
54 *yMin = -768;
55 *yMax = 0;
56 break;
58 *xMin = 0;
59 *xMax = 1920;
60 *yMin = -1080;
61 *yMax = 0;
62 break;
63
65 *xMax = 1920;
66 *xMin = 0;
67 *yMax = -1200;
68 *yMin = 0;
69 break;
70 }
71}
72
73inline std::string to_string(eMimicAspectRatio aspectRatio)
74{
75 switch (aspectRatio)
76 {
78 return "1280x1024 (5:4)";
80 return "1024x768 (4:3)";
82 return "1920x1080 (16:9)";
84 return "1920x1200 (16:10)";
85 }
86 return "Unknown";
87}
88
90{
94};
95
97{
98 On,
99 Off,
100 Warning,
101 Alarm
102};
103
104}// namespace diamar
105
106}// namespace iv::model
107
108#endif//IV_SRC_MODEL_ENUMS_HPP_
eDeadManStatus
Definition enums.hpp:97
eVerificationStatus
Definition enums.hpp:90
eMimicAspectRatio
Definition enums.hpp:33
void getScreenLimitsFromResolution(eMimicAspectRatio aspectRatio, double *xMin, double *xMax, double *yMin, double *yMax)
Definition enums.hpp:40
std::string to_string(eMimicAspectRatio aspectRatio)
Definition enums.hpp:73
Definition DiamarModel.cpp:14
bool isTypeZoneRepeaterIntoAreaStation(iv::model::eShipArea areaStation, iv::model::eShipArea typeZoneRepeaters)
Definition enums.cpp:26
eTimeSyncFormat
Definition enums.hpp:23
eShipArea
Definition enums.hpp:11
bool isIntoAreaStation(iv::model::eShipArea areaStation, uint64_t typeZone)
Definition enums.cpp:10