Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
AbstractRedundancyMessage.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_COMMS_REDUNDANCY_REDUNDANCYMESSAGE_HPP
2#define IV_SRC_COMMS_REDUNDANCY_REDUNDANCYMESSAGE_HPP
3
7#include "core/defines.hpp"
10#include <vector>
11
13{
14
16{
20
22
23 ~AbstractRedundancyMessage() override = default;
24
25 [[nodiscard]] std::vector<std::byte> serialize() const final;
26 [[nodiscard]] bool deserialize(const std::vector<std::byte> &_bytes) final;
27
28protected:
29 virtual void serializeSpecific(std::shared_ptr<iv::streams::OutputStreamMemory> &stream) const = 0;
30 virtual void deserializeSpecific(std::shared_ptr<iv::streams::InputStreamMemory> &stream) = 0;
31};
32
33}// namespace iv::comms::redundancy
34
35#endif//IV_SRC_COMMS_REDUNDANCY_REDUNDANCYMESSAGE_HPP
Definition IMessageComm.hpp:11
Definition enums.hpp:7
eRedundancyMessageType
Definition enums.hpp:10
eMessageDirection
Definition enums.hpp:306
std::string stationId
Definition types.hpp:75
Definition AlarmsManager.cpp:18
Definition AbstractRedundancyMessage.hpp:16
virtual void deserializeSpecific(std::shared_ptr< iv::streams::InputStreamMemory > &stream)=0
virtual void serializeSpecific(std::shared_ptr< iv::streams::OutputStreamMemory > &stream) const =0
iv::types::stationId station
Definition AbstractRedundancyMessage.hpp:18
AbstractRedundancyMessage(const iv::comms::redundancy::eRedundancyMessageType _type)
Definition AbstractRedundancyMessage.hpp:21
std::vector< std::byte > serialize() const final
Definition AbstractRedundancyMessage.cpp:10
iv::comms::eMessageDirection direction
Definition AbstractRedundancyMessage.hpp:19
iv::comms::redundancy::eRedundancyMessageType type
Definition AbstractRedundancyMessage.hpp:17
bool deserialize(const std::vector< std::byte > &_bytes) final
Definition AbstractRedundancyMessage.cpp:30