Package lejos.hardware.port
Interface ConfigurationPort
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable,EV3SensorConstants,IOPort
public interface ConfigurationPort extends IOPort, EV3SensorConstants
-
-
Field Summary
-
Fields inherited from interface lejos.hardware.sensor.EV3SensorConstants
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetDeviceType()This function returns information on the sensor/motor that is attached to the specified port.intgetPortType()Get the type classification for the port.-
Methods inherited from interface lejos.hardware.port.IOPort
close, getName, setPinMode
-
-
-
-
Method Detail
-
getPortType
int getPortType()
Get the type classification for the port. If a sensor is attached to the port this will identify the connection type (UART/IIC/Dumb/Output etc.)- Returns:
- The type of the port.
-
getDeviceType
int getDeviceType()
This function returns information on the sensor/motor that is attached to the specified port. Note that only very basic sensor identification information may be available for some sensor types. It may be necessary to actually open the sensor to allow it to be identified in further detail.- Returns:
- the sensor type
-
-