Class PFMotorPort

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, BasicMotorPort, IOPort

    public class PFMotorPort
    extends java.lang.Object
    implements BasicMotorPort
    MotorPort for PF Motors using HiTechnic IRLink
    Author:
    Lawrie Griffiths
    • Constructor Detail

      • PFMotorPort

        public PFMotorPort​(IRLink link,
                           int channel,
                           int slot)
    • Method Detail

      • close

        public void close()
        Description copied from interface: IOPort
        Close the port, the port can not be used after this call.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface IOPort
      • getName

        public java.lang.String getName()
        Description copied from interface: IOPort
        Return the string representing this port
        Specified by:
        getName in interface IOPort
        Returns:
        the port name
      • setPinMode

        public boolean setPinMode​(int mode)
        Description copied from interface: IOPort
        Set the port pins up ready for use.
        Specified by:
        setPinMode in interface IOPort
        Parameters:
        mode - The EV3 pin mode
        Returns:
        true if the operation succeeds false if it fails