public class OpenV4JDataSourceRT extends PollingDataSource
Modifier and Type | Field and Description |
---|---|
static int |
DATA_SOURCE_EXCEPTION_EVENT |
private static org.apache.commons.logging.Log |
LOG |
static int |
POINT_READ_EXCEPTION_EVENT |
static int |
POINT_WRITE_EXCEPTION_EVENT |
private net.sf.openv4j.protocolhandlers.ProtocolHandler |
protocolHandler |
private gnu.io.SerialPort |
sPort |
private OpenV4JDataSourceVO |
vo |
dataPoints, pointListChanged
addedChangedPoints, ATTR_DISCONNECTED_KEY, ATTR_UNRELIABLE_KEY, pointListChangeLock, removedPoints
Constructor and Description |
---|
OpenV4JDataSourceRT(OpenV4JDataSourceVO vo) |
Modifier and Type | Method and Description |
---|---|
private void |
closePort() |
protected void |
doPoll(long time) |
void |
initialize() |
private boolean |
openSerialPort() |
void |
setPointValue(DataPointRT dataPoint,
PointValueTime valueTime,
SetPointSource source) |
void |
terminate() |
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 OpenV4JDataSourceVO vo
private gnu.io.SerialPort sPort
private final net.sf.openv4j.protocolhandlers.ProtocolHandler protocolHandler
public OpenV4JDataSourceRT(OpenV4JDataSourceVO vo)
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
protected void doPoll(long time)
doPoll
in class PollingDataSource
public void setPointValue(DataPointRT dataPoint, PointValueTime valueTime, SetPointSource source)
setPointValue
in class DataSourceRT
private boolean openSerialPort()
private void closePort()