Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::option::LoadBalancingOption Class Reference

Service load balancing option. More...

#include <loadbalancing_option.h>

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

Public Member Functions

constexpr LoadBalancingOption (bool discardable, uint16_t priority, uint16_t weight) noexcept
 Constructor. More...
 
virtual uint16_t Length () const noexcept override
 Get option length. More...
 
uint16_t Priority () const noexcept
 Get priority. More...
 
uint16_t Weight () const noexcept
 Get weight. 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< LoadBalancingOptionDeserialize (const std::vector< uint8_t > &payload, std::size_t &offset, 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...
 

Detailed Description

Service load balancing option.

Constructor & Destructor Documentation

◆ LoadBalancingOption()

constexpr ara::com::option::LoadBalancingOption::LoadBalancingOption ( bool  discardable,
uint16_t  priority,
uint16_t  weight 
)
inlineconstexprnoexcept

Constructor.

Parameters
discardableIndicates whether the option can be discarded or not
priorityService instance priority
weightServince instance random selection weight

Member Function Documentation

◆ Deserialize()

std::unique_ptr< LoadBalancingOption > ara::com::option::LoadBalancingOption::Deserialize ( const std::vector< uint8_t > &  payload,
std::size_t &  offset,
bool  discardable 
)
static

Deserialize an option payload.

Parameters
payloadSerialized option payload byte array
offsetDeserializing offset in the payload
discardableIndicates whether the option can be discarded or not
Returns
Deserialized option

◆ Length()

uint16_t ara::com::option::LoadBalancingOption::Length ( ) const
overridevirtualnoexcept

Get option length.

Returns
Option length in bytes

Implements ara::com::option::Option.

◆ Payload()

std::vector< uint8_t > ara::com::option::LoadBalancingOption::Payload ( ) const
overridevirtual

Get option payload.

Returns
Byte array

Implements ara::com::option::Option.

◆ Priority()

uint16_t ara::com::option::LoadBalancingOption::Priority ( ) const
noexcept

Get priority.

Returns
Service instance priority

◆ Weight()

uint16_t ara::com::option::LoadBalancingOption::Weight ( ) const
noexcept

Get weight.

Returns
Servince instance random selection weight