|
direcs
2012-09-30
|
This thread sends a heartbeat to the microcontroller. The microccontroller waits for this heartsbeats. It stops/resets the robot, if no heartbeats are received. More...
#include <heartbeat.h>

Public Slots | |
| void | setRobotState (bool state) |
Signals | |
| void | alarm () |
Public Member Functions | |
| Heartbeat (InterfaceAvr *i, QMutex *m) | |
| void | init () |
| bool | isConnected (void) |
| virtual void | run () |
| void | stop () |
| ~Heartbeat () | |
Private Attributes | |
| bool | initDone |
| InterfaceAvr * | interface1 |
| QMutex * | mutex |
| Stores the robots (circuits) state.ON or OFF. | |
| bool | robotIsOn |
| volatile bool | stopped |
Static Private Attributes | |
| static const unsigned long | THREADSLEEPTIME = 500 |
This thread sends a heartbeat to the microcontroller. The microccontroller waits for this heartsbeats. It stops/resets the robot, if no heartbeats are received.
Definition at line 34 of file heartbeat.h.
| Heartbeat::Heartbeat | ( | InterfaceAvr * | i, |
| QMutex * | m | ||
| ) |
Definition at line 24 of file heartbeat.cpp.
| Heartbeat::~Heartbeat | ( | ) |
Definition at line 36 of file heartbeat.cpp.
|
signal |
TODO: text text text alarm
| void Heartbeat::init | ( | ) |
Definition at line 87 of file heartbeat.cpp.
| bool Heartbeat::isConnected | ( | void | ) |
Definition at line 81 of file heartbeat.cpp.
|
virtual |
|
slot |
This slot sets (stores) the robots (circuits) state within this class.
| state | can be ON or OFF |
Definition at line 112 of file heartbeat.cpp.
| void Heartbeat::stop | ( | ) |
Definition at line 41 of file heartbeat.cpp.
|
private |
Definition at line 71 of file heartbeat.h.
|
private |
Definition at line 75 of file heartbeat.h.
|
mutableprivate |
Stores the robots (circuits) state.ON or OFF.
Definition at line 74 of file heartbeat.h.
|
private |
Definition at line 73 of file heartbeat.h.
|
private |
Definition at line 72 of file heartbeat.h.
|
staticprivate |
Definition at line 79 of file heartbeat.h.