Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::someip::sd::fsm::RepetitionState< T > Class Template Reference

Server's or client's service repetition state. More...

#include <repetition_state.h>

Inheritance diagram for ara::com::someip::sd::fsm::RepetitionState< T >:
ara::com::someip::sd::fsm::TimerSetState< T > ara::com::helper::MachineState< T >

Public Member Functions

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

Protected Member Functions

virtual void SetTimer () override
 Set the phase time on state activation. More...
 
- Protected Member Functions inherited from ara::com::someip::sd::fsm::TimerSetState< T >
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 (T nextState, T stoppedState, std::function< void()> onTimerExpired)
 Constructor. More...
 
void Deactivate (T nextState) override
 Deactivating the current state before transiting to the next state. More...
 
- Protected Member Functions inherited from ara::com::helper::MachineState< T >
void Transit (T nextState)
 Transit to the next state. More...
 
 MachineState (T state) noexcept
 Constructor. More...
 

Protected Attributes

const int RepetitionsMax
 Maximum iteration in repetition phase.
 
const int RepetitionsBaseDelay
 Repetition iteration delay in milliseconds.
 
- Protected Attributes inherited from ara::com::someip::sd::fsm::TimerSetState< T >
const std::function< void()> OnTimerExpired
 Delegate which is invoked by timer's thread when the timer is expired.
 

Detailed Description

template<typename T>
class ara::com::someip::sd::fsm::RepetitionState< T >

Server's or client's service repetition state.

Template Parameters
TServer's or client state enumeration type
Note
The state is not copyable

Constructor & Destructor Documentation

◆ RepetitionState()

template<typename T >
ara::com::someip::sd::fsm::RepetitionState< T >::RepetitionState ( currentState,
nextState,
stoppedState,
std::function< void()>  onTimerExpired,
uint32_t  repetitionsMax,
int  repetitionsBaseDelay 
)
inline

Constructor.

Parameters
currentStateCurrent state at repetition phase
nextStateNext state after repetition phase expiration
stoppedStateStopped state after put a stop to the service
onTimerExpiredDelegate to be invoked by timer's thread when the timer is expired
repetitionsMaxMaximum iteration in repetition phase
repetitionsBaseDelayRepetition iteration delay in milliseconds

Member Function Documentation

◆ SetTimer()

template<typename T >
virtual void ara::com::someip::sd::fsm::RepetitionState< T >::SetTimer ( )
inlineoverrideprotectedvirtual

Set the phase time on state activation.

Implements ara::com::someip::sd::fsm::TimerSetState< T >.

Reimplemented in ara::com::someip::sd::fsm::ClientRepetitionState.