Package lejos.hardware.port
Interface IOPort
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Subinterfaces:
AnalogPort,BasicMotorPort,ConfigurationPort,I2CPort,LegacySensorPort,TachoMotorPort,UARTPort
- All Known Implementing Classes:
PFMotorPort,RCXPlexedMotorPort,RCXRemoteMotorPort,RemoteAnalogPort,RemoteI2CPort,RemoteIOPort,RemoteMotorPort,RemoteNXTAnalogPort,RemoteNXTI2CPort,RemoteNXTIOPort,RemoteNXTMotorPort,RemoteRequestAnalogPort,RemoteRequestI2CPort,RemoteRequestIOPort,RemoteRequestMotorPort,RemoteRequestUARTPort,RemoteUARTPort
public interface IOPort extends java.io.CloseableBasic interface for EV3 sensor ports. TODO: Need to cleanup the setting of modes etc. should probably become part of the open, with some sort of name/value string pairs.- Author:
- andy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close the port, the port can not be used after this call.java.lang.StringgetName()Return the string representing this portbooleansetPinMode(int mode)Set the port pins up ready for use.
-
-
-
Method Detail
-
close
void close()
Close the port, the port can not be used after this call.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
getName
java.lang.String getName()
Return the string representing this port- Returns:
- the port name
-
setPinMode
boolean setPinMode(int mode)
Set the port pins up ready for use.- Parameters:
mode- The EV3 pin mode- Returns:
- true if the operation succeeds false if it fails
-
-