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.remotecontrol
Class RemoteControlSensor

    java.lang.Object
      josx.rcxcomm.remotecontrol.RemoteControlSensor

All Implemented Interfaces:
  Opcode, SerialListener

    public class RemoteControlSensor

extends Object
implements SerialListener, Opcode

This class is a sensor for remote control messages.
It listens for remote control messages and triggers the registered listener methods.
F7 LEGO firmware opcodes are supported also which means that the sender could use RCXF7Port
instead of the LEGO remote control
The sensor uses the built-in lejos SerialListener thread

Version:
  1.1 (16/10/2002)
Author:
  Matthias Paul Scholz (mp.scholz@t-online.de)

Field Summary

Fields inherited from interface josx.platform.rcx.Opcode
`OPCODE_ABSOLUTE_VALUE, OPCODE_ABSOLUTE_VALUE_REPLY, OPCODE_ADD_TO_VARIABLE, OPCODE_ADD_TO_VARIABLE_REPLY, OPCODE_ALIVE, OPCODE_ALIVE_REPLY, OPCODE_AND_VARIABLE, OPCODE_AND_VARIABLE_REPLY, OPCODE_BRANCH_ALWAYS_FAR, OPCODE_BRANCH_ALWAYS_NEAR, OPCODE_CALL_SUBROUTINE, OPCODE_CLEAR_MESSAGE, OPCODE_CLEAR_SENSOR_VALUE, OPCODE_CLEAR_SENSOR_VALUE_REPLY, OPCODE_CLEAR_TIMER, OPCODE_CLEAR_TIMER_REPLY, OPCODE_DATALOG_NEXT, OPCODE_DATALOG_NEXT_REPLY, OPCODE_DECREMENT_LOOP_COUNTER_FAR, OPCODE_DECREMENT_LOOP_COUNTER_NEAR, OPCODE_DELETE_ALL_SUBROUTINES, OPCODE_DELETE_ALL_SUBROUTINES_REPLY, OPCODE_DELETE_ALL_TASKS, OPCODE_DELETE_ALL_TASKS_REPLY, OPCODE_DELETE_FIRMWARE, OPCODE_DELETE_FIRMWARE_REPLY, OPCODE_DELETE_SUBROUTINE, OPCODE_DELETE_SUBROUTINE_REPLY, OPCODE_DELETE_TASK, OPCODE_DELETE_TASK_REPLY, OPCODE_DIVIDE_VARIABLE, OPCODE_DIVIDE_VARIABLE_REPLY, OPCODE_GET_BATTERY_POWER, OPCODE_GET_BATTERY_POWER_REPLY, OPCODE_GET_MEMORY_MAP, OPCODE_GET_MEMORY_MAP_REPLY, OPCODE_GET_VALUE, OPCODE_GET_VALUE_REPLY, OPCODE_GET_VERSIONS, OPCODE_GET_VERSIONS_REPLY, OPCODE_MASK, OPCODE_MULTIPLY_VARIABLE, OPCODE_MULTIPLY_VARIABLE_REPLY, OPCODE_OR_VARIABLE, OPCODE_OR_VARIABLE_REPLY, OPCODE_PLAY_SOUND_REPLY, OPCODE_PLAY_TONE, OPCODE_PLAY_TONE_REPLY, OPCODE_POWER_OFF, OPCODE_POWER_OFF_REPLY, OPCODE_REMOTE_COMMAND, OPCODE_SEND_MESSAGE, OPCODE_SET_DATALOG_SIZE, OPCODE_SET_DATALOG_SIZE_REPLY, OPCODE_SET_DISPLAY, OPCODE_SET_DISPLAY_REPLY, OPCODE_SET_LOOP_COUNTER, OPCODE_SET_MESSAGE, OPCODE_SET_MOTOR_DIRECTION, OPCODE_SET_MOTOR_DIRECTION_REPLY, OPCODE_SET_MOTOR_ON_OFF, OPCODE_SET_MOTOR_ON_OFF_REPLY, OPCODE_SET_MOTOR_POWER, OPCODE_SET_MOTOR_POWER_REPLY, OPCODE_SET_POWER_DOWN_DELAY, OPCODE_SET_POWER_DOWN_DELAY_REPLY, OPCODE_SET_PROGRAM_NUMBER, OPCODE_SET_PROGRAM_NUMBER_REPLY, OPCODE_SET_SENSOR_MODE, OPCODE_SET_SENSOR_MODE_REPLY, OPCODE_SET_SENSOR_TYPE, OPCODE_SET_SENSOR_TYPE_REPLY, OPCODE_SET_TIME, OPCODE_SET_TIME_REPLY, OPCODE_SET_TRANSMITTER_RANGE, OPCODE_SET_TRANSMITTER_RANGE_REPLY, OPCODE_SET_VARIABLE, OPCODE_SET_VARIABLE_REPLY, OPCODE_SIGN_VARIABLE, OPCODE_SIGN_VARIABLE_REPLY, OPCODE_START_FIRMWARE_DOWNLOAD, OPCODE_START_FIRMWARE_DOWNLOAD_REPLY, OPCODE_START_SUBROUTINE_DOWNLOAD, OPCODE_START_SUBROUTINE_DOWNLOAD_REPLY, OPCODE_START_TASK, OPCODE_START_TASK_DOWNLOAD, OPCODE_START_TASK_DOWNLOAD_REPLY, OPCODE_START_TASK_REPLY, OPCODE_STOP_ALL_TASKS, OPCODE_STOP_ALL_TASKS_REPLY, OPCODE_STOP_TASK, OPCODE_STOP_TASK_REPLY, OPCODE_SUBTRACT_FROM_VARIABLE, OPCODE_SUBTRACT_FROM_VARIABLE_REPLY, OPCODE_TEST_AND_BRANCH_FAR, OPCODE_TEST_AND_BRANCH_NEAR, OPCODE_TRANSFER_DATA, OPCODE_TRANSFER_DATA_REPLY, OPCODE_UNLOCK_FIRMWARE, OPCODE_UNLOCK_FIRMWARE_REPLY, OPCODE_UPLOAD_DATALOG, OPCODE_UPLOAD_DATALOG_REPLY, OPCODE_WAIT`

Constructor Summary
`RemoteControlSensor()` creates a new instance of RemoteControlSensor

Method Summary
`void` | `addRemoteControlListener(RemoteControlListener aListener)` adds a remote control listener
`void` | `packetAvailable(byte[] aPacket, int aLength)` implements the SerialListener interface listens for incoming packets on the IR port and notifies the registered listeners.
`void` | `removeRemoteControlListener(RemoteControlListener aListener)` removes a remote control listener

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

Constructor Detail

### RemoteControlSensor

    public RemoteControlSensor()

  creates a new instance of RemoteControlSensor

Method Detail

### addRemoteControlListener

    public void addRemoteControlListener(RemoteControlListener aListener)

  adds a remote control listener

  Parameters:
    `aListener` - a remote control listener
  See Also:
    `RemoteControlListener`

### removeRemoteControlListener

    public void removeRemoteControlListener(RemoteControlListener aListener)

  removes a remote control listener

  Parameters:
    `aListener` - a remote control listener
  See Also:
    `RemoteControlListener`

### packetAvailable

    public void packetAvailable(byte[] aPacket,
                                int aLength)

  implements the SerialListener interface
  listens for incoming packets on the IR port and notifies the registered listeners.

  Specified by:
    `packetAvailable` in interface `SerialListener`
  Parameters:
    `aPacket` - the packet data received
    `aLength` - the length of the packet

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