#include <HeartBeatMonitor.h>
|
void | addHeartbeat (const uint8_t node_id) |
| Incoming heartbeats will trigger this function to update the most recent heartbeat time. More...
|
|
uint16_t | getHeartBeatCycleTime () const |
| The HeartbeatMonitor checks for missing heartbeat messages with this cycle time. If the last heartbeat message for one node was received more than one cycle ago, the error function will be triggered. So basically, this cycle time should be greater than the smallest heartbeat time. More...
|
|
| HeartBeatMonitor () |
|
void | registerErrorCallback (const boost::function< void()> &f) |
| This function will be called as soon as one node is missing a heartbeat message. Probably this function should turn off / stop all devices. More...
|
|
void | reset () |
| Resets the heartbeat monitor. This will make the monitor forget about all past heartbeats and start from scratch. More...
|
|
void | setHeartBeatCycleTime (const uint16_t heartbeat_cycle_time_ms) |
| The HeartbeatMonitor checks for missing heartbeat messages with this cycle time. If the last heartbeat message for one node was received more than one cycle ago, the error function will be triggered. So basically, this cycle time should be greater than the smallest heartbeat time. More...
|
|
| ~HeartBeatMonitor () |
|
|
void | start () |
| starts thread execution More...
|
|
void | stop () |
| stops thread execution More...
|
|
void | workerFunction () |
| Thread worker function for the Heartbeat monitor. This function will regularly check for missing heartbeat messages. If a heartbeat message is missing, m_error_function will be called. More...
|
|
Definition at line 34 of file HeartBeatMonitor.h.
icl_hardware::canopen_schunk::HeartBeatMonitor::HeartBeatMonitor |
( |
| ) |
|
icl_hardware::canopen_schunk::HeartBeatMonitor::~HeartBeatMonitor |
( |
| ) |
|
void icl_hardware::canopen_schunk::HeartBeatMonitor::addHeartbeat |
( |
const uint8_t |
node_id | ) |
|
Incoming heartbeats will trigger this function to update the most recent heartbeat time.
- Parameters
-
node_id | Node-ID the heartbeat message belonged to. |
Definition at line 81 of file HeartBeatMonitor.cpp.
uint16_t icl_hardware::canopen_schunk::HeartBeatMonitor::getHeartBeatCycleTime |
( |
| ) |
const |
|
inline |
The HeartbeatMonitor checks for missing heartbeat messages with this cycle time. If the last heartbeat message for one node was received more than one cycle ago, the error function will be triggered. So basically, this cycle time should be greater than the smallest heartbeat time.
- Returns
- The cycle time in milliseconds
Definition at line 69 of file HeartBeatMonitor.h.
void icl_hardware::canopen_schunk::HeartBeatMonitor::registerErrorCallback |
( |
const boost::function< void()> & |
f | ) |
|
This function will be called as soon as one node is missing a heartbeat message. Probably this function should turn off / stop all devices.
Definition at line 41 of file HeartBeatMonitor.cpp.
void icl_hardware::canopen_schunk::HeartBeatMonitor::reset |
( |
| ) |
|
Resets the heartbeat monitor. This will make the monitor forget about all past heartbeats and start from scratch.
Definition at line 110 of file HeartBeatMonitor.cpp.
void icl_hardware::canopen_schunk::HeartBeatMonitor::setHeartBeatCycleTime |
( |
const uint16_t |
heartbeat_cycle_time_ms | ) |
|
|
inline |
The HeartbeatMonitor checks for missing heartbeat messages with this cycle time. If the last heartbeat message for one node was received more than one cycle ago, the error function will be triggered. So basically, this cycle time should be greater than the smallest heartbeat time.
- Parameters
-
heartbeat_cycle_time_ms | The cycle time in milliseconds |
Definition at line 79 of file HeartBeatMonitor.h.
void icl_hardware::canopen_schunk::HeartBeatMonitor::start |
( |
| ) |
|
|
private |
void icl_hardware::canopen_schunk::HeartBeatMonitor::stop |
( |
| ) |
|
|
private |
void icl_hardware::canopen_schunk::HeartBeatMonitor::workerFunction |
( |
| ) |
|
|
private |
Thread worker function for the Heartbeat monitor. This function will regularly check for missing heartbeat messages. If a heartbeat message is missing, m_error_function will be called.
Definition at line 47 of file HeartBeatMonitor.cpp.
boost::function<void()> icl_hardware::canopen_schunk::HeartBeatMonitor::m_error_function |
|
private |
uint16_t icl_hardware::canopen_schunk::HeartBeatMonitor::m_period_time_ms |
|
private |
bool icl_hardware::canopen_schunk::HeartBeatMonitor::m_running |
|
private |
boost::thread icl_hardware::canopen_schunk::HeartBeatMonitor::m_thread |
|
private |
The documentation for this class was generated from the following files: