1#ifndef IV_SRC_MODEL_STRUCTS_HPP_
2#define IV_SRC_MODEL_STRUCTS_HPP_
6#include "model/enums.hpp"
51 static constexpr std::string_view
language {
"Language"};
52 static constexpr std::string_view
text {
"Text"};
57 static constexpr std::string
string {};
64 PasswordRequirements(uint64_t minLength,
bool requiresUpperCase,
bool requiresLowerCase,
bool requiresNumbers);
83 static constexpr std::string_view
minLength {
"MinLength"};
192 static constexpr std::string_view
enabled {
"Enabled"};
194 static constexpr std::string_view
networkId {
"NetworkId"};
195 static constexpr std::string_view
username {
"Username"};
196 static constexpr std::string_view
password {
"Password"};
228 std::optional<iv::types::timestamp>
getTimestamp()
const;
234 static constexpr std::string_view
channelId {
"ChannelId"};
238 static constexpr std::string
string {};
255 std::optional<iv::types::timestamp>
getTimestamp()
const;
266 static constexpr std::string
string {};
283 std::optional<iv::types::timestamp>
getTimestamp()
const;
300 static constexpr std::string
string {};
314 std::optional<iv::types::timestamp>
getTimestamp()
const;
349 static constexpr std::string
string {};
383 static constexpr std::string_view
deadManOn {
"DeadManOn"};
394 static constexpr std::string
string {};
Definition xmlFile.hpp:15
Definition Timestamp.hpp:17
Definition DiamarModel.cpp:14
eTimeSyncFormat
Definition enums.hpp:23
uint64_t timestamp
Definition types.hpp:21
uint16_t ipPort
Definition types.hpp:41
uint64_t milliseconds
Definition types.hpp:22
std::string networkId
Definition types.hpp:43
std::string channelId
Definition types.hpp:66
eLanguage
Definition enums.hpp:37
Definition structs.hpp:203
static constexpr bool enabled
Definition structs.hpp:204
static constexpr std::string databaseName
Definition structs.hpp:211
static constexpr iv::types::ipPort databasePort
Definition structs.hpp:210
static constexpr std::string username
Definition structs.hpp:207
static constexpr std::string databaseHost
Definition structs.hpp:209
static constexpr std::string password
Definition structs.hpp:208
static constexpr iv::types::networkId networkId
Definition structs.hpp:206
static constexpr bool isSedniServer
Definition structs.hpp:205
Definition structs.hpp:191
static constexpr std::string_view networkId
Definition structs.hpp:194
static constexpr std::string_view password
Definition structs.hpp:196
static constexpr std::string_view isSedniServer
Definition structs.hpp:193
static constexpr std::string_view databaseName
Definition structs.hpp:199
static constexpr std::string_view databasePort
Definition structs.hpp:198
static constexpr std::string_view enabled
Definition structs.hpp:192
static constexpr std::string_view databaseHost
Definition structs.hpp:197
static constexpr std::string_view username
Definition structs.hpp:195
Definition structs.hpp:168
std::string username
Definition structs.hpp:183
bool save(iv::file::xml::node &nodeCloudSettings) const
Definition structs.cpp:395
std::string databaseName
Definition structs.hpp:187
bool isSedniServer
Definition structs.hpp:181
CloudSettings(const CloudSettings &other)
CloudSettings()
Definition structs.cpp:333
bool enabled
Definition structs.hpp:180
iv::types::ipPort databasePort
Definition structs.hpp:186
iv::types::networkId networkId
Definition structs.hpp:182
CloudSettings & operator=(const CloudSettings &other)
Definition structs.cpp:351
std::string databaseHost
Definition structs.hpp:185
bool load(const iv::file::xml::node &nodeCloudSettings)
Definition structs.cpp:381
std::string password
Definition structs.hpp:184
Definition structs.hpp:393
Definition structs.hpp:382
static constexpr std::string_view deadManCommandOff
Definition structs.hpp:387
static constexpr std::string_view deadManCommandReset
Definition structs.hpp:388
static constexpr std::string_view deadManOn
Definition structs.hpp:383
static constexpr std::string_view deadManAlarm
Definition structs.hpp:385
static constexpr std::string_view deadManWarning
Definition structs.hpp:384
static constexpr std::string_view deadManTime
Definition structs.hpp:389
static constexpr std::string_view deadManCommandOn
Definition structs.hpp:386
Definition structs.hpp:358
DeadManSettings()=default
bool isDeadManEnabled
Definition structs.hpp:379
std::optional< iv::types::channelId > deadManCommandOn
Definition structs.hpp:373
std::optional< iv::types::channelId > deadManCommandOff
Definition structs.hpp:374
bool save(iv::file::xml::node &nodeDeadManSettings) const
Definition structs.cpp:824
~DeadManSettings()=default
std::optional< iv::types::channelId > deadManTime
Definition structs.hpp:376
DeadManSettings(DeadManSettings &&other) noexcept=default
std::optional< iv::types::channelId > deadManCommandReset
Definition structs.hpp:375
std::optional< iv::types::channelId > deadManOn
Definition structs.hpp:370
std::optional< iv::types::channelId > deadManWarning
Definition structs.hpp:371
bool load(const iv::file::xml::node &nodeDeadManSettings)
Definition structs.cpp:798
std::optional< iv::types::channelId > deadManAlarm
Definition structs.hpp:372
DeadManSettings & operator=(const DeadManSettings &other)=default
DeadManSettings(const DeadManSettings &other)=default
DeadManSettings & operator=(DeadManSettings &&other) noexcept=default
Definition structs.hpp:15
EntryRegister & operator=(const EntryRegister &other)
EntryRegister()
Definition structs.cpp:10
iv::time::Timestamp timestamp
Definition structs.hpp:25
std::string name
Definition structs.hpp:24
EntryRegister(const EntryRegister &other)
Definition structs.hpp:56
Definition structs.hpp:50
static constexpr std::string_view language
Definition structs.hpp:51
static constexpr std::string_view text
Definition structs.hpp:52
Definition structs.hpp:29
void clear()
Definition structs.cpp:123
bool save(iv::file::xml::node &nodeLocalizedText, std::string_view localizedTextNodeName) const
Definition structs.cpp:88
LocalizedText & operator=(const LocalizedText &other)
Definition structs.cpp:43
LocalizedText(const LocalizedText &other)
bool empty() const
Definition structs.cpp:118
bool load(const iv::file::xml::node &nodeLocalizedTexts)
Definition structs.cpp:63
std::string_view getText(iv::eLanguage language=iv::eLanguage::English) const
Definition structs.cpp:101
std::string & getRefString(iv::eLanguage language=iv::eLanguage::English)
Definition structs.cpp:108
std::map< iv::eLanguage, std::string > localizedText
Definition structs.hpp:46
Definition structs.hpp:160
static constexpr iv::types::milliseconds lockoutDuration
Definition structs.hpp:162
static constexpr bool automaticUnlock
Definition structs.hpp:163
static constexpr uint8_t maxFailedAttempts
Definition structs.hpp:161
Definition structs.hpp:153
static constexpr std::string_view lockoutDuration
Definition structs.hpp:155
static constexpr std::string_view maxFailedAttempts
Definition structs.hpp:154
static constexpr std::string_view automaticUnlock
Definition structs.hpp:156
Definition structs.hpp:134
LoginLockout & operator=(const LoginLockout &other)
Definition structs.cpp:291
iv::types::milliseconds _lockoutDuration
Definition structs.hpp:148
LoginLockout()
Definition structs.cpp:270
bool load(const iv::file::xml::node &nodeLoginLockout)
Definition structs.cpp:315
bool save(iv::file::xml::node &nodeLoginLockout) const
Definition structs.cpp:324
bool _automaticUnlock
Definition structs.hpp:149
uint8_t _maxFailedAttempts
Definition structs.hpp:147
LoginLockout(const LoginLockout &other)
Definition structs.hpp:126
static constexpr iv::types::milliseconds minTimeBetweenChanges
Definition structs.hpp:128
static constexpr iv::types::milliseconds notificationTimeBeforeExpiration
Definition structs.hpp:129
static constexpr iv::types::milliseconds expirationTime
Definition structs.hpp:127
Definition structs.hpp:119
static constexpr std::string_view minTimeBetweenChanges
Definition structs.hpp:121
static constexpr std::string_view expirationTime
Definition structs.hpp:120
static constexpr std::string_view notificationTimeBeforeExpiration
Definition structs.hpp:122
Definition structs.hpp:99
PasswordLifecycle & operator=(const PasswordLifecycle &other)
Definition structs.cpp:226
iv::types::milliseconds _expirationTime
Definition structs.hpp:113
PasswordLifecycle(const PasswordLifecycle &other)
bool save(iv::file::xml::node &nodePasswordLifecycle) const
Definition structs.cpp:261
bool load(const iv::file::xml::node &nodePasswordLifecycle)
Definition structs.cpp:250
iv::types::milliseconds _notificationTimeBeforeExpiration
Definition structs.hpp:115
iv::types::milliseconds _minTimeBetweenChanges
Definition structs.hpp:114
PasswordLifecycle()
Definition structs.cpp:202
Definition structs.hpp:90
static constexpr int32_t minLength
Definition structs.hpp:91
static constexpr bool requiresUpperCase
Definition structs.hpp:92
static constexpr bool requiresNumbers
Definition structs.hpp:94
static constexpr bool requiresLowerCase
Definition structs.hpp:93
Definition structs.hpp:82
static constexpr std::string_view requiresNumbers
Definition structs.hpp:86
static constexpr std::string_view minLength
Definition structs.hpp:83
static constexpr std::string_view requiresUpperCase
Definition structs.hpp:84
static constexpr std::string_view requiresLowerCase
Definition structs.hpp:85
Definition structs.hpp:62
uint64_t _minLength
Definition structs.hpp:75
bool _requiresLowerCase
Definition structs.hpp:77
bool _requiresUpperCase
Definition structs.hpp:76
bool _requiresNumbers
Definition structs.hpp:78
bool save(iv::file::xml::node &nodePasswordRequirements) const
Definition structs.cpp:188
PasswordRequirements()
Definition structs.cpp:128
PasswordRequirements(const PasswordRequirements &other)
bool load(const iv::file::xml::node &nodePasswordRequirements)
Definition structs.cpp:175
PasswordRequirements & operator=(const PasswordRequirements &other)
Definition structs.cpp:150
Definition structs.hpp:348
static constexpr iv::types::timestamp maxTimeDifference
Definition structs.hpp:352
static constexpr bool hasTimeZoneSync
Definition structs.hpp:351
static constexpr bool hasTimeSync
Definition structs.hpp:350
static constexpr auto timeSyncFormat
Definition structs.hpp:353
Definition structs.hpp:334
static constexpr std::string_view hasTimeZoneSync
Definition structs.hpp:336
static constexpr std::string_view timeSyncFormat
Definition structs.hpp:339
static constexpr std::string_view timeZoneChannelId
Definition structs.hpp:337
static constexpr std::string_view hasTimeSync
Definition structs.hpp:335
static constexpr std::string_view maxTimeDifference
Definition structs.hpp:338
Definition structs.hpp:342
static constexpr std::string_view zdaLikeFormat
Definition structs.hpp:345
static constexpr std::string_view rmcLikeFormat
Definition structs.hpp:344
static constexpr std::string_view posixTimeFormat
Definition structs.hpp:343
Definition structs.hpp:305
TimeSyncSettings & operator=(const TimeSyncSettings &other)=default
TimeSyncSettings()
Definition structs.cpp:409
ZDALikeFormat zdaLikeFormat
Definition structs.hpp:330
bool hasTimeSync
Definition structs.hpp:323
iv::model::eTimeSyncFormat timeSyncFormat
Definition structs.hpp:326
iv::types::channelId timeZoneChannelId
Definition structs.hpp:321
TimeSyncSettings & operator=(TimeSyncSettings &&other) noexcept=default
PosixTimeFormat posixTimeFormat
Definition structs.hpp:328
bool hasTimeZoneSync
Definition structs.hpp:320
iv::types::milliseconds maxTimeDifference
Definition structs.hpp:324
~TimeSyncSettings()=default
TimeSyncSettings(const TimeSyncSettings &other)=default
bool save(iv::file::xml::node &nodeTimeSyncSettings) const
Definition structs.cpp:444
std::optional< int32_t > getTimeZoneOffset() const
Definition structs.cpp:484
bool load(const iv::file::xml::node &nodeTimeSyncSettings)
Definition structs.cpp:417
std::optional< iv::types::timestamp > getTimestamp() const
Definition structs.cpp:470
RMCLikeFormat rmcLikeFormat
Definition structs.hpp:329
TimeSyncSettings(TimeSyncSettings &&other) noexcept=default