- All Implemented Interfaces:
Describable,Identity,Lifecycle,Extension,IO<Serial,,SerialConfig, SerialProvider> IODataReader,IODataWriter,Serial,AutoCloseable,Readable
public abstract class SerialBase
extends IOBase<Serial,SerialConfig,SerialProvider>
implements Serial
Abstract SerialBase class.
- Version:
- $Id: $Id
- Author:
- Robert Savage (http://www.savagehomeautomation.com)
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionSerialBase(SerialProvider provider, SerialConfig config) Constructor for SerialBase. -
Method Summary
Methods inherited from class com.pi4j.io.IOBase
config, 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, 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, write, write, writeMethods inherited from interface com.pi4j.common.Lifecycle
initialize, shutdown
-
Field Details
-
isOpen
protected boolean isOpen
-
-
Constructor Details
-
SerialBase
Constructor for SerialBase.
- Parameters:
provider- aSerialProviderobject.config- aSerialConfigobject.
-
-
Method Details
-
isOpen
public boolean isOpen()Serial Device Communication State is OPEN -
open
public void open()open.
-
close
public void close()close.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSerial
-