public class Serial
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static RCXLink |
getLink()
Get the RCXLink object associated with the Serial class
|
static boolean |
isPacketAvailable()
Test if a packet is available
|
static int |
readPacket(byte[] aBuffer)
Read an assembled packet.
|
static void |
resetSerial()
Reset the link - null
|
static boolean |
sendPacket(byte[] aBuffer,
int aOffset,
int aLen)
Send a packet
|
static void |
setPort(I2CPort port)
Set the sensor port
|
static void |
setRangeLong()
Set long range
|
static void |
setRangeShort()
Set short range
|
static void |
waitTillSent()
Wait until the packet is sent - null
|
public static void setPort(I2CPort port)
port
- the sensor port the link is connected topublic static int readPacket(byte[] aBuffer)
aBuffer
- the buffer to return the packet intopublic static boolean isPacketAvailable()
public static boolean sendPacket(byte[] aBuffer, int aOffset, int aLen)
aBuffer
- the buffer containing the packetaOffset
- the offset in the buffer - must be zeroaLen
- the length of the packetpublic static void setRangeLong()
public static void setRangeShort()
public static void resetSerial()
public static void waitTillSent()
public static RCXLink getLink()