Server's main state. More...
#include <main_state.h>
Public Member Functions | |
MainState (std::function< void()> onTimerExpired, int cyclicOfferDelay) | |
Constructor. More... | |
MainState (const MainState &)=delete | |
MainState & | operator= (const MainState &)=delete |
Public Member Functions inherited from ara::com::someip::sd::fsm::TimerSetState< helper::SdServerState > | |
TimerSetState (const TimerSetState &)=delete | |
TimerSetState & | operator= (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 | |
MachineState & | operator= (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. | |
Server's main state.
ara::com::someip::sd::fsm::MainState::MainState | ( | std::function< void()> | onTimerExpired, |
int | cyclicOfferDelay | ||
) |
Constructor.
cyclicOfferDelay | Interval in milliseconds to offer the service |
onTimerExpired | Delegate to be invoked by timer's thread when the timer is expired |
|
overrideprotectedvirtual |
Set the phase time on state activation.
Implements ara::com::someip::sd::fsm::TimerSetState< helper::SdServerState >.