Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## josx.rcxcomm
Class LLC

    java.lang.Object
      josx.rcxcomm.LLC

    public class LLC

extends Object

Low-level comms (LLC). This class provide native methods to read and write bytes to and from the IR unit by low-level driving of the RCX H8300 UART. It keeps its footprint down by making as much use of ROM routines as possible. The init() method must be called to take over driving the IR unit from the ROM routines. Once this is done, the program cannot use the Serial class.

Method Summary
`static void` | `init()` Initialize LLC
`static boolean` | `isSendError()` Return the error status of the last send
`static boolean` | `isSending()` Indicate whether the last send is still active
`static int` | `read()` read a single byte, if available
`static int` | `receive()` wait a little while for a byte to become available
`static boolean` | `sendBytes(byte[] buf, int len)` Send a number of bytes and wait for completion of transmission
`static void` | `setRangeLong()` Sets long range transmision.
`static void` | `setRangeShort()` Sets short range transmision.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait`

Method Detail

### init

    public static void init()

  Initialize LLC

### 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 send
    `len` - 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD