Legrand / Raritan / Server Technology Xerus™ JSON-RPC API

Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
peripheral::GatewaySensorManager Interface Reference

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 | InterpretationRuleEnum
| InterpretationRuleEnum is applied to a reading and maps the values to the given Interpretation. More...
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 | ModbusValueEncoding48
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 | RemoteSnmpDevice
struct | RemoteSnmpV1V2Device
struct | RemoteSnmpV3Device
struct | Sensor
| Specification of a Sensor. More...
struct | SensorClass
| Specification of sensor class that stores sensor properties. More...
struct | SensorFeedback
struct | SnmpSensor
struct | StateSensorClass
| Sensor class that stores state sensor properties. More...
struct | SwitchSensorClass
| Sensor class that switch properties. More...
struct | ValueEncoding
| Specification of value encoding. More...

## Public Types
enum | SnmpSecurityLevel { NO_AUTH_NO_PRIV , AUTH_NO_PRIV , AUTH_PRIV }
enum | SnmpAuthProtocol { MD5 , SHA1 , SHA224 , SHA256 , SHA384 , SHA512 }
enum | SnmpPrivProtocol { DES , AES128 , AES192 , AES256 , AES192_3DES , AES256_3DES }
enum | EncodingType { BOOL , INT , UINT , IEEE754 , INT_ONES_COMPLEMENT , INT_SIGN_MAGNITUDE , INT_10K , UINT_10K , INT_BCD , INT_SIGN_MAGNITUDE_BCD , UINT_BCD , INT_PACKED_BCD , INT_SIGN_MAGNITUDE_PACKED_BCD , UINT_PACKED_BCD }
| interpretation of binary values 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 | AccessType { ACCESS_READ_WRITE , ACCESS_READ , ACCESS_WRITE }
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.
int | setConfiguration (in map< string, ConfigurationPackage > cfg)
| Replace defined gateway sensor and/or other configuration objects in config.
vector< Feedback > | getFeedback ()
| Get feedback from gateway sensor configuration usage.

## Public Attributes
constant int | MODBUS_VENDOR_NAME = 0
constant int | MODBUS_PRODUCT_CODE = 1
constant int | MODBUS_REVISION = 2
constant int | MODBUS_VENDOR_URL = 3
constant int | MODBUS_PRODUCT_NAME = 4
constant int | MODBUS_MODEL_NAME = 5
constant int | MODBUS_APP_NAME = 6
constant int | ERR_CONFIG_INCONSISTENT = 1
constant int | ERR_CONFIG_STORAGE_FAILED = 2

## Detailed Description

Gateway Sensor Configuration Interface.

Definition at line 20 of file GatewaySensorManager.idl.

## Member Enumeration Documentation

## ◆ AccessType

enum peripheral::GatewaySensorManager::AccessType

Enumerator
ACCESS_READ_WRITE | use rule for both read and write access
ACCESS_READ | use rule for read access only
ACCESS_WRITE | use rule for write access only

Definition at line 443 of file GatewaySensorManager.idl.

## ◆ EncodingType

enum peripheral::GatewaySensorManager::EncodingType

interpretation of binary values

Enumerator
BOOL | boolean
INT | signed integer of a size specified in ValueEncoding as two's complement
UINT | unsigned integer of a size specified in ValueEncoding
IEEE754 | IEEE 754 floating point of a size specified in ValueEncoding.
INT_ONES_COMPLEMENT | integer as one's complement
INT_SIGN_MAGNITUDE | signed integer with sign in MSB
INT_10K | signed integer stored as 'modulo 10000' (int16[0] + 10000 * int16[1] + 10000^2 * int16[2] ...), the int16 parts are stores as two's complement
UINT_10K | unsigned integer stored as 'modulo 10000' (uint16[0] + 10000 * uint16[1] + 10000^2 * uint16[2] ...)
INT_BCD | signed integer as BCD, 10th complement
INT_SIGN_MAGNITUDE_BCD | signed integer as BCD, with sign in MSB
UINT_BCD | unsigned integer as BCD
INT_PACKED_BCD | signed integer as packed BCD, 10th complement
INT_SIGN_MAGNITUDE_PACKED_BCD | signed integer as packed BCD, with sign in MSB
UINT_PACKED_BCD | unsigned integer as packed BCD

Definition at line 381 of file GatewaySensorManager.idl.

## ◆ Interpretation

enum peripheral::GatewaySensorManager::Interpretation

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 read access for

- received modbus exceptions is REJECT_SENSOR
- on modbus errors (SystemError or ModbusSystemError) is REJECT_DEVICE
- on value decoding/conversion is normal numeric/state decoding

Default on write access (actuator switch) for

- all modbus exceptions and errors is UNAVAILABLE

Enumerator
DEFAULT | default behaviour as without rule, see above
REJECT_DEVICE | read only: device is treated as non-existent
REJECT_SENSOR | read only: sensor is treated as non-existent
IGNORE | read: ignore (use previous value) and retry write: ignore error and retry
UNAVAILABLE | read: treat as unavailable (both state and numeric value) write: give up, do not retry
NUMERIC_INVALID | read only: treat as invalid numeric value
STATE_ON | read: treat as state ON write: use for reversed rule to handle requested ON
STATE_OFF | read: treat as state OFF write: use for reversed rule to handle requested OFF

Definition at line 432 of file GatewaySensorManager.idl.

## ◆ ModbusEndianness

enum peripheral::GatewaySensorManager::ModbusEndianness

Enumerator
MODBUS_BIG_ENDIAN | use big endian modbus word order (default is big endian)
MODBUS_LITTLE_ENDIAN | use little endian modbus word order

Definition at line 567 of file GatewaySensorManager.idl.

## ◆ SnmpAuthProtocol

enum peripheral::GatewaySensorManager::SnmpAuthProtocol

Enumerator
MD5 | MD5.
SHA1 | SHA-1.
SHA224 | SHA-224.
SHA256 | SHA-256.
SHA384 | SHA-384.
SHA512 | SHA-512.

Definition at line 349 of file GatewaySensorManager.idl.

## ◆ SnmpPrivProtocol

enum peripheral::GatewaySensorManager::SnmpPrivProtocol

Enumerator
DES | DES.
AES128 | AES-128.
AES192 | AES-192.
AES256 | AES-256.
AES192_3DES | AES-192 with key extension (3DES)
AES256_3DES | AES-256 with key extension (3DES)

Definition at line 358 of file GatewaySensorManager.idl.

## ◆ SnmpSecurityLevel

enum peripheral::GatewaySensorManager::SnmpSecurityLevel

Enumerator
NO_AUTH_NO_PRIV | no authentication, no privacy
AUTH_NO_PRIV | authentication, no privacy
AUTH_PRIV | authentication, privacy

Definition at line 343 of file GatewaySensorManager.idl.

## Member Function Documentation

## ◆ getConfiguration()

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

Returns
  all defined gateway sensor feature configuration objects

## ◆ getFeedback()

vector< Feedback > peripheral::GatewaySensorManager::getFeedback | ( |  | ) |

Get feedback from gateway sensor configuration usage.

Returns
  Result: the full feedback

## ◆ setConfiguration()

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.

Parameters

  cfg | all defined gateway sensor feature configuration objects

Returns
  0 if OK
  ERR_CONFIG_INCONSISTENT if consistency check has failed (e.g. non-unique identifiers)
  ERR_CONFIG_STORAGE_FAILED if configuration cannot be stored

## Member Data Documentation

## ◆ ERR_CONFIG_INCONSISTENT

constant int peripheral::GatewaySensorManager::ERR_CONFIG_INCONSISTENT = 1

Definition at line 693 of file GatewaySensorManager.idl.

## ◆ ERR_CONFIG_STORAGE_FAILED

constant int peripheral::GatewaySensorManager::ERR_CONFIG_STORAGE_FAILED = 2

Definition at line 694 of file GatewaySensorManager.idl.

## ◆ MODBUS_APP_NAME

constant int peripheral::GatewaySensorManager::MODBUS_APP_NAME = 6

Definition at line 287 of file GatewaySensorManager.idl.

## ◆ MODBUS_MODEL_NAME

constant int peripheral::GatewaySensorManager::MODBUS_MODEL_NAME = 5

Definition at line 286 of file GatewaySensorManager.idl.

## ◆ MODBUS_PRODUCT_CODE

constant int peripheral::GatewaySensorManager::MODBUS_PRODUCT_CODE = 1

Definition at line 282 of file GatewaySensorManager.idl.

## ◆ MODBUS_PRODUCT_NAME

constant int peripheral::GatewaySensorManager::MODBUS_PRODUCT_NAME = 4

Definition at line 285 of file GatewaySensorManager.idl.

## ◆ MODBUS_REVISION

constant int peripheral::GatewaySensorManager::MODBUS_REVISION = 2

Definition at line 283 of file GatewaySensorManager.idl.

## ◆ MODBUS_VENDOR_NAME

constant int peripheral::GatewaySensorManager::MODBUS_VENDOR_NAME = 0

Definition at line 281 of file GatewaySensorManager.idl.

## ◆ MODBUS_VENDOR_URL

constant int peripheral::GatewaySensorManager::MODBUS_VENDOR_URL = 3

Definition at line 284 of file GatewaySensorManager.idl.

The documentation for this interface was generated from the following file:

- GatewaySensorManager.idl