17 static const uint32_t cInfiniteTtl = 0xffffff;
19 uint32_t mMinorVersion;
26 uint32_t minorVersion)
noexcept;
45 virtual std::vector<uint8_t>
Payload(uint8_t &optionIndex) const override;
56 uint32_t ttl = cInfiniteTtl,
72 uint32_t minorVersion,
73 uint32_t ttl = cInfiniteTtl);
85 uint32_t minorVersion) noexcept;
98 const std::vector<uint8_t> &payload,
104 uint8_t majorVersion);
Communication message abstract entry.
Definition: entry.h:28
static const uint16_t cAnyInstanceId
Any service instance ID.
Definition: entry.h:68
static const uint8_t cAnyMajorVersion
Any service major version.
Definition: entry.h:70
Entry to find and offer a service.
Definition: service_entry.h:15
virtual std::vector< uint8_t > Payload(uint8_t &optionIndex) const override
Get entity payload.
Definition: service_entry.cpp:50
uint32_t MinorVersion() const noexcept
Get minor version.
Definition: service_entry.cpp:45
static std::unique_ptr< ServiceEntry > CreateFindServiceEntry(uint16_t serviceId, uint32_t ttl=cInfiniteTtl, uint16_t instanceId=cAnyInstanceId, uint8_t majorVersion=cAnyMajorVersion, uint32_t minorVersion=cAnyMinorVersion)
Find a service entry factory.
Definition: service_entry.cpp:58
static const uint32_t cAnyMinorVersion
Any service minor version.
Definition: service_entry.h:34
static std::unique_ptr< ServiceEntry > 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: service_entry.cpp:131
virtual bool ValidateOption(const option::Option *option) const noexcept override
Validate an option for adding.
Definition: service_entry.cpp:32
static std::unique_ptr< ServiceEntry > CreateOfferServiceEntry(uint16_t serviceId, uint16_t instanceId, uint8_t majorVersion, uint32_t minorVersion, uint32_t ttl=cInfiniteTtl)
Offer a service entry factory.
Definition: service_entry.cpp:84
static std::unique_ptr< ServiceEntry > CreateStopOfferEntry(uint16_t serviceId, uint16_t instanceId, uint8_t majorVersion, uint32_t minorVersion) noexcept
Stop offer a service entry factory.
Definition: service_entry.cpp:110
Communication message entry abstract option.
Definition: option.h:37
EntryType
Message entry type.
Definition: entry.h:19