1#ifndef EVENTGROUP_ENTRY_H
2#define EVENTGROUP_ENTRY_H
16 static const uint32_t cNackTTL = 0x000000;
17 static const uint32_t cUnsubscribeEventTTL = 0x000000;
20 uint16_t mEventgroupId;
28 uint16_t eventgroupId);
30 bool isAcknowledge()
const noexcept;
44 uint8_t
Counter()
const noexcept;
50 virtual std::vector<uint8_t>
Payload(uint8_t &optionIndex)
const override;
65 uint16_t eventgroupId);
80 uint16_t eventgroupId);
104 static std::unique_ptr<EventgroupEntry>
Deserialize(
105 const std::vector<uint8_t> &payload,
111 uint8_t majorVersion);
Communication message abstract entry.
Definition: entry.h:28
Entry to subscribe/unsubscribe to/from an event-group.
Definition: eventgroup_entry.h:14
virtual bool ValidateOption(const option::Option *option) const noexcept override
Validate an option for adding.
Definition: eventgroup_entry.cpp:49
virtual std::vector< uint8_t > Payload(uint8_t &optionIndex) const override
Get entity payload.
Definition: eventgroup_entry.cpp:101
static std::unique_ptr< EventgroupEntry > CreateAcknowledgeEntry(const EventgroupEntry *eventgroupEntry)
Positive acknowledge of an event-group entry factory.
Definition: eventgroup_entry.cpp:157
uint8_t Counter() const noexcept
Get the subscriber counter.
Definition: eventgroup_entry.cpp:91
static std::unique_ptr< EventgroupEntry > Deserialize(const std::vector< uint8_t > &payload, std::size_t &offset, EntryType type, uint16_t serviceId, uint16_t instanceId, uint32_t ttl, uint8_t majorVersion)
Deserialize a entry payload.
Definition: eventgroup_entry.cpp:193
static std::unique_ptr< EventgroupEntry > CreateNegativeAcknowledgeEntry(const EventgroupEntry *eventgroupEntry)
Negative acknowledge of an event-group entry factory.
Definition: eventgroup_entry.cpp:175
uint16_t EventgroupId() const noexcept
Get event-group ID.
Definition: eventgroup_entry.cpp:96
static std::unique_ptr< EventgroupEntry > CreateUnsubscribeEventEntry(uint16_t serviceId, uint16_t instanceId, uint8_t majorVersion, uint8_t counter, uint16_t eventgroupId)
Unsubscribe from an event-group entry factory.
Definition: eventgroup_entry.cpp:135
static std::unique_ptr< EventgroupEntry > CreateSubscribeEventEntry(uint16_t serviceId, uint16_t instanceId, uint8_t majorVersion, uint8_t counter, uint16_t eventgroupId)
Subscribe to an event-group entry factory.
Definition: eventgroup_entry.cpp:112
Communication message entry abstract option.
Definition: option.h:37
EntryType
Message entry type.
Definition: entry.h:19