Class RemoteI2CPort

    • Constructor Detail

      • RemoteI2CPort

        public RemoteI2CPort​(RMIEV3 rmiEV3)
    • 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
        Overrides:
        close in class RemoteIOPort
      • i2cTransaction

        public void i2cTransaction​(int deviceAddress,
                                   byte[] writeBuf,
                                   int writeOffset,
                                   int writeLen,
                                   byte[] readBuf,
                                   int readOffset,
                                   int readLen)
        Description copied from interface: I2CPort
        High level i2c interface. Perform a complete i2c transaction and return the results. Writes the specified data to the device and then reads the requested bytes from it.
        Specified by:
        i2cTransaction in interface I2CPort
        Parameters:
        deviceAddress - The I2C device address.
        writeBuf - The buffer containing data to be written to the device.
        writeOffset - The offset of the data within the write buffer
        writeLen - The number of bytes to write.
        readBuf - The buffer to use for the transaction results
        readOffset - Location to write the results to
        readLen - The length of the read
      • setType

        public boolean setType​(int type)
        Description copied from interface: BasicSensorPort
        Set the operating type for the attached sensor. Normally type setting is only used with legacy sensors and for i2c devices (to set the speed and operating voltage). It is not normally used with EV3 sensors.
        Specified by:
        setType in interface BasicSensorPort
        Overrides:
        setType in class RemoteIOPort
        Returns:
        true if type accepted