Raritan PX2/PX3 JSON-RPC API
Sensor.idl
1 #ifndef __TFW_SENSOR_IDL__
2 #define __TFW_SENSOR_IDL__
3 
4 #include <Event.idl>
5 
7 module sensors {
8 
10  interface Sensor_4_0_2 {
11 
12  constant int ERR_NOT_SUPPORTED = 1;
13 
15  constant int NUMERIC = 0; //< %Sensor has numeric readings
16  constant int DISCRETE_ON_OFF = 1; //< %Sensor has two discrete readings: 0 (off) and 1 (on), see OnOffState
17  constant int DISCRETE_MULTI = 2; //< %Sensor has multiple discrete readings
18 
20  enumeration OnOffState {
21  OFF,
22  ON
23  };
24 
25  enumeration OpenClosedState {
26  OPEN,
27  CLOSED
28  };
29 
30  enumeration NormalAlarmedState {
32  ALARMED
33  };
34 
35  enumeration OkFaultState {
36  OK,
37  FAULT
38  };
39 
41  constant int UNSPECIFIED = 0; //< Unspecified
42 
43  constant int VOLTAGE = 1; //< Voltage
44  constant int CURRENT = 2; //< Current
45  constant int UNBALANCE_CURRENT = 3; //< Current unbalance
46  constant int POWER = 4; //< Power
47  constant int POWER_FACTOR = 5; //< Power factor
48  constant int ENERGY = 6; //< Energy
49  constant int FREQUENCY = 7; //< Frequency
50  constant int TEMPERATURE = 8; //< Temperature
51  constant int HUMIDITY = 9; //< Relative humidity
52  constant int AIR_FLOW = 10; //< Air flow
53  constant int AIR_PRESSURE = 11; //< Air pressure
54  constant int CONTACT_CLOSURE = 12; //< Contact Closure [uses %NormalAlarmedState mapping]
55  constant int ON_OFF_SENSOR = 13; //< Switch state [uses %OnOffState mapping]
56  constant int TRIP_SENSOR = 14; //< Circuit breaker tripped [uses %OpenClosedState mapping]
57  constant int VIBRATION = 15; //< Vibration [uses %NormalAlarmedState mapping]
58  constant int WATER_LEAK = 16; //< Water leak [uses %NormalAlarmedState mapping]
59  constant int SMOKE_DETECTOR = 17; //< Smoke detector [uses %NormalAlarmedState mapping]
60 
61  constant int TOTAL_HARMONIC_DISTORTION = 18; //< Total harmonic distortion
62 
63  constant int MASS = 19; //< Mass
64  constant int ELECTRICAL_RESISTANCE = 20; //< Electrical resistance
65  constant int FLUX = 21; //< Flux (mass per time, e.g. water flow)
66 
67  constant int LUMINOUS_INTENSITY = 22; //< Luminous intensity
68  constant int ACCELERATION = 23; //< Acceleration
69  constant int MAGNETIC_FLUX_DENSITY = 24; //< Magnetic flux density
70  constant int ELECTRIC_FIELD_STRENGTH = 25; //< Electric field strength
71  constant int MAGNETIC_FIELD_STRENGTH = 26; //< Magnetic field strength [uses %NormelAlarmedState mapping if of %DISCRETE_ON_OFF type]
72  constant int ANGLE = 27; //< Angle (e.g. phase angle)
73 
74  constant int SELECTION = 28; //< Selected index (one of n)
75  constant int FAULT_STATE = 29; //< Fault state [uses %NormalAlarmedState mapping if of %DISCRETE_ON_OFF type]
76  constant int POWER_QUALITY = 30; //< Power quality
77  constant int ROTATIONAL_SPEED = 31; //< Rotational speed (e.g. fan speed)
78 
79  constant int LUMINOUS_ENERGY = 32; //< Luminous energy
80  constant int LUMINOUS_FLUX = 33; //< Luminous flux
81  constant int ILLUMINANCE = 34; //< Illuminance used for light incident on a surface
82  constant int LUMINOUS_EMITTANCE = 35; //< Luminous emittance used for light emitted from a surface
83 
84  constant int MOTION = 36; //< Motion detection
85  constant int OCCUPANCY = 37; //< Occupancy detection [uses %NormalAlarmedState mapping]
86  constant int TAMPER = 38; //< Tamper detection [uses %NormalAlarmedState mapping]
87  constant int DRY_CONTACT = 39; //< Dry contact (actuator) [uses %OnOffState mapping]
88  constant int POWERED_DRY_CONTACT = 40; //< Powered dry contact (actuator) [uses %OnOffState mapping]
89 
90  constant int ABSOLUTE_HUMIDITY = 41; //< Absolute humidity
91  constant int DOOR_STATE = 42; //< Door state [uses %OpenClosedState mapping]
92  constant int DOOR_LOCK_STATE = 43; //< Door lock state [uses %OpenClosedState mapping]
93  constant int DOOR_HANDLE_LOCK = 44; //< Door handle switch [uses %OpenClosedState mapping]
94 
96  constant int NONE = 0; //< No unit
97  constant int VOLT = 1; //< Volts
98  constant int AMPERE = 2; //< Amperes
99  constant int WATT = 3; //< Watts
100  constant int VOLT_AMP = 4; //< Voltamperes
101  constant int WATT_HOUR = 5; //< Watthours
102  constant int VOLT_AMP_HOUR = 6; //< Voltamperehours
103  constant int DEGREE_CELSIUS = 7; //< Degrees Celsius
104  constant int HZ = 8; //< Hertz
105  constant int PERCENT = 9; //< Percent
106  constant int METER_PER_SEC = 10; //< Meters per second
107  constant int PASCAL = 11; //< Pascal
108  constant int G = 12; //< G-force
109  constant int RPM = 13; //< Revolutions per minute
110  constant int METER = 14; //< Meters
111  constant int HOUR = 15; //< Hours
112  constant int MINUTE = 16; //< Minutes
113  constant int SECOND = 17; //< Seconds
114 
115  constant int VOLT_AMP_REACTIVE = 18; //< Voltamperesreactive (var)
116  constant int VOLT_AMP_REACTIVE_HOUR = 19; //< Voltamperesreactivehours (varh)
117 
118  constant int GRAM = 20; //< Gram (g)
119  constant int OHM = 21; //< Ohm (omega, R)
120  constant int LITERS_PER_HOUR = 22; //< Liters per hour (l/h)
121 
122  constant int CANDELA = 23; //< Candela (cd)
123  constant int METER_PER_SQARE_SEC = 24; //< Meter per square second (m/s^2)
124  constant int TESLA = 25; //< Tesla (T)
125  constant int VOLT_PER_METER = 26; //< Volt per meter (V/m)
126  constant int VOLT_PER_AMPERE = 27; //< Volt per ampere (V/A)
127  constant int DEGREE = 28; //< Degree (angle)
128 
129  constant int DEGREE_FAHRENHEIT = 29; //< Degrees Fahrenheit (deg F)
130  constant int KELVIN = 30; //< Kelvin (deg K)
131  constant int JOULE = 31; //< Joules (J)
132  constant int COULOMB = 32; //< Coulombs (C)
133  constant int NIT = 33; //< Nits (cd/m^2)
134  constant int LUMEN = 34; //< Lumen (lm)
135  constant int LUMEN_SECOND = 35; //< Lumen second (lh s)
136  constant int LUX = 36; //< Lux (lx)
137  constant int PSI = 37; //< Pounds per square inch (psi)
138  constant int NEWTON = 38; //< Newtons (N, J/m)
139  constant int FOOT = 39; //< Feet (ft)
140  constant int FOOT_PER_SEC = 40; //< Feet per second (ft/s)
141  constant int CUBIC_METER = 41; //< Cubic meters (m^3)
142  constant int RADIANT = 42; //< Radiants (rad)
143  constant int STERADIANT = 43; //< Steradiants (sr)
144  constant int HENRY = 44; //< Henries (H, Vs/A, Ohm s)
145  constant int FARAD = 45; //< Farads (f)
146  constant int MOL = 46; //< Moles (mol)
147  constant int BECQUEREL = 47; //< Becquerels (Bq)
148  constant int GRAY = 48; //< Grays (Gy, J/kg)
149  constant int SIEVERT = 49; //< Sieverts (Sv = J/kg)
150  constant int G_PER_CUBIC_METER = 50; //< Gram per cubic meter (g/m^3)
151 
153  structure TypeSpec {
155  int type;
156  int unit;
157  };
158 
160  valueobject TypeSpecChangedEvent extends idl.Event {
161  TypeSpec oldTypeSpec;
163  };
164 
170  TypeSpec getTypeSpec();
171 
180  int setType(in int type, in int unit);
181 
182  };
183 
184 }
185 
186 #endif
open
Definition: Sensor.idl:26
OpenClosedState
Definition: Sensor.idl:25
int readingtype
Sensor reading type
Definition: Sensor.idl:154
OnOffState
Sensor states for DISCRETE_ON_OFF sensors.
Definition: Sensor.idl:20
off
Definition: Sensor.idl:21
Basic IDL definitions.
Definition: Event.idl:6
OkFaultState
Definition: Sensor.idl:35
int unit
Sensor unit
Definition: Sensor.idl:156
Sensor interface
Definition: Sensor.idl:10
int type
Sensor type
Definition: Sensor.idl:155
Sensors Model.
Definition: AccumulatingNumericSensor.idl:8
OK.
Definition: Sensor.idl:36
NormalAlarmedState
Definition: Sensor.idl:30
normal (not alarmed)
Definition: Sensor.idl:31
TypeSpec newTypeSpec
Type specification after change.
Definition: Sensor.idl:162
Complete sensor type specification.
Definition: Sensor.idl:153