Class RemoteI2CDevice
java.lang.Object
com.diozero.internal.provider.AbstractDevice
com.diozero.internal.provider.remote.devicefactory.RemoteI2CDevice
- All Implemented Interfaces:
DeviceInterface,I2CDeviceInterface,java.io.Closeable,java.lang.AutoCloseable
public class RemoteI2CDevice extends AbstractDevice implements I2CDeviceInterface
-
Constructor Summary
Constructors Constructor Description RemoteI2CDevice(RemoteDeviceFactory deviceFactory, java.lang.String key, int controller, int address, int addressSize, int clockFrequency) -
Method Summary
Modifier and Type Method Description protected voidcloseDevice()booleanprobe(I2CDevice.ProbeMode mode)voidread(java.nio.ByteBuffer buffer)bytereadByte()bytereadByteData(int register)voidreadI2CBlockData(int register, int subAddressSize, java.nio.ByteBuffer buffer)voidwrite(java.nio.ByteBuffer buffer)voidwriteByte(byte b)voidwriteByteData(int register, byte b)voidwriteI2CBlockData(int register, int subAddressSize, java.nio.ByteBuffer buffer)Methods inherited from class com.diozero.internal.provider.AbstractDevice
close, getDeviceFactory, getKey, isOpenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.diozero.internal.provider.DeviceInterface
close, getKey, isOpen
-
Constructor Details
-
RemoteI2CDevice
public RemoteI2CDevice(RemoteDeviceFactory deviceFactory, java.lang.String key, int controller, int address, int addressSize, int clockFrequency)
-
-
Method Details
-
probe
- Specified by:
probein interfaceI2CDeviceInterface- Throws:
RuntimeIOException
-
readByte
- Specified by:
readBytein interfaceI2CDeviceInterface- Throws:
RuntimeIOException
-
writeByte
- Specified by:
writeBytein interfaceI2CDeviceInterface- Throws:
RuntimeIOException
-
read
- Specified by:
readin interfaceI2CDeviceInterface- Throws:
RuntimeIOException
-
write
- Specified by:
writein interfaceI2CDeviceInterface- Throws:
RuntimeIOException
-
readByteData
- Specified by:
readByteDatain interfaceI2CDeviceInterface- Throws:
RuntimeIOException
-
writeByteData
- Specified by:
writeByteDatain interfaceI2CDeviceInterface- Throws:
RuntimeIOException
-
readI2CBlockData
public void readI2CBlockData(int register, int subAddressSize, java.nio.ByteBuffer buffer) throws RuntimeIOException- Specified by:
readI2CBlockDatain interfaceI2CDeviceInterface- Throws:
RuntimeIOException
-
writeI2CBlockData
public void writeI2CBlockData(int register, int subAddressSize, java.nio.ByteBuffer buffer) throws RuntimeIOException- Specified by:
writeI2CBlockDatain interfaceI2CDeviceInterface- Throws:
RuntimeIOException
-
closeDevice
- Specified by:
closeDevicein classAbstractDevice- Throws:
RuntimeIOException
-