Module com.pi4j.plugin.raspberrypi
Class RpiSerial
java.lang.Object
com.pi4j.common.IdentityBase
com.pi4j.io.IOBase<Serial,SerialConfig,SerialProvider>
com.pi4j.io.serial.SerialBase
com.pi4j.plugin.raspberrypi.provider.serial.RpiSerial
- All Implemented Interfaces:
Describable,Identity,Lifecycle,Extension,IO<Serial,,SerialConfig, SerialProvider> IODataReader,IODataWriter,Serial,AutoCloseable,Readable
RpiSerial class.
- Version:
- $Id: $Id
- Author:
- Robert Savage (http://www.savagehomeautomation.com)
-
Field Summary
Fields inherited from class com.pi4j.io.serial.SerialBase
isOpenFields inherited from class com.pi4j.common.IdentityBase
description, id, metadata, nameFields inherited from interface com.pi4j.io.serial.Serial
DEFAULT_BAUD, DEFAULT_DATA_BITS, DEFAULT_FLOW_CONTROL, DEFAULT_PARITY, DEFAULT_STOP_BITS -
Constructor Summary
ConstructorsConstructorDescriptionRpiSerial(SerialProvider provider, SerialConfig config) Constructor for RpiSerial. -
Method Summary
Methods inherited from class com.pi4j.io.serial.SerialBase
close, isOpen, openMethods inherited from class com.pi4j.io.IOBase
config, context, describe, description, initialize, name, provider, shutdownMethods inherited from class com.pi4j.common.IdentityBase
description, id, metadata, nameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.pi4j.common.Identity
description, getDescription, getId, getMetadata, getName, id, metadata, nameMethods inherited from interface com.pi4j.io.IODataReader
getInputStream, in, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, readByte, readByteBuffer, readByteBuffer, readCharArray, readCharArray, readCharArray, readCharArray, readCharBuffer, readCharBuffer, readCharBuffer, readCharBuffer, readNBytes, readNBytes, readString, readString, readString, readStringMethods inherited from interface com.pi4j.io.IODataWriter
getOutputStream, out, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, writeMethods inherited from interface com.pi4j.common.Lifecycle
initialize, shutdown
-
Constructor Details
-
RpiSerial
Constructor for RpiSerial.
- Parameters:
provider- aSerialProviderobject.config- aSerialConfigobject.
-
-
Method Details
-
write
public int write(byte b) - Specified by:
writein interfaceIODataWriter
-
write
public int write(byte[] data, int offset, int length) - Specified by:
writein interfaceIODataWriter
-
read
public int read()- Specified by:
readin interfaceIODataReader
-
read
public int read(byte[] buffer, int offset, int length) - Specified by:
readin interfaceIODataReader
-
available
-