Loading...
Searching...
No Matches
peripheral::GatewaySensorManager Interface Reference

Gateway Sensor Configuration Interface. More...

## 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 | 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

## 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 }
| 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...

## 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 = 5
constant int | MODBUS_MODEL_NAME = 6
constant int | MODBUS_APP_NAME = 7
constant int | ERR_CONFIG_INCONSISTENT = 1
constant int | ERR_CONFIG_STORAGE_FAILED = 2

## Detailed Description

Gateway Sensor Configuration Interface.

## Member Enumeration Documentation

## EncodingType

enum peripheral::GatewaySensorManager::EncodingType

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.

## 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 failed receives modbus exceptions REJECT_SENSOR. DEFAULT on modbus read errors (e.g. timeouts) is REJECT_DEVICE.

Enumerator
DEFAULT | use default decoding
REJECT_DEVICE | device is treated as non-existent
REJECT_SENSOR | sensor is treated as non-existent
IGNORE | ignore (use previous value)
UNAVAILABLE | set value to unavailable
NUMERIC_INVALID | set numeric value to invalid
STATE_ON | set state to ON
STATE_OFF | set state to OFF

## 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

## SnmpAuthProtocol

enum peripheral::GatewaySensorManager::SnmpAuthProtocol

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

## 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)

## SnmpSecurityLevel

enum peripheral::GatewaySensorManager::SnmpSecurityLevel

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

## 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

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

- GatewaySensorManager.idl