![]() |
WPILibC++ 2027.0.0-alpha-4
|
Functions | |
| HAL_NotifierHandle | HAL_CreateNotifier (int32_t *status) |
| Creates a notifier. | |
| HAL_Bool | HAL_SetNotifierThreadPriority (HAL_Bool realTime, int32_t priority, int32_t *status) |
| Sets the HAL notifier thread priority. | |
| 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. |
Sets the HAL notifier thread priority.
The HAL notifier thread is responsible for managing the system's notifier interrupt and waking up user's Notifiers when it's their time to run. Giving the HAL notifier thread real-time priority helps ensure the user's real-time Notifiers, if any, are notified to run in a timely manner.
| [in] | realTime | Set to true to set a real-time priority, false for standard priority. |
| [in] | priority | Priority to set the thread to. For real-time, this is 1-99 with 99 being highest. For non-real-time, this is forced to 0. See "man 7 sched" for more details. |
| [out] | status | Error status variable. 0 on success. |