public class UpsSensor extends WeatherSensor implements DriverDepending
UpsDriver must be supplied to this sensor.
The driver is caching all relevant sensor values, thus reading the
sensor has almost no latency. To reduce the number of parameters, we
recommend that the name of this sensor is equal to the sensor representation
in the UPS, though this is not possible for multiple UPS's.TimerTaskSensor.SensorReadPropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFUPSNAME
The default name of the ups
|
static String |
KEY_UPSNAME
The name of the ups driver to use.
|
static String |
KEY_VARIABLE
The name of this sensor in the ups driver cache.
|
private UpsDriver |
upsd
The instance of the ups driver to use.
|
KEY_DERIVATIVEINVALID, KEY_DERIVATIVEPARAMETER, KEY_INVERSE, KEY_INVERSEDERIVATIVE, KEY_JUDGEDERIVATIVE, KEY_JUDGEPREDICT, KEY_JUDGERAW, KEY_JUDGESMOOTH, KEY_PREDICTINVALID, KEY_PREDICTPARAMETER, KEY_RAWINVALID, KEY_RAWPARAMETER, KEY_RETARDBADDERIVATIVE, KEY_RETARDBADPREDICT, KEY_RETARDBADRAW, KEY_RETARDBADSMOOTH, KEY_RETARDGOODDERIVATIVE, KEY_RETARDGOODPREDICT, KEY_RETARDGOODRAW, KEY_RETARDGOODSMOOTH, KEY_SMOOTHINVALID, KEY_SMOOTHPARAMETERDEFRAWDERIVATIVE, derive, KEY_DERIVATIVEADVISE, KEY_DERIVE, KEY_PATH, KEY_RAWDERIVATIVE, zf, g, KEY_SMOOTH, KEY_SMOOTHADVISEKEY_CHI, KEY_EXTRAPOLATE, KEY_FUTURE, KEY_PREDICTADVISE, predictKEY_AVERAGE, KEY_MEMORY, KEY_PACKDEFRAWFORMAT, DEFREPORT, DEFSIGMAFORMAT, KEY_RAWFORMAT, KEY_REPORT, KEY_SIGMAFORMATKEY_LOGRAWABOVE, KEY_LOGRAWBELOW, KEY_LOGREADLAG, KEY_RESPAWNKEY_BIND, KEY_BINDNAME, KEY_CONVERT, KEY_DESCRIPTION, KEY_SENSORNAMEALTERNATEHOST, ALTERNATEPORT, KEY_EXPORTPORT, KEY_REGISTRYHOST, KEY_REGISTRYPORTKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORNAMING_EXTENSIONCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
UpsSensor(Map prop)
Constructs a new ups sensor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getSensorDescription()
We get our description from the underlying driver, if we have it.
|
protected double |
readSensor()
Reads the sensor value.
|
boolean |
registerDriver(Driver poller)
Registers the one-wire driver to this sensor.
|
boolean |
validReading()
Returns true if the a driver has been registered to this sensor.
|
addWeatherListener, conductOneMeasure, currentlyClear, currentlyRetarding, generateDataEvent, getMinClearUpTime, getSensorInitInfo, goodFromDerivative, goodFromPredict, goodFromRaw, goodFromSmooth, isDerivativeRetard, isPredictRetard, isRawRetard, isSmoothRetard, judgeWeather, notifyWeatherListener, removeWeatherListener, statusderiveAt, getDerivativeFormat, getDerivativeToggleInfo, getDerivator, getLastDerivative, isDerivativeAdvise, isDeriving, newData, regetDerive, registerDerivatorgetLastSmooth, getSmoother, getSmoothToggleInfo, isSmoothAdvise, isSmoothing, regetSmooth, registerSmoother, smoothOnegetExtrapolation, getLastPredict, getPredictToggleInfo, init, isPredictAdvise, isPredicting, isReliable, predictFrom, regetPredictcumulateOne, getLastRaw, getLastTime, getMaxSize, getMemory, getSizeaddDataListener, addRmiDataListener, exit, getRawFormat, getSigmaFormat, removeDataListener, removeRmiDataListener, reportcancel, equals, getRawToggleInfo, getReading, getRespawn, getTimeOfRead, hashCode, initSensorTimerTask, isReady, regetRaw, setTimeOfRead, validReadingaddRmiErrorListener, createSensor, getBindName, getConvert, getSensorName, notifyErrorListener, removeRmiErrorListener, setConvert, toStringbindToRegistry, bindToRegistry, bindToRegistry, bindToRegistry, bindToRegistry, bindToRegistry, casterExit, casterExit, getBindName, isValid, unbindFromRegistry, unbindFromRegistrycontainsRemoteProperty, getRemoteProperties, getRemoteProperty, setRemotePropertyclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringPropertiesfinalize, getClass, notify, notifyAll, wait, wait, waitcumulateOne, getLastRaw, getLastTime, getMaxSize, getSize, getTimeOfRead, regetRawbindToRegistry, isValid, unbindFromRegistrydefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_UPSNAME
public static final String KEY_VARIABLE
private static final String DEFUPSNAME
private transient UpsDriver upsd
public UpsSensor(Map prop) throws RemoteException
RemoteExceptionpublic boolean registerDriver(Driver poller)
registerDriver in interface DriverDependingprotected double readSensor()
readSensor in class TimerTaskSensorConvertToPhysicalpublic boolean validReading()
validReading in interface Telemeteringpublic String getSensorDescription()
getSensorDescription in interface TelemeteringgetSensorDescription in class AbstractSensor