pt.citar.diablu.nxt.protocol
Class NXTCommBluetoothSerialChannelJSSC
java.lang.Object
pt.citar.diablu.nxt.protocol.NXTCommBluetoothSerialChannelJSSC
- All Implemented Interfaces:
- NXTCommChannel
public class NXTCommBluetoothSerialChannelJSSC
- extends Object
- implements NXTCommChannel
- Author:
- Jorge Cardoso
NXTCommBluetoothSerialChannelJSSC
public NXTCommBluetoothSerialChannelJSSC()
- Creates a new instance of NXTCommBluetoothChannel
NXTCommBluetoothSerialChannelJSSC
public NXTCommBluetoothSerialChannelJSSC(String commPort)
throws RuntimeException
- Throws:
RuntimeException
sendCommand
public NXTResponse sendCommand(NXTCommand command)
throws IOException
- Specified by:
sendCommand
in interface NXTCommChannel
- Throws:
IOException
openChannel
public void openChannel(Object channel)
throws RuntimeException
- Specified by:
openChannel
in interface NXTCommChannel
- Throws:
RuntimeException
closeChannel
public void closeChannel()
throws IOException
- Specified by:
closeChannel
in interface NXTCommChannel
- Throws:
IOException
read
public int read()
throws RuntimeException
- Specified by:
read
in interface NXTCommChannel
- Throws:
RuntimeException
read
public int read(byte[] buffer)
throws RuntimeException
- Specified by:
read
in interface NXTCommChannel
- Throws:
RuntimeException
write
public void write(byte b)
throws RuntimeException
- Specified by:
write
in interface NXTCommChannel
- Throws:
RuntimeException
write
public void write(byte[] buffer)
throws RuntimeException
- Specified by:
write
in interface NXTCommChannel
- Throws:
RuntimeException
flush
public void flush()
throws RuntimeException
- Specified by:
flush
in interface NXTCommChannel
- Throws:
RuntimeException
Processing library NXTComm by Jorge C. S. Cardoso. (c) 2014