Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::helper Namespace Reference

Helper functions required for communication classes. More...

Classes

class  AbstractStateMachine
 Abstract Finite State Machine (FMS) that transits between states. More...
 
class  ConcurrentQueue
 Thread-safe wrapper around STL queue using locking mechanism. More...
 
class  FiniteStateMachine
 Finite State Machine (FMS) controller. More...
 
struct  Ipv4Address
 IPv4 address wrapper helper. More...
 
class  MachineState
 Machine state abstract class. More...
 
class  NetworkLayer
 Network communication abstraction layer. More...
 
class  TtlTimer
 Time To Live countdown timer. More...
 

Enumerations

enum class  SdServerState { NotReady , InitialWaitPhase , RepetitionPhase , MainPhase }
 Service discovery server machine state. More...
 
enum class  SdClientState {
  ServiceNotSeen , ServiceSeen , ServiceReady , Stopped ,
  InitialWaitPhase , RepetitionPhase
}
 Service discovery client machine state. More...
 
enum class  PubSubState { ServiceDown , NotSubscribed , Subscribed }
 Publish-subscribe server machine state. More...
 

Functions

bool operator== (Ipv4Address address1, Ipv4Address address2)
 Ipv4Address equality operator override. More...
 
bool operator!= (Ipv4Address address1, Ipv4Address address2)
 Ipv4Address inequality operator override. More...
 
void Inject (std::vector< uint8_t > &vector, uint16_t value)
 Inject a short value into a byte vector. More...
 
void Inject (std::vector< uint8_t > &vector, uint32_t value)
 Inject an integer value into a byte vector. More...
 
void Concat (std::vector< uint8_t > &vector1, std::vector< uint8_t > &&vector2)
 Concat the second vector into the end of the first vector. More...
 
uint16_t ExtractShort (const std::vector< uint8_t > &vector, std::size_t &offset)
 Extract a short value from a byte vector. More...
 
uint32_t ExtractInteger (const std::vector< uint8_t > &vector, std::size_t &offset)
 Extract an integer value from a byte vector. More...
 

Detailed Description

Helper functions required for communication classes.

Note
The namespace is not part of the official AUTOSAR standard.

Enumeration Type Documentation

◆ PubSubState

enum class ara::com::helper::PubSubState
strong

Publish-subscribe server machine state.

Enumerator
ServiceDown 

Service server is down.

NotSubscribed 

Service server is up, but there is no subscriber.

Subscribed 

Service server is up, and there is at least a subscriber.

◆ SdClientState

Service discovery client machine state.

Enumerator
ServiceNotSeen 

Service is not requested and not seen.

ServiceSeen 

Service is not requsted, but seen.

ServiceReady 

Service is ready.

Stopped 

Service is stopped.

InitialWaitPhase 

Client service is in initial waiting phase.

RepetitionPhase 

Client service is in repetition phase.

◆ SdServerState

Service discovery server machine state.

Enumerator
NotReady 

Server's service is down.

InitialWaitPhase 

Server's service is in initial waiting phase.

RepetitionPhase 

Server's service is in repetition phase.

MainPhase 

Server's service is in main phase.

Function Documentation

◆ Concat()

void ara::com::helper::Concat ( std::vector< uint8_t > &  vector1,
std::vector< uint8_t > &&  vector2 
)

Concat the second vector into the end of the first vector.

Parameters
vector1First vector
vector2Second vector

◆ ExtractInteger()

uint32_t ara::com::helper::ExtractInteger ( const std::vector< uint8_t > &  vector,
std::size_t &  offset 
)

Extract an integer value from a byte vector.

Parameters
vectorByte vector
offsetExtract offset at the vector
Returns
Extracted integer value

◆ ExtractShort()

uint16_t ara::com::helper::ExtractShort ( const std::vector< uint8_t > &  vector,
std::size_t &  offset 
)

Extract a short value from a byte vector.

Parameters
vectorByte vector
offsetExtract offset at the vector
Returns
Extracted short value

◆ Inject() [1/2]

void ara::com::helper::Inject ( std::vector< uint8_t > &  vector,
uint16_t  value 
)

Inject a short value into a byte vector.

Parameters
vectorByte vector
valueShort input value

◆ Inject() [2/2]

void ara::com::helper::Inject ( std::vector< uint8_t > &  vector,
uint32_t  value 
)

Inject an integer value into a byte vector.

Parameters
vectorByte vector
valueInteger input value

◆ operator!=()

bool ara::com::helper::operator!= ( Ipv4Address  address1,
Ipv4Address  address2 
)
inline

Ipv4Address inequality operator override.

Parameters
address1First address to compare
address2Second address to compare
Returns
True if both addresses are not equal; otherwise false

◆ operator==()

bool ara::com::helper::operator== ( Ipv4Address  address1,
Ipv4Address  address2 
)
inline

Ipv4Address equality operator override.

Parameters
address1First address to compare
address2Second address to compare
Returns
True if both addresses are equal; otherwise false