Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
Sensor.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2009 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __TFW_SENSOR_IDL__
7#define __TFW_SENSOR_IDL__
8
9#include <Event.idl>
10
11/** Sensors Model */
12module sensors {
13
14 /** %Sensor interface */
15 interface Sensor {
16
17 constant int ERR_NOT_SUPPORTED = 1; ///< The operation is not supported
18
19 /** %Sensor reading type */
20 constant int NUMERIC = 0; ///< %Sensor has numeric readings
21 constant int DISCRETE_ON_OFF = 1; ///< %Sensor has two discrete readings: 0 (off) and 1 (on), see OnOffState
22 constant int DISCRETE_MULTI = 2; ///< %Sensor has multiple discrete readings
23
24 /** Sensor states for DISCRETE_ON_OFF sensors */
25 enumeration OnOffState {
26 OFF, ///< off
27 ON ///< on
28 };
29
30 enumeration OpenClosedState {
31 OPEN, ///< open
32 CLOSED ///< closed
33 };
34
35 enumeration NormalAlarmedState {
36 NORMAL, ///< normal (not alarmed)
37 ALARMED ///< alarmed
38 };
39
40 enumeration OkFaultState {
41 OK, ///< OK
42 FAULT ///< fault
43 };
44
45 /** %Sensor type */
46 constant int UNSPECIFIED = 0; ///< Unspecified
47
48 constant int VOLTAGE = 1; ///< Voltage
49 constant int CURRENT = 2; ///< Current
50 constant int UNBALANCE_CURRENT = 3; ///< Current unbalance
51 constant int POWER = 4; ///< Power
52 constant int POWER_FACTOR = 5; ///< Power factor
53 constant int ENERGY = 6; ///< Energy
54 constant int FREQUENCY = 7; ///< Frequency
55 constant int TEMPERATURE = 8; ///< Temperature
56 constant int HUMIDITY = 9; ///< Relative humidity
57 constant int AIR_FLOW = 10; ///< Air flow
58 constant int AIR_PRESSURE = 11; ///< Air pressure
59 constant int CONTACT_CLOSURE = 12; ///< Contact Closure [uses %NormalAlarmedState mapping]
60 constant int ON_OFF_SENSOR = 13; ///< Switch state [uses %OnOffState mapping]
61 constant int TRIP_SENSOR = 14; ///< Circuit breaker tripped [uses %OpenClosedState mapping]
62 constant int VIBRATION = 15; ///< Vibration [uses %NormalAlarmedState mapping]
63 constant int WATER_LEAK = 16; ///< Water leak [uses %NormalAlarmedState mapping]
64 constant int SMOKE_DETECTOR = 17; ///< Smoke detector [uses %NormalAlarmedState mapping]
65
66 constant int TOTAL_HARMONIC_DISTORTION = 18; ///< Total harmonic distortion
67
68 constant int MASS = 19; ///< Mass
69 constant int ELECTRICAL_RESISTANCE = 20; ///< Electrical resistance
70 constant int FLUX = 21; ///< Flux (mass per time, e.g. water flow)
71
72 constant int LUMINOUS_INTENSITY = 22; ///< Luminous intensity
73 constant int ACCELERATION = 23; ///< Acceleration
74 constant int MAGNETIC_FLUX_DENSITY = 24; ///< Magnetic flux density
75 constant int ELECTRIC_FIELD_STRENGTH = 25; ///< Electric field strength
76 constant int MAGNETIC_FIELD_STRENGTH = 26; ///< Magnetic field strength [uses %NormelAlarmedState mapping if of %DISCRETE_ON_OFF type]
77 constant int ANGLE = 27; ///< Angle (e.g. phase angle)
78
79 constant int SELECTION = 28; ///< Selected index (one of n)
80 constant int FAULT_STATE = 29; ///< Fault state [uses %NormalAlarmedState mapping if of %DISCRETE_ON_OFF type]
81 constant int POWER_QUALITY = 30; ///< Power quality
82 constant int ROTATIONAL_SPEED = 31; ///< Rotational speed (e.g. fan speed)
83
84 constant int LUMINOUS_ENERGY = 32; ///< Luminous energy
85 constant int LUMINOUS_FLUX = 33; ///< Luminous flux
86 constant int ILLUMINANCE = 34; ///< Illuminance used for light incident on a surface
87 constant int LUMINOUS_EMITTANCE = 35; ///< Luminous emittance used for light emitted from a surface
88
89 constant int MOTION = 36; ///< Motion detection
90 constant int OCCUPANCY = 37; ///< Occupancy detection [uses %NormalAlarmedState mapping]
91 constant int TAMPER = 38; ///< Tamper detection [uses %NormalAlarmedState mapping]
92 constant int DRY_CONTACT = 39; ///< Dry contact (actuator) [uses %OnOffState mapping]
93 constant int POWERED_DRY_CONTACT = 40; ///< Powered dry contact (actuator) [uses %OnOffState mapping]
94
95 constant int ABSOLUTE_HUMIDITY = 41; ///< Absolute humidity
96 constant int DOOR_STATE = 42; ///< Door state [uses %OpenClosedState mapping]
97 constant int DOOR_LOCK_STATE = 43; ///< Door lock state [uses %OpenClosedState mapping]
98 constant int DOOR_HANDLE_LOCK = 44; ///< Door handle switch [uses %OpenClosedState mapping]
99
100 constant int CREST_FACTOR = 45; ///< Crest factor
101
102 constant int DISTANCE = 46; ///< Distance
103 constant int LENGTH = 47; ///< Length
104
105 constant int UNBALANCE_VOLTAGE = 48; ///< Voltage unbalance
106
107 constant int PARTICLE_DENSITY = 49; ///< Particle Density
108
109 constant int DEW_POINT = 50; ///< Dew Point
110
111 constant int ELECTRICAL_IMPEDANCE = 51; ///< Electrical impedance
112
113 constant int TS_BYPASS_STATE = 52; ///< Transfer switch bypass state
114
115 constant int BATTERY_LEVEL = 53; ///< Battery level
116
117 /** %Sensor unit */
118 constant int NONE = 0; ///< No unit
119 constant int VOLT = 1; ///< Electric Potential, Volts (V)
120 constant int AMPERE = 2; ///< Electric Current, Amperes (A)
121 constant int WATT = 3; ///< Electric Power, Watts (W)
122 constant int VOLT_AMP = 4; ///< Electric Capacity, Volt Amperes (VA)
123 constant int WATT_HOUR = 5; ///< Active Energy, Watt hours (Wh)
124 constant int VOLT_AMP_HOUR = 6; ///< Apparent Energy, Volt-Ampere hours (VAh)
125 constant int DEGREE_CELSIUS = 7; ///< Temperature, Celsius (deg C)
126 constant int HZ = 8; ///< Frequency, Hertz (Hz)
127 constant int PERCENT = 9; ///< Ratio, Percent (%)
128 constant int METER_PER_SEC = 10; ///< Speed, Meters per second (m/s)
129 constant int PASCAL = 11; ///< Pressure, Pascal (Pa)
130 constant int G = 12; ///< Acceleration, G-force (g)
131 constant int RPM = 13; ///< Rotation, Revolutions per minute (rpm)
132 constant int METER = 14; ///< Distance, Meters (m)
133 constant int HOUR = 15; ///< Time, Hours (h)
134 constant int MINUTE = 16; ///< Time, Minutes (min)
135 constant int SECOND = 17; ///< Time, Seconds (s)
136
137 constant int VOLT_AMP_REACTIVE = 18; ///< Reactive Power, Volt Amperes reactive (var)
138 constant int VOLT_AMP_REACTIVE_HOUR = 19; ///< Reactive Energy, Volt Ampere reactive hours (varh)
139
140 constant int GRAM = 20; ///< Mass, Gram (g)
141 constant int OHM = 21; ///< Resistance, Ohm (omega, R)
142 constant int LITERS_PER_HOUR = 22; ///< Flow, Liters per hour (l/h)
143
144 constant int CANDELA = 23; ///< Luminous Intensity, Candela (cd)
145 constant int METER_PER_SQUARE_SEC = 24; ///< Acceleration, Meter per square second (m/s^2)
146 constant int METER_PER_SQARE_SEC = 24; ///< Typo, preserved for backward compatibility
147 constant int TESLA = 25; ///< Magnetic Flux Density, Tesla (T)
148 constant int VOLT_PER_METER = 26; ///< Electric Field, Volt per meter (V/m)
149 constant int VOLT_PER_AMPERE = 27; ///< Resistance, Volt per ampere (V/A)
150 constant int DEGREE = 28; ///< Angle, Degrees (deg)
151
152 constant int DEGREE_FAHRENHEIT = 29; ///< Temperature, Fahrenheit (deg F)
153 constant int KELVIN = 30; ///< Temperature, Kelvin (K)
154 constant int JOULE = 31; ///< Energy, Joules (J)
155 constant int COULOMB = 32; ///< Electric Charge, Coulombs (C)
156 constant int NIT = 33; ///< Luminance, Nits (cd/m^2)
157 constant int LUMEN = 34; ///< Luminous Flux, Lumen (lm)
158 constant int LUMEN_SECOND = 35; ///< Luminous Energy, Lumen second (lm s)
159 constant int LUX = 36; ///< Luminous Flux, Lux (lx)
160 constant int PSI = 37; ///< Pressure, Pounds per square inch (psi)
161 constant int NEWTON = 38; ///< Force, Newtons (N, J/m)
162 constant int FOOT = 39; ///< Distance, Feet (ft)
163 constant int FOOT_PER_SEC = 40; ///< Speed, Feet per second (ft/s)
164 constant int CUBIC_METER = 41; ///< Volume, Cubic meters (m^3)
165 constant int RADIANT = 42; ///< Angle, Radians (rad)
166 constant int STERADIANT = 43; ///< Solid Angle, Steradians (sr)
167 constant int HENRY = 44; ///< Inductance, Henries (H, Vs/A, Ohm s)
168 constant int FARAD = 45; ///< Capacitance, Farads (F)
169 constant int MOL = 46; ///< Substance Quantity, Moles (mol)
170 constant int BECQUEREL = 47; ///< Radiation, Becquerels (Bq)
171 constant int GRAY = 48; ///< Radiation, Grays (Gy, J/kg)
172 constant int SIEVERT = 49; ///< Radiation, Sieverts (Sv = J/kg)
173 constant int G_PER_CUBIC_METER = 50; ///< Density, Grams per cubic meter (g/m^3)
174 constant int UG_PER_CUBIC_METER = 51; ///< Density, Micrograms per cubic meter (µg/m^3)
175
176 /** Complete sensor type specification */
177 structure TypeSpec {
178 int readingtype; ///< %Sensor reading type
179 int type; ///< %Sensor type
180 int unit; ///< %Sensor unit
181 };
182
183 /** Event: The type specification of the sensor changed */
184 valueobject TypeSpecChangedEvent extends idl.Event {
185 TypeSpec oldTypeSpec; ///< Type specification before change
186 TypeSpec newTypeSpec; ///< Type specification after change
187 };
188
189 /**
190 * Retrieve the sensor type specification.
191 *
192 * @return Type specification
193 */
195
196 /**
197 * Check whether the sensor type can be changed using setType().
198 *
199 * @return \true if type change is allowed
200 */
202
203 /**
204 * Set sensor type and unit
205 *
206 * @param type the sensor type to set
207 * @param unit the sensor unit to set
208 *
209 * @return ERR_NOT_SUPPORTED or 0
210 */
211 int setType(in int type, in int unit);
212
213 };
214
215}
216
217#endif
Sensor interface
Definition Sensor.idl:15
constant int FAULT_STATE
Fault state [uses NormalAlarmedState mapping if of DISCRETE_ON_OFF type].
Definition Sensor.idl:80
constant int AIR_FLOW
Air flow.
Definition Sensor.idl:57
constant int MOTION
Motion detection.
Definition Sensor.idl:89
constant int UNSPECIFIED
Sensor type
Definition Sensor.idl:46
constant int DOOR_HANDLE_LOCK
Door handle switch [uses OpenClosedState mapping].
Definition Sensor.idl:98
constant int METER_PER_SEC
Speed, Meters per second (m/s)
Definition Sensor.idl:128
constant int LUMINOUS_INTENSITY
Luminous intensity.
Definition Sensor.idl:72
constant int HUMIDITY
Relative humidity.
Definition Sensor.idl:56
constant int POWER_FACTOR
Power factor.
Definition Sensor.idl:52
constant int NONE
Sensor unit
Definition Sensor.idl:118
constant int UG_PER_CUBIC_METER
Density, Micrograms per cubic meter (µg/m^3)
Definition Sensor.idl:174
@ NORMAL
normal (not alarmed)
Definition Sensor.idl:36
@ ALARMED
alarmed
Definition Sensor.idl:37
constant int ROTATIONAL_SPEED
Rotational speed (e.g. fan speed)
Definition Sensor.idl:82
constant int LENGTH
Length.
Definition Sensor.idl:103
constant int CURRENT
Current.
Definition Sensor.idl:49
constant int ACCELERATION
Acceleration.
Definition Sensor.idl:73
constant int LUMEN_SECOND
Luminous Energy, Lumen second (lm s)
Definition Sensor.idl:158
constant int WATER_LEAK
Water leak [uses NormalAlarmedState mapping].
Definition Sensor.idl:63
constant int MINUTE
Time, Minutes (min)
Definition Sensor.idl:134
constant int WATT_HOUR
Active Energy, Watt hours (Wh)
Definition Sensor.idl:123
constant int VOLT_AMP
Electric Capacity, Volt Amperes (VA)
Definition Sensor.idl:122
constant int VOLTAGE
Voltage.
Definition Sensor.idl:48
constant int TOTAL_HARMONIC_DISTORTION
Total harmonic distortion.
Definition Sensor.idl:66
constant int DISCRETE_ON_OFF
Sensor has two discrete readings: 0 (off) and 1 (on), see OnOffState
Definition Sensor.idl:21
constant int AIR_PRESSURE
Air pressure.
Definition Sensor.idl:58
constant int DOOR_STATE
Door state [uses OpenClosedState mapping].
Definition Sensor.idl:96
constant int METER
Distance, Meters (m)
Definition Sensor.idl:132
constant int FLUX
Flux (mass per time, e.g. water flow)
Definition Sensor.idl:70
constant int VOLT_PER_AMPERE
Resistance, Volt per ampere (V/A)
Definition Sensor.idl:149
constant int JOULE
Energy, Joules (J)
Definition Sensor.idl:154
constant int HENRY
Inductance, Henries (H, Vs/A, Ohm s)
Definition Sensor.idl:167
constant int RADIANT
Angle, Radians (rad)
Definition Sensor.idl:165
constant int GRAY
Radiation, Grays (Gy, J/kg)
Definition Sensor.idl:171
constant int KELVIN
Temperature, Kelvin (K)
Definition Sensor.idl:153
constant int RPM
Rotation, Revolutions per minute (rpm)
Definition Sensor.idl:131
constant int VOLT_AMP_REACTIVE_HOUR
Reactive Energy, Volt Ampere reactive hours (varh)
Definition Sensor.idl:138
constant int TESLA
Magnetic Flux Density, Tesla (T)
Definition Sensor.idl:147
constant int BECQUEREL
Radiation, Becquerels (Bq)
Definition Sensor.idl:170
constant int DISCRETE_MULTI
Sensor has multiple discrete readings
Definition Sensor.idl:22
constant int NEWTON
Force, Newtons (N, J/m)
Definition Sensor.idl:161
constant int VOLT_PER_METER
Electric Field, Volt per meter (V/m)
Definition Sensor.idl:148
constant int ERR_NOT_SUPPORTED
The operation is not supported.
Definition Sensor.idl:17
constant int CANDELA
Luminous Intensity, Candela (cd)
Definition Sensor.idl:144
constant int LITERS_PER_HOUR
Flow, Liters per hour (l/h)
Definition Sensor.idl:142
constant int SMOKE_DETECTOR
Smoke detector [uses NormalAlarmedState mapping].
Definition Sensor.idl:64
constant int FARAD
Capacitance, Farads (F)
Definition Sensor.idl:168
constant int TS_BYPASS_STATE
Transfer switch bypass state.
Definition Sensor.idl:113
constant int METER_PER_SQUARE_SEC
Acceleration, Meter per square second (m/s^2)
Definition Sensor.idl:145
constant int SECOND
Time, Seconds (s)
Definition Sensor.idl:135
constant int PARTICLE_DENSITY
Particle Density.
Definition Sensor.idl:107
constant int GRAM
Mass, Gram (g)
Definition Sensor.idl:140
constant int OCCUPANCY
Occupancy detection [uses NormalAlarmedState mapping].
Definition Sensor.idl:90
constant int VIBRATION
Vibration [uses NormalAlarmedState mapping].
Definition Sensor.idl:62
constant int ILLUMINANCE
Illuminance used for light incident on a surface.
Definition Sensor.idl:86
constant int HZ
Frequency, Hertz (Hz)
Definition Sensor.idl:126
constant int TRIP_SENSOR
Circuit breaker tripped [uses OpenClosedState mapping].
Definition Sensor.idl:61
constant int LUMINOUS_EMITTANCE
Luminous emittance used for light emitted from a surface.
Definition Sensor.idl:87
constant int ANGLE
Angle (e.g. phase angle)
Definition Sensor.idl:77
constant int MASS
Mass.
Definition Sensor.idl:68
constant int SIEVERT
Radiation, Sieverts (Sv = J/kg)
Definition Sensor.idl:172
constant int SELECTION
Selected index (one of n)
Definition Sensor.idl:79
constant int LUMINOUS_ENERGY
Luminous energy.
Definition Sensor.idl:84
constant int FOOT_PER_SEC
Speed, Feet per second (ft/s)
Definition Sensor.idl:163
constant int DEGREE_CELSIUS
Temperature, Celsius (deg C)
Definition Sensor.idl:125
constant int ENERGY
Energy.
Definition Sensor.idl:53
boolean isTypeChangeAllowed()
Check whether the sensor type can be changed using setType().
OnOffState
Sensor states for DISCRETE_ON_OFF sensors.
Definition Sensor.idl:25
constant int FOOT
Distance, Feet (ft)
Definition Sensor.idl:162
constant int COULOMB
Electric Charge, Coulombs (C)
Definition Sensor.idl:155
constant int NUMERIC
Sensor reading type
Definition Sensor.idl:20
constant int LUMINOUS_FLUX
Luminous flux.
Definition Sensor.idl:85
constant int TEMPERATURE
Temperature.
Definition Sensor.idl:55
constant int MAGNETIC_FIELD_STRENGTH
Magnetic field strength [uses NormelAlarmedState mapping if of DISCRETE_ON_OFF type].
Definition Sensor.idl:76
constant int ON_OFF_SENSOR
Switch state [uses OnOffState mapping].
Definition Sensor.idl:60
constant int METER_PER_SQARE_SEC
Typo, preserved for backward compatibility.
Definition Sensor.idl:146
constant int CONTACT_CLOSURE
Contact Closure [uses NormalAlarmedState mapping].
Definition Sensor.idl:59
constant int LUX
Luminous Flux, Lux (lx)
Definition Sensor.idl:159
constant int VOLT
Electric Potential, Volts (V)
Definition Sensor.idl:119
constant int VOLT_AMP_REACTIVE
Reactive Power, Volt Amperes reactive (var)
Definition Sensor.idl:137
constant int DRY_CONTACT
Dry contact (actuator) [uses OnOffState mapping].
Definition Sensor.idl:92
@ CLOSED
closed
Definition Sensor.idl:32
constant int PASCAL
Pressure, Pascal (Pa)
Definition Sensor.idl:129
constant int ABSOLUTE_HUMIDITY
Absolute humidity.
Definition Sensor.idl:95
constant int OHM
Resistance, Ohm (omega, R)
Definition Sensor.idl:141
constant int TAMPER
Tamper detection [uses NormalAlarmedState mapping].
Definition Sensor.idl:91
constant int DEGREE_FAHRENHEIT
Temperature, Fahrenheit (deg F)
Definition Sensor.idl:152
constant int DEGREE
Angle, Degrees (deg)
Definition Sensor.idl:150
constant int G_PER_CUBIC_METER
Density, Grams per cubic meter (g/m^3)
Definition Sensor.idl:173
constant int VOLT_AMP_HOUR
Apparent Energy, Volt-Ampere hours (VAh)
Definition Sensor.idl:124
TypeSpec getTypeSpec()
Retrieve the sensor type specification.
constant int UNBALANCE_VOLTAGE
Voltage unbalance.
Definition Sensor.idl:105
constant int NIT
Luminance, Nits (cd/m^2)
Definition Sensor.idl:156
constant int G
Acceleration, G-force (g)
Definition Sensor.idl:130
constant int HOUR
Time, Hours (h)
Definition Sensor.idl:133
int setType(in int type, in int unit)
Set sensor type and unit.
constant int DEW_POINT
Dew Point.
Definition Sensor.idl:109
constant int BATTERY_LEVEL
Battery level.
Definition Sensor.idl:115
constant int AMPERE
Electric Current, Amperes (A)
Definition Sensor.idl:120
constant int MOL
Substance Quantity, Moles (mol)
Definition Sensor.idl:169
constant int POWERED_DRY_CONTACT
Powered dry contact (actuator) [uses OnOffState mapping].
Definition Sensor.idl:93
constant int DISTANCE
Distance.
Definition Sensor.idl:102
constant int FREQUENCY
Frequency.
Definition Sensor.idl:54
constant int POWER
Power.
Definition Sensor.idl:51
constant int POWER_QUALITY
Power quality.
Definition Sensor.idl:81
constant int ELECTRICAL_RESISTANCE
Electrical resistance.
Definition Sensor.idl:69
constant int STERADIANT
Solid Angle, Steradians (sr)
Definition Sensor.idl:166
constant int ELECTRICAL_IMPEDANCE
Electrical impedance.
Definition Sensor.idl:111
constant int WATT
Electric Power, Watts (W)
Definition Sensor.idl:121
constant int CUBIC_METER
Volume, Cubic meters (m^3)
Definition Sensor.idl:164
constant int CREST_FACTOR
Crest factor.
Definition Sensor.idl:100
constant int PSI
Pressure, Pounds per square inch (psi)
Definition Sensor.idl:160
constant int PERCENT
Ratio, Percent (%)
Definition Sensor.idl:127
constant int ELECTRIC_FIELD_STRENGTH
Electric field strength.
Definition Sensor.idl:75
constant int UNBALANCE_CURRENT
Current unbalance.
Definition Sensor.idl:50
constant int LUMEN
Luminous Flux, Lumen (lm)
Definition Sensor.idl:157
constant int MAGNETIC_FLUX_DENSITY
Magnetic flux density.
Definition Sensor.idl:74
constant int DOOR_LOCK_STATE
Door lock state [uses OpenClosedState mapping].
Definition Sensor.idl:97
Basic IDL definitions.
Definition Event.idl:10
Common base for all events.
Definition Event.idl:13
Event: The type specification of the sensor changed.
Definition Sensor.idl:184
TypeSpec newTypeSpec
Type specification after change.
Definition Sensor.idl:186
TypeSpec oldTypeSpec
Type specification before change.
Definition Sensor.idl:185
Complete sensor type specification.
Definition Sensor.idl:177
int unit
Sensor unit
Definition Sensor.idl:180
int readingtype
Sensor reading type
Definition Sensor.idl:178
int type
Sensor type
Definition Sensor.idl:179