Raritan PX2/PX3 JSON-RPC API

LhxParameter.idl
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3 * Copyright 2011 Raritan Inc. All rights reserved.
4 */
5
6 #ifndef __LHXMODEL_PARAMETER_IDL__
7 #define __LHXMODEL_PARAMETER_IDL__
8
9 #include <Event.idl>
10
11 /** LHX Model */
12 module lhxmodel {
13
14 /** LHX Parameter Interface */
15 interface Parameter_2_0_1 {
16
17 constant int ERR_INVALID_PARAMS = 1; ///< Invalid parameters
18 constant int ERR_READ_ONLY = 2; ///< Attempt to write a read-only parameter
19
20 /** Parameter Unit */
21 enumeration Unit {
22 NONE, ///< No unit
23 NUMBER, ///< Number
24 BINARY, ///< Binary
25 TEMP_ABS, ///< Absolute temperature
26 TEMP_REL, ///< Relative temperature
27 BAR, ///< Bar
28 PASCAL, ///< Pascal
29 SIEMENS, ///< Siemens
30 METER, ///< Meter
31 VOLT, ///< Volt
32 AMPERE, ///< Ampere
33 HOURS, ///< Hours
34 MINUTES, ///< Minutes
35 SECONDS, ///< Seconds
36 TIME, ///< Time
37 METERS_PER_SECOND, ///< Meters/second
38 NEWTON, ///< Newton
39 GRAMMS, ///< Gramms
40 HUMIDITY_REL, ///< Relative humidity
41 HERTZ, ///< Hertz
42 OHM, ///< Ohm
43 PERCENT, ///< Percent
44 LITERS_PER_MINUTE, ///< Liters/minute
45 LITERS_PER_HOUR ///< Liters/hour
46 };
47
48 /** Parameter Status */
49 structure Status {
50 boolean switchedOn; ///< LHX On / Off
51 boolean active; ///< Active
52 boolean overflow; ///< Overflow
53 boolean underflow; ///< Underflow
54 boolean valid; ///< Valid
55 };
56
57 /** Parameter Metadata */
58 structure MetaData {
59 Unit unit; ///< Parameter unit
60 string id; ///< Parameter ID
61 double defaultValue; ///< Default value
62 double min; ///< Minimum value
63 double max; ///< Maximum value
64 boolean read_only; ///< \c true for read-only parameters
65 int decDigits; ///< Number of decimal digits
66 };
67
68 /** Parameter Value */
69 structure Value {
70 time timestamp; ///< Timestamp of last sample
71 Status status; ///< The state of the parameter
72 double value; ///< The value of the parameter
73 };
74
75 /** Event: Parameter metadata has been changed */
76 valueobject MetaDataChangedEvent extends idl.Event {
77 MetaData oldMetaData; ///< Metadata before change
78 MetaData newMetaData; ///< Metadata after change
79 };
80
81 /** Event: Parameter value has changed */
82 valueobject ValueChangedEvent extends idl.Event {
83 Value newValue; ///< New parameter value
84 };
85
86 /**
87 * Retrieve the parameter metadata.
88 *
89 * @return Parameter metadata
90 */
91 MetaData getMetaData();
92
93 /**
94 * Retrieve the parameter value.
95 *
96 * @return Parameter value
97 */
98 Value getValue();
99
100 /**
101 * Retrieve the parameter raw value.
102 *
103 * @return Raw value
104 */
105 int getRawValue();
106
107 /**
108 * Change the parameter value.
109 *
110 * @param rawValue New value
111 * @param validateRange validate value against parameter range
112 *
113 * @return 0 if OK
114 * @return ERR_INVALID_PARAMS if any parameter value is invalid
115 * @return ERR_READ_ONLY if attempting to write read only parameter
116 */
117 int setRawValue(in int rawValue, in boolean validateRange);
118
119 };
120
121 }
122
123 #endif /* !__LHXMODEL_PARAMETER_IDL__ */
lhxmodel::Parameter_2_0_1::LITERS_PER_MINUTE
Liters/minute.
Definition: LhxParameter.idl:44
lhxmodel::Parameter_2_0_1::SIEMENS
Siemens.
Definition: LhxParameter.idl:29
lhxmodel::Parameter_2_0_1::VOLT
Volt.
Definition: LhxParameter.idl:31
lhxmodel::Parameter_2_0_1::NONE
No unit.
Definition: LhxParameter.idl:22
lhxmodel::Parameter_2_0_1::Status::active
boolean active
Active.
Definition: LhxParameter.idl:51
lhxmodel::Parameter_2_0_1::NEWTON
Newton.
Definition: LhxParameter.idl:38
lhxmodel::Parameter_2_0_1::Value::value
double value
The value of the parameter.
Definition: LhxParameter.idl:72
lhxmodel::Parameter_2_0_1::HOURS
Hours.
Definition: LhxParameter.idl:33
lhxmodel::Parameter_2_0_1::PERCENT
Percent.
Definition: LhxParameter.idl:43
lhxmodel::Parameter_2_0_1::MetaData::id
string id
Parameter ID.
Definition: LhxParameter.idl:60
lhxmodel::Parameter_2_0_1::MetaData::min
double min
Minimum value.
Definition: LhxParameter.idl:62
lhxmodel::Parameter_2_0_1::TEMP_ABS
Absolute temperature.
Definition: LhxParameter.idl:25
lhxmodel::Parameter_2_0_1::Status
Parameter Status.
Definition: LhxParameter.idl:49
lhxmodel::Parameter_2_0_1::Status::underflow
boolean underflow
Underflow.
Definition: LhxParameter.idl:53
lhxmodel::Parameter_2_0_1::newMetaData
MetaData newMetaData
Metadata after change.
Definition: LhxParameter.idl:78
lhxmodel
LHX Model.
Definition: Lhx.idl:14
lhxmodel::Parameter_2_0_1
LHX Parameter Interface.
Definition: LhxParameter.idl:15
idl
Basic IDL definitions.
Definition: Event.idl:10
lhxmodel::Parameter_2_0_1::TEMP_REL
Relative temperature.
Definition: LhxParameter.idl:26
lhxmodel::Parameter_2_0_1::Unit
Unit
Parameter Unit.
Definition: LhxParameter.idl:21
lhxmodel::Parameter_2_0_1::Value::status
Status status
The state of the parameter.
Definition: LhxParameter.idl:71
lhxmodel::Parameter_2_0_1::MetaData::unit
Unit unit
Parameter unit.
Definition: LhxParameter.idl:59
lhxmodel::Parameter_2_0_1::HUMIDITY_REL
Relative humidity.
Definition: LhxParameter.idl:40
lhxmodel::Parameter_2_0_1::MetaData::defaultValue
double defaultValue
Default value.
Definition: LhxParameter.idl:61
lhxmodel::Parameter_2_0_1::MetaData
Parameter Metadata.
Definition: LhxParameter.idl:58
lhxmodel::Parameter_2_0_1::MetaData::read_only
boolean read_only
true for read-only parameters
Definition: LhxParameter.idl:64
lhxmodel::Parameter_2_0_1::METER
Meter.
Definition: LhxParameter.idl:30
lhxmodel::Parameter_2_0_1::SECONDS
Seconds.
Definition: LhxParameter.idl:35
lhxmodel::Parameter_2_0_1::PASCAL
Pascal.
Definition: LhxParameter.idl:28
lhxmodel::Parameter_2_0_1::AMPERE
Ampere.
Definition: LhxParameter.idl:32
lhxmodel::Parameter_2_0_1::TIME
Time.
Definition: LhxParameter.idl:36
lhxmodel::Parameter_2_0_1::Status::valid
boolean valid
Valid.
Definition: LhxParameter.idl:54
lhxmodel::Parameter_2_0_1::MINUTES
Minutes.
Definition: LhxParameter.idl:34
lhxmodel::Parameter_2_0_1::Status::overflow
boolean overflow
Overflow.
Definition: LhxParameter.idl:52
lhxmodel::Parameter_2_0_1::Value::timestamp
time timestamp
Timestamp of last sample.
Definition: LhxParameter.idl:70
lhxmodel::Parameter_2_0_1::Value
Parameter Value.
Definition: LhxParameter.idl:69
lhxmodel::Parameter_2_0_1::BINARY
Binary.
Definition: LhxParameter.idl:24
lhxmodel::Parameter_2_0_1::NUMBER
Number.
Definition: LhxParameter.idl:23
lhxmodel::Parameter_2_0_1::OHM
Ohm.
Definition: LhxParameter.idl:42
lhxmodel::Parameter_2_0_1::BAR
Bar.
Definition: LhxParameter.idl:27
lhxmodel::Parameter_2_0_1::MetaData::decDigits
int decDigits
Number of decimal digits.
Definition: LhxParameter.idl:65
lhxmodel::Parameter_2_0_1::MetaData::max
double max
Maximum value.
Definition: LhxParameter.idl:63
lhxmodel::Parameter_2_0_1::GRAMMS
Gramms.
Definition: LhxParameter.idl:39
lhxmodel::Parameter_2_0_1::HERTZ
Hertz.
Definition: LhxParameter.idl:41
lhxmodel::Parameter_2_0_1::Status::switchedOn
boolean switchedOn
LHX On / Off.
Definition: LhxParameter.idl:50
lhxmodel::Parameter_2_0_1::METERS_PER_SECOND
Meters/second.
Definition: LhxParameter.idl:37