DAQ Driver
Heartbeat Class Reference

The Heartbeat class Make sure both devices are still alive. More...

#include <Driver/DriverComponents/Heartbeat.h>

Inheritance diagram for Heartbeat:
Collaboration diagram for Heartbeat:

Public Member Functions

 Heartbeat (std::function< void(void)> callback, pMessageProcessor messageProcessor)
 
void reset ()
 reset Resets the components More...
 
void process ()
 
- Public Member Functions inherited from AbstractDriverComponent
 AbstractDriverComponent (pMessageProcessor messageProcessor)
 

Protected Member Functions

void hearthbeatTimerTimeout ()
 
void hearthbeatDieTimerTimeout ()
 
void handleHearthbeatMessage (const google::protobuf::Message &message)
 

Private Attributes

Timer m_hearthbeatTimer
 
Timer m_hearthbeatDieTimer
 
std::function< void(void)> m_callback
 

Additional Inherited Members

- Protected Attributes inherited from AbstractDriverComponent
pMessageProcessor m_messageProcessor
 

Detailed Description

The Heartbeat class Make sure both devices are still alive.

Definition at line 23 of file Heartbeat.h.

Constructor & Destructor Documentation

◆ Heartbeat()

Heartbeat::Heartbeat ( std::function< void(void)>  callback,
pMessageProcessor  messageProcessor 
)

Definition at line 3 of file Heartbeat.cpp.

Member Function Documentation

◆ handleHearthbeatMessage()

void Heartbeat::handleHearthbeatMessage ( const google::protobuf::Message &  message)
protected

Definition at line 45 of file Heartbeat.cpp.

◆ hearthbeatDieTimerTimeout()

void Heartbeat::hearthbeatDieTimerTimeout ( )
protected

Definition at line 35 of file Heartbeat.cpp.

◆ hearthbeatTimerTimeout()

void Heartbeat::hearthbeatTimerTimeout ( )
protected

Definition at line 27 of file Heartbeat.cpp.

◆ process()

void Heartbeat::process ( )

Definition at line 21 of file Heartbeat.cpp.

◆ reset()

void Heartbeat::reset ( )
virtual

reset Resets the components

Implements AbstractDriverComponent.

Definition at line 15 of file Heartbeat.cpp.

Member Data Documentation

◆ m_callback

std::function<void(void)> Heartbeat::m_callback
private

Definition at line 49 of file Heartbeat.h.

◆ m_hearthbeatDieTimer

Timer Heartbeat::m_hearthbeatDieTimer
private

Definition at line 48 of file Heartbeat.h.

◆ m_hearthbeatTimer

Timer Heartbeat::m_hearthbeatTimer
private

Definition at line 47 of file Heartbeat.h.