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

## lejos.nxt.remote
Class RemoteSensorPort

    java.lang.Object
      lejos.nxt.remote.RemoteSensorPort

All Implemented Interfaces:
  ADSensorPort, BasicSensorPort, NXTProtocol, SensorConstants

    public class RemoteSensorPort

extends Object
implements NXTProtocol, ADSensorPort

Emulates a Sensor Port using LCP

Field Summary

Fields inherited from interface lejos.nxt.comm.NXTProtocol
`ANGLE, ANGLESTEPSMODE, BOOLEANMODE, BOOT, BRAKE, CELSIUSMODE, CLOSE, CUSTOM, DELETE, DELETE_USER_FLASH, DIRECT_COMMAND_NOREPLY, DIRECT_COMMAND_REPLY, FAHRENHEITMODE, FIND_FIRST, FIND_NEXT, GET_BATTERY_LEVEL, GET_CURRENT_PROGRAM_NAME, GET_DEVICE_INFO, GET_FIRMWARE_VERSION, GET_INPUT_VALUES, GET_OUTPUT_STATE, HIGH_SPEED_BUFFER, KEEP_ALIVE, LIGHT_ACTIVE, LIGHT_INACTIVE, LOWSPEED, LOWSPEED_9V, LS_GET_STATUS, LS_READ, LS_WRITE, MESSAGE_READ, MESSAGE_WRITE, MODEMASK, MOTOR_RUN_STATE_IDLE, MOTOR_RUN_STATE_RAMPDOWN, MOTOR_RUN_STATE_RAMPUP, MOTOR_RUN_STATE_RUNNING, MOTORON, NO_OF_SENSOR_TYPES, NO_SENSOR, OPEN_APPEND_DATA, OPEN_READ, OPEN_READ_LINEAR, OPEN_WRITE, OPEN_WRITE_DATA, OPEN_WRITE_LINEAR, PCTFULLSCALEMODE, PERIODCOUNTERMODE, PLAY_SOUND_FILE, PLAY_TONE, POLL, POLL_BUFFER, POLL_LENGTH, RAWMODE, READ, REFLECTION, REGULATED, REGULATION_MODE_IDLE, REGULATION_MODE_MOTOR_SPEED, REGULATION_MODE_MOTOR_SYNC, REPLY_COMMAND, RESET_MOTOR_POSITION, RESET_SCALED_INPUT_VALUE, SET_BRICK_NAME, SET_INPUT_MODE, SET_OUTPUT_STATE, SLOPEMASK, SOUND_DB, SOUND_DBA, START_PROGRAM, STOP_PROGRAM, STOP_SOUND_PLAYBACK, SWITCH, SYSTEM_COMMAND_NOREPLY, SYSTEM_COMMAND_REPLY, TEMPERATURE, TRANSITIONCNTMODE, WRITE`

Fields inherited from interface lejos.nxt.SensorConstants
`MODE_ANGLESTEP, MODE_BOOLEAN, MODE_CELSIUS, MODE_FARENHEIT, MODE_PCTFULLSCALE, MODE_PERIODCOUNTER, MODE_RAW, MODE_TRANSITIONCNT, TYPE_ANGLE, TYPE_CUSTOM, TYPE_LIGHT_ACTIVE, TYPE_LIGHT_INACTIVE, TYPE_LOWSPEED, TYPE_LOWSPEED_9V, TYPE_NO_SENSOR, TYPE_REFLECTION, TYPE_SOUND_DB, TYPE_SOUND_DBA, TYPE_SWITCH, TYPE_TEMPERATURE`

Constructor Summary
`RemoteSensorPort(NXTCommand nxtCommand, int id)`

Method Summary
`int` | `getId()`
`int` | `getMode()`
`int` | `getType()`
`boolean` | `readBooleanValue()` Reads the boolean value of the sensor.
`int` | `readRawValue()` Reads the raw value of the sensor.
`int` | `readValue()` Returns value compatible with Lego firmware.
`void` | `setMode(int mode)`
`void` | `setType(int type)`
`void` | `setTypeAndMode(int type, int mode)`

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

Constructor Detail

### RemoteSensorPort

    public RemoteSensorPort(NXTCommand nxtCommand,
                            int id)

Method Detail

### getId

    public int getId()

### getType

    public int getType()

  Specified by:
    `getType` in interface `BasicSensorPort`

### getMode

    public int getMode()

  Specified by:
    `getMode` in interface `BasicSensorPort`

### setTypeAndMode

    public void setTypeAndMode(int type,
                               int mode)

  Specified by:
    `setTypeAndMode` in interface `BasicSensorPort`

### setType

    public void setType(int type)

  Specified by:
    `setType` in interface `BasicSensorPort`

### setMode

    public void setMode(int mode)

  Specified by:
    `setMode` in interface `BasicSensorPort`

### readBooleanValue

    public boolean readBooleanValue()

  Reads the boolean value of the sensor.

  Specified by:
    `readBooleanValue` in interface `ADSensorPort`
  Returns:
    Boolean value of sensor.

### readRawValue

    public int readRawValue()

  Reads the raw value of the sensor.

  Specified by:
    `readRawValue` in interface `ADSensorPort`
  Returns:
    Raw sensor value. Range is device dependent.

### readValue

    public int readValue()

  Returns value compatible with Lego firmware.

  Specified by:
    `readValue` in interface `ADSensorPort`

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