IPv4 endpoint option for both generic and service discovery purposes. More...
#include <ipv4_endpoint_option.h>
Public Member Functions | |
virtual uint16_t | Length () const noexcept override |
Get option length. More... | |
helper::Ipv4Address | IpAddress () const noexcept |
Get IP address. More... | |
Layer4ProtocolType | L4Proto () const noexcept |
Get protocol. More... | |
uint16_t | Port () const noexcept |
Get port. More... | |
virtual std::vector< uint8_t > | Payload () const override |
Get option payload. More... | |
Public Member Functions inherited from ara::com::option::Option | |
OptionType | Type () const noexcept |
Get option type. More... | |
bool | Discardable () const noexcept |
Get discardable flag. More... | |
Static Public Member Functions | |
static std::unique_ptr< Ipv4EndpointOption > | CreateUnitcastEndpoint (bool discardable, helper::Ipv4Address ipAddress, Layer4ProtocolType protocol, uint16_t port) noexcept |
Unitcast endpoint factory. More... | |
static std::unique_ptr< Ipv4EndpointOption > | CreateMulticastEndpoint (bool discardable, helper::Ipv4Address ipAddress, uint16_t port) |
Multicast endpoint factory. More... | |
static std::unique_ptr< Ipv4EndpointOption > | CreateSdEndpoint (bool discardable, helper::Ipv4Address ipAddress, Layer4ProtocolType protocol=cDefaultSdProtocol, uint16_t port=cDefaultSdPort) noexcept |
Service discovery factroy. More... | |
static std::unique_ptr< Ipv4EndpointOption > | Deserialize (const std::vector< uint8_t > &payload, std::size_t &offset, OptionType type, bool discardable) |
Deserialize an option payload. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ara::com::option::Option | |
constexpr | Option (OptionType type, bool discardable) noexcept |
Constructor. More... | |
std::vector< uint8_t > | BasePayload () const |
Get base option payload. More... | |
IPv4 endpoint option for both generic and service discovery purposes.
|
static |
Multicast endpoint factory.
discardable | Indicates whether the option can be discarded or not |
ipAddress | IP address |
port | Port number |
|
staticnoexcept |
Service discovery factroy.
discardable | Indicates whether the option can be discarded or not |
ipAddress | IP address |
protocol | Layer-4 protocol |
port | Port number |
|
staticnoexcept |
Unitcast endpoint factory.
discardable | Indicates whether the option can be discarded or not |
ipAddress | IP address |
protocol | Layer-4 protocol |
port | Port number |
|
static |
Deserialize an option payload.
payload | Serialized option payload byte array |
offset | Deserializing offset in the payload |
type | IPv4 endpoint option type |
discardable | Indicates whether the option can be discarded or not |
std::out_of_range | Throws when the option type is not an IPv4 endpoint |
|
noexcept |
Get IP address.
|
noexcept |
Get protocol.
|
overridevirtualnoexcept |
|
overridevirtual |
|
noexcept |
Get port.