|
|
|
|
BTLEConnectionStatus (Function) In french: BTLEEtatConnexion Returns the current status of the connection to a Bluetooth Low Energy device or asks to be notified when the connection status changes. Remark: Bluetooth functions are not available in the Android emulator.
myDevice is btleDevice BTLEConnect(myDevice) ... SWITCH BTLEConnectionStatus(myDevice) CASE btleStatusConnected // Process OTHER CASE ... END
Syntax
Finding out the current connection status Hide the details
<Result> = BTLEConnectionStatus(<Device>)
<Result>: Integer constant Connection status: | | btleStatusConnected | The device is connected to the specified Bluetooth device. | btleStatusDisconnected | The device is not connected to the specified Bluetooth device. |
<Device>: btleDevice variable Name of the btleDevice variable corresponding to the device to use.
Enabling the notification whenever Bluetooth activation changes Hide the details
BTLEConnectionStatus(<WLanguage procedure>)
<WLanguage procedure>: Procedure name Name of WLangage procedure ("callback" procedure) that will be called when the status of Bluetooth connection changes on the device. This procedure has the following format : PROCEDURE <Procedure name> (<Device>, <Status>) where: - <Device> is a btleDevice variable corresponding to the Bluetooth device whose status is retrieved.
- <Status> is an integer corresponding ot the status of Bluetooth connection on the device:
| | btleStatusConnected | The device is connected to the specified Bluetooth device. | btleStatusDisconnected | The device is not connected to the specified Bluetooth device. |
There is no need to pass parameters to this procedure. Indeed, these parameters are automatically filled during each call. Remarks Necessary versions
- WINDEV applications:
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|