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;
530 vector<SensorClass> classes;
531 vector<RemoteDevice> devices;
532 vector<ValueEncoding> encodings;
546 constant
int ERR_CONFIG_INCONSISTENT = 1;
547 constant
int ERR_CONFIG_STORAGE_FAILED = 2;
583 enumeration FeedbackState {
585 INTENTIONALLY_UNUSED,
586 FAILED_PRECONDITIONS_UNUSED,
598 vector<FeedbackObject> infos;
Gateway Sensor Configuration Interface.
Definition: GatewaySensorManager.idl:20
ModbusEndianness
Definition: GatewaySensorManager.idl:452
@ MODBUS_BIG_ENDIAN
use big endian modbus word order (default is big endian)
Definition: GatewaySensorManager.idl:453
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:324
@ BOOL
boolean
Definition: GatewaySensorManager.idl:325
@ INT
signed integer of a size specified in ValueEncoding
Definition: GatewaySensorManager.idl:326
@ UINT
unsigned integer of a size specified in ValueEncoding
Definition: GatewaySensorManager.idl:327
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:360
@ DEFAULT
use default decoding
Definition: GatewaySensorManager.idl:361
@ UNAVAILABLE
set value to unavailable
Definition: GatewaySensorManager.idl:365
@ IGNORE
ignore (use previous value)
Definition: GatewaySensorManager.idl:364
@ REJECT_SENSOR
sensor is treated as non-existent
Definition: GatewaySensorManager.idl:363
@ NUMERIC_INVALID
set numeric value to invalid
Definition: GatewaySensorManager.idl:366
@ STATE_ON
set state to ON
Definition: GatewaySensorManager.idl:367
@ REJECT_DEVICE
device is treated as non-existent
Definition: GatewaySensorManager.idl:362
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:568
map< string, ConfigurationPackage > configuration
the current gateway sensor feature configuration
Definition: GatewaySensorManager.idl:569
Definition: GatewaySensorManager.idl:527
boolean disabled
prevents usage of all sensor specifications defined in this package
Definition: GatewaySensorManager.idl:528
string name
package name
Definition: GatewaySensorManager.idl:529
Definition: GatewaySensorManager.idl:601
string packageId
the configuration package id
Definition: GatewaySensorManager.idl:602
string deviceId
the same id as in RemoteDevice
Definition: GatewaySensorManager.idl:603
Event: The configuration usage feedback has changed.
Definition: GatewaySensorManager.idl:620
vector< Feedback > feedback
the latest configuration usage feedback
Definition: GatewaySensorManager.idl:621
Feedback from gateway sensor configuration usage.
Definition: GatewaySensorManager.idl:582
FeedbackState stateTansitionTo
this FeedbackObject changes state, if not UNSPECIFIED
Definition: GatewaySensorManager.idl:593
string value
message or value
Definition: GatewaySensorManager.idl:592
string key
empty or free defined value name
Definition: GatewaySensorManager.idl:591
Definition: GatewaySensorManager.idl:596
FeedbackObject::FeedbackState currentState
Device or sensor state.
Definition: GatewaySensorManager.idl:597
Definition: GatewaySensorManager.idl:423
InterpretationRuleIEEE* are applied after value is wapped, masked and interpreted as float / double.
Definition: GatewaySensorManager.idl:421
Definition: GatewaySensorManager.idl:422
Definition: GatewaySensorManager.idl:381
boolean invertCondition
negate rule condition
Definition: GatewaySensorManager.idl:382
InterpretationRuleModbusException is applied to modbus read exceptions.
Definition: GatewaySensorManager.idl:387
vector< int > exceptions
list of modbus exception codes
Definition: GatewaySensorManager.idl:388
InterpretationRuleModbusSpecificError is applied to specific errors from libmodbus.
Definition: GatewaySensorManager.idl:400
vector< ModbusCfg::SpecificModbusErrors > errors
list of specific libmodbus error codes
Definition: GatewaySensorManager.idl:401
InterpretationRuleModbusSystemError is applied to standard system errors returned from libmodbus.
Definition: GatewaySensorManager.idl:394
vector< int > errnos
list of system error codes
Definition: GatewaySensorManager.idl:395
InterpretationRuleRAW is applied after swap, but before masking (because it has it's own mask)
Definition: GatewaySensorManager.idl:406
long value
compare to value
Definition: GatewaySensorManager.idl:407
long mask
(0 = not masked, the same as 0xFFFF...)
Definition: GatewaySensorManager.idl:408
InterpretationRuleRangeRAW is applied after swap, but before masking (because it has it's own mask)
Definition: GatewaySensorManager.idl:413
long mask
(0 = not masked, the same as 0xFFFF...)
Definition: GatewaySensorManager.idl:416
long max
maximum accepted value
Definition: GatewaySensorManager.idl:415
long min
minimum accepted value
Definition: GatewaySensorManager.idl:414
InterpretationRule defines a rule that is applied to a reading, resulting in an Interpretation.
Definition: GatewaySensorManager.idl:376
Interpretation interpretation
how to interpret the applied rule
Definition: GatewaySensorManager.idl:377
int ignoreTimeout
if > 0, ignoring stops after this timeout (seconds), and state changes to unavailable
Definition: GatewaySensorManager.idl:378
Definition: GatewaySensorManager.idl:519
int regAddr
Modbus server register address.
Definition: GatewaySensorManager.idl:521
Definition: GatewaySensorManager.idl:450
Definition: GatewaySensorManager.idl:457
ModbusEndianness endianness
Modbus 16-bit-words should be transmitted in big endian order.
Definition: GatewaySensorManager.idl:462
Definition: GatewaySensorManager.idl:466
Definition: GatewaySensorManager.idl:439
long mask
mask raw value before interpreting (0 = not masked, the same as 0xFFFF...)
Definition: GatewaySensorManager.idl:447
boolean byteSwap
16-bit modbus words should be transferred in big-endian byte order.
Definition: GatewaySensorManager.idl:446
Definition: GatewaySensorManager.idl:437
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:432
float scalingFactor
multiply with when interpreting as numeric value
Definition: GatewaySensorManager.idl:433
float offset
add value after applying scalingFactor
Definition: GatewaySensorManager.idl:434
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:304
string busInterface
rs485 interface used for modbus communication
Definition: GatewaySensorManager.idl:303
int interframeDelayDeciChars
(== 0) -> default, (< 0) -> no delay, (> 0) -> e.g. 35 means 3.5 chars
Definition: GatewaySensorManager.idl:305
Definition: GatewaySensorManager.idl:308
int tcpPort
modbus tcp port
Definition: GatewaySensorManager.idl:310
string ipAddress
modbus device ip address
Definition: GatewaySensorManager.idl:309
Specification of sensor class that stores sensor properties.
Definition: GatewaySensorManager.idl:225
string classId
sensor class id
Definition: GatewaySensorManager.idl:226
Definition: GatewaySensorManager.idl:606
string sensorId
the same id as in Sensor
Definition: GatewaySensorManager.idl:609
string deviceId
the same id as in RemoteDevice
Definition: GatewaySensorManager.idl:608
string packageId
the configuration package id
Definition: GatewaySensorManager.idl:607
Specification of a Sensor.
Definition: GatewaySensorManager.idl:474
boolean disabled
Set disabled = true prevents any usage of the specification.
Definition: GatewaySensorManager.idl:483
string classId
sensor class id
Definition: GatewaySensorManager.idl:502
string deviceId
remote device id
Definition: GatewaySensorManager.idl:491
string defaultName
default sensor name
Definition: GatewaySensorManager.idl:516
string encodingId
sensor encoding id
Definition: GatewaySensorManager.idl:509
string sensorId
Unique sensor id, is automatically generated if not set.
Definition: GatewaySensorManager.idl:478
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:425
boolean invertState
invert when interpreting as state
Definition: GatewaySensorManager.idl:428
EncodingType type
value coding type
Definition: GatewaySensorManager.idl:427
vector< InterpretationRule > interpretationRules
error/value inerpretation rules
Definition: GatewaySensorManager.idl:429
string encodingId
encoding type id
Definition: GatewaySensorManager.idl:426
Definition: ModbusCfg.idl:14
Numeric sensor thresholds.
Definition: NumericSensor.idl:111
Complete sensor type specification.
Definition: Sensor.idl:169