Class RCXLink

    • Constructor Detail

      • RCXLink

        public RCXLink​(I2CPort port)
      • RCXLink

        public RCXLink​(Port port)
    • Method Detail

      • runMacro

        public void runMacro​(int addr)
      • setRCXRangeShort

        public void setRCXRangeShort()
      • setRCXRangeLong

        public void setRCXRangeLong()
      • powerOff

        public void powerOff()
      • flush

        public void flush()
      • setDefaultSpeed

        public void setDefaultSpeed()
      • setHighSpeed

        public void setHighSpeed()
      • setRangeLong

        public void setRangeLong()
      • setRangeShort

        public void setRangeShort()
      • setAPDAOn

        public void setAPDAOn()
      • setAPDAOff

        public void setAPDAOff()
      • defineMacro

        public void defineMacro​(int addr,
                                byte[] macro)
      • getStatus

        public int getStatus()
      • bytesAvailable

        public int bytesAvailable()
      • ping

        public void ping()
      • sendF7

        public void sendF7​(int msg)
      • sendPacket

        public void sendPacket​(byte[] packet)
        Description copied from interface: IRTransmitter
        Send a packet of data to the RCX
        Specified by:
        sendPacket in interface IRTransmitter
      • sendRemoteCommand

        public void sendRemoteCommand​(int msg)
        Description copied from interface: IRTransmitter
        Send a remote control command to the RCX
        Specified by:
        sendRemoteCommand in interface IRTransmitter
        Parameters:
        msg - the code for the remote command
      • setMotorPower

        public void setMotorPower​(int id,
                                  int power)
      • stopMotor

        public void stopMotor​(int id)
      • startMotor

        public void startMotor​(int id)
      • fltMotor

        public void fltMotor​(int id)
      • forward

        public void forward​(int id)
      • backward

        public void backward​(int id)
      • setRawMode

        public void setRawMode()
      • sendBytes

        public void sendBytes​(byte[] data,
                              int len)
        Description copied from interface: IRTransmitter
        Send raw bytes to the RCX
        Specified by:
        sendBytes in interface IRTransmitter
        Parameters:
        data - the raw data
        len - the number of bytes
      • readBytes

        public int readBytes​(byte[] data)
      • defineAndRun

        public void defineAndRun​(byte[] macro,
                                 int len)