HDLC-Daemon
AliveGuard Class Reference

Class AliveGuard. More...

#include <AliveGuard.h>

Public Member Functions

 AliveGuard ()
 The constructor of AccessGuard objects. More...
 
bool UpdateSerialPortState (bool a_bAlive)
 Change the serial port state. More...
 
bool IsAlive () const
 Query whether the related serial port is currently alive. More...
 

Detailed Description

Class AliveGuard.

This guard object tracks whether a device attached via serial connections is alive, i.e., the baud rate is known and the HDLC protocol is initialized

Definition at line 32 of file AliveGuard.h.

Constructor & Destructor Documentation

AliveGuard::AliveGuard ( )
inline

The constructor of AccessGuard objects.

On creation, a serial port is considered as alive

Definition at line 38 of file AliveGuard.h.

Member Function Documentation

bool AliveGuard::IsAlive ( ) const
inline

Query whether the related serial port is currently alive.

Query whether the related serial device is currently alive

Returns
bool indicating whether the related serial device is currently alive

Definition at line 60 of file AliveGuard.h.

Here is the caller graph for this function:

bool AliveGuard::UpdateSerialPortState ( bool  a_bAlive)
inline

Change the serial port state.

Change the serial port state

Parameters
a_bAlivethe new state of the related serial device
Returns
bool indicates whether the state of the related serial device was changed by the call

Definition at line 48 of file AliveGuard.h.

Here is the caller graph for this function:


The documentation for this class was generated from the following file: