Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::someip::sd::fsm::MainState Class Reference

Server's main state. More...

#include <main_state.h>

Inheritance diagram for ara::com::someip::sd::fsm::MainState:
ara::com::someip::sd::fsm::TimerSetState< helper::SdServerState > ara::com::helper::MachineState< helper::SdServerState >

Public Member Functions

 MainState (std::function< void()> onTimerExpired, int cyclicOfferDelay)
 Constructor. More...
 
 MainState (const MainState &)=delete
 
MainStateoperator= (const MainState &)=delete
 
- Public Member Functions inherited from ara::com::someip::sd::fsm::TimerSetState< helper::SdServerState >
 TimerSetState (const TimerSetState &)=delete
 
TimerSetStateoperator= (const TimerSetState &)=delete
 
virtual void Activate (helper::SdServerState previousState) override
 Activate the state. More...
 
void ServiceStopped () noexcept
 Inform the state that the server's service is stopped.
 
void SetNextState (helper::SdServerState nextState) noexcept
 Set next state. More...
 
- Public Member Functions inherited from ara::com::helper::MachineState< helper::SdServerState >
 MachineState (const MachineState &)=delete
 
MachineStateoperator= (const MachineState &)=delete
 
helper::SdServerState GetState () const noexcept
 Get the machine state. More...
 
void Register (AbstractStateMachine< helper::SdServerState > *finiteStateMachine) noexcept
 Register the state to a finite state machine (FSM) More...
 

Protected Member Functions

void SetTimer () override
 Set the phase time on state activation. More...
 
- Protected Member Functions inherited from ara::com::someip::sd::fsm::TimerSetState< helper::SdServerState >
bool WaitFor (std::chrono::milliseconds duration)
 Wait for certian period of time. More...
 
bool WaitFor (int duration)
 Wait for certian period of time. More...
 
void Interrupt () noexcept
 Interrupt the timer. More...
 
 TimerSetState (helper::SdServerState nextState, helper::SdServerState stoppedState, std::function< void()> onTimerExpired)
 Constructor. More...
 
void Deactivate (helper::SdServerState nextState) override
 Deactivating the current state before transiting to the next state. More...
 
- Protected Member Functions inherited from ara::com::helper::MachineState< helper::SdServerState >
void Transit (helper::SdServerState nextState)
 Transit to the next state. More...
 
 MachineState (helper::SdServerState state) noexcept
 Constructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from ara::com::someip::sd::fsm::TimerSetState< helper::SdServerState >
const std::function< void()> OnTimerExpired
 Delegate which is invoked by timer's thread when the timer is expired.
 

Detailed Description

Server's main state.

Note
The state is not copyable

Constructor & Destructor Documentation

◆ MainState()

ara::com::someip::sd::fsm::MainState::MainState ( std::function< void()>  onTimerExpired,
int  cyclicOfferDelay 
)

Constructor.

Parameters
cyclicOfferDelayInterval in milliseconds to offer the service
onTimerExpiredDelegate to be invoked by timer's thread when the timer is expired

Member Function Documentation

◆ SetTimer()

void ara::com::someip::sd::fsm::MainState::SetTimer ( )
overrideprotectedvirtual

Set the phase time on state activation.

Implements ara::com::someip::sd::fsm::TimerSetState< helper::SdServerState >.