Class RMIRemoteI2CPort

  • All Implemented Interfaces:
    java.io.Serializable, java.rmi.Remote, RMII2CPort

    public class RMIRemoteI2CPort
    extends java.rmi.server.UnicastRemoteObject
    implements RMII2CPort
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.rmi.server.RemoteObject

        ref
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected RMIRemoteI2CPort​(java.lang.String portName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      byte[] i2cTransaction​(int deviceAddress, byte[] writeBuf, int writeOffset, int writeLen, int readLen)
      High level i2c interface.
      boolean setType​(int type)  
      • Methods inherited from class java.rmi.server.UnicastRemoteObject

        clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
      • Methods inherited from class java.rmi.server.RemoteServer

        getClientHost, getLog, setLog
      • Methods inherited from class java.rmi.server.RemoteObject

        equals, getRef, hashCode, toString, toStub
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RMIRemoteI2CPort

        protected RMIRemoteI2CPort​(java.lang.String portName)
                            throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface RMII2CPort
      • i2cTransaction

        public byte[] i2cTransaction​(int deviceAddress,
                                     byte[] writeBuf,
                                     int writeOffset,
                                     int writeLen,
                                     int readLen)
                              throws java.rmi.RemoteException
        Description copied from interface: RMII2CPort
        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 RMII2CPort
        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.
        readLen - The length of the read
        Returns:
        < 0 error otherwise the number of bytes read
        Throws:
        java.rmi.RemoteException
      • setType

        public boolean setType​(int type)
                        throws java.rmi.RemoteException
        Specified by:
        setType in interface RMII2CPort
        Throws:
        java.rmi.RemoteException