6#ifndef __PERIPHERAL_GATEWAY_SENSOR_MANAGER_IDL__
7#define __PERIPHERAL_GATEWAY_SENSOR_MANAGER_IDL__
10#include <NumericSensor.idl>
12#include <ModbusCfg.idl>
281 constant
int MODBUS_VENDOR_NAME = 0;
282 constant
int MODBUS_PRODUCT_CODE = 1;
283 constant
int MODBUS_REVISION = 2;
284 constant
int MODBUS_VENDOR_URL = 3;
285 constant
int MODBUS_PRODUCT_NAME = 4;
286 constant
int MODBUS_MODEL_NAME = 5;
287 constant
int MODBUS_APP_NAME = 6;
677 vector<SensorClass> classes;
678 vector<RemoteDevice> devices;
679 vector<ValueEncoding> encodings;
693 constant
int ERR_CONFIG_INCONSISTENT = 1;
694 constant
int ERR_CONFIG_STORAGE_FAILED = 2;
730 enumeration FeedbackState {
732 INTENTIONALLY_UNUSED,
733 FAILED_PRECONDITIONS_UNUSED,
745 vector<FeedbackObject> infos;
Gateway Sensor Configuration Interface.
@ MODBUS_BIG_ENDIAN
use big endian modbus word order (default is big endian)
@ AES192_3DES
AES-192 with key extension (3DES)
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.
EncodingType
interpretation of binary values
@ INT_10K
signed integer stored as 'modulo 10000' (int16[0] + 10000 * int16[1] + 10000^2 * int16[2] ....
@ INT_SIGN_MAGNITUDE_BCD
signed integer as BCD, with sign in MSB
@ IEEE754
IEEE 754 floating point of a size specified in ValueEncoding.
@ UINT_10K
unsigned integer stored as 'modulo 10000' (uint16[0] + 10000 * uint16[1] + 10000^2 * uint16[2] ....
@ INT_SIGN_MAGNITUDE
signed integer with sign in MSB
@ INT_PACKED_BCD
signed integer as packed BCD, 10th complement
@ INT_BCD
signed integer as BCD, 10th complement
@ INT_SIGN_MAGNITUDE_PACKED_BCD
signed integer as packed BCD, with sign in MSB
@ INT_ONES_COMPLEMENT
integer as one's complement
@ UINT_BCD
unsigned integer as BCD
@ INT
signed integer of a size specified in ValueEncoding as two's complement
@ UINT
unsigned integer of a size specified in ValueEncoding
@ ACCESS_READ_WRITE
use rule for both read and write access
@ ACCESS_READ
use rule for read access only
@ AUTH_NO_PRIV
authentication, no privacy
@ NO_AUTH_NO_PRIV
no authentication, no privacy
Interpretation
Here you define how certain read values are to be interpreted.
@ DEFAULT
default behaviour as without rule, see above
@ UNAVAILABLE
read: treat as unavailable (both state and numeric value) write: give up, do not retry
@ IGNORE
read: ignore (use previous value) and retry write: ignore error and retry
@ REJECT_SENSOR
read only: sensor is treated as non-existent
@ 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
@ REJECT_DEVICE
read only: device is treated as non-existent
vector< Feedback > getFeedback()
Get feedback from gateway sensor configuration usage.
A sensor with numeric readings.
@ UNSPECIFIED
device type is unknown
Common base for all events.
Event: The gateway sensor feature configuration has changed.
map< string, ConfigurationPackage > configuration
the current gateway sensor feature configuration
boolean disabled
prevents usage of all sensor specifications defined in this package
string packageId
the configuration package id
string deviceId
the same id as in RemoteDevice
Event: The configuration usage feedback has changed.
vector< Feedback > feedback
the latest configuration usage feedback
Feedback from gateway sensor configuration usage.
FeedbackState stateTansitionTo
this FeedbackObject changes state, if not UNSPECIFIED
string value
message or value
string key
empty or free defined value name
FeedbackObject::FeedbackState currentState
Device or sensor state.
InterpretationRuleEnum is applied to a reading and maps the values to the given Interpretation.
vector< string > enumValues
signed or unsigned 64-bit values as strings, decimal or hexadecimal 64-bit numbers
InterpretationRuleIEEE* are applied after value is wapped, masked and interpreted as float / double.
boolean invertCondition
negate rule condition
InterpretationRuleModbusException is applied to modbus read exceptions.
vector< int > exceptions
list of modbus exception codes
InterpretationRuleModbusSpecificError is applied to specific errors from libmodbus.
vector< ModbusCfg::SpecificModbusErrors > errors
list of specific libmodbus error codes
InterpretationRuleModbusSystemError is applied to standard system errors returned from libmodbus.
vector< int > errnos
list of system error codes
InterpretationRuleRAW is applied after swap, but before masking (because it has it's own mask)
string value
compare to value (unsigned 64-bit value as string, decimal or hexadecimal)
string mask
mask before compare (unsigned 64-bit value as string, decimal or hexadecimal; "" or "0" = not masked,...
InterpretationRuleRangeRAW is applied after swap, but before masking (because it has it's own mask)
string max
maximum accepted value (unsigned 64-bit value as string, decimal or hexadecimal)
string mask
mask before compare (unsigned 64-bit value as string, decimal or hexadecimal; "" or "0" = not masked,...
string min
minimum accepted value (unsigned 64-bit value as string, decimal or hexadecimal)
InterpretationRule defines a rule that is applied to a reading, resulting in an Interpretation.
AccessType accessType
use rule for read and/or write access
Interpretation interpretation
how to interpret the applied rule
int ignoreTimeout
if > 0, ignoring stops after this timeout (seconds), and state changes to unavailable
int regAddr
Modbus server register address.
ModbusEndianness endianness
Modbus 16-bit-words should be transmitted in big endian order.
int width
Word width in bits used in numerical interpretation.
int start
The least significant bit of the read word used in numerical interpretation.
boolean byteSwap
16-bit modbus words should be transferred in big-endian byte order.
string mask
64-bit unsigned raw mask value as decimal or hexadecimal string, applied before interpreting ("" or "...
Sensor class that stores numeric sensor properties.
sensors::NumericSensor Thresholds defaultThresholds
threshold values may be used initially and as default threshold values, depending on the value of the...
sensors::NumericSensor MetaData metadata
numeric sensor type, ranges, etc.
boolean preferCommonThresholds
if true, use common default thresholds if available, otherwise use the value of the defaultThresholds...
float scalingFactor
multiply with when interpreting as numeric value
float offset
add value after applying scalingFactor
Specification of a remote device that provides access to sensors.
int timeoutMs
communication access timeout, 0 = default
string name
human readable remote device name
string deviceId
remote device id
int retry
communication retry count, 0 = default
boolean disabled
prevents usage of all sensor specifications which reference this device
vector< byte > unsupportedFunctionCodes
list of unsupported modbus function codes (FC)
map< int, string > detectionIdentifiers
list of expected device identifiers
int unitId
modbus server address
ModbusCfg::SerialSettings busSettings
interface settings
string busInterface
rs485 interface used for modbus communication
int interframeDelayDeciChars
(== 0) -> default, (< 0) -> no delay, (> 0) -> e.g. 35 means 3.5 chars
int tcpPort
modbus tcp port
string ipAddress
modbus device ip address
string community
community string for v1/v2c
string user
security user name
SnmpPrivProtocol privacyProtocol
privacy protocol (DES|AES|AES-192|AES-256)
string privacyPassphrase
privacy protocol pass phrase
SnmpSecurityLevel level
security level (noAuthNoPriv|authNoPriv|authPriv)
SnmpAuthProtocol authProtocol
authentication protocol (MD5|SHA|SHA-224|SHA-256|SHA-384|SHA-512)
string authPassphrase
authentication protocol passphrase
Specification of sensor class that stores sensor properties.
string classId
sensor class id
string sensorId
the same id as in Sensor
string deviceId
the same id as in RemoteDevice
string packageId
the configuration package id
Specification of a Sensor.
boolean disabled
Set disabled = true prevents any usage of the specification.
string classId
sensor class id
string deviceId
remote device id
string defaultDescription
sensor description
string defaultName
sensor name
string encodingId
sensor encoding id
string defaultLocationZ
sensor location Z coordinate
string sensorId
Unique sensor id, is automatically generated if not set.
string defaultLocationY
sensor location Y coordinate
string defaultLocationX
sensor location X coordinate
Sensor class that stores state sensor properties.
sensors::Sensor TypeSpec type
state sensor type
Sensor class that switch properties.
Specification of value encoding.
int minAccessInterval
minimum time interval between two read accesses in seconds
boolean invertState
invert when interpreting as state
EncodingType type
value coding type
vector< InterpretationRule > interpretationRules
error/value interpretation rules
string encodingId
encoding type id
Numeric sensor thresholds.
Complete sensor type specification.