Module diozero.provider.remote
Class GrpcClientI2CDevice
java.lang.Object
com.diozero.internal.spi.AbstractDevice
com.diozero.internal.provider.remote.grpc.GrpcClientI2CDevice
- All Implemented Interfaces:
DeviceInterface,I2CDeviceInterface,I2CSMBusInterface,InternalDeviceInterface,InternalI2CDeviceInterface,AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.diozero.api.I2CDeviceInterface
I2CDeviceInterface.Command, I2CDeviceInterface.I2CMessage, I2CDeviceInterface.ReadCommand, I2CDeviceInterface.WriteCommand -
Field Summary
Fields inherited from interface com.diozero.api.I2CDeviceInterface
I2C_FUNC_10BIT_ADDR, I2C_FUNC_I2C, I2C_FUNC_NOSTART, I2C_FUNC_PROTOCOL_MANGLING, I2C_FUNC_SMBUS_BLOCK_PROC_CALL, I2C_FUNC_SMBUS_PEC, I2C_FUNC_SMBUS_PROC_CALL, I2C_FUNC_SMBUS_QUICK, I2C_FUNC_SMBUS_READ_BLOCK_DATA, I2C_FUNC_SMBUS_READ_BYTE, I2C_FUNC_SMBUS_READ_BYTE_DATA, I2C_FUNC_SMBUS_READ_I2C_BLOCK, I2C_FUNC_SMBUS_READ_WORD_DATA, I2C_FUNC_SMBUS_WRITE_BLOCK_DATA, I2C_FUNC_SMBUS_WRITE_BYTE, I2C_FUNC_SMBUS_WRITE_BYTE_DATA, I2C_FUNC_SMBUS_WRITE_I2C_BLOCK, I2C_FUNC_SMBUS_WRITE_WORD_DATAFields inherited from interface com.diozero.api.I2CSMBusInterface
MAX_I2C_BLOCK_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionGrpcClientI2CDevice(GrpcClientDeviceFactory deviceFactory, String key, int controller, int address, I2CConstants.AddressSize addressSize) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]blockProcessCall(int register, byte... txData) protected voidbooleanprobe(I2CDevice.ProbeMode mode) shortprocessCall(int register, short s) byte[]readBlockData(int register) bytereadByte()bytereadByteData(int register) intreadBytes(byte[] buffer) intreadI2CBlockData(int register, byte[] buffer) shortreadWordData(int register) voidreadWrite(I2CDeviceInterface.I2CMessage[] messages, byte[] buffer) voidwriteBlockData(int register, byte... data) voidwriteByte(byte b) voidwriteByteData(int register, byte b) voidwriteBytes(byte... data) voidwriteI2CBlockData(int register, byte... data) voidwriteQuick(byte bit) voidwriteWordData(int register, short s) Methods inherited from class com.diozero.internal.spi.AbstractDevice
close, getDeviceFactory, getKey, isChild, isOpen, setChildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.diozero.api.DeviceInterface
closeMethods inherited from interface com.diozero.api.I2CDeviceInterface
readNoStop, readWrite, readWriteMethods inherited from interface com.diozero.api.I2CSMBusInterface
probe, readWordSwapped, writeWordSwappedMethods inherited from interface com.diozero.internal.spi.InternalDeviceInterface
getKey, isChild, isOpen, setChild
-
Constructor Details
-
GrpcClientI2CDevice
public GrpcClientI2CDevice(GrpcClientDeviceFactory deviceFactory, String key, int controller, int address, I2CConstants.AddressSize addressSize)
-
-
Method Details
-
probe
- Specified by:
probein interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
writeQuick
public void writeQuick(byte bit) - Specified by:
writeQuickin interfaceI2CSMBusInterface
-
readByte
- Specified by:
readBytein interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
writeByte
- Specified by:
writeBytein interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
readByteData
- Specified by:
readByteDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
writeByteData
- Specified by:
writeByteDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
readWordData
- Specified by:
readWordDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
writeWordData
- Specified by:
writeWordDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
processCall
- Specified by:
processCallin interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
readBlockData
- Specified by:
readBlockDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
writeBlockData
- Specified by:
writeBlockDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
blockProcessCall
- Specified by:
blockProcessCallin interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
readI2CBlockData
- Specified by:
readI2CBlockDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
writeI2CBlockData
- Specified by:
writeI2CBlockDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
readBytes
- Specified by:
readBytesin interfaceI2CDeviceInterface- Throws:
RuntimeIOException
-
writeBytes
- Specified by:
writeBytesin interfaceI2CDeviceInterface- Throws:
RuntimeIOException
-
readWrite
- Specified by:
readWritein interfaceI2CDeviceInterface
-
closeDevice
- Specified by:
closeDevicein classAbstractDevice- Throws:
RuntimeIOException
-