1#ifndef IV_SRC_CHANNELS_STRUCTS_HPP_
2#define IV_SRC_CHANNELS_STRUCTS_HPP_
11#include "model/structs.hpp"
12#include "third_party/magic_enum/magic_enum.hpp"
23 std::optional<std::string>
unit;
105 static constexpr std::string_view
system {
"System"};
106 static constexpr std::string_view
equipment {
"Equipment"};
117 static constexpr std::string
string {};
164 group = std::move(other.group);
180 auto aux_alarmPriority = magic_enum::enum_cast<iv::alarms::eAlarmPriority>(
182 if (aux_alarmPriority.has_value())
195 magic_enum::enum_cast<iv::channels::eInhibitionCondition>(
219 if (not txtIHTag.empty())
253 static constexpr std::string_view
offScan {
"OffScan"};
254 static constexpr std::string_view
group {
"Group"};
267 static constexpr std::string
string {};
315 dataType = magic_enum::enum_cast<iv::eDataType>(
322 for (
const auto &filter: filterParametersNode.getChildren())
363 static constexpr std::string_view
pgn {
"Pgn"};
365 static constexpr std::string_view
dataType {
"DataType"};
380 static constexpr std::optional<iv::types::comms::j1939SourceAddress>
sourceAddress {std::nullopt};
384 static constexpr std::string
string {};
419 subProtocol = magic_enum::enum_cast<iv::comms::canJ1939::eJ1939SubProtocol>(
423 dataType = magic_enum::enum_cast<iv::eDataType>(
427 for (
const auto &filter: filterSPNsNode.getChildren())
470 static constexpr std::string_view
pgn {
"Pgn"};
472 static constexpr std::string_view
spn {
"Spn"};
473 static constexpr std::string_view
fmi {
"Fmi"};
474 static constexpr std::string_view
startBit {
"StartBit"};
475 static constexpr std::string_view
length {
"Length"};
477 static constexpr std::string_view
direction {
"Direction"};
479 static constexpr std::string_view
dataType {
"DataType"};
486 static constexpr std::string_view
filterSPN {
"FilterSPN"};
492 static constexpr std::string
string {};
493 static constexpr std::optional<iv::types::comms::j1939SourceAddress>
sourceAddress {std::nullopt};
526 type = magic_enum::enum_cast<iv::comms::modbus::eRegisterType>(
540 dataType = magic_enum::enum_cast<iv::eDataType>(
543 endianType = magic_enum::enum_cast<iv::eEndianType>(
567 static constexpr std::string_view
type {
"Type"};
569 static constexpr std::string_view
address {
"Address"};
570 static constexpr std::string_view
dataType {
"DataType"};
574 static constexpr std::string_view
slaveId {
"SlaveId"};
579 static constexpr std::string
string {};
600 fieldType = magic_enum::enum_cast<iv::comms::nmea0183::eFieldType>(
615 static constexpr std::string_view
header {
"Header"};
617 static constexpr std::string_view
fieldType {
"FieldType"};
621 static constexpr std::string
string {};
645 static constexpr std::string_view
vdrId {
"VdrId"};
Definition xmlFile.hpp:15
T getAttribute(const std::string_view key, T defaultValue) const
Definition xmlFile.hpp:33
iv::file::xml::node getChild(std::string_view name) const
Definition xmlFile.cpp:43
bool addAttribute(const std::string_view key, T value)
Definition xmlFile.hpp:77
iv::file::xml::node appendChild(std::string_view name)
Definition xmlFile.cpp:53
eAlarmPriority
Definition enums.hpp:13
Definition AlarmsManager.hpp:17
eInhibitionCondition
Definition enums.hpp:11
eJ1939SubProtocol
Definition enums.hpp:41
constexpr iv::types::comms::modbus::modbusAddress maxNonExtendedAddress
Definition defines.hpp:9
eRegisterType
Definition enums.hpp:315
eFieldType
Definition enums.hpp:328
eMessageDirection
Definition enums.hpp:306
static constexpr iv::types::channelValue channelValueInvalid
Definition constants.hpp:14
uint16_t modbusAddress
Definition defines.hpp:37
uint16_t fieldPosition
Definition defines.hpp:48
std::string nmeaHeader
Definition defines.hpp:47
uint16_t id
Definition defines.hpp:54
uint32_t pgn
Definition defines.hpp:25
uint32_t nmea2kParameterId
Definition defines.hpp:32
uint32_t spn
Definition defines.hpp:26
uint8_t fmi
Definition defines.hpp:23
uint8_t slaveId
Definition types.hpp:49
uint64_t timestamp
Definition types.hpp:21
uint16_t delay
Definition types.hpp:69
double channelValue
Definition types.hpp:67
std::string channelId
Definition types.hpp:66
std::string groupId
Definition types.hpp:70
Definition AlarmsManager.cpp:18
eLanguage
Definition enums.hpp:37
eEndianType
Definition enums.hpp:220
eDataType
Definition enums.hpp:207
Definition structs.hpp:27
iv::types::channelValue limitValue
Definition structs.hpp:29
bool hasLimit
Definition structs.hpp:28
Definition structs.hpp:33
bool hasInstrumentFailureHigh
Definition structs.hpp:34
iv::channels::AnalogAlarmLimit lowAlarmLimit
Definition structs.hpp:39
iv::channels::AnalogAlarmLimit highHighAlarmLimit
Definition structs.hpp:41
iv::channels::AnalogAlarmLimit lowLowAlarmLimit
Definition structs.hpp:38
iv::types::channelValue lowEngineeringLimit
Definition structs.hpp:36
iv::types::channelValue highEngineeringLimit
Definition structs.hpp:37
iv::channels::AnalogAlarmLimit highAlarmLimit
Definition structs.hpp:40
bool hasInstrumentFailureLow
Definition structs.hpp:35
Definition structs.hpp:266
static constexpr iv::types::delay activationDelay
Definition structs.hpp:272
static constexpr std::string string
Definition structs.hpp:267
static constexpr bool offScan
Definition structs.hpp:269
static constexpr iv::types::delay deactivationDelay
Definition structs.hpp:273
static constexpr bool alarmEnabled
Definition structs.hpp:268
static constexpr iv::types::groupId group
Definition structs.hpp:270
static constexpr iv::channels::eInhibitionCondition inhibitionCondition
Definition structs.hpp:275
static constexpr std::string alarmPriority
Definition structs.hpp:271
static constexpr iv::types::channelId inhibitionChannel
Definition structs.hpp:274
Definition structs.hpp:251
static constexpr std::string_view group
Definition structs.hpp:254
static constexpr std::string_view alarmEnabled
Definition structs.hpp:252
static constexpr std::string_view offScan
Definition structs.hpp:253
static constexpr std::string_view activationDelay
Definition structs.hpp:256
static constexpr std::string_view inhibitionCondition
Definition structs.hpp:259
static constexpr std::string_view inhibitionChannel
Definition structs.hpp:258
static constexpr std::string_view alarmPriority
Definition structs.hpp:255
static constexpr std::string_view deactivationDelay
Definition structs.hpp:257
Definition structs.hpp:262
static constexpr std::string_view alarmParameters
Definition structs.hpp:263
Definition structs.hpp:123
iv::types::groupId group
Definition structs.hpp:241
std::string strInhibitionChannel() const
Definition structs.hpp:215
ChannelAlarmParameters(const ChannelAlarmParameters &other)=default
ChannelAlarmParameters(ChannelAlarmParameters &&other) noexcept
Definition structs.hpp:135
iv::types::delay deactivationDelay
Definition structs.hpp:244
ChannelAlarmParameters()
Definition structs.hpp:124
~ChannelAlarmParameters()=default
iv::alarms::eAlarmPriority alarmPriority
Definition structs.hpp:242
iv::types::delay activationDelay
Definition structs.hpp:243
iv::channels::eInhibitionCondition inhibitionCondition
Definition structs.hpp:247
iv::types::channelId inhibitionChannelTag
Definition structs.hpp:246
ChannelAlarmParameters & operator=(ChannelAlarmParameters &&other) noexcept
Definition structs.hpp:158
bool load(const iv::file::xml::node &nodeChannel)
Definition structs.hpp:174
bool offScan
Definition structs.hpp:240
bool alarmEnabled
Definition structs.hpp:239
ChannelAlarmParameters & operator=(const ChannelAlarmParameters &other)
Definition structs.hpp:145
bool save(iv::file::xml::node &nodeChannel) const
Definition structs.hpp:201
Definition structs.hpp:116
static constexpr std::string string
Definition structs.hpp:117
static constexpr iv::eLanguage language
Definition structs.hpp:118
Definition structs.hpp:104
static constexpr std::string_view equipment
Definition structs.hpp:106
static constexpr std::string_view functionCode
Definition structs.hpp:107
static constexpr std::string_view system
Definition structs.hpp:105
Definition structs.hpp:110
static constexpr std::string_view description
Definition structs.hpp:113
static constexpr std::string_view descriptions
Definition structs.hpp:112
static constexpr std::string_view channelMisc
Definition structs.hpp:111
Definition structs.hpp:45
bool save(iv::file::xml::node &nodeChannel) const
Definition structs.hpp:84
ChannelInfo & operator=(const iv::channels::ChannelInfo &&other)=delete
std::string functionCode
Definition structs.hpp:99
bool load(const iv::file::xml::node &nodeChannel)
Definition structs.hpp:71
ChannelInfo & operator=(const iv::channels::ChannelInfo &other)
Definition structs.hpp:54
ChannelInfo()
Definition structs.hpp:46
iv::model::LocalizedText descriptions
Definition structs.hpp:100
ChannelInfo(const iv::channels::ChannelInfo &other)=default
std::string equipment
Definition structs.hpp:98
std::string system
Definition structs.hpp:97
ChannelInfo(const iv::channels::ChannelInfo &&other)=delete
Definition structs.hpp:281
iv::eDataType dataType
Definition structs.hpp:283
iv::types::channelValue value
Definition structs.hpp:284
iv::types::comms::spn spn
Definition structs.hpp:282
Definition structs.hpp:491
static constexpr int16_t nullSourceAddress
Definition structs.hpp:494
static constexpr iv::comms::canJ1939::eJ1939SubProtocol subProtocol
Definition structs.hpp:502
static constexpr iv::types::comms::fmi fmi
Definition structs.hpp:497
static constexpr std::optional< iv::types::comms::j1939SourceAddress > sourceAddress
Definition structs.hpp:493
static constexpr uint8_t length
Definition structs.hpp:499
static constexpr std::string string
Definition structs.hpp:492
static constexpr iv::eEndianType endianType
Definition structs.hpp:500
static constexpr iv::comms::eMessageDirection direction
Definition structs.hpp:501
static constexpr uint8_t startBit
Definition structs.hpp:498
static constexpr iv::types::comms::spn spn
Definition structs.hpp:496
static constexpr iv::eDataType dataType
Definition structs.hpp:504
static constexpr iv::types::comms::pgn pgn
Definition structs.hpp:495
Definition structs.hpp:469
static constexpr std::string_view endianType
Definition structs.hpp:476
static constexpr std::string_view direction
Definition structs.hpp:477
static constexpr std::string_view startBit
Definition structs.hpp:474
static constexpr std::string_view subProtocol
Definition structs.hpp:478
static constexpr std::string_view filterValue
Definition structs.hpp:480
static constexpr std::string_view fmi
Definition structs.hpp:473
static constexpr std::string_view pgn
Definition structs.hpp:470
static constexpr std::string_view length
Definition structs.hpp:475
static constexpr std::string_view dataType
Definition structs.hpp:479
static constexpr std::string_view spn
Definition structs.hpp:472
static constexpr std::string_view sourceAddress
Definition structs.hpp:471
Definition structs.hpp:484
static constexpr std::string_view filterSPNs
Definition structs.hpp:485
static constexpr std::string_view filterSPN
Definition structs.hpp:486
Definition structs.hpp:389
iv::types::comms::pgn pgn
Definition structs.hpp:392
iv::comms::canJ1939::eJ1939SubProtocol subProtocol
Definition structs.hpp:390
void load(const iv::file::xml::node &nodeRegisterInfo)
Definition structs.hpp:403
iv::types::comms::spn spn
Definition structs.hpp:397
iv::types::comms::fmi fmi
Definition structs.hpp:401
std::optional< iv::types::comms::j1939SourceAddress > sourceAddress
Definition structs.hpp:393
void save(iv::file::xml::node &nodeRegisterInfo) const
Definition structs.hpp:439
iv::eDataType dataType
Definition structs.hpp:395
std::vector< J1939Filter > filterSPNs
Definition structs.hpp:398
Definition structs.hpp:578
static constexpr uint8_t registerBitsLength
Definition structs.hpp:585
static constexpr std::string string
Definition structs.hpp:579
static constexpr bool isExtended
Definition structs.hpp:581
static constexpr iv::types::comms::modbus::modbusAddress address
Definition structs.hpp:582
static constexpr iv::comms::modbus::eRegisterType type
Definition structs.hpp:580
static constexpr iv::eEndianType endianType
Definition structs.hpp:584
static constexpr uint8_t bitPosition
Definition structs.hpp:586
static constexpr iv::eDataType dataType
Definition structs.hpp:583
Definition structs.hpp:565
static constexpr std::string_view registerBitsLength
Definition structs.hpp:572
static constexpr std::string_view slaveId
Definition structs.hpp:574
static constexpr std::string_view registerDirection
Definition structs.hpp:566
static constexpr std::string_view type
Definition structs.hpp:567
static constexpr std::string_view endianType
Definition structs.hpp:571
static constexpr std::string_view dataType
Definition structs.hpp:570
static constexpr std::string_view address
Definition structs.hpp:569
static constexpr std::string_view isExtended
Definition structs.hpp:568
static constexpr std::string_view bitPosition
Definition structs.hpp:573
Definition structs.hpp:509
void load(const iv::file::xml::node &nodeRegisterInfo)
Definition structs.hpp:524
iv::comms::modbus::eRegisterType type
Definition structs.hpp:510
void save(iv::file::xml::node &nodeRegisterInfo) const
Definition structs.hpp:551
iv::types::modbus::slaveId slaveId
Definition structs.hpp:522
uint8_t registerBitsLength
Definition structs.hpp:519
iv::types::comms::modbus::modbusAddress address
Definition structs.hpp:512
bool isExtended
Definition structs.hpp:511
iv::eDataType dataType
Definition structs.hpp:514
uint8_t bitPosition
Definition structs.hpp:520
iv::eEndianType endianType
Definition structs.hpp:515
Definition structs.hpp:620
static constexpr iv::types::comms::nmea0183::fieldPosition fieldPosition
Definition structs.hpp:623
static constexpr iv::comms::nmea0183::eFieldType fieldType
Definition structs.hpp:624
static constexpr iv::types::comms::nmea0183::nmeaHeader header
Definition structs.hpp:622
static constexpr std::string string
Definition structs.hpp:621
Definition structs.hpp:614
static constexpr std::string_view fieldPosition
Definition structs.hpp:616
static constexpr std::string_view fieldType
Definition structs.hpp:617
static constexpr std::string_view header
Definition structs.hpp:615
Definition structs.hpp:591
void load(const iv::file::xml::node &nodeRegisterInfo)
Definition structs.hpp:596
iv::comms::nmea0183::eFieldType fieldType
Definition structs.hpp:594
void save(iv::file::xml::node &nodeRegisterInfo) const
Definition structs.hpp:605
iv::types::comms::nmea0183::nmeaHeader header
Definition structs.hpp:592
iv::types::comms::nmea0183::fieldPosition fieldPosition
Definition structs.hpp:593
Definition structs.hpp:378
static constexpr iv::eDataType dataType
Definition structs.hpp:382
static constexpr iv::types::comms::nmea2kParameterId parameterId
Definition structs.hpp:383
static constexpr std::optional< iv::types::comms::j1939SourceAddress > sourceAddress
Definition structs.hpp:380
static constexpr int16_t nullSourceAddress
Definition structs.hpp:381
static constexpr iv::types::comms::pgn pgn
Definition structs.hpp:379
static constexpr std::string string
Definition structs.hpp:384
Definition structs.hpp:362
static constexpr std::string_view parameterId
Definition structs.hpp:366
static constexpr std::string_view filterValue
Definition structs.hpp:367
static constexpr std::string_view sourceAddress
Definition structs.hpp:364
static constexpr std::string_view pgn
Definition structs.hpp:363
static constexpr std::string_view dataType
Definition structs.hpp:365
Definition structs.hpp:371
static constexpr std::string_view filterParameters
Definition structs.hpp:372
static constexpr std::string_view filterParameter
Definition structs.hpp:373
Definition structs.hpp:288
iv::eDataType dataType
Definition structs.hpp:292
iv::types::comms::pgn pgn
Definition structs.hpp:289
iv::types::comms::nmea2kParameterId parameterId
indicates which of the parameters in the packet are binded to the channel, begins at one
Definition structs.hpp:297
void save(iv::file::xml::node &nodeRegisterInfo) const
Definition structs.hpp:334
std::optional< iv::types::comms::j1939SourceAddress > sourceAddress
Definition structs.hpp:290
std::vector< J1939Filter > filterParameters
Definition structs.hpp:299
void load(const iv::file::xml::node &nodeRegisterInfo)
Definition structs.hpp:301
Definition structs.hpp:665
iv::types::channelValue rawData
Definition structs.hpp:668
bool hasValidValue
Definition structs.hpp:666
iv::types::channelValue value
Definition structs.hpp:667
iv::types::timestamp timestamp
Definition structs.hpp:669
Definition structs.hpp:649
static constexpr iv::types::comms::vdr::id vdrId
Definition structs.hpp:650
Definition structs.hpp:644
static constexpr std::string_view vdrId
Definition structs.hpp:645
Definition structs.hpp:629
void load(const iv::file::xml::node &nodeRegisterInfo)
Definition structs.hpp:632
void save(iv::file::xml::node &nodeRegisterInfo) const
Definition structs.hpp:637
iv::types::comms::vdr::id vdrId
Definition structs.hpp:630
Definition structs.hpp:655
std::string terminalXT
Definition structs.hpp:656
std::string terminalBoard
Definition structs.hpp:659
std::string cable
Definition structs.hpp:657
std::string wire
Definition structs.hpp:658
std::string shipyardTerminal
Definition structs.hpp:660
std::string shipyardElement
Definition structs.hpp:661
Definition structs.hpp:29
bool save(iv::file::xml::node &nodeLocalizedText, std::string_view localizedTextNodeName) const
Definition structs.cpp:88
bool load(const iv::file::xml::node &nodeLocalizedTexts)
Definition structs.cpp:63