|
BAOS SDK
18.2.0
|
Auto starts and stops the Heartbeat class using RAII. More...
#include <BaosHeartbeat.h>
Public Member Functions | |
| ScopedBaosHeartbeat (std::shared_ptr< BaosConnector > connector, unsigned int interval=1000) | |
| Creates a ScopedBaosHeartbeat and auto-starts the heartbeat thread. More... | |
| virtual | ~ScopedBaosHeartbeat () |
| Destroys the scoped boas heartbeat. More... | |
Public Member Functions inherited from kdrive::baos::BaosHeartbeat | |
| BaosHeartbeat (std::shared_ptr< BaosConnector > connector, unsigned int interval=1000) | |
| Creates a BaosHeartbeat and associates it with a connection precondition: connector is not null. More... | |
| virtual | ~BaosHeartbeat () |
| Destroys the BaosHeartbeat Stops the heartbeat thread if it is still active. More... | |
| void | start () |
| Starts the heartbeat thread. More... | |
| void | stop () |
| Stops the heartbeat thread. More... | |
| bool | isAlive () const |
| Returns true if the last request was successful. More... | |
| unsigned long | getTimeSinceReset () const |
| Returns the last successful value of the server item time since reset. More... | |
| void | setAutoTerminate (bool autoTerminate, int failCount=3) |
| If autoTerminate is true we disconnect the connection and raise the terminated event as soon as isAlive is false. More... | |
Auto starts and stops the Heartbeat class using RAII.
| ScopedBaosHeartbeat::ScopedBaosHeartbeat | ( | std::shared_ptr< BaosConnector > | connector, |
| unsigned int | interval = 1000 |
||
| ) |
Creates a ScopedBaosHeartbeat and auto-starts the heartbeat thread.
precondition: connector is not null
|
virtual |
Destroys the scoped boas heartbeat.
Stops the heartbeat thread.
1.8.11