public abstract class I2CProviderImpl extends Object implements I2CFactoryProvider
Constructor and Description |
---|
I2CProviderImpl() |
Modifier and Type | Method and Description |
---|---|
protected static void |
closeBus(int busNumber,
long lockAquireTimeout,
TimeUnit lockAquireTimeoutUnit,
Callable<Void> closeAction) |
protected static I2CBus |
getBus(int busNumber,
Callable<I2CBusImpl> constructor,
long lockAquireTimeout,
TimeUnit lockAquireTimeoutUnit)
Factory method that returns bus implementation.
|
I2CBus |
getBus(int busNumber,
long lockAquireTimeout,
TimeUnit lockAquireTimeoutUnit) |
protected abstract String |
getFilenameForBusnumber(int busNumber) |
public I2CProviderImpl()
protected static I2CBus getBus(int busNumber, Callable<I2CBusImpl> constructor, long lockAquireTimeout, TimeUnit lockAquireTimeoutUnit) throws I2CFactory.UnsupportedBusNumberException, IOException
newInstanceCandidate
- if no bus has been created yet, this instance is usedIOException
- thrown in case there is a problem opening bus file or bus number is not 0 or 1.I2CFactory.UnsupportedBusNumberException
protected static void closeBus(int busNumber, long lockAquireTimeout, TimeUnit lockAquireTimeoutUnit, Callable<Void> closeAction)
public I2CBus getBus(int busNumber, long lockAquireTimeout, TimeUnit lockAquireTimeoutUnit) throws I2CFactory.UnsupportedBusNumberException, IOException
getBus
in interface I2CFactoryProvider
I2CFactory.UnsupportedBusNumberException
IOException
protected abstract String getFilenameForBusnumber(int busNumber) throws I2CFactory.UnsupportedBusNumberException
Copyright © 2012–2019 Pi4J. All rights reserved.