public class ModbusSerialDataSource extends ModbusDataSource
Modifier and Type | Field and Description |
---|---|
private ModbusSerialDataSourceVO |
configuration |
private org.apache.commons.logging.Log |
LOG |
(package private) com.serotonin.modbus4j.ModbusMaster |
modbusMaster |
(package private) SerialPortWrapperImpl |
serialWrapper |
private int |
timeoutPort |
DATA_SOURCE_EXCEPTION_EVENT, POINT_READ_EXCEPTION_EVENT, POINT_WRITE_EXCEPTION_EVENT
dataPoints, pointListChanged
addedChangedPoints, ATTR_DISCONNECTED_KEY, ATTR_UNRELIABLE_KEY, pointListChangeLock, removedPoints
Constructor and Description |
---|
ModbusSerialDataSource(ModbusSerialDataSourceVO configuration) |
Modifier and Type | Method and Description |
---|---|
private void |
disconnect() |
protected void |
doPoll(long time) |
protected com.serotonin.web.i18n.LocalizableMessage |
getLocalExceptionMessage(java.lang.Exception e) |
void |
initialize() |
void |
receivedException(java.lang.Exception e) |
addDataPoint, createModbusLocator, forcePointRead, initialize, localExceptionMessage, removeDataPoint, setPointValue, terminate
beginPolling, joinTermination, scheduleTimeout, setPollingPeriod, updateChangedPoints
getExceptionMessage, getId, getName, getPersistentData, getSerialExceptionMessage, raiseEvent, relinquish, returnToNormal, setPersistentData
private final org.apache.commons.logging.Log LOG
private final ModbusSerialDataSourceVO configuration
com.serotonin.modbus4j.ModbusMaster modbusMaster
SerialPortWrapperImpl serialWrapper
private int timeoutPort
public ModbusSerialDataSource(ModbusSerialDataSourceVO configuration)
public void initialize()
initialize
in interface com.serotonin.util.ILifecycle
initialize
in class DataSourceRT
protected void doPoll(long time)
doPoll
in class ModbusDataSource
private void disconnect()
protected com.serotonin.web.i18n.LocalizableMessage getLocalExceptionMessage(java.lang.Exception e)
getLocalExceptionMessage
in class ModbusDataSource
public void receivedException(java.lang.Exception e)
receivedException
in interface com.serotonin.modbus4j.messaging.MessagingExceptionHandler
receivedException
in class ModbusDataSource