Class BluetoothMeshProxyStateMachine
java.lang.Object
org.openremote.agent.protocol.bluetooth.mesh.BluetoothMeshProxyStateMachine
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Loggerstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionBluetoothMeshProxyStateMachine(BluetoothMeshProxy proxy, com.welie.blessed.BluetoothCentralManager bluetoothCentral, ScheduledExecutorService executorService, MainThreadManager commandSerializer, com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.BluetoothPeripheralCallback callback) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(Consumer<org.openremote.model.asset.agent.ConnectionStatus> statusConsumer, BluetoothMeshProxyConnectCallback callback) voidcom.welie.blessed.BluetoothPeripheralbooleanvoidonCharacteristicUpdate(com.welie.blessed.BluetoothPeripheral peripheral, byte[] value, com.welie.blessed.BluetoothGattCharacteristic characteristic, com.welie.blessed.BluetoothCommandStatus status) voidonCharacteristicWrite(com.welie.blessed.BluetoothPeripheral peripheral, byte[] value, com.welie.blessed.BluetoothGattCharacteristic characteristic, com.welie.blessed.BluetoothCommandStatus status) voidonConnectedPeripheral(com.welie.blessed.BluetoothPeripheral peripheral) voidonConnectionFailed(com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.BluetoothCommandStatus status) voidonDisconnectedPeripheral(com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.BluetoothCommandStatus status) voidonDiscoveredPeripheral(com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.ScanResult scanResult) voidonNotificationStateUpdate(com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.BluetoothGattCharacteristic characteristic, com.welie.blessed.BluetoothCommandStatus status) voidonServicesDiscovered(com.welie.blessed.BluetoothPeripheral peripheral, List<com.welie.blessed.BluetoothGattService> services) voidsendData(int mtuSize, byte[] data, BluetoothMeshProxySendDataCallback callback) void
-
Field Details
-
LOG
-
MAX_RETRY_COUNT
public static final int MAX_RETRY_COUNT- See Also:
-
CONNECT_TIMEOUT
public static final int CONNECT_TIMEOUT- See Also:
-
SCAN_TIMEOUT
public static final int SCAN_TIMEOUT- See Also:
-
-
Constructor Details
-
BluetoothMeshProxyStateMachine
public BluetoothMeshProxyStateMachine(BluetoothMeshProxy proxy, com.welie.blessed.BluetoothCentralManager bluetoothCentral, ScheduledExecutorService executorService, MainThreadManager commandSerializer, com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.BluetoothPeripheralCallback callback)
-
-
Method Details
-
setRxDataCallback
-
connect
public void connect(Consumer<org.openremote.model.asset.agent.ConnectionStatus> statusConsumer, BluetoothMeshProxyConnectCallback callback) -
disconnect
public void disconnect() -
sendData
-
onConnectedPeripheral
public void onConnectedPeripheral(com.welie.blessed.BluetoothPeripheral peripheral) -
onConnectionFailed
public void onConnectionFailed(com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.BluetoothCommandStatus status) -
onDisconnectedPeripheral
public void onDisconnectedPeripheral(com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.BluetoothCommandStatus status) -
onServicesDiscovered
public void onServicesDiscovered(com.welie.blessed.BluetoothPeripheral peripheral, List<com.welie.blessed.BluetoothGattService> services) -
onNotificationStateUpdate
public void onNotificationStateUpdate(com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.BluetoothGattCharacteristic characteristic, com.welie.blessed.BluetoothCommandStatus status) -
onCharacteristicUpdate
public void onCharacteristicUpdate(com.welie.blessed.BluetoothPeripheral peripheral, byte[] value, com.welie.blessed.BluetoothGattCharacteristic characteristic, com.welie.blessed.BluetoothCommandStatus status) -
onCharacteristicWrite
public void onCharacteristicWrite(com.welie.blessed.BluetoothPeripheral peripheral, byte[] value, com.welie.blessed.BluetoothGattCharacteristic characteristic, com.welie.blessed.BluetoothCommandStatus status) -
onDiscoveredPeripheral
public void onDiscoveredPeripheral(com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.ScanResult scanResult) -
isConnected
public boolean isConnected() -
getPeripheral
public com.welie.blessed.BluetoothPeripheral getPeripheral()
-