Class CSimulationTaskTimerService#
Defined in File simulationtasktimer.h
Inheritance Relationships#
Base Types#
public sdv::CSdvObject(Class CSdvObject)public sdv::core::ITaskTimer(Struct ITaskTimer)public sdv::core::ITimerSimulationStep(Struct ITimerSimulationStep)
Class Documentation#
-
class CSimulationTaskTimerService : public sdv::CSdvObject, public sdv::core::ITaskTimer, public sdv::core::ITimerSimulationStep#
Task timer class to execute task periodically.
Public Functions
-
CSimulationTaskTimerService()#
Constructor configure and initializes the timer.
-
virtual ~CSimulationTaskTimerService() override#
Destructor cleans up the timer if there is no active task and delete it after.
-
virtual bool OnInitialize() override#
Initialization event, called after object configuration was loaded. Overload of sdv::CSdvObject::OnInitialize.
- Returns:
Returns ‘true’ when the initialization was successful, ‘false’ when not.
-
virtual void OnShutdown() override#
Shutdown the object. Overload of sdv::CSdvObject::OnShutdown.
-
virtual sdv::IInterfaceAccess *CreateTimer(uint32_t uiPeriod, sdv::IInterfaceAccess *pTask) override#
Method to execute the user-defined task periodically until ShutdownTask is called.
- Parameters:
uiPeriod – [in] The time period in milliseconds in which the task should executed.
pTask – [in] Interface to the task object exposing the ITaskExecute interface. The object must be kept alive until the timer has been destroyed.
- Returns:
Returns an interface to the task timer object. Use sdv::IObjectDestroy to terminate the timer.
-
virtual void SimulationStep(uint64_t uiSimulationStep) override#
Method to set the time which has past from the last simulation step.
- Parameters:
uiSimulationStep – [in] the time in microseconds which has past from the last simulation step.
-
void RemoveTimer(CSimulationTimer *pTimer)#
Remove the timer from from the timer map.
- Parameters:
pTimer – [in] Pointer to the timer object to remove.
-
CSimulationTaskTimerService()#