HDLC-Daemon
HdlcdPacketCtrl Class Reference

#include <HdlcdPacketCtrl.h>

Inheritance diagram for HdlcdPacketCtrl:
Collaboration diagram for HdlcdPacketCtrl:

Public Types

enum  E_CTRL_TYPE {
  CTRL_TYPE_PORT_STATUS = 0x00, CTRL_TYPE_ECHO = 0x10, CTRL_TYPE_KEEP_ALIVE = 0x20, CTRL_TYPE_PORT_KILL = 0x30,
  CTRL_TYPE_UNSET = 0xFF
}
 

Public Member Functions

E_CTRL_TYPE GetPacketType () const
 
bool GetIsAlive () const
 
bool GetIsLockedByOthers () const
 
bool GetIsLockedBySelf () const
 
bool GetDesiredLockState () const
 
- Public Member Functions inherited from Frame
 Frame ()
 The constructor of Frame objects. More...
 
virtual ~Frame ()
 The destructor of Frame objects. More...
 
size_t BytesNeeded () const
 Query the amount of outstanding data during reception for frame assembly. More...
 
bool ParseBytes (const unsigned char *a_ReadBuffer, size_t &a_ReadBufferOffset, size_t &a_BytesAvailable)
 Deliver a chunk of received bytes in the phase of deserialization. More...
 

Static Public Member Functions

static std::shared_ptr< HdlcdPacketCtrlCreateDeserializedPacket ()
 
static HdlcdPacketCtrl CreatePortStatusRequest (bool a_bLockSerialPort)
 
static HdlcdPacketCtrl CreatePortStatusResponse (bool a_bIsAlive, bool a_bIsLockedByOthers, bool a_bIsLockedBySelf)
 
static HdlcdPacketCtrl CreateEchoRequest ()
 
static HdlcdPacketCtrl CreateKeepAliveRequest ()
 
static HdlcdPacketCtrl CreatePortKillRequest ()
 

Additional Inherited Members

- Protected Attributes inherited from Frame
std::vector< unsigned char > m_Buffer
 The buffer containing partly received frames or higher-layer payload. More...
 
size_t m_BytesRemaining
 The amount of bytes required to finalize frame assembly during reception. More...
 

Detailed Description

Definition at line 43 of file HdlcdPacketCtrl.h.

Member Enumeration Documentation

Enumerator
CTRL_TYPE_PORT_STATUS 
CTRL_TYPE_ECHO 
CTRL_TYPE_KEEP_ALIVE 
CTRL_TYPE_PORT_KILL 
CTRL_TYPE_UNSET 

Definition at line 46 of file HdlcdPacketCtrl.h.

Member Function Documentation

static std::shared_ptr<HdlcdPacketCtrl> HdlcdPacketCtrl::CreateDeserializedPacket ( )
inlinestatic

Definition at line 54 of file HdlcdPacketCtrl.h.

Here is the caller graph for this function:

static HdlcdPacketCtrl HdlcdPacketCtrl::CreateEchoRequest ( )
inlinestatic

Definition at line 79 of file HdlcdPacketCtrl.h.

static HdlcdPacketCtrl HdlcdPacketCtrl::CreateKeepAliveRequest ( )
inlinestatic

Definition at line 85 of file HdlcdPacketCtrl.h.

Here is the caller graph for this function:

static HdlcdPacketCtrl HdlcdPacketCtrl::CreatePortKillRequest ( )
inlinestatic

Definition at line 91 of file HdlcdPacketCtrl.h.

static HdlcdPacketCtrl HdlcdPacketCtrl::CreatePortStatusRequest ( bool  a_bLockSerialPort)
inlinestatic

Definition at line 63 of file HdlcdPacketCtrl.h.

static HdlcdPacketCtrl HdlcdPacketCtrl::CreatePortStatusResponse ( bool  a_bIsAlive,
bool  a_bIsLockedByOthers,
bool  a_bIsLockedBySelf 
)
inlinestatic

Definition at line 70 of file HdlcdPacketCtrl.h.

Here is the caller graph for this function:

bool HdlcdPacketCtrl::GetDesiredLockState ( ) const
inline

Definition at line 121 of file HdlcdPacketCtrl.h.

Here is the caller graph for this function:

bool HdlcdPacketCtrl::GetIsAlive ( ) const
inline

Definition at line 103 of file HdlcdPacketCtrl.h.

bool HdlcdPacketCtrl::GetIsLockedByOthers ( ) const
inline

Definition at line 109 of file HdlcdPacketCtrl.h.

bool HdlcdPacketCtrl::GetIsLockedBySelf ( ) const
inline

Definition at line 115 of file HdlcdPacketCtrl.h.

E_CTRL_TYPE HdlcdPacketCtrl::GetPacketType ( ) const
inline

Definition at line 98 of file HdlcdPacketCtrl.h.

Here is the caller graph for this function:


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