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;
522 vector<SensorClass> classes;
523 vector<RemoteDevice> devices;
524 vector<ValueEncoding> encodings;
538 constant
int ERR_CONFIG_INCONSISTENT = 1;
539 constant
int ERR_CONFIG_STORAGE_FAILED = 2;
575 enumeration FeedbackState {
577 INTENTIONALLY_UNUSED,
578 FAILED_PRECONDITIONS_UNUSED,
590 vector<FeedbackObject> infos;
Gateway Sensor Configuration Interface.
Definition: GatewaySensorManager.idl:20
ModbusEndianness
Definition: GatewaySensorManager.idl:444
@ MODBUS_BIG_ENDIAN
use big endian modbus word order (default is big endian)
Definition: GatewaySensorManager.idl:445
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
Specification of value encoding.
Definition: GatewaySensorManager.idl:316
@ BOOL
boolean
Definition: GatewaySensorManager.idl:317
@ INT
signed integer of a size specified in ValueEncoding
Definition: GatewaySensorManager.idl:318
@ UINT
unsigned integer of a size specified in ValueEncoding
Definition: GatewaySensorManager.idl:319
vector< Feedback > getFeedback()
Get feedback from gateway sensor configuration usage.
Interpretation
Here you define how certain read values are to be interpreted.
Definition: GatewaySensorManager.idl:352
@ DEFAULT
use default decoding
Definition: GatewaySensorManager.idl:353
@ UNAVAILABLE
set value to unavailable
Definition: GatewaySensorManager.idl:357
@ IGNORE
ignore (use previous value)
Definition: GatewaySensorManager.idl:356
@ REJECT_SENSOR
sensor is treated as non-existent
Definition: GatewaySensorManager.idl:355
@ NUMERIC_INVALID
set numeric value to invalid
Definition: GatewaySensorManager.idl:358
@ STATE_ON
set state to ON
Definition: GatewaySensorManager.idl:359
@ REJECT_DEVICE
device is treated as non-existent
Definition: GatewaySensorManager.idl:354
Definition: ModbusCfg.idl:13
A sensor with numeric readings.
Definition: NumericSensor.idl:17
Sensor interface
Definition: Sensor.idl:15
Basic IDL definitions.
Definition: Event.idl:10
Peripheral Devices.
Definition: GatewaySensorManager.idl:17
@ UNSPECIFIED
device type is unknown
Definition: PeripheralDeviceSlot.idl:25
Sensors Model.
Definition: AccumulatingNumericSensor.idl:13
Common base for all events.
Definition: Event.idl:13
Event: The gateway sensor feature configuration has changed.
Definition: GatewaySensorManager.idl:560
map< string, ConfigurationPackage > configuration
the current gateway sensor feature configuration
Definition: GatewaySensorManager.idl:561
Definition: GatewaySensorManager.idl:519
boolean disabled
prevents usage of all sensor specifications defined in this package
Definition: GatewaySensorManager.idl:520
string name
package name
Definition: GatewaySensorManager.idl:521
Definition: GatewaySensorManager.idl:593
string packageId
the configuration package id
Definition: GatewaySensorManager.idl:594
string deviceId
the same id as in RemoteDevice
Definition: GatewaySensorManager.idl:595
Event: The configuration usage feedback has changed.
Definition: GatewaySensorManager.idl:612
vector< Feedback > feedback
the latest configuration usage feedback
Definition: GatewaySensorManager.idl:613
Feedback from gateway sensor configuration usage.
Definition: GatewaySensorManager.idl:574
FeedbackState stateTansitionTo
this FeedbackObject changes state, if not UNSPECIFIED
Definition: GatewaySensorManager.idl:585
string value
message or value
Definition: GatewaySensorManager.idl:584
string key
empty or free defined value name
Definition: GatewaySensorManager.idl:583
Definition: GatewaySensorManager.idl:588
FeedbackObject::FeedbackState currentState
Device or sensor state.
Definition: GatewaySensorManager.idl:589
Definition: GatewaySensorManager.idl:415
InterpretationRuleIEEE* are applied after value is wapped, masked and interpreted as float / double.
Definition: GatewaySensorManager.idl:413
Definition: GatewaySensorManager.idl:414
Definition: GatewaySensorManager.idl:373
boolean invertCondition
negate rule condition
Definition: GatewaySensorManager.idl:374
InterpretationRuleModbusException is applied to modbus read exceptions.
Definition: GatewaySensorManager.idl:379
vector< int > exceptions
list of modbus exception codes
Definition: GatewaySensorManager.idl:380
InterpretationRuleModbusSpecificError is applied to specific errors from libmodbus.
Definition: GatewaySensorManager.idl:392
vector< ModbusCfg::SpecificModbusErrors > errors
list of specific libmodbus error codes
Definition: GatewaySensorManager.idl:393
InterpretationRuleModbusSystemError is applied to standard system errors returned from libmodbus.
Definition: GatewaySensorManager.idl:386
vector< int > errnos
list of system error codes
Definition: GatewaySensorManager.idl:387
InterpretationRuleRAW is applied after swap, but before masking (because it has it's own mask)
Definition: GatewaySensorManager.idl:398
long value
compare to value
Definition: GatewaySensorManager.idl:399
long mask
(0 = not masked, the same as 0xFFFF...)
Definition: GatewaySensorManager.idl:400
InterpretationRuleRangeRAW is applied after swap, but before masking (because it has it's own mask)
Definition: GatewaySensorManager.idl:405
long mask
(0 = not masked, the same as 0xFFFF...)
Definition: GatewaySensorManager.idl:408
long max
maximum accepted value
Definition: GatewaySensorManager.idl:407
long min
minimum accepted value
Definition: GatewaySensorManager.idl:406
InterpretationRule defines a rule that is applied to a reading, resulting in an Interpretation.
Definition: GatewaySensorManager.idl:368
Interpretation interpretation
how to interpret the applied rule
Definition: GatewaySensorManager.idl:369
int ignoreTimeout
if > 0, ignoring stops after this timeout (seconds), and state changes to unavailable
Definition: GatewaySensorManager.idl:370
Definition: GatewaySensorManager.idl:511
int regAddr
Modbus server register address.
Definition: GatewaySensorManager.idl:513
Definition: GatewaySensorManager.idl:442
Definition: GatewaySensorManager.idl:449
ModbusEndianness endianness
Modbus 16-bit-words should be transmitted in big endian order.
Definition: GatewaySensorManager.idl:454
Definition: GatewaySensorManager.idl:458
Definition: GatewaySensorManager.idl:431
long mask
mask raw value before interpreting (0 = not masked, the same as 0xFFFF...)
Definition: GatewaySensorManager.idl:439
boolean byteSwap
16-bit modbus words should be transferred in big-endian byte order.
Definition: GatewaySensorManager.idl:438
Definition: GatewaySensorManager.idl:429
Sensor class that stores numeric sensor properties.
Definition: GatewaySensorManager.idl:232
sensors::NumericSensor Thresholds defaultThresholds
threshold values may be used initially and as default threshold values, depending on the value of the...
Definition: GatewaySensorManager.idl:242
sensors::NumericSensor MetaData metadata
numeric sensor type, ranges, etc.
Definition: GatewaySensorManager.idl:236
boolean preferCommonThresholds
if true, use common default thresholds if available, otherwise use the value of the defaultThresholds...
Definition: GatewaySensorManager.idl:244
Definition: GatewaySensorManager.idl:424
float scalingFactor
multiply with when interpreting as numeric value
Definition: GatewaySensorManager.idl:425
float offset
add value after applying scalingFactor
Definition: GatewaySensorManager.idl:426
Specification of a remote device that provides access to sensors.
Definition: GatewaySensorManager.idl:273
int timeoutMs
communication access timeout, 0 = default
Definition: GatewaySensorManager.idl:277
string name
human readable remote device name
Definition: GatewaySensorManager.idl:276
string deviceId
remote device id
Definition: GatewaySensorManager.idl:274
int retry
communication retry count, 0 = default
Definition: GatewaySensorManager.idl:278
boolean disabled
prevents usage of all sensor specifications which reference this device
Definition: GatewaySensorManager.idl:275
Definition: GatewaySensorManager.idl:289
map< int, string > detectionIdentifiers
list of expected device identifiers
Definition: GatewaySensorManager.idl:290
int unitId
modbus server address
Definition: GatewaySensorManager.idl:291
Definition: GatewaySensorManager.idl:294
ModbusCfg::SerialSettings busSettings
interface settings
Definition: GatewaySensorManager.idl:296
string busInterface
modbus/rs485 interface, e.g. 'sensorhub1-rs485`
Definition: GatewaySensorManager.idl:295
int interframeDelayDeciChars
(== 0) -> default, (< 0) -> no delay, (> 0) -> e.g. 35 means 3.5 chars
Definition: GatewaySensorManager.idl:297
Definition: GatewaySensorManager.idl:300
int tcpPort
modbus tcp port
Definition: GatewaySensorManager.idl:302
string ipAddress
modbus device ip address
Definition: GatewaySensorManager.idl:301
Specification of sensor class that stores sensor properties.
Definition: GatewaySensorManager.idl:225
string classId
sensor class id
Definition: GatewaySensorManager.idl:226
Definition: GatewaySensorManager.idl:598
string sensorId
the same id as in Sensor
Definition: GatewaySensorManager.idl:601
string deviceId
the same id as in RemoteDevice
Definition: GatewaySensorManager.idl:600
string packageId
the configuration package id
Definition: GatewaySensorManager.idl:599
Specification of a Sensor.
Definition: GatewaySensorManager.idl:466
boolean disabled
Set disabled = true prevents any usage of the specification.
Definition: GatewaySensorManager.idl:475
string classId
sensor class id
Definition: GatewaySensorManager.idl:494
string deviceId
remote device id
Definition: GatewaySensorManager.idl:483
string defaultName
default sensor name
Definition: GatewaySensorManager.idl:508
string encodingId
sensor encoding id
Definition: GatewaySensorManager.idl:501
string sensorId
Unique sensor id, is automatically generated if not set.
Definition: GatewaySensorManager.idl:470
Sensor class that stores state sensor properties.
Definition: GatewaySensorManager.idl:250
sensors::Sensor TypeSpec type
state sensor type
Definition: GatewaySensorManager.idl:251
Sensor class that switch properties.
Definition: GatewaySensorManager.idl:257
Definition: GatewaySensorManager.idl:417
boolean invertState
invert when interpreting as state
Definition: GatewaySensorManager.idl:420
EncodingType type
value coding type
Definition: GatewaySensorManager.idl:419
vector< InterpretationRule > interpretationRules
error/value inerpretation rules
Definition: GatewaySensorManager.idl:421
string encodingId
encoding type id
Definition: GatewaySensorManager.idl:418
Definition: ModbusCfg.idl:14
Numeric sensor thresholds.
Definition: NumericSensor.idl:111
Complete sensor type specification.
Definition: Sensor.idl:169