- java.lang.Object
-
- com.pi4j.common.IdentityBase
-
- com.pi4j.io.IOBase<Spi,SpiConfig,SpiProvider>
-
- com.pi4j.io.spi.SpiBase
-
- All Implemented Interfaces:
Describable
,Identity
,Lifecycle
,Extension
,IO<Spi,SpiConfig,SpiProvider>
,IODataReader
,IODataWriter
,Spi
,AutoCloseable
,Readable
public abstract class SpiBase extends IOBase<Spi,SpiConfig,SpiProvider> implements Spi
Abstract SpiBase class.
- Version:
- $Id: $Id
- Author:
- Robert Savage (http://www.savagehomeautomation.com)
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isOpen
-
Fields inherited from class com.pi4j.common.IdentityBase
description, id, metadata, name
-
Fields inherited from interface com.pi4j.io.spi.Spi
DEFAULT_BAUD, DEFAULT_MODE
-
-
Constructor Summary
Constructors Constructor Description SpiBase(SpiProvider provider, SpiConfig config)
Constructor for SpiBase.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
close.boolean
isOpen()
SPI Device Communication State is OPENvoid
open()
open.-
Methods inherited from class com.pi4j.io.IOBase
config, describe, description, initialize, name, provider, shutdown
-
Methods inherited from class com.pi4j.common.IdentityBase
description, id, metadata, name
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.pi4j.common.Identity
description, getDescription, getId, getMetadata, getName, id, metadata, name
-
Methods 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, readString
-
Methods 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, write
-
Methods inherited from interface com.pi4j.common.Lifecycle
initialize, shutdown
-
-
-
-
Constructor Detail
-
SpiBase
public SpiBase(SpiProvider provider, SpiConfig config)
Constructor for SpiBase.
- Parameters:
provider
- aSpiProvider
object.config
- aSpiConfig
object.
-
-
Method Detail
-
isOpen
public boolean isOpen()
SPI Device Communication State is OPEN
-
close
public void close()
close.
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSpi
-
-