Server's or client's service timer set state. More...
#include <timer_set_state.h>
Public Member Functions | |
| TimerSetState (const TimerSetState &)=delete | |
| TimerSetState & | operator= (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 | |
| MachineState & | operator= (const MachineState &)=delete |
| T | 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 | |
| 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... | |
| virtual void | SetTimer ()=0 |
| Set the phase time on state activation. 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 std::function< void()> | OnTimerExpired |
| Delegate which is invoked by timer's thread when the timer is expired. | |
Server's or client's service timer set state.
| T | Server's or client state enumeration type |
|
inlineprotected |
Constructor.
| nextState | Next state after initial wait phase expiration |
| stoppedState | Default stopped state after put a stop to the service |
| onTimerExpired | Delegate to be invoked by timer's thread when the timer is expired |
|
inlineoverridevirtual |
Activate the state.
| previousState | Previous state before transiting to this state |
Implements ara::com::helper::MachineState< T >.
|
inlineoverrideprotectedvirtual |
Deactivating the current state before transiting to the next state.
| nextState | Next state coming after deactivation |
Implements ara::com::helper::MachineState< T >.
|
inlineprotectednoexcept |
Interrupt the timer.
|
inlinenoexcept |
Set next state.
| nextState | New next state |
|
protectedpure virtual |
Set the phase time on state activation.
Implemented in ara::com::someip::sd::fsm::ClientInitialWaitState, ara::com::someip::sd::fsm::ClientRepetitionState, ara::com::someip::sd::fsm::InitialWaitState< T >, ara::com::someip::sd::fsm::InitialWaitState< helper::SdClientState >, ara::com::someip::sd::fsm::MainState, ara::com::someip::sd::fsm::RepetitionState< T >, and ara::com::someip::sd::fsm::RepetitionState< helper::SdClientState >.
|
inlineprotected |
Wait for certian period of time.
| duration | Waiting duration in milliseconds |
|
inlineprotected |
Wait for certian period of time.
| duration | Waiting duration |