This class contains the information of a VDR Message.
More...
#include <VdrMessage.hpp>
|
template<typename T >
requires std::is_base_of_v<ISerializable, T> |
static std::vector< std::byte > | serialize (const T &object) |
|
This class contains the information of a VDR Message.
◆ VdrMessage()
iv::comms::vdr::VdrMessage::VdrMessage |
( |
iv::types::timestamp | hourOfAlarm, |
|
|
uint16_t | alarmId, |
|
|
bool | alarmCondition, |
|
|
bool | ackState, |
|
|
std::string_view | alarmDescription ) |
◆ deserialize()
bool iv::comms::vdr::VdrMessage::deserialize |
( |
const std::vector< std::byte > & | input | ) |
|
|
nodiscardoverridevirtual |
- Note
- not implemented, it's not necessary to read vdr messages
- Parameters
-
- Returns
Implements iv::comms::IMessageComm.
◆ serialize() [1/2]
std::vector< std::byte > iv::comms::vdr::VdrMessage::serialize |
( |
| ) |
const |
|
nodiscardoverridevirtual |
Serialize the VDR message to be sent through the serial line driver.
- Returns
- std::vector<std::byte> with the following format $ERALR,HHMMSS.SSS,alarmId,alarmCondition,ackState,alarmDescription*CC
Implements iv::comms::IMessageComm.
◆ serialize() [2/2]
template<typename T >
requires std::is_base_of_v<ISerializable, T>
static std::vector< std::byte > iv::core::ISerializable::serialize |
( |
const T & | object | ) |
|
|
inlinestaticinherited |
◆ ackState
bool iv::comms::vdr::VdrMessage::ackState |
|
private |
true for Acknowledged, false for everything else
◆ alarmCondition
bool iv::comms::vdr::VdrMessage::alarmCondition |
|
private |
true for Active, Ack and false for Inactive, Unacknowledged, Undefined
◆ alarmDescription
std::string_view iv::comms::vdr::VdrMessage::alarmDescription |
|
private |
◆ alarmId
uint16_t iv::comms::vdr::VdrMessage::alarmId |
|
private |
◆ bytes
std::vector<std::byte> iv::comms::IMessageComm::bytes |
|
inherited |
◆ hourOfAlarm
The documentation for this class was generated from the following files: