Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::option::Option Class Referenceabstract

Communication message entry abstract option. More...

#include <option.h>

Inheritance diagram for ara::com::option::Option:
ara::com::option::Ipv4EndpointOption ara::com::option::LoadBalancingOption

Public Member Functions

virtual uint16_t Length () const noexcept=0
 Get option length. More...
 
OptionType Type () const noexcept
 Get option type. More...
 
bool Discardable () const noexcept
 Get discardable flag. More...
 
virtual std::vector< uint8_t > Payload () const =0
 Get option payload. More...
 

Protected Member Functions

constexpr Option (OptionType type, bool discardable) noexcept
 Constructor. More...
 
std::vector< uint8_t > BasePayload () const
 Get base option payload. More...
 

Detailed Description

Communication message entry abstract option.

Constructor & Destructor Documentation

◆ Option()

constexpr ara::com::option::Option::Option ( OptionType  type,
bool  discardable 
)
inlineconstexprprotectednoexcept

Constructor.

Parameters
typeOption type
discardableIndicates whether the option can be discarded or not

Member Function Documentation

◆ BasePayload()

std::vector< uint8_t > ara::com::option::Option::BasePayload ( ) const
protected

Get base option payload.

Returns
Byte array

◆ Discardable()

bool ara::com::option::Option::Discardable ( ) const
noexcept

Get discardable flag.

Returns
True if the option can be discarded; otherwise false

◆ Length()

virtual uint16_t ara::com::option::Option::Length ( ) const
pure virtualnoexcept

Get option length.

Returns
Option length in bytes

Implemented in ara::com::option::Ipv4EndpointOption, and ara::com::option::LoadBalancingOption.

◆ Payload()

virtual std::vector< uint8_t > ara::com::option::Option::Payload ( ) const
pure virtual

Get option payload.

Returns
Byte array

Implemented in ara::com::option::Ipv4EndpointOption, and ara::com::option::LoadBalancingOption.

◆ Type()

OptionType ara::com::option::Option::Type ( ) const
noexcept

Get option type.

Returns
Option type