Loading...
Searching...
No Matches
sensors::NumericSensor Interface Reference

A sensor with numeric readings. More...

`import <NumericSensor.idl;`

Inheritance diagram for sensors::NumericSensor:

## Classes

struct | DefaultThresholdsChangedEvent
| Event: Sensor default thresholds have changed. More...
struct | MetaData
| Numeric sensor metadata. More...
struct | MetaDataChangedEvent
| Event: Sensor metadata has changed. More...
struct | MinMax
| Numeric sensor minimum / maximum values. More...
struct | MinMaxChangedEvent
| Event: Sensor min or max value has changed. More...
struct | MinMaxResetEvent
| Event: Min / Max value has been reset. More...
struct | Range
| Range of possible sensor readings. More...
struct | Reading
| Numeric sensor reading. More...
struct | ReadingChangedEvent
| Event: Numeric sensor reading has changed. More...
struct | StateChangedEvent
| Event: Sensor state has changed. More...
struct | ThresholdCapabilities
| Threshold capabilities. More...
struct | Thresholds
| Numeric sensor thresholds. More...
struct | ThresholdsChangedEvent
| Event: Sensor thresholds have changed. More...

## Public Member Functions

MetaData | getMetaData ()
| Retrieve the sensor metadata.
Thresholds | getDefaultThresholds ()
| Retrieve the sensor default thresholds.
Thresholds | getThresholds ()
| Retrieve the thresholds.
int | setThresholds (in Thresholds thresh)
| Change the thresholds.
Reading | getReading ()
| Get the sensor reading.
MinMax | getMinMax ()
| Get the min / max of sensor value.
void | resetMinMax ()
| Reset min / max of sensor value.
Public Member Functions inherited from sensors::Sensor
TypeSpec | getTypeSpec ()
| Retrieve the sensor type specification.
boolean | isTypeChangeAllowed ()
| Check whether the sensor type can be changed using setType().
int | setType (in int type, in int unit)
| Set sensor type and unit.

## Public Attributes

constant int | THRESHOLD_OUT_OF_RANGE = 1
| The threshold exceedes the sensor range.
constant int | THRESHOLD_INVALID = 2
| The threshold constraints are not met.
constant int | THRESHOLD_NOT_SUPPORTED = 3
| The sensor does not support setting this threshold.
Public Attributes inherited from sensors::Sensor
constant int | ERR_NOT_SUPPORTED = 1
| The operation is not supported.
constant int | NUMERIC = 0
| Sensor reading type
constant int | DISCRETE_ON_OFF = 1
| Sensor has two discrete readings: 0 (off) and 1 (on), see OnOffState
constant int | DISCRETE_MULTI = 2
| Sensor has multiple discrete readings
constant int | UNSPECIFIED = 0
| Sensor type
constant int | VOLTAGE = 1
| Voltage.
constant int | CURRENT = 2
| Current.
constant int | UNBALANCE_CURRENT = 3
| Current unbalance.
constant int | POWER = 4
| Power.
constant int | POWER_FACTOR = 5
| Power factor.
constant int | ENERGY = 6
| Energy.
constant int | FREQUENCY = 7
| Frequency.
constant int | TEMPERATURE = 8
| Temperature.
constant int | HUMIDITY = 9
| Relative humidity.
constant int | AIR_FLOW = 10
| Air flow.
constant int | AIR_PRESSURE = 11
| Air pressure.
constant int | CONTACT_CLOSURE = 12
| Contact Closure [uses NormalAlarmedState mapping].
constant int | ON_OFF_SENSOR = 13
| Switch state [uses OnOffState mapping].
constant int | TRIP_SENSOR = 14
| Circuit breaker tripped [uses OpenClosedState mapping].
constant int | VIBRATION = 15
| Vibration [uses NormalAlarmedState mapping].
constant int | WATER_LEAK = 16
| Water leak [uses NormalAlarmedState mapping].
constant int | SMOKE_DETECTOR = 17
| Smoke detector [uses NormalAlarmedState mapping].
constant int | TOTAL_HARMONIC_DISTORTION = 18
| Total harmonic distortion.
constant int | MASS = 19
| Mass.
constant int | ELECTRICAL_RESISTANCE = 20
| Electrical resistance.
constant int | FLUX = 21
| Flux (mass per time, e.g. water flow)
constant int | LUMINOUS_INTENSITY = 22
| Luminous intensity.
constant int | ACCELERATION = 23
| Acceleration.
constant int | MAGNETIC_FLUX_DENSITY = 24
| Magnetic flux density.
constant int | ELECTRIC_FIELD_STRENGTH = 25
| Electric field strength.
constant int | MAGNETIC_FIELD_STRENGTH = 26
| Magnetic field strength [uses NormelAlarmedState mapping if of DISCRETE_ON_OFF type].
constant int | ANGLE = 27
| Angle (e.g. phase angle)
constant int | SELECTION = 28
| Selected index (one of n)
constant int | FAULT_STATE = 29
| Fault state [uses NormalAlarmedState mapping if of DISCRETE_ON_OFF type].
constant int | POWER_QUALITY = 30
| Power quality.
constant int | ROTATIONAL_SPEED = 31
| Rotational speed (e.g. fan speed)
constant int | LUMINOUS_ENERGY = 32
| Luminous energy.
constant int | LUMINOUS_FLUX = 33
| Luminous flux.
constant int | ILLUMINANCE = 34
| Illuminance used for light incident on a surface.
constant int | LUMINOUS_EMITTANCE = 35
| Luminous emittance used for light emitted from a surface.
constant int | MOTION = 36
| Motion detection.
constant int | OCCUPANCY = 37
| Occupancy detection [uses NormalAlarmedState mapping].
constant int | TAMPER = 38
| Tamper detection [uses NormalAlarmedState mapping].
constant int | DRY_CONTACT = 39
| Dry contact (actuator) [uses OnOffState mapping].
constant int | POWERED_DRY_CONTACT = 40
| Powered dry contact (actuator) [uses OnOffState mapping].
constant int | ABSOLUTE_HUMIDITY = 41
| Absolute humidity.
constant int | DOOR_STATE = 42
| Door state [uses OpenClosedState mapping].
constant int | DOOR_LOCK_STATE = 43
| Door lock state [uses OpenClosedState mapping].
constant int | DOOR_HANDLE_LOCK = 44
| Door handle switch [uses OpenClosedState mapping].
constant int | CREST_FACTOR = 45
| Crest factor.
constant int | DISTANCE = 46
| Distance.
constant int | LENGTH = 47
| Length.
constant int | UNBALANCE_VOLTAGE = 48
| Voltage unbalance.
constant int | PARTICLE_DENSITY = 49
| Particle Density.
constant int | DEW_POINT = 50
| Dew Point.
constant int | ELECTRICAL_IMPEDANCE = 51
| Electrical impedance.
constant int | TS_BYPASS_STATE = 52
| Transfer switch bypass state.
constant int | BATTERY_LEVEL = 53
| Battery level.
constant int | NONE = 0
| Sensor unit
constant int | VOLT = 1
| Electric Potential, Volts (V)
constant int | AMPERE = 2
| Electric Current, Amperes (A)
constant int | WATT = 3
| Electric Power, Watts (W)
constant int | VOLT_AMP = 4
| Electric Capacity, Volt Amperes (VA)
constant int | WATT_HOUR = 5
| Active Energy, Watt hours (Wh)
constant int | VOLT_AMP_HOUR = 6
| Apparent Energy, Volt-Ampere hours (VAh)
constant int | DEGREE_CELSIUS = 7
| Temperature, Celsius (deg C)
constant int | HZ = 8
| Frequency, Hertz (Hz)
constant int | PERCENT = 9
| Ratio, Percent (%)
constant int | METER_PER_SEC = 10
| Speed, Meters per second (m/s)
constant int | PASCAL = 11
| Pressure, Pascal (Pa)
constant int | G = 12
| Acceleration, G-force (g)
constant int | RPM = 13
| Rotation, Revolutions per minute (rpm)
constant int | METER = 14
| Distance, Meters (m)
constant int | HOUR = 15
| Time, Hours (h)
constant int | MINUTE = 16
| Time, Minutes (min)
constant int | SECOND = 17
| Time, Seconds (s)
constant int | VOLT_AMP_REACTIVE = 18
| Reactive Power, Volt Amperes reactive (var)
constant int | VOLT_AMP_REACTIVE_HOUR = 19
| Reactive Energy, Volt Ampere reactive hours (varh)
constant int | GRAM = 20
| Mass, Gram (g)
constant int | OHM = 21
| Resistance, Ohm (omega, R)
constant int | LITERS_PER_HOUR = 22
| Flow, Liters per hour (l/h)
constant int | CANDELA = 23
| Luminous Intensity, Candela (cd)
constant int | METER_PER_SQUARE_SEC = 24
| Acceleration, Meter per square second (m/s^2)
constant int | METER_PER_SQARE_SEC = 24
| Typo, preserved for backward compatibility.
constant int | TESLA = 25
| Magnetic Flux Density, Tesla (T)
constant int | VOLT_PER_METER = 26
| Electric Field, Volt per meter (V/m)
constant int | VOLT_PER_AMPERE = 27
| Resistance, Volt per ampere (V/A)
constant int | DEGREE = 28
| Angle, Degrees (deg)
constant int | DEGREE_FAHRENHEIT = 29
| Temperature, Fahrenheit (deg F)
constant int | KELVIN = 30
| Temperature, Kelvin (K)
constant int | JOULE = 31
| Energy, Joules (J)
constant int | COULOMB = 32
| Electric Charge, Coulombs (C)
constant int | NIT = 33
| Luminance, Nits (cd/m^2)
constant int | LUMEN = 34
| Luminous Flux, Lumen (lm)
constant int | LUMEN_SECOND = 35
| Luminous Energy, Lumen second (lm s)
constant int | LUX = 36
| Luminous Flux, Lux (lx)
constant int | PSI = 37
| Pressure, Pounds per square inch (psi)
constant int | NEWTON = 38
| Force, Newtons (N, J/m)
constant int | FOOT = 39
| Distance, Feet (ft)
constant int | FOOT_PER_SEC = 40
| Speed, Feet per second (ft/s)
constant int | CUBIC_METER = 41
| Volume, Cubic meters (m^3)
constant int | RADIANT = 42
| Angle, Radians (rad)
constant int | STERADIANT = 43
| Solid Angle, Steradians (sr)
constant int | HENRY = 44
| Inductance, Henries (H, Vs/A, Ohm s)
constant int | FARAD = 45
| Capacitance, Farads (F)
constant int | MOL = 46
| Substance Quantity, Moles (mol)
constant int | BECQUEREL = 47
| Radiation, Becquerels (Bq)
constant int | GRAY = 48
| Radiation, Grays (Gy, J/kg)
constant int | SIEVERT = 49
| Radiation, Sieverts (Sv = J/kg)
constant int | G_PER_CUBIC_METER = 50
| Density, Grams per cubic meter (g/m^3)
constant int | UG_PER_CUBIC_METER = 51
| Density, Micrograms per cubic meter (µg/m^3)

## Additional Inherited Members

Public Types inherited from sensors::Sensor
enum | OnOffState { OFF , ON }
| Sensor states for DISCRETE_ON_OFF sensors. More...
enum | OpenClosedState { OPEN , CLOSED }
enum | NormalAlarmedState { NORMAL , ALARMED }
enum | OkFaultState { OK , FAULT }

## Detailed Description

A sensor with numeric readings.

Definition at line 17 of file NumericSensor.idl.

## Member Function Documentation

## getDefaultThresholds()

Thresholds sensors::NumericSensor::getDefaultThresholds | ( |  | ) |

Retrieve the sensor default thresholds.

Returns
  Set of default thresholds

## getMetaData()

MetaData sensors::NumericSensor::getMetaData | ( |  | ) |

Retrieve the sensor metadata.

Returns
  Sensor metadata

## getMinMax()

MinMax sensors::NumericSensor::getMinMax | ( |  | ) |

Get the min / max of sensor value.

Returns
  Sensor min / max values

## getReading()

Reading sensors::NumericSensor::getReading | ( |  | ) |

Get the sensor reading.

Returns
  Sensor reading, not rounded

## getThresholds()

Thresholds sensors::NumericSensor::getThresholds | ( |  | ) |

Retrieve the thresholds.

Note: In case of peripheral devices these thresholds may be overridden by the device slot configuration.

Returns
  Set of configured thresholds

## setThresholds()

int sensors::NumericSensor::setThresholds | ( | in Thresholds | thresh | ) |

Change the thresholds.

Note: In case of peripheral devices these thresholds may be overridden by the device slot configuration.

Parameters

  thresh | New set of thresholds

Returns
  0 if OK
  THRESHOLD_OUT_OF_RANGE if any threshold is out of range
  THRESHOLD_INVALID if thresholds don't meet the requirements
  THRESHOLD_NOT_SUPPORTED if threshold is not supported

## Member Data Documentation

## THRESHOLD_INVALID

constant int sensors::NumericSensor::THRESHOLD_INVALID = 2

The threshold constraints are not met.

Definition at line 20 of file NumericSensor.idl.

## THRESHOLD_NOT_SUPPORTED

constant int sensors::NumericSensor::THRESHOLD_NOT_SUPPORTED = 3

The sensor does not support setting this threshold.

Definition at line 21 of file NumericSensor.idl.

## THRESHOLD_OUT_OF_RANGE

constant int sensors::NumericSensor::THRESHOLD_OUT_OF_RANGE = 1

The threshold exceedes the sensor range.

Definition at line 19 of file NumericSensor.idl.

The documentation for this interface was generated from the following file:

- NumericSensor.idl