Module diozero.provider.remote
Class GrpcClientSerialDevice
java.lang.Object
com.diozero.internal.spi.AbstractDevice
com.diozero.internal.provider.remote.grpc.GrpcClientSerialDevice
- All Implemented Interfaces:
DeviceInterface,SerialDeviceInterface,InternalDeviceInterface,InternalSerialDeviceInterface,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionGrpcClientSerialDevice(GrpcClientDeviceFactory deviceFactory, String key, String deviceFile, int baud, SerialConstants.DataBits dataBits, SerialConstants.StopBits stopBits, SerialConstants.Parity parity, boolean readBlocking, int minReadChars, int readTimeoutMillis) -
Method Summary
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
-
GrpcClientSerialDevice
public GrpcClientSerialDevice(GrpcClientDeviceFactory deviceFactory, String key, String deviceFile, int baud, SerialConstants.DataBits dataBits, SerialConstants.StopBits stopBits, SerialConstants.Parity parity, boolean readBlocking, int minReadChars, int readTimeoutMillis)
-
-
Method Details
-
read
public int read()- Specified by:
readin interfaceSerialDeviceInterface
-
readByte
- Specified by:
readBytein interfaceSerialDeviceInterface- Throws:
RuntimeIOException
-
writeByte
public void writeByte(byte bVal) - Specified by:
writeBytein interfaceSerialDeviceInterface
-
read
public int read(byte[] buffer) - Specified by:
readin interfaceSerialDeviceInterface
-
write
public void write(byte... data) - Specified by:
writein interfaceSerialDeviceInterface
-
bytesAvailable
public int bytesAvailable()- Specified by:
bytesAvailablein interfaceSerialDeviceInterface
-
closeDevice
- Specified by:
closeDevicein classAbstractDevice- Throws:
RuntimeIOException
-