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, deviceName, disconnect, expandUUID, firmwareRevision, handleForDescriptor, hardwareRevision, isConnected, manufacturerName, modelNumber, onConnected, onDisconnected, onError, onIndication, onNotification, readBytes, readDeviceInformation, readDouble, readFloat, readInt16, readInt32, readInt64, readInt8, readString, readString0, readUInt16, readUInt32, readUInt64, readUInt8, readValue, serialNumber, serviceUUIDForAssignedNumber, services, softwareRevision, writeBytes, writeDouble, writeFloat, writeInt16, writeInt32, writeInt64, writeInt8, writeString, writeUInt16, writeUInt32, writeUInt64, writeUInt8, writeValue
Inherited Functions: address, characteristic, characteristicForAssignedNumber, characteristics, connect, connectAsync, deviceName, disconnect, expandUUID, firmwareRevision, handleForDescriptor, hardwareRevision, isConnected, manufacturerName, modelNumber, readBytes, readDouble, readFloat, readInt16, readInt32, readInt64, readInt8, readString, readString0, readUInt16, readUInt32, readUInt64, readUInt8, serialNumber, serviceUUIDForAssignedNumber, services, softwareRevision, writeBytes, writeDouble, writeFloat, writeInt16, writeInt32, writeInt64, writeInt8, writeString, writeUInt16, writeUInt32, writeUInt64, 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 Poco::UUID & serviceUUID,
const Poco::UUID & characteristicUUID
);
See also: IoT::BtLE::Peripheral::characteristic()
characteristicForAssignedNumber
Characteristic characteristicForAssignedNumber(
const Poco::UUID & serviceUUID,
Poco::UInt32 assignedNumber
);
characteristics
std::vector < Poco::UUID > characteristics(
const Poco::UUID & 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()
deviceName
std::string deviceName();
See also: IoT::BtLE::Peripheral::deviceName()
disconnect
void disconnect();
See also: IoT::BtLE::Peripheral::disconnect()
expandUUID
Poco::UUID expandUUID(
Poco::UInt32 uuid
);
See also: IoT::BtLE::Peripheral::expandUUID()
firmwareRevision
std::string firmwareRevision();
handleForDescriptor
Handle handleForDescriptor(
const Poco::UUID & serviceUUID,
const Poco::UUID & characteristicUUID,
const Poco::UUID & 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(
Handle valueHandle
);
See also: IoT::BtLE::Peripheral::readBytes()
readDouble
double readDouble(
Handle valueHandle
);
See also: IoT::BtLE::Peripheral::readDouble()
readFloat
float readFloat(
Handle valueHandle
);
See also: IoT::BtLE::Peripheral::readFloat()
readInt16
Poco::Int16 readInt16(
Handle valueHandle
);
See also: IoT::BtLE::Peripheral::readInt16()
readInt32
Poco::Int32 readInt32(
Handle valueHandle
);
See also: IoT::BtLE::Peripheral::readInt32()
readInt64
Poco::Int64 readInt64(
Handle valueHandle
);
See also: IoT::BtLE::Peripheral::readInt64()
readInt8
Poco::Int8 readInt8(
Handle valueHandle
);
See also: IoT::BtLE::Peripheral::readInt8()
readString
std::string readString(
Handle valueHandle
);
See also: IoT::BtLE::Peripheral::readString()
readString0
std::string readString0(
Handle valueHandle
);
See also: IoT::BtLE::Peripheral::readString0()
readUInt16
Poco::UInt16 readUInt16(
Handle valueHandle
);
See also: IoT::BtLE::Peripheral::readUInt16()
readUInt32
Poco::UInt32 readUInt32(
Handle valueHandle
);
See also: IoT::BtLE::Peripheral::readUInt32()
readUInt64
Poco::UInt64 readUInt64(
Handle valueHandle
);
See also: IoT::BtLE::Peripheral::readUInt64()
readUInt8
Poco::UInt8 readUInt8(
Handle valueHandle
);
See also: IoT::BtLE::Peripheral::readUInt8()
serialNumber
std::string serialNumber();
See also: IoT::BtLE::Peripheral::serialNumber()
serviceUUIDForAssignedNumber
Poco::UUID serviceUUIDForAssignedNumber(
Poco::UInt32 assignedNumber
);
services
std::vector < Poco::UUID > services();
See also: IoT::BtLE::Peripheral::services()
softwareRevision
std::string softwareRevision();
writeBytes
void writeBytes(
Handle valueHandle,
const std::vector < char > & value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeBytes()
writeDouble
void writeDouble(
Handle valueHandle,
double value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeDouble()
writeFloat
void writeFloat(
Handle valueHandle,
float value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeFloat()
writeInt16
void writeInt16(
Handle valueHandle,
Poco::Int16 value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeInt16()
writeInt32
void writeInt32(
Handle valueHandle,
Poco::Int32 value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeInt32()
writeInt64
void writeInt64(
Handle valueHandle,
Poco::Int64 value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeInt64()
writeInt8
void writeInt8(
Handle valueHandle,
Poco::Int8 value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeInt8()
writeString
void writeString(
Handle valueHandle,
const std::string & value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeString()
writeUInt16
void writeUInt16(
Handle valueHandle,
Poco::UInt16 value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeUInt16()
writeUInt32
void writeUInt32(
Handle valueHandle,
Poco::UInt32 value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeUInt32()
writeUInt64
void writeUInt64(
Handle valueHandle,
Poco::UInt64 value,
bool withResponse
);
See also: IoT::BtLE::Peripheral::writeUInt64()
writeUInt8
void writeUInt8(
Handle 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
);
readValue
template < typename T > T readValue(
Handle valueHandle
);
writeValue
template < typename T > void writeValue(
Handle valueHandle,
T value,
bool withResponse
);