Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
openlcb::BLEGattClient Class Reference

Metadata for a BLE Gatt Client instance. More...

#include <BLEGattClient.hxx>

Public Member Functions

 ~BLEGattClient ()
 Destructor.
 
ble::Defs::AttHandle get_out_bound ()
 Get the out bound data characteristic handle.
 
ble::Defs::AttHandle get_in_bound ()
 Get the in bound data characteristic handle.
 
ble::Connectionconnection ()
 Get the client connection.
 
void set_protocol_engine (BLEProtocolEnginePtr protocol)
 Save a protocol engine into this object's ownership.
 
BLEProtocolEngineprotocol_engine ()
 

Private Member Functions

 BLEGattClient (ble::Connection *conn, ble::Defs::AttHandle out_bound, ble::Defs::AttHandle in_bound)
 Constructor.
 

Private Attributes

ble::Connectionconn_
 BLE device connection.
 
ble::Defs::AttHandle outBound_
 handle to out bound data characteristic
 
ble::Defs::AttHandle inBound_
 handle to in bound data characteristic
 
BLEProtocolEnginePtr protocol_
 This object implements the protocol over this connection.
 

Friends

class BLEGattClients
 Allow private access from BLEGattClients container object.
 

Detailed Description

Metadata for a BLE Gatt Client instance.

Definition at line 41 of file BLEGattClient.hxx.

Constructor & Destructor Documentation

◆ ~BLEGattClient()

openlcb::BLEGattClient::~BLEGattClient ( )
inline

Destructor.

Definition at line 45 of file BLEGattClient.hxx.

◆ BLEGattClient()

openlcb::BLEGattClient::BLEGattClient ( ble::Connection conn,
ble::Defs::AttHandle  out_bound,
ble::Defs::AttHandle  in_bound 
)
inlineprivate

Constructor.

Parameters
connBLE device connection
out_boundhandle to out bound data characteristic
in_boundhandle to in bound data characteristic

Definition at line 91 of file BLEGattClient.hxx.

Member Function Documentation

◆ connection()

ble::Connection * openlcb::BLEGattClient::connection ( )
inline

Get the client connection.

Returns
client connection

Definition at line 65 of file BLEGattClient.hxx.

◆ get_in_bound()

ble::Defs::AttHandle openlcb::BLEGattClient::get_in_bound ( )
inline

Get the in bound data characteristic handle.

Returns
in bound data characteristic handle

Definition at line 58 of file BLEGattClient.hxx.

◆ get_out_bound()

ble::Defs::AttHandle openlcb::BLEGattClient::get_out_bound ( )
inline

Get the out bound data characteristic handle.

Returns
out bound data characteristic handle

Definition at line 51 of file BLEGattClient.hxx.

◆ protocol_engine()

BLEProtocolEngine * openlcb::BLEGattClient::protocol_engine ( )
inline
Returns
the protocol engine

Definition at line 82 of file BLEGattClient.hxx.

◆ set_protocol_engine()

void openlcb::BLEGattClient::set_protocol_engine ( BLEProtocolEnginePtr  protocol)
inline

Save a protocol engine into this object's ownership.

The new protocol engine will be deleted when this client is disconnected. One connection can set only one protocol engine. Any previous one will be deleted in this call.

Parameters
protocolthe newly created protocol engine. Will take ownership and delete it via abandon_and_delete.

Definition at line 76 of file BLEGattClient.hxx.

Friends And Related Symbol Documentation

◆ BLEGattClients

friend class BLEGattClients
friend

Allow private access from BLEGattClients container object.

Definition at line 106 of file BLEGattClient.hxx.

Member Data Documentation

◆ conn_

ble::Connection* openlcb::BLEGattClient::conn_
private

BLE device connection.

Definition at line 98 of file BLEGattClient.hxx.

◆ inBound_

ble::Defs::AttHandle openlcb::BLEGattClient::inBound_
private

handle to in bound data characteristic

Definition at line 100 of file BLEGattClient.hxx.

◆ outBound_

ble::Defs::AttHandle openlcb::BLEGattClient::outBound_
private

handle to out bound data characteristic

Definition at line 99 of file BLEGattClient.hxx.

◆ protocol_

BLEProtocolEnginePtr openlcb::BLEGattClient::protocol_
private

This object implements the protocol over this connection.

It is used only for onwership and notifying it upon disconnect.

Definition at line 103 of file BLEGattClient.hxx.


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