Open Lighting Architecture
Latest Git
|
An class that provides health checking for a connection. The subclasses implement the SendHeartbeat and HeartbeatTimeout methods.
Public Member Functions | |
HealthCheckedConnection (ola::thread::SchedulerInterface *scheduler, const ola::TimeInterval timeout_interval) | |
bool | Setup () |
virtual void | SendHeartbeat ()=0 |
void | HeartbeatSent () |
void | HeartbeatReceived () |
void | PauseTimer () |
void | ResumeTimer () |
Protected Member Functions | |
virtual void | HeartbeatTimeout ()=0 |
void ola::network::HealthCheckedConnection::HeartbeatReceived | ( | ) |
Reset the RX timer
void ola::network::HealthCheckedConnection::HeartbeatSent | ( | ) |
Call this when a heartbeat is piggybacked on another message. This prevents sending heatbeats unless necessary.
Reset the send timer
|
protectedpure virtual |
This is called when we don't receive a health check within the interval.
void ola::network::HealthCheckedConnection::PauseTimer | ( | ) |
Pause the receive timer
void ola::network::HealthCheckedConnection::ResumeTimer | ( | ) |
Resume the health check timer. Call this when reading is resumed.
Resume the receive timer
bool ola::network::HealthCheckedConnection::Setup | ( | ) |
Setup the health checked channel