6. RAS FEATURES IN HF-W100E/IoT
6-20
6.3.3 Event notification
The CODESYS runtime environment monitor uses an event object and notifies an
application when a watchdog timer timeout occurs.
The application can infer that a watchdog timer timeout has occurred when the event object
is in the signaled state.
The event object is reset when the watchdog timer is retriggered once again after the action
at the time of time-out is complete.
(1) Detecting the event
The application can detect when a watchdog timer timeout occurs using the following
procedure.
1. Use the OpenEvent Windows API function to get the handle to the event object.
If an event object is not created by executing the OpenEvent function, retry the
function until the event object is created.
2. Use the WaitForSingleObject or WaitForMultipleObject Windows API function to
monitor whether the event object is in the signaled state.
Table 6-10 shows the event object name used when a watchdog timer timeout occurs.
When an event object is used in a program, you need to add “Global\” to the
beginning of the name of the event object.
Table 6-10 Event Object
Event
Event object name
Watchdog timer timeout
HIOTRAS_WDT_TIMEOUT_EVENT