Class: Watchdog

Watchdog

Provides access to the system watchdog. The watchdog is used to reboot the device if software becomes unresponsive.

The watchdog is automatically reset by WAT at half of the timeout (to a minimum of 1 second), unless JavaScript takes over by calling reset.


Members


auto :bool

Gets/sets whether the watchdog is handled automatically by WAT. Note that auto will be set to false as soon as reset is called once. This can be re-enabled later if JavaScript no longer wants to reset the watchdog.

Type:
  • bool
Since:
  • 1.4
Default Value:
  • true

timeout :number

Gets/sets the time in milliseconds between the latest reset of the watchdog, and the system rebooting. It is not recommended to use values less than 10 seconds for the timeout or else false resets may begin to occur.

Type:
  • number
Since:
  • 1.4
Default Value:
  • 30000

Methods


reset()

Resets the watchdog. After this is called once by JavaScript, WAT stops automatically resetting the watchdog. JavaScript is then responsible for making sure that the watchdog is reset before the timeout or else the system will reboot.

Since:
  • 1.4