RTI Connext DDS Micro
Version 2.4.6
|
Data Structures | |
struct | OSAPI_TimeoutUserData |
User-data passed to timer-handler. More... | |
struct | OSAPI_TimerProperty |
Timer properies. More... | |
Macros | |
#define | OSAPI_TIMER_PERIODIC (0x1) |
Create a periodic timer. More... | |
#define | OSAPI_TIMER_ONE_SHOT (0x0) |
Create a one-shot timer. More... | |
Enumerations | |
enum | OSAPI_TimeoutOp_t |
Action taken by timer module when a timer callback returns. More... | |
Functions | |
OSAPI_Timer_T | OSAPI_Timer_new (struct OSAPI_TimerProperty *property, struct OSAPI_Mutex *mutex) |
Create a Timer. More... | |
RTI_BOOL | OSAPI_Timer_delete (OSAPI_Timer_T timer) |
Delete a Timer. More... | |
RTI_BOOL | OSAPI_Timer_create_timeout (OSAPI_Timer_T timer, OSAPI_TimeoutHandle_T *out_handle, RTI_INT32 timeout_sec, RTI_INT32 timeout_nsec, RTI_INT32 flags, OSAPI_TimeoutFunction_T timeout_handler, struct OSAPI_TimeoutUserData *user_data) |
Schedule a timeout. More... | |
RTI_BOOL | OSAPI_Timer_update_timeout (OSAPI_Timer_T timer, OSAPI_TimeoutHandle_T *out_handle, RTI_INT32 timeout_sec, RTI_INT32 timeout_nsec) |
Reschedule a timeout. More... | |
RTI_BOOL | OSAPI_Timer_delete_timeout (OSAPI_Timer_T timer, OSAPI_TimeoutHandle_T *handle) |
Stop a previously scheduled timeout. More... | |
RTI_BOOL | OSAPI_TimeoutHandle_get_user_data (struct OSAPI_TimeoutUserData *user_data, OSAPI_TimeoutHandle_T *handle) |
Get the user_data from a handle. More... | |
#define OSAPI_TIMER_PERIODIC (0x1) |
Create a periodic timer.
#define OSAPI_TIMER_ONE_SHOT (0x0) |
Create a one-shot timer.
enum OSAPI_TimeoutOp_t |
Action taken by timer module when a timer callback returns.
OSAPI_Timer_T OSAPI_Timer_new | ( | struct OSAPI_TimerProperty * | property, |
struct OSAPI_Mutex * | mutex | ||
) |
Create a Timer.
Create a new Timer. A Timer can manage multiple timeouts.
Example:
The created Timer should be deleted with OSAPI_Timer_delete.
[in] | property | Timer property. |
[in] | mutex | Shared mutex. |
RTI_BOOL OSAPI_Timer_delete | ( | OSAPI_Timer_T | timer | ) |
Delete a Timer.
Delete a previously created Timer. All timeouts are cancelled.
Example:
The created Timer should be deleted with OSAPI_Timer_delete.
[in] | timer | Timer. |
RTI_BOOL OSAPI_Timer_create_timeout | ( | OSAPI_Timer_T | timer, |
OSAPI_TimeoutHandle_T * | out_handle, | ||
RTI_INT32 | timeout_sec, | ||
RTI_INT32 | timeout_nsec, | ||
RTI_INT32 | flags, | ||
OSAPI_TimeoutFunction_T | timeout_handler, | ||
struct OSAPI_TimeoutUserData * | user_data | ||
) |
Schedule a timeout.
This function schedules a timeout with the specified period. The timeout can either be rescheduled automatically or a new timeout must be created.
Example:
A timeout can cancelled with OSAPI_Timer_delete_timeout or the timeout can be modified with OSAPI_Timer_update_timeout.
[in] | timer | Timer object. Cannot be NULL. |
[out] | out_handle | Reference to the timeout. Cannot be NULL. |
[in] | timeout_sec | The number of seconds before timeout |
[in] | timeout_nsec | Additional number of nanoseconds before timeout |
[in] | flags | Flags OSAPI_TIMER_PERIODIC or OSAPI_TIMER_ONE_SHOT |
[in] | timeout_handler | Function to call at timeout. Cannot be NULL. |
[in] | user_data | User data associated with the timeout. Can be NULL. |
RTI_BOOL OSAPI_Timer_update_timeout | ( | OSAPI_Timer_T | timer, |
OSAPI_TimeoutHandle_T * | out_handle, | ||
RTI_INT32 | timeout_sec, | ||
RTI_INT32 | timeout_nsec | ||
) |
Reschedule a timeout.
This function reschedules a previously scheduled timeout with the specified period.
Example:
[in] | timer | Timer object. Cannot be NULL. |
[out] | out_handle | Reference to the timeout. Cannot be NULL. |
[in] | timeout_sec | The number of seconds before timeout |
[in] | timeout_nsec | Additional number of nanoseconds before timeout |
RTI_BOOL OSAPI_Timer_delete_timeout | ( | OSAPI_Timer_T | timer, |
OSAPI_TimeoutHandle_T * | handle | ||
) |
Stop a previously scheduled timeout.
This function stops a previously scheduled timeout.
Example:
[in] | timer | Timer object. Cannot be NULL. |
[in] | handle | Reference to the timeout. Cannot be NULL. |
RTI_BOOL OSAPI_TimeoutHandle_get_user_data | ( | struct OSAPI_TimeoutUserData * | user_data, |
OSAPI_TimeoutHandle_T * | handle | ||
) |
Get the user_data from a handle.
Example:
[out] | user_data | User-data associated with handle. Cannot be NULL. |
[in] | handle | Timer handle. |