|
FireSync API
|
| kStatus kSvNode_EnableWatchdog | ( | kSvNode | node, |
| kBool | enable, | ||
| k64u | timeoutPeriod, | ||
| k64u | checkPeriod, | ||
| kSvWatchdogFx | callback, | ||
| kPointer | receiver | ||
| ) |
Enables or disables the watchdog timer.
Watchdog timers are disabled by default. When the watchdog timer is enabled, the provided callback function will be invoked periodically, according to the checkPeriod argument. Refer to the kSvWatchdogFx documentation for information on how to implement this callback.
The timeoutPeriod argument determines the countdown period of the underlying watchdog timer. If the countdown reaches zero without positive affirmation of system liveliness (determined by the callback), the node will automatically reset. The watchdog countdown is restarted each time that the callback affirms liveliness. Naturally, timeoutPeriod should be set to something higher than checkPeriod, with a margin of safety to account for thread scheduling variability. Setting timeoutPeriod to twice the duration of checkPeriod would be a reasonable starting point.
| node | Node object. |
| enable | kTRUE to enable the watchdog. |
| timeoutPeriod | Coundown period of the underlying watchdog (microseconds). |
| checkPeriod | Period at which the system liveliness callback will be invoked (microseconds). |
| callback | System liveliness callback. |
| receiver | Callback context pointer. |