Skip to content

BLERemoteCharacteristic

A model of a remote BLE characteristic.

詳細情報

メンバー

~BLERemoteCharacteristic()

Destructor.

BLERemoteCharacteristic::~BLERemoteCharacteristic()

canBroadcast()

Does the characteristic support broadcasting?

bool BLERemoteCharacteristic::canBroadcast()

戻り値

bool True if the characteristic supports broadcasting.

canIndicate()

Does the characteristic support indications?

bool BLERemoteCharacteristic::canIndicate()

戻り値

bool True if the characteristic supports indications.

canNotify()

Does the characteristic support notifications?

bool BLERemoteCharacteristic::canNotify()

戻り値

bool True if the characteristic supports notifications.

canRead()

Does the characteristic support reading?

bool BLERemoteCharacteristic::canRead()

戻り値

bool True if the characteristic supports reading.

canWrite()

Does the characteristic support writing?

bool BLERemoteCharacteristic::canWrite()

戻り値

bool True if the characteristic supports writing.

canWriteNoResponse()

Does the characteristic support writing with no response?

bool BLERemoteCharacteristic::canWriteNoResponse()

戻り値

bool True if the characteristic supports writing with no response.

getDescriptor()

Get the descriptor instance with the given UUID that belongs to this characteristic.

BLERemoteDescriptor * BLERemoteCharacteristic::getDescriptor(BLEUUID uuid)

引数

  • BLEUUID uuid The UUID of the descriptor to find.

戻り値

BLERemoteDescriptor* The Remote descriptor (if present) or null if not present.

getDescriptors()

Retrieve the map of descriptors keyed by UUID.

std::map< std::string, BLERemoteDescriptor * > * BLERemoteCharacteristic::getDescriptors()

戻り値

std::map< , * > *

getHandle()

Get the handle for this characteristic.

uint16_t BLERemoteCharacteristic::getHandle()

戻り値

uint16_t The handle for this characteristic.

getUUID()

Get the UUID for this characteristic.

BLEUUID BLERemoteCharacteristic::getUUID()

戻り値

BLEUUID The UUID for this characteristic.

readValue()

Read the value of the remote characteristic.

std::string BLERemoteCharacteristic::readValue()

戻り値

std::string The value of the remote characteristic.

readUInt8()

Read a byte value

uint8_t BLERemoteCharacteristic::readUInt8()

戻り値

uint8_t The value as a byte

readUInt16()

Read an unsigned 16 bit value

uint16_t BLERemoteCharacteristic::readUInt16()

戻り値

uint16_t The unsigned 16 bit value.

readUInt32()

Read an unsigned 32 bit value.

uint32_t BLERemoteCharacteristic::readUInt32()

戻り値

uint32_t the unsigned 32 bit value.

registerForNotify()

Register for notifications.

void BLERemoteCharacteristic::registerForNotify(notify_callback _callback, bool notifications=true)

引数

  • notify_callback _callback
  • bool notifications

writeValue()

Write the new value for the characteristic from a data buffer.

void BLERemoteCharacteristic::writeValue(uint8_t *data, size_t length, bool response=false)

引数

  • uint8_t* data A pointer to a data buffer.
  • size_t length The length of the data in the data buffer.
  • bool response Whether we require a response from the write.

writeValue()

Write the new value for the characteristic.

void BLERemoteCharacteristic::writeValue(std::string newValue, bool response=false)

引数

  • std::string newValue The new value to write.
  • bool response Do we expect a response?

writeValue()

Write the new value for the characteristic.

void BLERemoteCharacteristic::writeValue(uint8_t newValue, bool response=false)

引数

  • uint8_t newValue The new byte value to write.
  • bool response Whether we require a response from the write.

toString()

Convert a to a string representation;

std::string BLERemoteCharacteristic::toString()

戻り値

std::string a String representation.

readRawData()

Read raw data from remote characteristic as hex bytes

uint8_t * BLERemoteCharacteristic::readRawData()

戻り値

uint8_t* return pointer data read