|
RobotCore 1.0
WPILib port to raspberry Pi
|
Public Member Functions | |
| Watchdog (double timeout, Runnable callback) | |
| Watchdog (Time timeout, Runnable callback) | |
| void | close () |
| boolean | equals (Object obj) |
| int | hashCode () |
| int | compareTo (Watchdog rhs) |
| double | getTime () |
| void | setTimeout (double timeout) |
| double | getTimeout () |
| boolean | isExpired () |
| void | addEpoch (String epochName) |
| void | printEpochs () |
| void | reset () |
| void | enable () |
| void | disable () |
| void | suppressTimeoutMessage (boolean suppress) |
A class that's a wrapper around a watchdog timer.
When the timer expires, a message is printed to the console and an optional user-provided callback is invoked.
The watchdog is initialized disabled, so the user needs to call enable() before use.
Definition at line 26 of file Watchdog.java.
| org.wpilib.system.Watchdog.Watchdog | ( | double | timeout, |
| Runnable | callback ) |
Watchdog constructor.
| timeout | The watchdog's timeout in seconds with nanosecond resolution. |
| callback | This function is called when the timeout expires. |
Definition at line 60 of file Watchdog.java.
| org.wpilib.system.Watchdog.Watchdog | ( | Time | timeout, |
| Runnable | callback ) |
Watchdog constructor.
| timeout | The watchdog's timeout with nanosecond resolution. |
| callback | This function is called when the timeout expires. |
Definition at line 72 of file Watchdog.java.
| void org.wpilib.system.Watchdog.addEpoch | ( | String | epochName | ) |
Adds time since last epoch to the list printed by printEpochs().
| epochName | The name to associate with the epoch. |
Definition at line 164 of file Watchdog.java.
| void org.wpilib.system.Watchdog.close | ( | ) |
Definition at line 77 of file Watchdog.java.
| int org.wpilib.system.Watchdog.compareTo | ( | Watchdog | rhs | ) |
Definition at line 92 of file Watchdog.java.
| void org.wpilib.system.Watchdog.disable | ( | ) |
Disables the watchdog timer.
Definition at line 205 of file Watchdog.java.
| void org.wpilib.system.Watchdog.enable | ( | ) |
Enables the watchdog timer.
Definition at line 187 of file Watchdog.java.
| boolean org.wpilib.system.Watchdog.equals | ( | Object | obj | ) |
Definition at line 82 of file Watchdog.java.
| double org.wpilib.system.Watchdog.getTime | ( | ) |
Returns the time in seconds since the watchdog was last fed.
Definition at line 103 of file Watchdog.java.
| double org.wpilib.system.Watchdog.getTimeout | ( | ) |
Returns the watchdog's timeout in seconds.
Definition at line 135 of file Watchdog.java.
| int org.wpilib.system.Watchdog.hashCode | ( | ) |
Definition at line 87 of file Watchdog.java.
| boolean org.wpilib.system.Watchdog.isExpired | ( | ) |
Returns true if the watchdog timer has expired.
Definition at line 149 of file Watchdog.java.
| void org.wpilib.system.Watchdog.printEpochs | ( | ) |
Prints list of epochs added so far and their times.
Definition at line 173 of file Watchdog.java.
| void org.wpilib.system.Watchdog.reset | ( | ) |
Resets the watchdog timer.
This also enables the timer if it was previously disabled.
Definition at line 182 of file Watchdog.java.
| void org.wpilib.system.Watchdog.setTimeout | ( | double | timeout | ) |
Sets the watchdog's timeout.
| timeout | The watchdog's timeout in seconds with nanosecond resolution. |
Definition at line 112 of file Watchdog.java.
| void org.wpilib.system.Watchdog.suppressTimeoutMessage | ( | boolean | suppress | ) |
Enable or disable suppression of the generic timeout message.
This may be desirable if the user-provided callback already prints a more specific message.
| suppress | Whether to suppress generic timeout message. |
Definition at line 222 of file Watchdog.java.