![]() |
WPILibC++ 2027.0.0-alpha-5
|
Functions | |
| HAL_NotifierHandle | HAL_CreateNotifier (int32_t *status) |
| Creates a notifier. | |
| void | HAL_SetNotifierName (HAL_NotifierHandle notifierHandle, const struct WPI_String *name, int32_t *status) |
| Sets the name of a notifier. | |
| void | HAL_DestroyNotifier (HAL_NotifierHandle notifierHandle) |
| Destroys a notifier. | |
| void | HAL_SetNotifierAlarm (HAL_NotifierHandle notifierHandle, uint64_t alarmTime, uint64_t intervalTime, HAL_Bool absolute, HAL_Bool ack, int32_t *status) |
| Updates the initial and interval alarm times for a notifier. | |
| void | HAL_CancelNotifierAlarm (HAL_NotifierHandle notifierHandle, HAL_Bool ack, int32_t *status) |
| Cancels all future notifier alarms for a notifier. | |
| void | HAL_AcknowledgeNotifierAlarm (HAL_NotifierHandle notifierHandle, int32_t *status) |
| Indicates the notifier alarm has been serviced. | |
| int32_t | HAL_GetNotifierOverrun (HAL_NotifierHandle notifierHandle, int32_t *status) |
| Gets the overrun count for a notifier. | |
| void HAL_AcknowledgeNotifierAlarm | ( | HAL_NotifierHandle | notifierHandle, |
| int32_t * | status ) |
Indicates the notifier alarm has been serviced.
Makes no change to future alarms.
One of HAL_SetNotifierAlarm (with ack=true), HAL_CancelNotifierAlarm (with ack=true), or this function must be called before waiting for the next alarm.
| [in] | notifierHandle | the notifier handle |
| [out] | status | Error status variable. 0 on success. |
| void HAL_CancelNotifierAlarm | ( | HAL_NotifierHandle | notifierHandle, |
| HAL_Bool | ack, | ||
| int32_t * | status ) |
Cancels all future notifier alarms for a notifier.
| [in] | notifierHandle | the notifier handle |
| [in] | ack | true to acknowledge any prior alarm |
| [out] | status | Error status variable. 0 on success. |
| HAL_NotifierHandle HAL_CreateNotifier | ( | int32_t * | status | ) |
Creates a notifier.
A notifier is an timer that alarms at an initial and (optionally) repeated intervals. This can be used to make precise control loops.
| [out] | status | Error status variable. 0 on success. |
| void HAL_DestroyNotifier | ( | HAL_NotifierHandle | notifierHandle | ) |
Destroys a notifier.
Destruction wakes up any waiters.
| [in] | notifierHandle | the notifier handle |
| int32_t HAL_GetNotifierOverrun | ( | HAL_NotifierHandle | notifierHandle, |
| int32_t * | status ) |
Gets the overrun count for a notifier.
An overrun occurs when a notifier's alarm is not serviced before the next scheduled alarm time.
| [in] | notifierHandle | the notifier handle |
| [out] | status | Error status variable. 0 on success. |
| void HAL_SetNotifierAlarm | ( | HAL_NotifierHandle | notifierHandle, |
| uint64_t | alarmTime, | ||
| uint64_t | intervalTime, | ||
| HAL_Bool | absolute, | ||
| HAL_Bool | ack, | ||
| int32_t * | status ) |
Updates the initial and interval alarm times for a notifier.
The alarmTime is an absolute time (using the WPI_Now() time base) if absolute is true, or relative to the current time if absolute is false.
If intervalTime is non-zero, the notifier will alarm periodically following alarmTime at the given interval.
If an absolute alarmTime is in the past, the notifier will alarm immediately.
| [in] | notifierHandle | the notifier handle |
| [in] | alarmTime | the first alarm time (in microseconds) |
| [in] | intervalTime | the periodic interval time (in microseconds) |
| [in] | absolute | true if the alarm time is absolute |
| [in] | ack | true to acknowledge any prior alarm |
| [out] | status | Error status variable. 0 on success. |
| void HAL_SetNotifierName | ( | HAL_NotifierHandle | notifierHandle, |
| const struct WPI_String * | name, | ||
| int32_t * | status ) |
Sets the name of a notifier.
| [in] | notifierHandle | the notifier handle |
| [in] | name | name |
| [out] | status | Error status variable. 0 on success. |