Raritan / Server Technology Xerus™ PDU JSON-RPC API
|
Gateway Sensor Configuration Interface. More...
import"GatewaySensorManager.idl";
Classes | |
struct | ConfigurationChangedEvent |
Event: The gateway sensor feature configuration has changed. More... | |
struct | ConfigurationPackage |
struct | DeviceFeedback |
struct | Feedback |
struct | FeedbackChangedEvent |
Event: The configuration usage feedback has changed. More... | |
struct | FeedbackObject |
Feedback from gateway sensor configuration usage. More... | |
struct | InterpretationRule |
InterpretationRule defines a rule that is applied to a reading, resulting in an Interpretation. More... | |
struct | InterpretationRuleCatchAll |
struct | InterpretationRuleIEEE754INF |
InterpretationRuleIEEE* are applied after value is wapped, masked and interpreted as float / double. More... | |
struct | InterpretationRuleIEEE754NAN |
struct | InterpretationRuleInvertable |
struct | InterpretationRuleModbusException |
InterpretationRuleModbusException is applied to modbus read exceptions. More... | |
struct | InterpretationRuleModbusSpecificError |
InterpretationRuleModbusSpecificError is applied to specific errors from libmodbus. More... | |
struct | InterpretationRuleModbusSystemError |
InterpretationRuleModbusSystemError is applied to standard system errors returned from libmodbus. More... | |
struct | InterpretationRuleRangeRAW |
InterpretationRuleRangeRAW is applied after swap, but before masking (because it has it's own mask) More... | |
struct | InterpretationRuleRAW |
InterpretationRuleRAW is applied after swap, but before masking (because it has it's own mask) More... | |
struct | ModbusSensor |
struct | ModbusValueEncoding16 |
struct | ModbusValueEncoding32 |
struct | ModbusValueEncoding64 |
struct | ModbusValueEncoding8 |
struct | ModbusValueEncodingBit |
struct | NumericSensorClass |
Sensor class that stores numeric sensor properties. More... | |
struct | NumericValueEncoding |
struct | RemoteDevice |
Specification of a remote device that provides access to sensors. More... | |
struct | RemoteModbusDevice |
struct | RemoteModbusRTUDevice |
struct | RemoteModbusTCPDevice |
struct | Sensor |
Specification of a Sensor. More... | |
struct | SensorClass |
Specification of sensor class that stores sensor properties. More... | |
struct | SensorFeedback |
struct | StateSensorClass |
Sensor class that stores state sensor properties. More... | |
struct | SwitchSensorClass |
Sensor class that switch properties. More... | |
struct | ValueEncoding |
Public Types | |
enum | EncodingType { BOOL , INT , UINT , IEEE754 } |
Specification of value encoding. More... | |
enum | Interpretation { DEFAULT , REJECT_DEVICE , REJECT_SENSOR , IGNORE , UNAVAILABLE , NUMERIC_INVALID , STATE_ON , STATE_OFF } |
Here you define how certain read values are to be interpreted. More... | |
enum | ModbusEndianness { MODBUS_BIG_ENDIAN , MODBUS_LITTLE_ENDIAN } |
Public Member Functions | |
map< string, ConfigurationPackage > | getConfiguration () |
Get all defined gateway sensors and required objects from config. More... | |
int | setConfiguration (in map< string, ConfigurationPackage > cfg) |
Replace defined gateway sensor and/or other configuration objects in config. More... | |
vector< Feedback > | getFeedback () |
Get feedback from gateway sensor configuration usage. More... | |
Gateway Sensor Configuration Interface.
Specification of value encoding.
Before an instance of Sensor can be created, an instance of ValueEncoding must be present. The Sensor locates the corresponding ValueEncoding using the sensor class id encodingId
.
Enumerator | |
---|---|
BOOL | boolean |
INT | signed integer of a size specified in ValueEncoding |
UINT | unsigned integer of a size specified in ValueEncoding |
IEEE754 | IEEE 754 floating point of a size specified in ValueEncoding. |
Here you define how certain read values are to be interpreted.
The rules leading to *_IGNORE and *_UNAVAILABLE are applied to numeric values and states.
IGNORE can be time-limited using ignoreTimeout, see InterpretationRule. After the time has expired, the value is set to unavailable.
NUMERIC_INVALID only affects NumericSensors. As DEFAULT for numeric sensors (if no rule is matched, or if DEFAULT is matched) the value is converted to a floating point number according to type specification.
STATE_ON and STATE_OFF affect only StateSensors. If no such rule is specified, the state becomes true if the read value is integral and not 0. If STATE_ON or STATE_OFF are present in the rules, then the state is set to true or false only if a STATE_* rule matches. Otherwise (DEFAULT) the state becomes unavailable.
REJECT_SENSOR means: do not accept this reading in any way. The sensor is treated as non-existent.
REJECT_DEVICE means: do not accept this reading in any way. Instead, this is a clear indication that the device is defective, or it is a wrong device. All sensors that belong to this device are treated as non-existent. REJECT_DEVICE can be used in this way to detect devices. The sensor defined for this purpose does not have to be imported as gateway sensor (see Sensor::classId = "").
DEFAULT on failed receives modbus exceptions REJECT_SENSOR. DEFAULT on modbus read errors (e.g. timeouts) is REJECT_DEVICE.
map<string, ConfigurationPackage> peripheral::GatewaySensorManager::getConfiguration | ( | ) |
Get all defined gateway sensors and required objects from config.
Read all Sensor Classes, Remote Devices, Value Encodings and Sensors at once to ensure that the overall configuration is consistent
vector<Feedback> peripheral::GatewaySensorManager::getFeedback | ( | ) |
Get feedback from gateway sensor configuration usage.
int peripheral::GatewaySensorManager::setConfiguration | ( | in map< string, ConfigurationPackage > | cfg | ) |
Replace defined gateway sensor and/or other configuration objects in config.
Write all Sensor Classes, Remote Devices, Value Encodings and Sensors at once to ensure that the overall configuration is consistent at every moment.
The uniqueness of all IDs and the availability of all referenced elements are checked before the configuration is applied. Otherwise setConfiguration() returns with an error.
cfg | all defined gateway sensor feature configuration objects |