Service load balancing option. More...
#include <loadbalancing_option.h>
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< LoadBalancingOption > | Deserialize (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... | |
Service load balancing option.
|
inlineconstexprnoexcept |
Constructor.
| discardable | Indicates whether the option can be discarded or not |
| priority | Service instance priority |
| weight | Servince instance random selection weight |
|
static |
Deserialize an option payload.
| payload | Serialized option payload byte array |
| offset | Deserializing offset in the payload |
| discardable | Indicates whether the option can be discarded or not |
|
overridevirtualnoexcept |
|
overridevirtual |
|
noexcept |
Get priority.
|
noexcept |
Get weight.