rcxport
Class RCXCmd

java.lang.Object
  |
  +--rcxport.RCXCmd

public class RCXCmd
extends Object

Build and manipulate RCX commands.

Author:
Scott B. Lewis, slewis@teleport.com

Field Summary
static byte AutoOff
           
static byte BatteryLevel
           
static byte BeginFirmware
           
static byte BeginSub
           
static byte BeginTask
           
static byte BootMode
           
static byte CheckLoop
           
static byte ClearMsg
           
static byte ClearSensor
           
static byte ClearTimer
           
static byte Datalog
           
static byte Delay
           
static byte DeleteSubs
           
static byte DeleteTasks
           
static byte Display
           
static byte Download
           
static byte EndFirmware
           
static byte GoSub
           
static byte InputMode
           
static byte InputType
           
static byte IRMode
           
static byte Jump
           
static byte Message
           
static byte OutputDir
           
static byte OutputMode
           
static byte OutputPower
           
static byte Ping
           
static byte PlaySound
           
static byte PlayTone
           
static byte Read
           
static byte SelectProgram
           
static byte SendMessage
           
static byte SendMsg
           
static byte SetDatalog
           
static byte SetLoop
           
static byte SetWatch
           
static byte SJump
           
static byte StartTask
           
static byte StopAll
           
static byte StopTask
           
static byte Test
           
static byte Unlock
           
static byte UploadDatalog
           
 
Constructor Summary
RCXCmd()
           
 
Method Summary
static void checkStartDownloadResult(boolean task, RCXResult res)
           
static void checkTransferDataResult(RCXResult res)
           
static byte[] copy(byte[] input, int start, int length)
           
static byte hibyte(int i)
           
static byte lobyte(int i)
           
static byte[] makeBeginSub(byte taskNum, int length)
           
static byte[] makeBeginTask(byte taskNum, int length)
           
static byte[] makeDownload(int seq, byte[] data)
           
static byte[] makeOutputPower(byte outputs, int val)
           
static byte[] makePlaySound(int sound)
           
static byte[] makePlayTone(int freq, byte duration)
           
static String makeString(byte aByte)
           
static byte[] makeUnlock()
           
static byte[] makeValue16(byte op, int val)
           
static byte[] makeValue8(byte op, int val)
           
static byte[] set(byte aByte)
           
static byte[] set(byte one, byte two)
           
static byte[] set(byte one, byte two, byte three)
           
static byte[] set(byte one, byte two, byte three, byte four)
           
static byte[] set(byte one, byte two, byte three, byte four, byte five)
           
static byte[] set(byte one, byte two, byte three, byte four, byte five, byte six)
           
static byte[] startTask(byte task)
           
static byte[] stopTask(byte task)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OutputMode

public static final byte OutputMode

OutputPower

public static final byte OutputPower

OutputDir

public static final byte OutputDir

InputMode

public static final byte InputMode

InputType

public static final byte InputType

PlaySound

public static final byte PlaySound

PlayTone

public static final byte PlayTone

Test

public static final byte Test

Jump

public static final byte Jump

SJump

public static final byte SJump

SetLoop

public static final byte SetLoop

CheckLoop

public static final byte CheckLoop

Delay

public static final byte Delay

Display

public static final byte Display

SendMessage

public static final byte SendMessage

StartTask

public static final byte StartTask

StopTask

public static final byte StopTask

StopAll

public static final byte StopAll

ClearTimer

public static final byte ClearTimer

ClearMsg

public static final byte ClearMsg

SendMsg

public static final byte SendMsg

ClearSensor

public static final byte ClearSensor

GoSub

public static final byte GoSub

SetDatalog

public static final byte SetDatalog

Datalog

public static final byte Datalog

UploadDatalog

public static final byte UploadDatalog

Read

public static final byte Read

Unlock

public static final byte Unlock

BeginTask

public static final byte BeginTask

BeginSub

public static final byte BeginSub

Download

public static final byte Download

Message

public static final byte Message

DeleteTasks

public static final byte DeleteTasks

DeleteSubs

public static final byte DeleteSubs

BootMode

public static final byte BootMode

BeginFirmware

public static final byte BeginFirmware

EndFirmware

public static final byte EndFirmware

Ping

public static final byte Ping

SelectProgram

public static final byte SelectProgram

BatteryLevel

public static final byte BatteryLevel

SetWatch

public static final byte SetWatch

IRMode

public static final byte IRMode

AutoOff

public static final byte AutoOff
Constructor Detail

RCXCmd

public RCXCmd()
Method Detail

hibyte

public static byte hibyte(int i)

lobyte

public static byte lobyte(int i)

copy

public static byte[] copy(byte[] input,
                          int start,
                          int length)

set

public static byte[] set(byte aByte)

set

public static byte[] set(byte one,
                         byte two)

set

public static byte[] set(byte one,
                         byte two,
                         byte three)

set

public static byte[] set(byte one,
                         byte two,
                         byte three,
                         byte four)

set

public static byte[] set(byte one,
                         byte two,
                         byte three,
                         byte four,
                         byte five)

set

public static byte[] set(byte one,
                         byte two,
                         byte three,
                         byte four,
                         byte five,
                         byte six)

startTask

public static byte[] startTask(byte task)

stopTask

public static byte[] stopTask(byte task)

makeUnlock

public static byte[] makeUnlock()

makePlayTone

public static byte[] makePlayTone(int freq,
                                  byte duration)

makePlaySound

public static byte[] makePlaySound(int sound)

makeBeginTask

public static byte[] makeBeginTask(byte taskNum,
                                   int length)

makeBeginSub

public static byte[] makeBeginSub(byte taskNum,
                                  int length)

makeOutputPower

public static byte[] makeOutputPower(byte outputs,
                                     int val)

makeValue16

public static byte[] makeValue16(byte op,
                                 int val)

makeValue8

public static byte[] makeValue8(byte op,
                                int val)

makeDownload

public static byte[] makeDownload(int seq,
                                  byte[] data)

checkStartDownloadResult

public static void checkStartDownloadResult(boolean task,
                                            RCXResult res)
                                     throws IOException

checkTransferDataResult

public static void checkTransferDataResult(RCXResult res)
                                    throws IOException

makeString

public static String makeString(byte aByte)