Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
VdrMessage.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_COMMS_NMEA_VDRMESSAGE_HPP_
2#define IV_SRC_COMMS_NMEA_VDRMESSAGE_HPP_
3
5#include "core/defines.hpp"
6
7namespace iv::comms::vdr
8{
13{
14public:
16 std::string_view alarmDescription);
17 [[nodiscard]] std::vector<std::byte> serialize() const override;
18 [[nodiscard]] bool deserialize(const std::vector<std::byte> &input) override;
19
20private:
22 uint16_t alarmId;
31 std::string_view alarmDescription;
32};
33}// namespace iv::comms::vdr
34#endif//IV_SRC_COMMS_NMEA_VDRMESSAGE_HPP_
Definition IMessageComm.hpp:11
This class contains the information of a VDR Message.
Definition VdrMessage.hpp:13
std::string_view alarmDescription
Definition VdrMessage.hpp:31
std::vector< std::byte > serialize() const override
Serialize the VDR message to be sent through the serial line driver.
Definition VdrMessage.cpp:15
VdrMessage(iv::types::timestamp hourOfAlarm, uint16_t alarmId, bool alarmCondition, bool ackState, std::string_view alarmDescription)
Definition VdrMessage.cpp:5
bool deserialize(const std::vector< std::byte > &input) override
Definition VdrMessage.cpp:51
bool alarmCondition
true for Active, Ack and false for Inactive, Unacknowledged, Undefined
Definition VdrMessage.hpp:26
iv::types::timestamp hourOfAlarm
Definition VdrMessage.hpp:21
uint16_t alarmId
Definition VdrMessage.hpp:22
bool ackState
true for Acknowledged, false for everything else
Definition VdrMessage.hpp:30
Definition structs.hpp:34
uint64_t timestamp
Definition types.hpp:21