pt.citar.diablu.nxt.protocol
Class NXTCommBluetoothSerialChannelJSSC

java.lang.Object
  extended by pt.citar.diablu.nxt.protocol.NXTCommBluetoothSerialChannelJSSC
All Implemented Interfaces:
NXTCommChannel

public class NXTCommBluetoothSerialChannelJSSC
extends Object
implements NXTCommChannel

Author:
Jorge Cardoso

Constructor Summary
NXTCommBluetoothSerialChannelJSSC()
          Creates a new instance of NXTCommBluetoothChannel
NXTCommBluetoothSerialChannelJSSC(String commPort)
           
 
Method Summary
 void closeChannel()
           
 void flush()
           
 void openChannel(Object channel)
           
 int read()
           
 int read(byte[] buffer)
           
 NXTResponse sendCommand(NXTCommand command)
           
 void write(byte b)
           
 void write(byte[] buffer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NXTCommBluetoothSerialChannelJSSC

public NXTCommBluetoothSerialChannelJSSC()
Creates a new instance of NXTCommBluetoothChannel


NXTCommBluetoothSerialChannelJSSC

public NXTCommBluetoothSerialChannelJSSC(String commPort)
                                  throws RuntimeException
Throws:
RuntimeException
Method Detail

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