Package ej.bluetooth
Class StubNativesImplementation
- java.lang.Object
-
- ej.bluetooth.StubNativesImplementation
-
- All Implemented Interfaces:
NativesImplementation
public class StubNativesImplementation extends java.lang.Object implements NativesImplementation
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddService(byte[] service, short[] handles)booleanconnect(byte[] deviceAddress)voiddisable()booleandisconnect(short connHandle)booleandiscoverServices(short connHandle, byte[] uuid)booleanenable()static StubNativesImplementationgetInstance()booleansendExecuteWriteResponse(short connHandle, short attributeHandle, byte status)booleansendNotification(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean confirm)booleansendPairRequest(short connHandle)booleansendPairResponse(short connHandle, boolean accept)booleansendPasskeyResponse(short connHandle, boolean accept, int passkey)booleansendPrepareWriteResponse(short connHandle, short attributeHandle, byte status, byte[] value, int valueSize, int offset)booleansendReadRequest(short connHandle, short attributeHandle)booleansendReadResponse(short connHandle, short attributeHandle, byte status, byte[] value, int valueSize)booleansendWriteRequest(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean noResponse)booleansendWriteResponse(short connHandle, short attributeHandle, byte status)booleanstartAdvertising(byte[] advertisementData, int advertisementDataSize)booleanstartScanning(byte filterAction, byte filterType, byte[] filterData, int filterDataSize)booleanstopAdvertising()booleanstopScanning()intwaitEvent(byte[] buffer, int bufferLength)
-
-
-
Method Detail
-
getInstance
public static StubNativesImplementation getInstance()
-
waitEvent
public int waitEvent(byte[] buffer, int bufferLength)- Specified by:
waitEventin interfaceNativesImplementation
-
enable
public boolean enable()
- Specified by:
enablein interfaceNativesImplementation
-
disable
public void disable()
- Specified by:
disablein interfaceNativesImplementation
-
addService
public boolean addService(byte[] service, short[] handles)- Specified by:
addServicein interfaceNativesImplementation
-
startScanning
public boolean startScanning(byte filterAction, byte filterType, byte[] filterData, int filterDataSize)- Specified by:
startScanningin interfaceNativesImplementation
-
stopScanning
public boolean stopScanning()
- Specified by:
stopScanningin interfaceNativesImplementation
-
startAdvertising
public boolean startAdvertising(byte[] advertisementData, int advertisementDataSize)- Specified by:
startAdvertisingin interfaceNativesImplementation
-
stopAdvertising
public boolean stopAdvertising()
- Specified by:
stopAdvertisingin interfaceNativesImplementation
-
connect
public boolean connect(byte[] deviceAddress)
- Specified by:
connectin interfaceNativesImplementation
-
disconnect
public boolean disconnect(short connHandle)
- Specified by:
disconnectin interfaceNativesImplementation
-
sendPairRequest
public boolean sendPairRequest(short connHandle)
- Specified by:
sendPairRequestin interfaceNativesImplementation
-
sendPairResponse
public boolean sendPairResponse(short connHandle, boolean accept)- Specified by:
sendPairResponsein interfaceNativesImplementation
-
sendPasskeyResponse
public boolean sendPasskeyResponse(short connHandle, boolean accept, int passkey)- Specified by:
sendPasskeyResponsein interfaceNativesImplementation
-
discoverServices
public boolean discoverServices(short connHandle, byte[] uuid)- Specified by:
discoverServicesin interfaceNativesImplementation
-
sendReadRequest
public boolean sendReadRequest(short connHandle, short attributeHandle)- Specified by:
sendReadRequestin interfaceNativesImplementation
-
sendWriteRequest
public boolean sendWriteRequest(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean noResponse)- Specified by:
sendWriteRequestin interfaceNativesImplementation
-
sendReadResponse
public boolean sendReadResponse(short connHandle, short attributeHandle, byte status, byte[] value, int valueSize)- Specified by:
sendReadResponsein interfaceNativesImplementation
-
sendWriteResponse
public boolean sendWriteResponse(short connHandle, short attributeHandle, byte status)- Specified by:
sendWriteResponsein interfaceNativesImplementation
-
sendPrepareWriteResponse
public boolean sendPrepareWriteResponse(short connHandle, short attributeHandle, byte status, byte[] value, int valueSize, int offset)- Specified by:
sendPrepareWriteResponsein interfaceNativesImplementation
-
sendExecuteWriteResponse
public boolean sendExecuteWriteResponse(short connHandle, short attributeHandle, byte status)- Specified by:
sendExecuteWriteResponsein interfaceNativesImplementation
-
sendNotification
public boolean sendNotification(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean confirm)- Specified by:
sendNotificationin interfaceNativesImplementation
-
-