Package lejos.remote.rcx
Class LLC
- java.lang.Object
-
- lejos.remote.rcx.LLC
-
public class LLC extends java.lang.ObjectEmulates RCX LLC class using the RCXLink class.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RCXLinkgetLink()Return the RCXLink object associated with LLCstatic voidinit()Initialize LLC anstatic voidinit(I2CPort port)Initialize LLC and set portstatic voidinit(Port port)Initialize LLC and set portstatic booleanisSendError()Return the error status of the last sendstatic booleanisSending()Indicate whether the last send is still activestatic intread()read a single byte, if availablestatic intreceive()wait a little while for a byte to become availablestatic booleansendBytes(byte[] buf, int len)Send a number of bytes and wait for completion of transmissionstatic voidsetPort(I2CPort port)Set sensor portstatic voidsetRangeLong()Sets long range transmision.static voidsetRangeShort()Sets short range transmision.
-
-
-
Method Detail
-
init
public static void init(I2CPort port)
Initialize LLC and set port
-
init
public static void init(Port port)
Initialize LLC and set port
-
init
public static void init()
Initialize LLC an
-
setPort
public static void setPort(I2CPort port)
Set sensor port
-
read
public static int read()
read a single byte, if available- Returns:
- the byte read, or -1 if no byte is available
-
isSending
public static boolean isSending()
Indicate whether the last send is still active- Returns:
- true if still sending, else false
-
isSendError
public static boolean isSendError()
Return the error status of the last send- Returns:
- true if still sending, else false
-
sendBytes
public static boolean sendBytes(byte[] buf, int len)Send a number of bytes and wait for completion of transmission- Parameters:
buf- the array of bytes to sendlen- the number of bytes to send- Returns:
- true if the send is successful, else false
-
receive
public static int receive()
wait a little while for a byte to become available- Returns:
- the byte received, or -1 if no byte available
-
setRangeLong
public static void setRangeLong()
Sets long range transmision.
-
setRangeShort
public static void setRangeShort()
Sets short range transmision.
-
getLink
public static RCXLink getLink()
Return the RCXLink object associated with LLC- Returns:
- the RCXLink used
-
-