IPWorks BLE 2020 Delphi Edition

Questions / Feedback?

Unsubscribe Method

Unsubscribes from value updates for one or more characteristics.

procedure Unsubscribe(ServiceId: String; CharacteristicId: String);

Remarks

This method will unsubscribe from value updates for the characteristic represented by CharacteristicId (which is owned by the service specified by ServiceId). The Unsubscribed event will fire each time you unsubscribe from a characteristic.

Passing empty string for CharacteristicId will cause the component to unsubscribe from any characteristic it is subscribed to in the specified service. Passing empty string for both parameters does the same, but for all services. (Unsubscribing en masse may take time since every subscribe/unsubscribe operation requires a write request and response behind the scenes.)

An error will be thrown if either of the given Ids are invalid (when both are passed), if only CharacteristicId is passed, if the characteristic does not support subscribing for updates, or if there is an issue while trying to unsubscribe.

Refer to the Subscribe method for more information.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks BLE 2020 Delphi Edition - Version 20.0 [Build 8158]