Module diozero.provider.remote
Class GrpcClientSpiDevice
java.lang.Object
com.diozero.internal.spi.AbstractDevice
com.diozero.internal.provider.remote.grpc.GrpcClientSpiDevice
- All Implemented Interfaces:
DeviceInterface,SpiDeviceInterface,InternalDeviceInterface,InternalSpiDeviceInterface,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionGrpcClientSpiDevice(GrpcClientDeviceFactory deviceFactory, String key, int controller, int chipSelect, int frequency, SpiClockMode spiClockMode, boolean lsbFirst) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidintintvoidwrite(byte... txBuffer) voidwrite(byte[] txBuffer, int txOffset, int length) byte[]writeAndRead(byte... txBuffer) 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.internal.spi.InternalDeviceInterface
getKey, isChild, isOpen, setChild
-
Constructor Details
-
GrpcClientSpiDevice
public GrpcClientSpiDevice(GrpcClientDeviceFactory deviceFactory, String key, int controller, int chipSelect, int frequency, SpiClockMode spiClockMode, boolean lsbFirst)
-
-
Method Details
-
getController
public int getController()- Specified by:
getControllerin interfaceSpiDeviceInterface
-
getChipSelect
public int getChipSelect()- Specified by:
getChipSelectin interfaceSpiDeviceInterface
-
write
public void write(byte... txBuffer) - Specified by:
writein interfaceSpiDeviceInterface
-
write
public void write(byte[] txBuffer, int txOffset, int length) - Specified by:
writein interfaceSpiDeviceInterface
-
writeAndRead
- Specified by:
writeAndReadin interfaceSpiDeviceInterface- Throws:
RuntimeIOException
-
closeDevice
- Specified by:
closeDevicein classAbstractDevice- Throws:
RuntimeIOException
-