Method: BLE::Device#characteristics

Defined in:
lib/ble/device.rb

#characteristics(service) ⇒ Array<String>?

Note:

The list is retrieve once when object is connected if auto_refresh is enable, otherwise you need to call #refresh.

List of available characteristics UUID for a service.

Parameters:

  • service

    service can be a UUID, a service type or a service nickname

Returns:

  • (Array<String>, nil)

    list of characteristics or nil if the service doesn’t exist

Raises:



244
245
246
247
248
249
# File 'lib/ble/device.rb', line 244

def characteristics(service)
  _require_connection!
  if chars = _characteristics(service)
    chars.keys
  end
end