Class CharacteristicBool
Represents a Bluetooth characteristic with a boolean value.
Assembly: Meadow.dll
View Source
public class CharacteristicBool : Characteristic<bool>, ICharacteristic, IAttribute, IJsonSerializable
Inheritance: System.Object
-> Meadow.Gateways.Bluetooth.Characteristic -> Meadow.Gateways.Bluetooth.Characteristic<T>
Implements:
Meadow.Gateways.Bluetooth.ICharacteristic, Meadow.Gateways.Bluetooth.IAttribute, Meadow.Gateways.Bluetooth.IJsonSerializable
Methods
HandleDataWrite(byte[])
Handles the data write for the characteristic.
View Source
public override void HandleDataWrite(byte[] data)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | data | The data to be written. |
SerializeValue(bool)
Serializes the boolean value to a byte array.
View Source
protected override byte[] SerializeValue(bool value)
Returns
System.Byte[]
: The byte array representing the serialized value.
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | The boolean value to be serialized. |