public class RemoteRequestIOPort extends java.lang.Object implements IOPort, BasicSensorPort, EV3SensorConstants
Modifier and Type | Field and Description |
---|---|
protected int |
currentMode |
protected static RemoteRequestIOPort[][] |
openPorts |
protected int |
port |
protected RemoteRequestPort |
ref |
protected int |
typ |
BLACK, BLANK_INDEX, BLUE, BLUE_INDEX, BROWN, GREEN, GREEN_INDEX, MAX_TYPE, MIN_TYPE, MODE_RAW, NXT_ADC_RES, RED, RED_INDEX, TYPE_ANGLE, TYPE_COLORBLUE, TYPE_COLORFULL, TYPE_COLORGREEN, TYPE_COLORNONE, TYPE_COLORRED, TYPE_CUSTOM, TYPE_HIGHSPEED, TYPE_HIGHSPEED_9V, TYPE_HISPEED, 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, WHITE, YELLOW
ADC_REF, ADC_RES, CMD_AUTOMATIC, CMD_COL_AMB, CMD_COL_BLU, CMD_COL_COL, CMD_COL_GRN, CMD_COL_RED, CMD_CONNECTED, CMD_DISCONNECTED, CMD_FLOAT, CMD_NONE, CMD_PIN1, CMD_PIN5, CMD_SET, CONN_DAISYCHAIN, CONN_ERROR, CONN_INPUT_DUMB, CONN_INPUT_UART, CONN_NONE, CONN_NXT_COLOR, CONN_NXT_DUMB, CONN_NXT_IIC, CONN_OUTPUT_DUMB, CONN_OUTPUT_INTELLIGENT, CONN_OUTPUT_TACHO, CONN_UNKNOWN, IIC_DATA_LENGTH, MAX_DEVICE_DATALENGTH, MOTORS, PORTS, STATUS_BUSY, STATUS_FAIL, STATUS_OK, STATUS_STOP, TYPE_ERROR, TYPE_IIC_UNKNOWN, TYPE_MINITACHO, TYPE_NEWTACHO, TYPE_NONE, TYPE_NXT_COLOR, TYPE_NXT_IIC, TYPE_NXT_LIGHT, TYPE_NXT_SOUND, TYPE_NXT_TEST, TYPE_NXT_TOUCH, TYPE_TACHO, TYPE_TERMINAL, TYPE_THIRD_PARTY_END, TYPE_THIRD_PARTY_START, TYPE_UNKNOWN, UART_MAX_MODES
Constructor and Description |
---|
RemoteRequestIOPort() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the port, the port can not be used after this call.
|
int |
getMode()
Get the current operating mode of the sensor
|
java.lang.String |
getName()
Return the string representing this port
|
int |
getType()
Get the current type setting.
|
boolean |
open(int typ,
int port,
RemoteRequestPort ref) |
boolean |
setMode(int mode)
Set the current operating mode for the sensor attached to the port.
|
boolean |
setPinMode(int mode)
Set the port pins up ready for use.
|
boolean |
setType(int type)
Set the operating type for the attached sensor.
|
boolean |
setTypeAndMode(int type,
int mode) |
protected int port
protected int typ
protected RemoteRequestPort ref
protected int currentMode
protected static RemoteRequestIOPort[][] openPorts
public boolean open(int typ, int port, RemoteRequestPort ref)
public int getMode()
BasicSensorPort
getMode
in interface BasicSensorPort
public int getType()
BasicSensorPort
getType
in interface BasicSensorPort
public boolean setMode(int mode)
BasicSensorPort
setMode
in interface BasicSensorPort
mode
- the new modepublic boolean setType(int type)
BasicSensorPort
setType
in interface BasicSensorPort
public boolean setTypeAndMode(int type, int mode)
setTypeAndMode
in interface BasicSensorPort
public void close()
IOPort
public java.lang.String getName()
IOPort
public boolean setPinMode(int mode)
IOPort
setPinMode
in interface IOPort
mode
- The EV3 pin mode