28#ifndef _OPENLCB_BLEGATTCLIENT_HXX_
29#define _OPENLCB_BLEGATTCLIENT_HXX_
92 ble::Defs::AttHandle in_bound)
127 ble::Defs::AttHandle out_bound, ble::Defs::AttHandle in_bound)
141 if (it->get()->connection() == conn &&
142 it->get()->get_out_bound() == out_handle)
156 if (it->get()->connection() == conn &&
157 it->get()->get_in_bound() == in_handle)
181 for (
int i = 0; i < (int)
clients_.size(); ++i)
193 std::vector<std::unique_ptr<BLEGattClient>>
clients_;
static Connections * instance()
Connection instance metadata.
Metadata for a BLE Gatt Client instance.
ble::Defs::AttHandle get_out_bound()
Get the out bound data characteristic handle.
ble::Defs::AttHandle inBound_
handle to in bound data characteristic
void set_protocol_engine(BLEProtocolEnginePtr protocol)
Save a protocol engine into this object's ownership.
ble::Connection * conn_
BLE device connection.
ble::Defs::AttHandle outBound_
handle to out bound data characteristic
~BLEGattClient()
Destructor.
BLEGattClient(ble::Connection *conn, ble::Defs::AttHandle out_bound, ble::Defs::AttHandle in_bound)
Constructor.
ble::Defs::AttHandle get_in_bound()
Get the in bound data characteristic handle.
BLEProtocolEngine * protocol_engine()
ble::Connection * connection()
Get the client connection.
BLEProtocolEnginePtr protocol_
This object implements the protocol over this connection.
Singleton container of all the BLE Gatt Clients.
void disconnect_callback(ble::Connection *conn)
Callback for when a connection disconnect occurs.
BLEGattClient * find_client_by_out(ble::Connection *conn, ble::Defs::AttHandle out_handle)
BLEGattClient * register_client(ble::Connection *conn, ble::Defs::AttHandle out_bound, ble::Defs::AttHandle in_bound)
Register an active client.
BLEGattClients()
Constructor.
BLEGattClient * find_client_by_in(ble::Connection *conn, ble::Defs::AttHandle in_handle)
void for_each_call(std::function< void(BLEGattClient *)> callback)
Invoke a callback method on each of the registered clients.
std::vector< std::unique_ptr< BLEGattClient > > clients_
All the BLE Gatt clients managed by the container.
Shared base class for protocol implementation on a per-BLE-connection basis.