Device
Functions
Methods
characteristic:addDescriptor (descriptor)
Adds a new descriptor to the characteristic. The descriptor must not have been added to another characteristic and there must not be another descriptor already added to the characteristic with same UUID.
Params
- descriptor
Descriptor
The descriptor to add to the characteristic.
Returns: bool
If the descriptor was successfully added to the device.
characteristic:notifying (notify)
Changes a characteristics notifying state. If a characterisitc is notifying, then a notification will be produced every time its value changes.
Params
- notify
bool
The descriptor to add to the characteristic.
Returns: bool
If the notifying state was successfully updated.
characteristic:setValue (value, type)
Sets the value of a characteristic. If notifying is enabled, then a notification will be produced.
Params
- value
bool|number|string|array
the new value - type
DataType
the type of the value
Returns: bool
If the value was successfully updated.