hil_watchdog_is_expired
Indicates whether the watchdog has expired.
Description
The hil_watchdog_is_expired function indicates whether the watchdog has expired. It is not typically required because the hil_watchdog_reload function's return value also indicates whether the watchdog has expired.
Prototype
t_error hil_watchdog_is_expired(t_card card);
Parameters
t_card card
A handle to the board, as returned by hil_open .
Return value
Returns true (1) if the watchdog has expired. Otherwise it returns false (0). If an error
occurs then a negative error code is returned. Error codes are
defined in quanser_errors.h
. A suitable error message
may be retrieved using
msg_get_error_message
.
Error codes
QERR_HIL_WATCHDOG_IS_EXPIRED
This function is not supported by the board-specific HIL driver for this board type.
QERR_INVALID_CARD_HANDLE
An invalid card handle was passed as an argument. Once a card has been closed using hil_close the card handle is invalid.
Requirements
Include Files |
Libraries |
---|---|
hil.h |
hil.lib;quanser_runtime.lib;quanser_common.lib |
Examples
/* * Print an error message if the watchdog has expired * or an error occurs. */ t_error result = hil_watchdog_is_expired(card); if (result != 0) { /* watchdog has expired or an error occurred */ fprintf(stderr, "Watchdog has expired or an error has occurred.\n"); }
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.