public class SnmpDataSourceRT extends PollingDataSource
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
address |
static int |
DATA_SOURCE_EXCEPTION_EVENT |
private org.apache.commons.logging.Log |
log |
static int |
PDU_EXCEPTION_EVENT |
private org.snmp4j.Snmp |
snmp |
private org.snmp4j.Target |
target |
private Version |
version |
private SnmpDataSourceVO |
vo |
dataPoints, pointListChanged
addedChangedPoints, ATTR_DISCONNECTED_KEY, ATTR_UNRELIABLE_KEY, pointListChangeLock, removedPoints
Constructor and Description |
---|
SnmpDataSourceRT(SnmpDataSourceVO vo) |
Modifier and Type | Method and Description |
---|---|
protected void |
doPoll(long time) |
private void |
doPollImpl(long time) |
(package private) java.lang.String |
getAddress() |
(package private) java.lang.String |
getLocalAddress() |
private SnmpPointLocatorVO |
getLocatorVO(DataPointRT dp) |
private org.snmp4j.smi.OID |
getOid(DataPointRT dp) |
(package private) int |
getTrapPort() |
void |
initialize() |
(package private) void |
receivedTrap(org.snmp4j.PDU trap) |
void |
setPointValue(DataPointRT dataPoint,
PointValueTime valueTime,
SetPointSource source) |
void |
terminate() |
private void |
updatePoint(DataPointRT dp,
org.snmp4j.smi.Variable variable,
long time) |
private com.serotonin.web.i18n.LocalizableMessage |
validatePdu(org.snmp4j.PDU pdu) |
beginPolling, joinTermination, scheduleTimeout, setPollingPeriod, updateChangedPoints
addDataPoint, forcePointRead, getExceptionMessage, getId, getName, getPersistentData, getSerialExceptionMessage, raiseEvent, relinquish, removeDataPoint, returnToNormal, setPersistentData
public static final int DATA_SOURCE_EXCEPTION_EVENT
public static final int PDU_EXCEPTION_EVENT
private final org.apache.commons.logging.Log log
private final SnmpDataSourceVO vo
private final Version version
private java.lang.String address
private org.snmp4j.Target target
private org.snmp4j.Snmp snmp
public SnmpDataSourceRT(SnmpDataSourceVO vo)
public void setPointValue(DataPointRT dataPoint, PointValueTime valueTime, SetPointSource source)
setPointValue
in class DataSourceRT
protected void doPoll(long time)
doPoll
in class PollingDataSource
private void doPollImpl(long time) throws java.io.IOException
java.io.IOException
private com.serotonin.web.i18n.LocalizableMessage validatePdu(org.snmp4j.PDU pdu)
private org.snmp4j.smi.OID getOid(DataPointRT dp)
private SnmpPointLocatorVO getLocatorVO(DataPointRT dp)
int getTrapPort()
java.lang.String getLocalAddress()
java.lang.String getAddress()
void receivedTrap(org.snmp4j.PDU trap)
private void updatePoint(DataPointRT dp, org.snmp4j.smi.Variable variable, long time)
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