public class BluetoothIO extends IO
associatedDevice, callbackHelper
Modifier and Type | Method and Description |
---|---|
static BluetoothIO |
bluetoothIO(android.bluetooth.BluetoothGattService service,
LegoBluetoothDevice associatedDevice) |
void |
handleUpdatedInputServiceCharacteristic(android.bluetooth.BluetoothGattCharacteristic characteristic) |
void |
handleWriteResponseFromIOServiceWithCharacteristic(android.bluetooth.BluetoothGattCharacteristic characteristic,
LDSDKError error) |
void |
readInputFormatForConnectId(int connectId) |
void |
readValueForConnectId(int connectId) |
void |
resetStateForConnectId(int connectId) |
void |
writeColor(int red,
int green,
int blue,
int connectId) |
void |
writeColorIndex(int index,
int connectId) |
void |
writeData(byte[] data,
int connectId) |
void |
writeInputCommand(InputCommand command) |
void |
writeInputFormat(InputFormat inputFormat,
int connectId) |
void |
writeMotorPower(int power,
int connectId) |
void |
writeMotorPower(int power,
int offset,
int connectId) |
void |
writeOutputCommand(OutputCommand command) |
void |
writePiezoToneFrequency(int frequency,
int duration,
int connectId) |
void |
writePiezoToneStop(int connectId) |
registerCallbackListener, unregisterCallbackListener
public static BluetoothIO bluetoothIO(android.bluetooth.BluetoothGattService service, LegoBluetoothDevice associatedDevice)
public void readValueForConnectId(int connectId)
readValueForConnectId
in class IO
public void resetStateForConnectId(int connectId)
resetStateForConnectId
in class IO
public void writeInputFormat(InputFormat inputFormat, int connectId)
writeInputFormat
in class IO
public void readInputFormatForConnectId(int connectId)
readInputFormatForConnectId
in class IO
public void writeInputCommand(InputCommand command)
public void writeMotorPower(int power, int connectId)
writeMotorPower
in class IO
public void writeMotorPower(int power, int offset, int connectId)
writeMotorPower
in class IO
public void writePiezoToneFrequency(int frequency, int duration, int connectId)
writePiezoToneFrequency
in class IO
public void writePiezoToneStop(int connectId)
writePiezoToneStop
in class IO
public void writeColor(int red, int green, int blue, int connectId)
writeColor
in class IO
public void writeColorIndex(int index, int connectId)
writeColorIndex
in class IO
public void writeOutputCommand(OutputCommand command)
public void handleWriteResponseFromIOServiceWithCharacteristic(android.bluetooth.BluetoothGattCharacteristic characteristic, LDSDKError error)
public void handleUpdatedInputServiceCharacteristic(android.bluetooth.BluetoothGattCharacteristic characteristic)