public class OneWireDataSourceRT extends PollingDataSource
Modifier and Type | Class and Description |
---|---|
(package private) class |
OneWireDataSourceRT.NetworkReloadException |
Modifier and Type | Field and Description |
---|---|
static int |
DATA_SOURCE_EXCEPTION_EVENT |
private static org.apache.commons.logging.Log |
LOG |
private Network |
network |
private long |
nextRescan |
static int |
POINT_READ_EXCEPTION_EVENT |
static int |
POINT_WRITE_EXCEPTION_EVENT |
private OneWireDataSourceVO |
vo |
dataPoints, pointListChanged
addedChangedPoints, ATTR_DISCONNECTED_KEY, ATTR_UNRELIABLE_KEY, pointListChangeLock, removedPoints
Constructor and Description |
---|
OneWireDataSourceRT(OneWireDataSourceVO vo) |
Modifier and Type | Method and Description |
---|---|
private boolean |
arePointsThatNeedAddress(java.lang.Long address,
java.util.List<DataPointRT> points) |
protected void |
doPoll(long time) |
Network |
getNetwork() |
void |
initialize() |
private void |
initializeNetwork() |
private void |
readSensor(com.dalsemi.onewire.container.OneWireContainer owc,
java.util.List<DataPointRT> points,
java.lang.Long address,
long time) |
void |
setPointValue(DataPointRT dataPoint,
PointValueTime valueTime,
SetPointSource source) |
void |
terminate() |
private void |
terminateNetwork() |
private com.serotonin.web.i18n.LocalizableMessage |
tryRead(java.util.List<DataPointRT> points,
long time,
boolean throwToReload) |
private void |
updateNextRescan(long time) |
beginPolling, joinTermination, scheduleTimeout, setPollingPeriod, updateChangedPoints
addDataPoint, forcePointRead, getExceptionMessage, getId, getName, getPersistentData, getSerialExceptionMessage, raiseEvent, relinquish, removeDataPoint, returnToNormal, setPersistentData
private static final org.apache.commons.logging.Log LOG
public static final int DATA_SOURCE_EXCEPTION_EVENT
public static final int POINT_READ_EXCEPTION_EVENT
public static final int POINT_WRITE_EXCEPTION_EVENT
private final OneWireDataSourceVO vo
private Network network
private long nextRescan
public OneWireDataSourceRT(OneWireDataSourceVO vo)
public Network getNetwork()
protected void doPoll(long time)
doPoll
in class PollingDataSource
private com.serotonin.web.i18n.LocalizableMessage tryRead(java.util.List<DataPointRT> points, long time, boolean throwToReload) throws OneWireDataSourceRT.NetworkReloadException
private boolean arePointsThatNeedAddress(java.lang.Long address, java.util.List<DataPointRT> points)
private void readSensor(com.dalsemi.onewire.container.OneWireContainer owc, java.util.List<DataPointRT> points, java.lang.Long address, long time) throws com.dalsemi.onewire.adapter.OneWireIOException, com.dalsemi.onewire.OneWireException
com.dalsemi.onewire.adapter.OneWireIOException
com.dalsemi.onewire.OneWireException
public void setPointValue(DataPointRT dataPoint, PointValueTime valueTime, SetPointSource source)
setPointValue
in class DataSourceRT
public void initialize()
initialize
in interface com.serotonin.util.ILifecycle
initialize
in class DataSourceRT
public void terminate()
terminate
in interface com.serotonin.util.ILifecycle
terminate
in class PollingDataSource
private void initializeNetwork()
private void terminateNetwork()
private void updateNextRescan(long time)