Arendi.BleLibrary
5.6.0.1400
Arendi.BleLibrary for OnSemi RSL-10 Dongle
|
Interface all platform specific implementations of the characteristic fulfill. More...
Public Member Functions | |
byte [] | ReadData (int timeout=Constants.ReadDataTimeout, CancellationToken cancellationToken=default(CancellationToken)) |
Retrieves the value of a specified characteristic from peripheral. More... | |
void | WriteData (byte[] data, WriteType writeType=WriteType.Default, int timeout=Constants.WriteDataTimeout, CancellationToken cancellationToken=default(CancellationToken)) |
Writes the data of the characteristic to the peripheral. More... | |
void | ChangeNotification (bool enable, int timeout=Constants.ChangeNotificationTimeout, CancellationToken cancellationToken=default(CancellationToken)) |
Changes the notifications for the value of a specified characteristic. More... | |
void | ChangeIndication (bool enable, int timeout=Constants.ChangeIndicationTimeout, CancellationToken cancellationToken=default(CancellationToken)) |
Changes the indications for the value of a specified characteristic. More... | |
Task< byte[]> | ReadDataAsync (int timeout=Constants.ReadDataTimeout, CancellationToken cancellationToken=default(CancellationToken)) |
Retrieves the value of a specified characteristic from peripheral. More... | |
Task | WriteDataAsync (byte[] data, WriteType writeType=WriteType.Default, int timeout=Constants.WriteDataTimeout, CancellationToken cancellationToken=default(CancellationToken)) |
Writes the data of the characteristic to the peripheral. More... | |
Task | ChangeNotificationAsync (bool enable, int timeout=Constants.ChangeNotificationTimeout, CancellationToken cancellationToken=default(CancellationToken)) |
Changes the notifications for the value of a specified characteristic. More... | |
Task | ChangeIndicationAsync (bool enable, int timeout=Constants.ChangeIndicationTimeout, CancellationToken cancellationToken=default(CancellationToken)) |
Changes the indications for the value of a specified characteristic. More... | |
Properties | |
Uuid | Uuid [get] |
Get the UUID identifying the characteristic. More... | |
byte [] | Value [get] |
Get the local value of the characteristic. The local value is not valid on all implementations. More... | |
CharacteristicPermissions | Permission [get] |
Get the permissions associated with the characteristic. More... | |
CharacteristicProperties | Property [get] |
Get the properties associated with the characteristic. More... | |
Dictionary< DescriptorType, IDescriptor > | Descriptors [get] |
Get a dictionary with all descriptors of this characteristic. More... | |
IPeripheral | Peripheral [get] |
Get the peripheral the characteristic is associated to. More... | |
ILog | Log [get] |
Logger instance. More... | |
Events | |
EventHandler< NotificationReceivedEventArgs > | NotificationReceived |
Event triggered, when a notification has been received. More... | |
EventHandler< IndicationReceivedEventArgs > | IndicationReceived |
Event triggered, when a indication has been received. More... | |
Interface all platform specific implementations of the characteristic fulfill.
The characteristic object supports "Task Asynchronous Programming". The methods with the ending "Async" handle its operation in a task which can be awaited on the upper level. The TAP methods won't trigger events unless other described. Error cases in TAP events are always triggering an exception based on the type BleException.
void Arendi.BleLibrary.Service.ICharacteristic.ChangeIndication | ( | bool | enable, |
int | timeout = Constants.ChangeIndicationTimeout , |
||
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
Changes the indications for the value of a specified characteristic.
enable | Enable or disable the indication. |
timeout | Optional timeout [ms] (Default: Constants.ChangeIndicationTimeout). The timeout may be set to infinite by using Timeout.Infinite |
cancellationToken | Token to cancel an ongoing async operation. |
Implemented in Arendi.BleLibrary.Service.CharacteristicBase< TPeripheral >, and OnSemi.RSL10.Adapter.Service.CharacteristicBase< TPeripheral >.
Task Arendi.BleLibrary.Service.ICharacteristic.ChangeIndicationAsync | ( | bool | enable, |
int | timeout = Constants.ChangeIndicationTimeout , |
||
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
Changes the indications for the value of a specified characteristic.
enable | Enable or disable the indication. |
timeout | Optional timeout [ms] (Default: Constants.ChangeIndicationTimeout). The timeout may be set to infinite by using Timeout.Infinite |
cancellationToken | Token to cancel an ongoing async operation. |
Implemented in OnSemi.RSL10.Adapter.Service.CharacteristicBase< TPeripheral >, and Arendi.BleLibrary.Service.CharacteristicBase< TPeripheral >.
void Arendi.BleLibrary.Service.ICharacteristic.ChangeNotification | ( | bool | enable, |
int | timeout = Constants.ChangeNotificationTimeout , |
||
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
Changes the notifications for the value of a specified characteristic.
enable | Enable or disable the notification. |
timeout | Optional timeout [ms] (Default: Constants.ChangeNotificationTimeout). The timeout may be set to infinite by using Timeout.Infinite |
cancellationToken | Token to cancel an ongoing async operation. |
Implemented in Arendi.BleLibrary.Service.CharacteristicBase< TPeripheral >, and OnSemi.RSL10.Adapter.Service.CharacteristicBase< TPeripheral >.
Task Arendi.BleLibrary.Service.ICharacteristic.ChangeNotificationAsync | ( | bool | enable, |
int | timeout = Constants.ChangeNotificationTimeout , |
||
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
Changes the notifications for the value of a specified characteristic.
enable | Enable or disable the notification. |
timeout | Optional timeout [ms] (Default: Constants.ChangeNotificationTimeout). The timeout may be set to infinite by using Timeout.Infinite |
cancellationToken | Token to cancel an ongoing async operation. |
Implemented in OnSemi.RSL10.Adapter.Service.CharacteristicBase< TPeripheral >, and Arendi.BleLibrary.Service.CharacteristicBase< TPeripheral >.
byte [] Arendi.BleLibrary.Service.ICharacteristic.ReadData | ( | int | timeout = Constants.ReadDataTimeout , |
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
Retrieves the value of a specified characteristic from peripheral.
timeout | Optional timeout [ms] (Default: Constants.ReadDataTimeout). The timeout may be set to infinite by using Timeout.Infinite |
cancellationToken | Token to cancel an ongoing async operation. |
Implemented in OnSemi.RSL10.Adapter.Service.CharacteristicBase< TPeripheral >, and Arendi.BleLibrary.Service.CharacteristicBase< TPeripheral >.
Task<byte[]> Arendi.BleLibrary.Service.ICharacteristic.ReadDataAsync | ( | int | timeout = Constants.ReadDataTimeout , |
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
Retrieves the value of a specified characteristic from peripheral.
timeout | Optional timeout [ms] (Default: Constants.ReadDataTimeout). The timeout may be set to infinite by using Timeout.Infinite |
cancellationToken | Token to cancel an ongoing async operation. |
Implemented in OnSemi.RSL10.Adapter.Service.CharacteristicBase< TPeripheral >, and Arendi.BleLibrary.Service.CharacteristicBase< TPeripheral >.
void Arendi.BleLibrary.Service.ICharacteristic.WriteData | ( | byte [] | data, |
WriteType | writeType = WriteType.Default , |
||
int | timeout = Constants.WriteDataTimeout , |
||
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
Writes the data of the characteristic to the peripheral.
data | Data to write to the characteristic. |
writeType | Type of the used write operation. |
timeout | Optional timeout [ms] (Default: Constants.WriteDataTimeout). The timeout may be set to infinite by using Timeout.Infinite |
cancellationToken | Token to cancel an ongoing async operation. |
Implemented in OnSemi.RSL10.Adapter.Service.CharacteristicBase< TPeripheral >, and Arendi.BleLibrary.Service.CharacteristicBase< TPeripheral >.
Task Arendi.BleLibrary.Service.ICharacteristic.WriteDataAsync | ( | byte [] | data, |
WriteType | writeType = WriteType.Default , |
||
int | timeout = Constants.WriteDataTimeout , |
||
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
Writes the data of the characteristic to the peripheral.
data | Data to write to the characteristic. |
writeType | Type of the used write operation. |
timeout | Optional timeout [ms] (Default: Constants.WriteDataTimeout). The timeout may be set to infinite by using Timeout.Infinite |
cancellationToken | Token to cancel an ongoing async operation. |
Implemented in OnSemi.RSL10.Adapter.Service.CharacteristicBase< TPeripheral >, and Arendi.BleLibrary.Service.CharacteristicBase< TPeripheral >.
|
get |
Get a dictionary with all descriptors of this characteristic.
|
get |
Logger instance.
|
get |
Get the peripheral the characteristic is associated to.
|
get |
Get the permissions associated with the characteristic.
|
get |
Get the properties associated with the characteristic.
|
get |
Get the UUID identifying the characteristic.
|
get |
Get the local value of the characteristic. The local value is not valid on all implementations.
EventHandler<IndicationReceivedEventArgs> Arendi.BleLibrary.Service.ICharacteristic.IndicationReceived |
Event triggered, when a indication has been received.
EventHandler<NotificationReceivedEventArgs> Arendi.BleLibrary.Service.ICharacteristic.NotificationReceived |
Event triggered, when a notification has been received.