Skip to main content

Class Characteristic<T>

Represents a Bluetooth characteristic with a generic value of type <code class="typeparamref">T</code>.

Assembly: Meadow.dll​
View Source​
Declaration
public abstract class Characteristic<T> : Characteristic, ICharacteristic, IAttribute, IJsonSerializable

Inheritance: System.Object -> Meadow.Gateways.Bluetooth.Characteristic

Derived:
Meadow.Gateways.Bluetooth.CharacteristicBool

Implements:
Meadow.Gateways.Bluetooth.ICharacteristic

Methods​

SerializeValue(T)​

Serializes the value of type <code class="typeparamref">T</code> to a byte array.

View Source​
Declaration
protected abstract byte[] SerializeValue(T value)
Returns​

System.Byte[]: The byte array representing the serialized value.

Parameters​
TypeNameDescription
<T>valueThe value to be serialized.

SetValue(T)​

Sets the value of the characteristic.

View Source​
Declaration
public void SetValue(T value)
Parameters​
TypeNameDescription
<T>valueThe value to be set.

SetValue(object)​

Sets the value of the characteristic.

View Source​
Declaration
public override void SetValue(object value)
Parameters​
TypeNameDescription
System.ObjectvalueThe value to be set.

Implements​