public class BrickPiSerialTransmitter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BAUD_RATE
Baud rate used with the serial
|
static int |
SERIAL_MONITOR_DELAY
Contains the inter send message delay the transmitter waits for
in milliseconds.
|
static int |
SERIAL_MONITOR_RATE
Contains the rate in milliseconds at which the serial is monitored
to detect a change in its buffer
|
Constructor and Description |
---|
BrickPiSerialTransmitter(int timeout)
Construct the BrickPiSerialTransmitter with blocking queues for messaging
|
Modifier and Type | Method and Description |
---|---|
java.util.Map.Entry<Atmel,byte[]> |
sendMessage(java.util.Map.Entry<Atmel,byte[]> bytesChunkToSend)
Send a message to the BrickPi then waits for the reponse message
|
public static final int BAUD_RATE
public static final int SERIAL_MONITOR_RATE
public static final int SERIAL_MONITOR_DELAY
public BrickPiSerialTransmitter(int timeout)
timeout
- The timeout in millisecond to wait before retrying to send and receive dataRaspoidSerialException
- in case of trouble when opening serial communications with the brick pipublic java.util.Map.Entry<Atmel,byte[]> sendMessage(java.util.Map.Entry<Atmel,byte[]> bytesChunkToSend)
bytesChunkToWrite
- the bytes of the message to write