Insures that a constant connection is maintained between both systems. If the connection is ever lost the motors will be shutdown, the connection will be fully closed and start listening for a new connection. This system is very important, since it shuts down the motors if the remote system crashes or the robot goes out of the range of the remote computer
Definition at line 17 of file NetConnWatchdog.h.
Public Types | |
enum | Status { OPEN = 1, CLOSED = 0, ERROR = -1 } |
enumeration for the status of the watchdog More... | |
Public Member Functions | |
int | start () |
start up the watchdog | |
int | stop () |
stop the watchdog | |
void | countDown () |
countDown the watchdog timer - this function should be called whenever a HBeat packet is recieved | |
void | addTick () |
add one to the ticker | |
int | getInTicker () |
get inTicker | |
Static Public Member Functions | |
NetConnWatchdog * | theInstance () |
get a pointer to the singleton instance of the NetConnWatchdog | |
Protected Member Functions | |
NetConnWatchdog () | |
constructor for the net watchdog | |
~NetConnWatchdog () | |
destructor for the net watchdog | |
Private Member Functions | |
int | error () |
if no HBeat packets are recieved with the time required the network is shutdown and the motors are stopped | |
Static Private Member Functions | |
void | tick () |
thead function to make the watchdog tick and send out HBeat packets to the other side | |
Private Attributes | |
int | inTicker |
The ticker for the watchdog. | |
Status | status |
The status of the watchdog. | |
pthread_t | tThread |
Thread for the watchdog to run on. |
|
enumeration for the status of the watchdog
Definition at line 22 of file NetConnWatchdog.h. |
|
get inTicker
Definition at line 64 of file NetConnWatchdog.h. References inTicker. |
|
start up the watchdog
|
|
stop the watchdog
|
|
get a pointer to the singleton instance of the NetConnWatchdog
|