Package lejos.remote.ev3
Class RMIRemoteI2CPort
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- lejos.remote.ev3.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
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRMIRemoteI2CPort(java.lang.String portName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()byte[]i2cTransaction(int deviceAddress, byte[] writeBuf, int writeOffset, int writeLen, int readLen)High level i2c interface.booleansetType(int type)-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
-
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceRMII2CPort
-
i2cTransaction
public byte[] i2cTransaction(int deviceAddress, byte[] writeBuf, int writeOffset, int writeLen, int readLen) throws java.rmi.RemoteExceptionDescription copied from interface:RMII2CPortHigh 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:
i2cTransactionin interfaceRMII2CPort- 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 bufferwriteLen- 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:
setTypein interfaceRMII2CPort- Throws:
java.rmi.RemoteException
-
-