This function will make the adapter stop listening for notifications for a characteristic.
Input:
dev : STRING
The address of the device.
service : INT
The service the characteristic belongs to.
char : INT
The characteristic to stop receiving notifications from.
Returns: INT
1
|
-
|
_BT_OK
|
|
Success.
|
0
|
-
|
_BT_ERR_NOT_SUPPORTED
|
|
The API is not supported.
|
-1
|
-
|
_BT_ERR_NOT_OPEN
|
|
The adapter is not powered(see btPower).
|
-4
|
-
|
_BT_ERR_NOT_FOUND
|
|
The device or characteristic could not be found.
|
-8
|
-
|
_BT_ERR_INVAL
|
|
This device does not have any characteristics.
|
-16
|
-
|
_BT_ERR_NOT_PERM
|
|
The characteristic does not support notifications.
|
-19
|
-
|
_BT_ERR_NOT_CONNECTED
|
|
The device is not connected.
|
Declaration:
FUNCTION btleNotifyStop : INT;
VAR_INPUT
dev : STRING;
service : INT;
char : INT;
END_VAR;
Example:
INCLUDE rtcu.inc
PROGRAM test;
VAR
rc : INT;
address : STRING;
END_VAR;
btPower();
BEGIN
...
rc := btleNotifyStop(dev := address, service := 16#18, char := 16#19);
DebugFmt(message:="btleNotifyStop "+address+": \1", v1:=rc);
...
END;
END_PROGRAM;
|