mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[bluetooth.bluegiga] Refactored and added null annotations (#13974)
* All SAT warnings Signed-off-by: Leo Siepel <leosiepel@gmail.com>
This commit is contained in:
parent
a3c621fffc
commit
ca09f71a6c
@ -14,6 +14,7 @@ package org.openhab.binding.bluetooth.bluegiga;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.bluetooth.BluetoothCharacteristic;
|
||||
|
||||
/**
|
||||
@ -25,6 +26,7 @@ import org.openhab.binding.bluetooth.BluetoothCharacteristic;
|
||||
* @author Connor Petty - Initial contribution
|
||||
*
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaBluetoothCharacteristic extends BluetoothCharacteristic {
|
||||
|
||||
private boolean notifying;
|
||||
|
@ -32,7 +32,6 @@ import org.openhab.binding.bluetooth.BluetoothAddress;
|
||||
import org.openhab.binding.bluetooth.BluetoothBindingConstants;
|
||||
import org.openhab.binding.bluetooth.BluetoothCharacteristic;
|
||||
import org.openhab.binding.bluetooth.BluetoothDescriptor;
|
||||
import org.openhab.binding.bluetooth.BluetoothDevice;
|
||||
import org.openhab.binding.bluetooth.BluetoothException;
|
||||
import org.openhab.binding.bluetooth.BluetoothService;
|
||||
import org.openhab.binding.bluetooth.BluetoothUtils;
|
||||
@ -65,7 +64,7 @@ import org.slf4j.LoggerFactory;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaBluetoothDevice extends BaseBluetoothDevice implements BlueGigaEventListener {
|
||||
private final long TIMEOUT_SEC = 60;
|
||||
private static final long TIMEOUT_SEC = 60;
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(BlueGigaBluetoothDevice.class);
|
||||
|
||||
@ -548,13 +547,17 @@ public class BlueGigaBluetoothDevice extends BaseBluetoothDevice implements Blue
|
||||
characteristic.setService(service);
|
||||
handleToCharacteristic.put(handle, characteristic);
|
||||
} else {
|
||||
@Nullable
|
||||
Integer chrHandle = handleToCharacteristic.floorKey(handle);
|
||||
if (chrHandle == null) {
|
||||
logger.debug("BlueGiga: Unable to find characteristic for handle {}", handle);
|
||||
return;
|
||||
}
|
||||
@Nullable
|
||||
BlueGigaBluetoothCharacteristic characteristic = handleToCharacteristic.get(chrHandle);
|
||||
characteristic.addDescriptor(new BluetoothDescriptor(characteristic, attUUID, handle));
|
||||
if (characteristic != null) {
|
||||
characteristic.addDescriptor(new BluetoothDescriptor(characteristic, attUUID, handle));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -749,9 +752,11 @@ public class BlueGigaBluetoothDevice extends BaseBluetoothDevice implements Blue
|
||||
} else {
|
||||
// it must be one of the descriptors we need to update
|
||||
UUID attUUID = handleToUUID.get(handle);
|
||||
BluetoothDescriptor descriptor = characteristic.getDescriptor(attUUID);
|
||||
notifyListeners(BluetoothEventType.DESCRIPTOR_UPDATED, descriptor,
|
||||
BluetoothUtils.toByteArray(event.getValue()));
|
||||
if (attUUID != null) {
|
||||
BluetoothDescriptor descriptor = characteristic.getDescriptor(attUUID);
|
||||
notifyListeners(BluetoothEventType.DESCRIPTOR_UPDATED, descriptor,
|
||||
BluetoothUtils.toByteArray(event.getValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,8 +118,8 @@ public class BlueGigaBridgeHandler extends AbstractBluetoothBridgeHandler<BlueGi
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(BlueGigaBridgeHandler.class);
|
||||
|
||||
private final int COMMAND_TIMEOUT_MS = 5000;
|
||||
private final int INITIALIZATION_INTERVAL_SEC = 60;
|
||||
private static final int COMMAND_TIMEOUT_MS = 5000;
|
||||
private static final int INITIALIZATION_INTERVAL_SEC = 60;
|
||||
|
||||
private final SerialPortManager serialPortManager;
|
||||
|
||||
@ -314,9 +314,11 @@ public class BlueGigaBridgeHandler extends AbstractBluetoothBridgeHandler<BlueGi
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
if (initTask != null) {
|
||||
initTask.cancel(true);
|
||||
initTask = null;
|
||||
@Nullable
|
||||
ScheduledFuture<?> task = initTask;
|
||||
if (task != null) {
|
||||
task.cancel(true);
|
||||
task = null;
|
||||
}
|
||||
stop();
|
||||
super.dispose();
|
||||
@ -355,8 +357,10 @@ public class BlueGigaBridgeHandler extends AbstractBluetoothBridgeHandler<BlueGi
|
||||
}
|
||||
|
||||
private void cancelScheduledPassiveScan() {
|
||||
if (passiveScanIdleTimer != null) {
|
||||
passiveScanIdleTimer.cancel(true);
|
||||
@Nullable
|
||||
Future<?> scanTimer = passiveScanIdleTimer;
|
||||
if (scanTimer != null) {
|
||||
scanTimer.cancel(true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -367,13 +371,17 @@ public class BlueGigaBridgeHandler extends AbstractBluetoothBridgeHandler<BlueGi
|
||||
|
||||
private void stopScheduledTasks() {
|
||||
cancelScheduledPassiveScan();
|
||||
if (removeInactiveDevicesTask != null) {
|
||||
removeInactiveDevicesTask.cancel(true);
|
||||
removeInactiveDevicesTask = null;
|
||||
@Nullable
|
||||
ScheduledFuture<?> removeTask = removeInactiveDevicesTask;
|
||||
if (removeTask != null) {
|
||||
removeTask.cancel(true);
|
||||
removeTask = null;
|
||||
}
|
||||
if (discoveryTask != null) {
|
||||
discoveryTask.cancel(true);
|
||||
discoveryTask = null;
|
||||
@Nullable
|
||||
ScheduledFuture<?> discoverTask = discoveryTask;
|
||||
if (discoverTask != null) {
|
||||
discoverTask.cancel(true);
|
||||
discoverTask = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,89 +103,88 @@ class BlueGigaResponsePackets {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(BlueGigaResponsePackets.class);
|
||||
|
||||
private static final Map<Integer, Class<?>> packetMap = new HashMap<>();
|
||||
private static final Map<Integer, Class<?>> PACKETMAP = new HashMap<>();
|
||||
|
||||
static {
|
||||
packetMap.put(Objects.hash(0x00, 0x06, true), BlueGigaProtocolErrorEvent.class);
|
||||
packetMap.put(Objects.hash(0x00, 0x02, true), BlueGigaEndpointWatermarkRxEvent.class);
|
||||
packetMap.put(Objects.hash(0x00, 0x03, true), BlueGigaEndpointWatermarkTxEvent.class);
|
||||
packetMap.put(Objects.hash(0x00, 0x05, true), BlueGigaNoLicenseKeyEvent.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x05, false), BlueGigaAttributeWriteResponse.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x0A, false), BlueGigaExecuteWriteResponse.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x00, false), BlueGigaFindByTypeValueResponse.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x03, false), BlueGigaFindInformationResponse.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x07, false), BlueGigaIndicateConfirmResponse.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x09, false), BlueGigaPrepareWriteResponse.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x01, false), BlueGigaReadByGroupTypeResponse.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x04, false), BlueGigaReadByHandleResponse.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x02, false), BlueGigaReadByTypeResponse.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x08, false), BlueGigaReadLongResponse.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x0B, false), BlueGigaReadMultipleResponse.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x06, false), BlueGigaWriteCommandResponse.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x01, true), BlueGigaProcedureCompletedEvent.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x05, true), BlueGigaAttributeValueEvent.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x04, true), BlueGigaFindInformationFoundEvent.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x02, true), BlueGigaGroupFoundEvent.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x00, true), BlueGigaIndicatedEvent.class);
|
||||
packetMap.put(Objects.hash(0x04, 0x00, true), BlueGigaReadMultipleResponseEvent.class);
|
||||
packetMap.put(Objects.hash(0x02, 0x01, false), BlueGigaReadResponse.class);
|
||||
packetMap.put(Objects.hash(0x02, 0x02, false), BlueGigaReadTypeResponse.class);
|
||||
packetMap.put(Objects.hash(0x02, 0x02, false), BlueGigaSendAttributesResponse.class);
|
||||
packetMap.put(Objects.hash(0x02, 0x03, false), BlueGigaUserReadResponseResponse.class);
|
||||
packetMap.put(Objects.hash(0x02, 0x04, false), BlueGigaUserWriteResponseResponse.class);
|
||||
packetMap.put(Objects.hash(0x02, 0x00, false), BlueGigaWriteResponse.class);
|
||||
packetMap.put(Objects.hash(0x02, 0x02, true), BlueGigaAttributeStatusEvent.class);
|
||||
packetMap.put(Objects.hash(0x02, 0x01, true), BlueGigaUserReadRequestEvent.class);
|
||||
packetMap.put(Objects.hash(0x02, 0x00, true), BlueGigaValueEvent.class);
|
||||
packetMap.put(Objects.hash(0x03, 0x04, false), BlueGigaChannelMapGetResponse.class);
|
||||
packetMap.put(Objects.hash(0x03, 0x00, false), BlueGigaDisconnectResponse.class);
|
||||
packetMap.put(Objects.hash(0x03, 0x01, false), BlueGigaGetRssiResponse.class);
|
||||
packetMap.put(Objects.hash(0x03, 0x07, false), BlueGigaGetStatusResponse.class);
|
||||
packetMap.put(Objects.hash(0x03, 0x02, false), BlueGigaUpdateResponse.class);
|
||||
packetMap.put(Objects.hash(0x03, 0x04, true), BlueGigaDisconnectedEvent.class);
|
||||
packetMap.put(Objects.hash(0x03, 0x02, true), BlueGigaFeatureIndEvent.class);
|
||||
packetMap.put(Objects.hash(0x03, 0x00, true), BlueGigaConnectionStatusEvent.class);
|
||||
packetMap.put(Objects.hash(0x03, 0x01, true), BlueGigaVersionIndEvent.class);
|
||||
packetMap.put(Objects.hash(0x06, 0x07, false), BlueGigaSetScanParametersResponse.class);
|
||||
packetMap.put(Objects.hash(0x06, 0x03, false), BlueGigaConnectDirectResponse.class);
|
||||
packetMap.put(Objects.hash(0x06, 0x05, false), BlueGigaConnectSelectiveResponse.class);
|
||||
packetMap.put(Objects.hash(0x06, 0x02, false), BlueGigaDiscoverResponse.class);
|
||||
packetMap.put(Objects.hash(0x06, 0x08, false), BlueGigaSetAdvParametersResponse.class);
|
||||
packetMap.put(Objects.hash(0x06, 0x09, false), BlueGigaSetAdvDataResponse.class);
|
||||
packetMap.put(Objects.hash(0x06, 0x04, false), BlueGigaEndProcedureResponse.class);
|
||||
packetMap.put(Objects.hash(0x06, 0x01, false), BlueGigaSetModeResponse.class);
|
||||
packetMap.put(Objects.hash(0x06, 0x00, true), BlueGigaScanResponseEvent.class);
|
||||
packetMap.put(Objects.hash(0x05, 0x02, false), BlueGigaDeleteBondingResponse.class);
|
||||
packetMap.put(Objects.hash(0x05, 0x00, false), BlueGigaEncryptStartResponse.class);
|
||||
packetMap.put(Objects.hash(0x05, 0x05, false), BlueGigaGetBondsResponse.class);
|
||||
packetMap.put(Objects.hash(0x05, 0x04, false), BlueGigaPassKeyResponse.class);
|
||||
packetMap.put(Objects.hash(0x05, 0x01, false), BlueGigaSetBondableModeResponse.class);
|
||||
packetMap.put(Objects.hash(0x05, 0x03, false), BlueGigaSetParametersResponse.class);
|
||||
packetMap.put(Objects.hash(0x05, 0x07, false), BlueGigaWhitelistBondsResponse.class);
|
||||
packetMap.put(Objects.hash(0x00, 0x0A, false), BlueGigaWhitelistAppendResponse.class);
|
||||
packetMap.put(Objects.hash(0x00, 0x0B, false), BlueGigaWhitelistRemoveResponse.class);
|
||||
packetMap.put(Objects.hash(0x00, 0x0C, false), BlueGigaWhitelistClearResponse.class);
|
||||
packetMap.put(Objects.hash(0x05, 0x01, true), BlueGigaBondingFailEvent.class);
|
||||
packetMap.put(Objects.hash(0x05, 0x04, true), BlueGigaBondStatusEvent.class);
|
||||
packetMap.put(Objects.hash(0x05, 0x02, true), BlueGigaPasskeyDisplayEvent.class);
|
||||
packetMap.put(Objects.hash(0x05, 0x03, true), BlueGigaPasskeyRequestEvent.class);
|
||||
packetMap.put(Objects.hash(0x00, 0x02, false), BlueGigaAddressGetResponse.class);
|
||||
packetMap.put(Objects.hash(0x00, 0x01, false), BlueGigaHelloResponse.class);
|
||||
packetMap.put(Objects.hash(0x00, 0x00, false), BlueGigaResetResponse.class);
|
||||
packetMap.put(Objects.hash(0x00, 0x06, false), BlueGigaGetConnectionsResponse.class);
|
||||
packetMap.put(Objects.hash(0x00, 0x05, false), BlueGigaGetCountersResponse.class);
|
||||
packetMap.put(Objects.hash(0x00, 0x08, false), BlueGigaGetInfoResponse.class);
|
||||
packetMap.put(Objects.hash(0x00, 0x00, true), BlueGigaBootEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x06, true), BlueGigaProtocolErrorEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x02, true), BlueGigaEndpointWatermarkRxEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x03, true), BlueGigaEndpointWatermarkTxEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x05, true), BlueGigaNoLicenseKeyEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x05, false), BlueGigaAttributeWriteResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x0A, false), BlueGigaExecuteWriteResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x00, false), BlueGigaFindByTypeValueResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x03, false), BlueGigaFindInformationResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x07, false), BlueGigaIndicateConfirmResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x09, false), BlueGigaPrepareWriteResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x01, false), BlueGigaReadByGroupTypeResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x04, false), BlueGigaReadByHandleResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x02, false), BlueGigaReadByTypeResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x08, false), BlueGigaReadLongResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x0B, false), BlueGigaReadMultipleResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x06, false), BlueGigaWriteCommandResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x01, true), BlueGigaProcedureCompletedEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x05, true), BlueGigaAttributeValueEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x04, true), BlueGigaFindInformationFoundEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x02, true), BlueGigaGroupFoundEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x00, true), BlueGigaIndicatedEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x04, 0x00, true), BlueGigaReadMultipleResponseEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x02, 0x01, false), BlueGigaReadResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x02, 0x02, false), BlueGigaReadTypeResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x02, 0x02, false), BlueGigaSendAttributesResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x02, 0x03, false), BlueGigaUserReadResponseResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x02, 0x04, false), BlueGigaUserWriteResponseResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x02, 0x00, false), BlueGigaWriteResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x02, 0x02, true), BlueGigaAttributeStatusEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x02, 0x01, true), BlueGigaUserReadRequestEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x02, 0x00, true), BlueGigaValueEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x03, 0x04, false), BlueGigaChannelMapGetResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x03, 0x00, false), BlueGigaDisconnectResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x03, 0x01, false), BlueGigaGetRssiResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x03, 0x07, false), BlueGigaGetStatusResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x03, 0x02, false), BlueGigaUpdateResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x03, 0x04, true), BlueGigaDisconnectedEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x03, 0x02, true), BlueGigaFeatureIndEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x03, 0x00, true), BlueGigaConnectionStatusEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x03, 0x01, true), BlueGigaVersionIndEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x06, 0x07, false), BlueGigaSetScanParametersResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x06, 0x03, false), BlueGigaConnectDirectResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x06, 0x05, false), BlueGigaConnectSelectiveResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x06, 0x02, false), BlueGigaDiscoverResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x06, 0x08, false), BlueGigaSetAdvParametersResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x06, 0x09, false), BlueGigaSetAdvDataResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x06, 0x04, false), BlueGigaEndProcedureResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x06, 0x01, false), BlueGigaSetModeResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x06, 0x00, true), BlueGigaScanResponseEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x05, 0x02, false), BlueGigaDeleteBondingResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x05, 0x00, false), BlueGigaEncryptStartResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x05, 0x05, false), BlueGigaGetBondsResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x05, 0x04, false), BlueGigaPassKeyResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x05, 0x01, false), BlueGigaSetBondableModeResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x05, 0x03, false), BlueGigaSetParametersResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x05, 0x07, false), BlueGigaWhitelistBondsResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x0A, false), BlueGigaWhitelistAppendResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x0B, false), BlueGigaWhitelistRemoveResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x0C, false), BlueGigaWhitelistClearResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x05, 0x01, true), BlueGigaBondingFailEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x05, 0x04, true), BlueGigaBondStatusEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x05, 0x02, true), BlueGigaPasskeyDisplayEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x05, 0x03, true), BlueGigaPasskeyRequestEvent.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x02, false), BlueGigaAddressGetResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x01, false), BlueGigaHelloResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x00, false), BlueGigaResetResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x06, false), BlueGigaGetConnectionsResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x05, false), BlueGigaGetCountersResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x08, false), BlueGigaGetInfoResponse.class);
|
||||
PACKETMAP.put(Objects.hash(0x00, 0x00, true), BlueGigaBootEvent.class);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "null", "unused" })
|
||||
@Nullable
|
||||
public static BlueGigaResponse getPacket(int[] data) {
|
||||
int cmdClass = data[2];
|
||||
int cmdMethod = data[3];
|
||||
boolean isEvent = (data[0] & 0x80) != 0;
|
||||
|
||||
Class<?> bleClass = packetMap.get(Objects.hash(cmdClass, cmdMethod, isEvent));
|
||||
Class<?> bleClass = PACKETMAP.get(Objects.hash(cmdClass, cmdMethod, isEvent));
|
||||
|
||||
if (bleClass == null) {
|
||||
return null;
|
||||
|
@ -105,9 +105,11 @@ public class BlueGigaTransactionManager implements BlueGigaSerialEventListener {
|
||||
}
|
||||
|
||||
private void cancelTransactionTimer() {
|
||||
if (transactionTimeoutTimer != null) {
|
||||
transactionTimeoutTimer.cancel(true);
|
||||
transactionTimeoutTimer = null;
|
||||
@Nullable
|
||||
Future<?> transTimer = transactionTimeoutTimer;
|
||||
if (transTimer != null) {
|
||||
transTimer.cancel(true);
|
||||
transTimer = null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,17 +123,12 @@ public class BlueGigaTransactionManager implements BlueGigaSerialEventListener {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "null", "unused" })
|
||||
private Optional<BlueGigaUniqueCommand> getNextFrame() {
|
||||
while (!sendQueue.isEmpty()) {
|
||||
@Nullable
|
||||
BlueGigaUniqueCommand frame = sendQueue.poll();
|
||||
if (frame != null) {
|
||||
if (frame.getMessage() != null) {
|
||||
return Optional.of(frame);
|
||||
} else {
|
||||
logger.debug("Null message found from queue, skip it");
|
||||
continue;
|
||||
}
|
||||
return Optional.of(frame);
|
||||
} else {
|
||||
logger.debug("Null frame found from queue, skip it");
|
||||
continue;
|
||||
|
@ -31,8 +31,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.AttributeValu
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaAttributeValueEvent extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x05;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x05;
|
||||
|
||||
/**
|
||||
* Attribute handle
|
||||
|
@ -31,8 +31,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaAttributeWriteCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x05;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x05;
|
||||
|
||||
private BlueGigaAttributeWriteCommand(CommandBuilder builder) {
|
||||
super.setConnection(builder.connection);
|
||||
|
@ -31,8 +31,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaAttributeWriteResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x05;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x05;
|
||||
|
||||
/**
|
||||
* 0 : write was successful. Otherwise error occurred
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaExecuteWriteCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x0A;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x0A;
|
||||
|
||||
/**
|
||||
* 1: commits queued writes, 0: cancels queued writes
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaExecuteWriteResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x0A;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x0A;
|
||||
|
||||
/**
|
||||
* 0 : write was successful. Otherwise error occurred
|
||||
|
@ -31,8 +31,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaFindByTypeValueCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x00;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x00;
|
||||
|
||||
/**
|
||||
* First requested handle number
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaFindByTypeValueResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x00;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x00;
|
||||
|
||||
/**
|
||||
* 0 : the operation was successful. Otherwise error occurred
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaFindInformationCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x03;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x03;
|
||||
|
||||
private BlueGigaFindInformationCommand(CommandBuilder builder) {
|
||||
super.setConnection(builder.connection);
|
||||
|
@ -32,8 +32,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaFindInformationFoundEvent extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x04;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x04;
|
||||
|
||||
/**
|
||||
* Characteristics handle
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaFindInformationResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x03;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x03;
|
||||
|
||||
/**
|
||||
* 0 : the operation was successful. Otherwise error occurred
|
||||
|
@ -31,8 +31,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaGroupFoundEvent extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* Starting handle
|
||||
|
@ -32,8 +32,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaIndicateConfirmCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x07;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x07;
|
||||
|
||||
@Override
|
||||
public int[] serialize() {
|
||||
|
@ -33,8 +33,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaIndicateConfirmResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x07;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x07;
|
||||
|
||||
/**
|
||||
* Command result.
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaIndicatedEvent extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x00;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x00;
|
||||
|
||||
/**
|
||||
* Attribute handle
|
||||
|
@ -32,8 +32,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaPrepareWriteCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x09;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x09;
|
||||
|
||||
/**
|
||||
* Attribute handle
|
||||
|
@ -33,8 +33,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaPrepareWriteResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x09;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x09;
|
||||
|
||||
/**
|
||||
* Command result.
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaProcedureCompletedEvent extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
/**
|
||||
* 0: The operation was successful. Otherwise: attribute protocol error code returned by
|
||||
|
@ -34,8 +34,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadByGroupTypeCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
private BlueGigaReadByGroupTypeCommand(CommandBuilder builder) {
|
||||
super.setConnection(builder.connection);
|
||||
|
@ -32,8 +32,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadByGroupTypeResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
/**
|
||||
* Command result.
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadByHandleCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x04;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x04;
|
||||
|
||||
private BlueGigaReadByHandleCommand(CommandBuilder builder) {
|
||||
super.setConnection(builder.connection);
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadByHandleResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x04;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x04;
|
||||
|
||||
/**
|
||||
* 0 : the command was successful. Otherwise an error occurred
|
||||
|
@ -32,8 +32,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadByTypeCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* First attribute handle
|
||||
|
@ -31,8 +31,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadByTypeResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* 0 : the command was successful. Otherwise an error occurred
|
||||
|
@ -32,8 +32,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadLongCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x08;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x08;
|
||||
|
||||
/**
|
||||
* Attribute handle
|
||||
|
@ -33,8 +33,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadLongResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x08;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x08;
|
||||
|
||||
/**
|
||||
* 0 : the command was successful. Otherwise an error occurred
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadMultipleCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x0B;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x0B;
|
||||
|
||||
/**
|
||||
* List of attribute handles to read from the remote device
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadMultipleResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x0B;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x0B;
|
||||
|
||||
/**
|
||||
* 0 : the command was successful. Otherwise an error occurred
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadMultipleResponseEvent extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x00;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x00;
|
||||
|
||||
/**
|
||||
* This array contains the concatenated data from the multiple attributes that have been read,
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaWriteCommandCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x06;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x06;
|
||||
|
||||
/**
|
||||
* Attribute handle to write
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaWriteCommandResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x04;
|
||||
public static int COMMAND_METHOD = 0x06;
|
||||
public static final int COMMAND_CLASS = 0x04;
|
||||
public static final int COMMAND_METHOD = 0x06;
|
||||
|
||||
/**
|
||||
* 0 : the command was successful. Otherwise an error occurred
|
||||
|
@ -31,8 +31,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaAttributeStatusEvent extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* Attribute handle
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
/**
|
||||
* Handle of the attribute to read
|
||||
|
@ -31,8 +31,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
/**
|
||||
* Handle of the attribute which was read
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadTypeCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* Handle of the attribute to read
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaReadTypeResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* Handle of the attribute which was read
|
||||
|
@ -32,8 +32,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSendAttributesCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* Attribute handle to send.
|
||||
|
@ -33,8 +33,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSendAttributesResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* 0 : the command was successful. Otherwise an error occurred
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaUserReadRequestEvent extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
/**
|
||||
* Attribute handle requested
|
||||
|
@ -35,8 +35,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaUserReadResponseCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x03;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x03;
|
||||
|
||||
/**
|
||||
* 0: User Read Request is responded with data. In case of an error an application specific error
|
||||
|
@ -35,8 +35,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaUserReadResponseResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x03;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x03;
|
||||
|
||||
/**
|
||||
* Response constructor
|
||||
|
@ -34,8 +34,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaUserWriteResponseCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x04;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x04;
|
||||
|
||||
/**
|
||||
* 0: User Read Request is responded with data. In case of an error an application specific error
|
||||
|
@ -34,8 +34,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaUserWriteResponseResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x04;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x04;
|
||||
|
||||
/**
|
||||
* Response constructor
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.AttributeChan
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaValueEvent extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x00;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x00;
|
||||
|
||||
/**
|
||||
* Reason why value has changed see: enum Attribute Change Reason
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaWriteCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x00;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x00;
|
||||
|
||||
/**
|
||||
* Handle of the attribute to write.
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaWriteResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x02;
|
||||
public static int COMMAND_METHOD = 0x00;
|
||||
public static final int COMMAND_CLASS = 0x02;
|
||||
public static final int COMMAND_METHOD = 0x00;
|
||||
|
||||
/**
|
||||
* 0: the write was successful. Non-zero: An error occurred
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaChannelMapGetCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x04;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x04;
|
||||
|
||||
@Override
|
||||
public int[] serialize() {
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaChannelMapGetResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x04;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x04;
|
||||
|
||||
/**
|
||||
* Current Channel Map. Each bit corresponds to one channel. 0-bit corresponds to 0 channel.
|
||||
|
@ -33,8 +33,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.ConnectionSta
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaConnectionStatusEvent extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x00;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x00;
|
||||
|
||||
/**
|
||||
* Connection status flags use connstatus-enumerator
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaDisconnectCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x00;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x00;
|
||||
|
||||
private BlueGigaDisconnectCommand(CommandBuilder builder) {
|
||||
super.setConnection(builder.connection);
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaDisconnectResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x00;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x00;
|
||||
|
||||
/**
|
||||
* 0 : the update was successful. Non-zero: An error occurred.
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaDisconnectedEvent extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x04;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x04;
|
||||
|
||||
/**
|
||||
* Disconnection reason code. 0 : disconnected by local user
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaFeatureIndEvent extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* CtrData field from LL_FEATURE_RSP - packet
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaGetRssiCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
@Override
|
||||
public int[] serialize() {
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaGetRssiResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
/**
|
||||
* RSSI value of the connection in dBm. Range: -103 to -38
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaGetStatusCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x07;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x07;
|
||||
|
||||
@Override
|
||||
public int[] serialize() {
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaGetStatusResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x07;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x07;
|
||||
|
||||
/**
|
||||
* Response constructor
|
||||
|
@ -34,8 +34,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaUpdateCommand extends BlueGigaDeviceCommand {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* Minimum connection interval (units of 1.25ms)
|
||||
|
@ -35,8 +35,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaUpdateResponse extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* 0 : the update was successful. Non-zero: An error occurred.
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaVersionIndEvent extends BlueGigaDeviceResponse {
|
||||
public static int COMMAND_CLASS = 0x03;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x03;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
/**
|
||||
* Bluetooth controller specification version
|
||||
|
@ -40,8 +40,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BluetoothAddr
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaConnectDirectCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x03;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x03;
|
||||
|
||||
private BlueGigaConnectDirectCommand(CommandBuilder builder) {
|
||||
this.address = builder.address;
|
||||
|
@ -39,8 +39,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaConnectDirectResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x03;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x03;
|
||||
|
||||
/**
|
||||
* 0 : procedure was successfully started Non-zero: An error occurred
|
||||
|
@ -35,8 +35,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaConnectSelectiveCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x05;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x05;
|
||||
|
||||
/**
|
||||
* Minimum Connection Interval (in units of 1.25ms). Range: 6 - 3200 The lowest possible
|
||||
|
@ -36,8 +36,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaConnectSelectiveResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x05;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x05;
|
||||
|
||||
/**
|
||||
* 0 : procedure was successfully started Non-zero: An error occurred
|
||||
|
@ -32,8 +32,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.GapDiscoverMo
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaDiscoverCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
private BlueGigaDiscoverCommand(CommandBuilder builder) {
|
||||
this.mode = builder.mode;
|
||||
|
@ -32,8 +32,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaDiscoverResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* 0: Scan procedure was successfully started Non-zero: An error occurred.
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaEndProcedureCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x04;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x04;
|
||||
|
||||
@Override
|
||||
public int[] serialize() {
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaEndProcedureResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x04;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x04;
|
||||
|
||||
/**
|
||||
* 0: the command was successful. Non-zero: An error occurred
|
||||
|
@ -31,8 +31,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.ScanResponseT
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaScanResponseEvent extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x00;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x00;
|
||||
|
||||
/**
|
||||
* RSSI value (dBm). Range: -103 to -38
|
||||
|
@ -33,8 +33,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSetAdvDataCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x09;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x09;
|
||||
|
||||
/**
|
||||
* Advertisement data type. 0 : sets advertisement data. 1 : sets scan response data
|
||||
|
@ -34,8 +34,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSetAdvDataResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x09;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x09;
|
||||
|
||||
/**
|
||||
* 0: Command was successfully executed. Non-zero: An error occurred
|
||||
|
@ -31,8 +31,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSetAdvParametersCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x08;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x08;
|
||||
|
||||
/**
|
||||
* Minimum advertisement interval in units of 625us. Range: 0x20 to 0x4000. Default: 0x200
|
||||
|
@ -32,8 +32,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSetAdvParametersResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x08;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x08;
|
||||
|
||||
/**
|
||||
* 0: Command was successfully executed. Non-zero: An error occurred
|
||||
|
@ -33,8 +33,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.GapDiscoverab
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSetModeCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
private BlueGigaSetModeCommand(CommandBuilder builder) {
|
||||
this.discover = builder.discover;
|
||||
|
@ -31,8 +31,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSetModeResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
/**
|
||||
* 0: the command was successful. Non-zero: An error occurred
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSetScanParametersCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x07;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x07;
|
||||
|
||||
private BlueGigaSetScanParametersCommand(CommandBuilder builder) {
|
||||
this.scanInterval = builder.scanInterval;
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSetScanParametersResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x06;
|
||||
public static int COMMAND_METHOD = 0x07;
|
||||
public static final int COMMAND_CLASS = 0x06;
|
||||
public static final int COMMAND_METHOD = 0x07;
|
||||
|
||||
/**
|
||||
* 0: The command was executed successfully. Non-zero: An error occurred
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaBondStatusEvent extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x04;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x04;
|
||||
|
||||
/**
|
||||
* Bonding handle
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaBondingFailEvent extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
/**
|
||||
* Connection handle
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaDeleteBondingCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* Bonding handle of a device. This handle can be obtained for example from events like: Scan
|
||||
|
@ -31,8 +31,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaDeleteBondingResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* 0: the command was successful. Non-zero: An error occurred
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaEncryptStartCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x00;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x00;
|
||||
|
||||
/**
|
||||
* Bonding handle of a device. This handle can be obtained for example from events like: Scan
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaEncryptStartResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x00;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x00;
|
||||
|
||||
/**
|
||||
* Connection handle
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaGetBondsCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x05;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x05;
|
||||
|
||||
@Override
|
||||
public int[] serialize() {
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaGetBondsResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x05;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x05;
|
||||
|
||||
/**
|
||||
* Num of currently bonded devices
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaPassKeyCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x04;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x04;
|
||||
|
||||
/**
|
||||
* Connection handle
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaPassKeyResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x04;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x04;
|
||||
|
||||
/**
|
||||
* Command Result
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaPasskeyDisplayEvent extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
/**
|
||||
* Bluetooth connection handle
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaPasskeyRequestEvent extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x03;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x03;
|
||||
|
||||
/**
|
||||
* Bluetooth connection handle
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSetBondableModeCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
/**
|
||||
* Enables or disables bonding mode. 0 : the device is not bondable. 1 : the device is bondable
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSetBondableModeResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x01;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x01;
|
||||
|
||||
/**
|
||||
* Response constructor
|
||||
|
@ -29,8 +29,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.SmpIoCapabili
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSetParametersCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x03;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x03;
|
||||
|
||||
/**
|
||||
* 1: Man-in-the-middle protection required. 0: No Man-in-the-middle protection. Default:
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaResponse;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaSetParametersResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x03;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x03;
|
||||
|
||||
/**
|
||||
* Response constructor
|
||||
|
@ -30,8 +30,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaWhitelistBondsCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x07;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x07;
|
||||
|
||||
@Override
|
||||
public int[] serialize() {
|
||||
|
@ -31,8 +31,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.enumeration.BgApiResponse
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaWhitelistBondsResponse extends BlueGigaResponse {
|
||||
public static int COMMAND_CLASS = 0x05;
|
||||
public static int COMMAND_METHOD = 0x07;
|
||||
public static final int COMMAND_CLASS = 0x05;
|
||||
public static final int COMMAND_METHOD = 0x07;
|
||||
|
||||
/**
|
||||
* Command result
|
||||
|
@ -28,8 +28,8 @@ import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class BlueGigaAddressGetCommand extends BlueGigaCommand {
|
||||
public static int COMMAND_CLASS = 0x00;
|
||||
public static int COMMAND_METHOD = 0x02;
|
||||
public static final int COMMAND_CLASS = 0x00;
|
||||
public static final int COMMAND_METHOD = 0x02;
|
||||
|
||||
@Override
|
||||
public int[] serialize() {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user