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 = 5;
286 constant
int MODBUS_MODEL_NAME = 6;
287 constant
int MODBUS_APP_NAME = 7;
622 vector<SensorClass> classes;
623 vector<RemoteDevice> devices;
624 vector<ValueEncoding> encodings;
638 constant
int ERR_CONFIG_INCONSISTENT = 1;
639 constant
int ERR_CONFIG_STORAGE_FAILED = 2;
675 enumeration FeedbackState {
677 INTENTIONALLY_UNUSED,
678 FAILED_PRECONDITIONS_UNUSED,
690 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
@ 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
use default decoding
@ UNAVAILABLE
set value to unavailable
@ IGNORE
ignore (use previous value)
@ REJECT_SENSOR
sensor is treated as non-existent
@ NUMERIC_INVALID
set numeric value to invalid
@ STATE_ON
set state to ON
@ REJECT_DEVICE
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< long > enumValues
values to map
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)
long value
compare to value
long mask
(0 = not masked, the same as 0xFFFF...)
InterpretationRuleRangeRAW is applied after swap, but before masking (because it has it's own mask)
long mask
(0 = not masked, the same as 0xFFFF...)
long max
maximum accepted value (always compare as unsigned)
long min
minimum accepted value (always compare as unsigned)
InterpretationRule defines a rule that is applied to a reading, resulting in an Interpretation.
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.
long mask
mask raw value before interpreting (0 = not masked, the same as 0xFFFF...)
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.
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
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 defaultName
default sensor name
string encodingId
sensor encoding id
string sensorId
Unique sensor id, is automatically generated if not set.
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.