File Information
Library: IoT/BtLE
Package: BtLE
Header: IoT/BtLE/GATTPeripheral.h
Description
This class provides a high-level interface to a Bt LE peripheral device using the Bt Generic Attribute Profile (GATT).
Inheritance
Direct Base Classes: Peripheral
All Base Classes: Peripheral
Member Summary
Member Functions: address, characteristic, characteristicForAssignedNumber, characteristics, connect, connectAsync, disconnect, firmwareRevision, handleForDescriptor, hardwareRevision, isConnected, manufacturerName, modelNumber, onConnected, onDisconnected, onError, onIndication, onNotification, readBytes, readDeviceInformation, readInt16, readInt32, readInt8, readString, readString0, readUInt16, readUInt32, readUInt8, serialNumber, serviceUUIDForAssignedNumber, services, softwareRevision, writeBytes, writeInt16, writeInt32, writeInt8, writeString, writeUInt16, writeUInt32, writeUInt8
Inherited Functions: address, characteristic, characteristicForAssignedNumber, characteristics, connect, connectAsync, disconnect, firmwareRevision, handleForDescriptor, hardwareRevision, isConnected, manufacturerName, modelNumber, readBytes, readInt16, readInt32, readInt8, readString, readString0, readUInt16, readUInt32, readUInt8, serialNumber, serviceUUIDForAssignedNumber, services, softwareRevision, writeBytes, writeInt16, writeInt32, writeInt8, writeString, writeUInt16, writeUInt32, writeUInt8
Constructors
GATTPeripheral
GATTPeripheral(
const std::string & address,
GATTClient::Ptr pGATTClient
);
Creates the GATTPeripheral.
Destructor
~GATTPeripheral
~GATTPeripheral();
Destroys the GATTPeripheral.
Member Functions
address
std::string address() const;
See also: IoT::BtLE::Peripheral::address()
characteristic
Characteristic characteristic(
const std::string & serviceUUID,
const std::string & characteristicUUID
);
See also: IoT::BtLE::Peripheral::characteristic()
characteristicForAssignedNumber
Characteristic characteristicForAssignedNumber(
const std::string & serviceUUID,
Poco::UInt32 assignedNumber
);
characteristics
std::vector < std::string > characteristics(
const std::string & serviceUUID
);
See also: IoT::BtLE::Peripheral::characteristics()
connect
void connect();
See also: IoT::BtLE::Peripheral::connect()
connectAsync
void connectAsync();
See also: IoT::BtLE::Peripheral::connectAsync()
disconnect
void disconnect();
See also: IoT::BtLE::Peripheral::disconnect()
firmwareRevision
std::string firmwareRevision();
handleForDescriptor
Poco::UInt16 handleForDescriptor(
const std::string & serviceUUID,
const std::string & descriptorUUID
);
hardwareRevision
std::string hardwareRevision();
isConnected
bool isConnected() const;
See also: IoT::BtLE::Peripheral::isConnected()
manufacturerName
std::string manufacturerName();
modelNumber
std::string modelNumber();
See also: IoT::BtLE::Peripheral::modelNumber()
readBytes
std::vector < char > readBytes(
Poco::UInt16 valueHandle
);
See also: IoT::BtLE::Peripheral::readBytes()
readInt16
Poco::Int16 readInt16(
Poco::UInt16 valueHandle
);
See also: IoT::BtLE::Peripheral::readInt16()
readInt32
Poco::Int32 readInt32(
Poco::UInt16 valueHandle
);
See also: IoT::BtLE::Peripheral::readInt32()
readInt8
Poco::Int8 readInt8(
Poco::UInt16 valueHandle
);
See also: IoT::BtLE::Peripheral::readInt8()
readString
std::string readString(
Poco::UInt16 valueHandle
);
See also: IoT::BtLE::Peripheral::readString()
readString0
std::string readString0(
Poco::UInt16 valueHandle
);
See also: IoT::BtLE::Peripheral::readString0()
readUInt16
Poco::UInt16 readUInt16(
Poco::UInt16 valueHandle
);
See also: IoT::BtLE::Peripheral::readUInt16()
readUInt32
Poco::UInt32 readUInt32(
Poco::UInt16 valueHandle
);
See also: IoT::BtLE::Peripheral::readUInt32()
readUInt8
Poco::UInt8 readUInt8(
Poco::UInt16 valueHandle
);
See also: IoT::BtLE::Peripheral::readUInt8()
serialNumber
std::string serialNumber();
See also: IoT::BtLE::Peripheral::serialNumber()
serviceUUIDForAssignedNumber
std::string serviceUUIDForAssignedNumber(
Poco::UInt32 assignedNumber
);
services
std::vector < std::string > services();
See also: IoT::BtLE::Peripheral::services()
softwareRevision
std::string softwareRevision();
writeBytes
void writeBytes(
Poco::UInt16 valueHandle,
const std::vector < char > & value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeBytes()
writeInt16
void writeInt16(
Poco::UInt16 valueHandle,
Poco::Int16 value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeInt16()
writeInt32
void writeInt32(
Poco::UInt16 valueHandle,
Poco::UInt32 value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeInt32()
writeInt8
void writeInt8(
Poco::UInt16 valueHandle,
Poco::Int8 value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeInt8()
writeString
void writeString(
Poco::UInt16 valueHandle,
const std::string & value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeString()
writeUInt16
void writeUInt16(
Poco::UInt16 valueHandle,
Poco::UInt16 value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeUInt16()
writeUInt32
void writeUInt32(
Poco::UInt16 valueHandle,
Poco::UInt32 value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeUInt32()
writeUInt8
void writeUInt8(
Poco::UInt16 valueHandle,
Poco::UInt8 value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeUInt8()
onConnected
void onConnected();
onDisconnected
void onDisconnected();
onError
void onError(
const std::string & error
);
onIndication
void onIndication(
const GATTClient::Indication & ind
);
onNotification
void onNotification(
const GATTClient::Notification & nf
);
readDeviceInformation
std::string readDeviceInformation(
Poco::UInt32 assignedNumber
);