DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Detailed Description

Defines the methods for the timer interface.

Note
SW Release Applicability: These APIs are available in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.

Typedefs

typedef struct dwTimerObject * dwTimerHandle_t
 
typedef void(* dwTimerWork) (void *)
 

Functions

DW_API_PUBLIC dwStatus dwTimer_cancelAsync (dwTimerHandle_t timer)
 Asynchronously cancels all scheduled work associated with this timer. More...
 
DW_API_PUBLIC dwStatus dwTimer_cancelSync (dwTimerHandle_t timer)
 Synchronously cancels all scheduled work associated with this timer. More...
 
DW_API_PUBLIC dwStatus dwTimer_initialize (dwTimerHandle_t *timer, const char *timerName, dwContextHandle_t context)
 Creates and initializes a DW Timer. More...
 
DW_API_PUBLIC dwStatus dwTimer_release (dwTimerHandle_t timer)
 Release the timer instance. More...
 
DW_API_PUBLIC dwStatus dwTimer_scheduleTaskOneShot (const dwTimerWork task, void *clientData, const dwTime_t startTime, dwTimerHandle_t timer)
 Scheduled a task to be run at a future time (non-recurring) More...
 
DW_API_PUBLIC dwStatus dwTimer_scheduleTaskRecurring (const dwTimerWork task, void *clientData, const dwTime_t startTime, const dwTime_t period, dwTimerHandle_t timer)
 Scheduled a task to be run at a future time (recurring) More...
 

Typedef Documentation

◆ dwTimerHandle_t

typedef struct dwTimerObject* dwTimerHandle_t

Definition at line 60 of file Timer.h.

◆ dwTimerWork

typedef void(* dwTimerWork) (void *)

Definition at line 61 of file Timer.h.

Function Documentation

◆ dwTimer_cancelAsync()

DW_API_PUBLIC dwStatus dwTimer_cancelAsync ( dwTimerHandle_t  timer)

Asynchronously cancels all scheduled work associated with this timer.

Parameters
[in]timerA handle to the timer
Returns
DW_INVALID_HANDLE - if provided context handle is invalid,i.e. null or of wrong type
DW_SUCCESS

◆ dwTimer_cancelSync()

DW_API_PUBLIC dwStatus dwTimer_cancelSync ( dwTimerHandle_t  timer)

Synchronously cancels all scheduled work associated with this timer.

This call will allow pending work to complete for cancelling the job.

Parameters
[in]timerA handle to the timer
Returns
DW_INVALID_HANDLE - if provided context handle is invalid,i.e. null or of wrong type
DW_SUCCESS

◆ dwTimer_initialize()

DW_API_PUBLIC dwStatus dwTimer_initialize ( dwTimerHandle_t timer,
const char *  timerName,
dwContextHandle_t  context 
)

Creates and initializes a DW Timer.

This method creates a timer instance and registers it with the primary time source for the context.

Parameters
[out]timerA pointer to the timer handle
[in]timerNameName of the timer, which will be associated with the created thread.
[in]contextSpecifies the handle to the context under which the timer should be created.
Returns
DW_INVALID_ARGUMENT - if pointer to the timer handle is NULL.
DW_INVALID_HANDLE - if provided context handle is invalid,i.e. null or of wrong type
DW_SUCCESS

◆ dwTimer_release()

DW_API_PUBLIC dwStatus dwTimer_release ( dwTimerHandle_t  timer)

Release the timer instance.

Parameters
[in]timerThe timer handle
Returns
DW_INVALID_ARGUMENT - if pointer to the timer handle is NULL.
DW_SUCCESS

◆ dwTimer_scheduleTaskOneShot()

DW_API_PUBLIC dwStatus dwTimer_scheduleTaskOneShot ( const dwTimerWork  task,
void *  clientData,
const dwTime_t  startTime,
dwTimerHandle_t  timer 
)

Scheduled a task to be run at a future time (non-recurring)

Parameters
[in]taskFunction pointer for the task to be executed
[in]clientDataPointer to data to be passed back to task
[in]startTimeTime when the task should be activated
[in]timerHandle to the timer object
Returns
DW_INVALID_HANDLE - if provided context handle is invalid,i.e. null or of wrong type
DW_SUCCESS

◆ dwTimer_scheduleTaskRecurring()

DW_API_PUBLIC dwStatus dwTimer_scheduleTaskRecurring ( const dwTimerWork  task,
void *  clientData,
const dwTime_t  startTime,
const dwTime_t  period,
dwTimerHandle_t  timer 
)

Scheduled a task to be run at a future time (recurring)

Parameters
[in]taskFunction pointer for the task to be executed
[in]clientDataPointer to data to be passed back to task
[in]startTimeTime when the task should be activated
[in]periodPeriod at which to fire the task
[in]timerHandle to the timer object
Returns
DW_INVALID_HANDLE - if provided context handle is invalid,i.e. null or of wrong type
DW_SUCCESS