Class BluetoothMeshProxyStateMachine
java.lang.Object
org.openremote.agent.protocol.bluetooth.mesh.BluetoothMeshProxyStateMachine
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final Logger
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionBluetoothMeshProxyStateMachine
(BluetoothMeshProxy proxy, com.welie.blessed.BluetoothCentralManager bluetoothCentral, ExecutorService executorService, ScheduledExecutorService scheduledExecutorService, MainThreadManager commandSerializer, com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.BluetoothPeripheralCallback callback) -
Method Summary
Modifier and TypeMethodDescriptionvoid
connect
(Consumer<org.openremote.model.asset.agent.ConnectionStatus> statusConsumer, BluetoothMeshProxyConnectCallback callback) void
com.welie.blessed.BluetoothPeripheral
boolean
void
onCharacteristicUpdate
(com.welie.blessed.BluetoothPeripheral peripheral, byte[] value, com.welie.blessed.BluetoothGattCharacteristic characteristic, com.welie.blessed.BluetoothCommandStatus status) void
onCharacteristicWrite
(com.welie.blessed.BluetoothPeripheral peripheral, byte[] value, com.welie.blessed.BluetoothGattCharacteristic characteristic, com.welie.blessed.BluetoothCommandStatus status) void
onConnectedPeripheral
(com.welie.blessed.BluetoothPeripheral peripheral) void
onConnectionFailed
(com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.BluetoothCommandStatus status) void
onDisconnectedPeripheral
(com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.BluetoothCommandStatus status) void
onDiscoveredPeripheral
(com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.ScanResult scanResult) void
onNotificationStateUpdate
(com.welie.blessed.BluetoothPeripheral peripheral, com.welie.blessed.BluetoothGattCharacteristic characteristic, com.welie.blessed.BluetoothCommandStatus status) void
onServicesDiscovered
(com.welie.blessed.BluetoothPeripheral peripheral, List<com.welie.blessed.BluetoothGattService> services) void
sendData
(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, ExecutorService executorService, ScheduledExecutorService scheduledExecutorService, 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()
-