Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::someip::sd::SomeIpSdAgent< T > Class Template Referenceabstract

SOME/IP service discovery agent (i.e., a server or a client) More...

#include <someip_sd_agent.h>

Public Member Functions

 SomeIpSdAgent (helper::NetworkLayer< SomeIpSdMessage > *networkLayer)
 Constructor. More...
 
void Start ()
 Start the service discovery agent.
 
GetState () const noexcept
 Get the current server state. More...
 
void Join ()
 Join to the timer's thread.
 
void Stop ()
 Stop the service discovery agent. More...
 

Protected Member Functions

virtual void StartAgent (T state)=0
 Start the service discovery agent. More...
 
virtual void StopAgent ()=0
 Stop the service discovery agent. More...
 

Protected Attributes

helper::FiniteStateMachine< T > StateMachine
 Agent's FSM.
 
std::future< void > Future
 Agent running state future object.
 
helper::NetworkLayer< SomeIpSdMessage > * CommunicationLayer
 Network communication abstraction layer.
 

Detailed Description

template<typename T>
class ara::com::someip::sd::SomeIpSdAgent< T >

SOME/IP service discovery agent (i.e., a server or a client)

Template Parameters
TAgent state enumeration type

Constructor & Destructor Documentation

◆ SomeIpSdAgent()

template<typename T >
ara::com::someip::sd::SomeIpSdAgent< T >::SomeIpSdAgent ( helper::NetworkLayer< SomeIpSdMessage > *  networkLayer)
inline

Constructor.

Parameters
networkLayerNetwork communication abstraction layer

Member Function Documentation

◆ GetState()

template<typename T >
T ara::com::someip::sd::SomeIpSdAgent< T >::GetState ( ) const
inlinenoexcept

Get the current server state.

Returns
Server machine state

◆ StartAgent()

template<typename T >
virtual void ara::com::someip::sd::SomeIpSdAgent< T >::StartAgent ( state)
protectedpure virtual

Start the service discovery agent.

Parameters
stateCurrent FSM state before start

Implemented in ara::com::someip::sd::SomeIpSdClient, and ara::com::someip::sd::SomeIpSdServer.

◆ Stop()

template<typename T >
void ara::com::someip::sd::SomeIpSdAgent< T >::Stop ( )
inline

Stop the service discovery agent.

Note
It is safe to recall the function if the agent has been already stopped.

◆ StopAgent()

template<typename T >
virtual void ara::com::someip::sd::SomeIpSdAgent< T >::StopAgent ( )
protectedpure virtual

Stop the service discovery agent.

Parameters
stateCurrent FSM state before stop

Implemented in ara::com::someip::sd::SomeIpSdClient, and ara::com::someip::sd::SomeIpSdServer.