public class RS485Sensor extends WeatherSensor implements DriverDepending
$(Add)Afollowed by a carriage return (see
RS485Server.KEY_CR).
>(InpData)*followed again by a carriage return.
| Code | Input range | Resolution | Output |
|---|---|---|---|
| 08 | ±10V | 1mV | ±##.###V |
| 09 | ±5V | 100µV | ±#.####V |
| 0A | ±1V | 100µV | ±#.####V |
| 0B | ±500mV | 10µV | ±###.##mV |
| 0C | ±150mV | 10µV | ±###.##mV< /td> |
| 0D | ±20mA | 1µA | ±##.###mA td> |
PollingRS485Server, the
PollingRS485Server.KEY_ACTIVEREAD and the
PollingRS485Server.KEY_PASSIVEREAD must include the read command
for the Nudam module ($(Add)ARS485Server.KEY_STARTUP. Enabling of the Nudam channel is
done with $(Add)5(Channel), where (Channel) is the
two-character hex-equivalent of the eight input channels enable/disable
bits.KEY_READKEY_CHANNELTimerTaskSensor.SensorReadPropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private int |
channel
The integer equivalent of the channel key property.
|
static String |
KEY_CHANNEL
The key for the channel number this sensor link to on the module.
|
static String |
KEY_READ
The key linked to the channel-read command of the Nudam module.
|
static String |
KEY_SERVER
The key linked to the polling instance to read from.
|
private PollingRS485Server |
serial
The instance of the polling rs485 server.
|
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 |
|---|
RS485Sensor(Map prop)
Constructs a new RS485 sensor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getSensorInitInfo()
Returns a string description of the sensor.
|
protected double |
readSensor()
Reads the sensor value.
|
boolean |
registerDriver(Driver poller)
Registers the serial server to this sensor.
|
protected double |
retrieveValue(String read,
int nr)
Converts the input data string returned by the Nudam-module into a
double value.
|
boolean |
validReading()
Returns true if the sensor reading is valid.
|
addWeatherListener, conductOneMeasure, currentlyClear, currentlyRetarding, generateDataEvent, getMinClearUpTime, 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, getSensorDescription, 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_SERVER
public static final String KEY_READ
public static final String KEY_CHANNEL
private int channel
private transient PollingRS485Server serial
public RS485Sensor(Map prop) throws RemoteException
KEY_READ and the KEY_CHANNEL keys.
Construction fails if these keys are not present.IllegalArgumentException - If the necessary properties are not
set.NumberFormatException - If the channel number is not an int.RemoteExceptionpublic boolean registerDriver(Driver poller)
PollingRS485Server.registerDriver in interface DriverDependingprotected double readSensor()
PollingRS485Server.readChannel(java.lang.String), whose return value is then
fed, along with the channel number, to the retrieveValue(java.lang.String, int) method
of the sensor.readSensor in class TimerTaskSensorConvertToPhysicalpublic boolean validReading()
validReading in interface Telemeteringpublic String getSensorInitInfo()
getSensorInitInfo in interface TelemeteringgetSensorInitInfo in class WeatherSensorprotected double retrieveValue(String read, int nr)
read - The string read in from the serial linenr - The channel number (0-7) of the analog input.