Class CTaskTimerService#
Defined in File tasktimer.h
Inheritance Relationships#
Base Types#
public sdv::CSdvObject(Class CSdvObject)public sdv::core::ITaskTimer(Struct ITaskTimer)
Class Documentation#
-
class CTaskTimerService : public sdv::CSdvObject, public sdv::core::ITaskTimer#
Task timer class to execute task periodically.
Public Functions
-
CTaskTimerService()#
Constructor configure and initializes the timer.
-
virtual ~CTaskTimerService() 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.
-
CTaskTimerService()#