LhxParameter.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2011 Raritan Inc. All rights reserved.
*/
#ifndef __LHXMODEL_PARAMETER_IDL__
#define __LHXMODEL_PARAMETER_IDL__
#include <Event.idl>
/** LHX Model */
module lhxmodel {
/** LHX Parameter Interface */
interface Parameter_2_0_1 {
constant int ERR_INVALID_PARAMS = 1; ///< Invalid parameters
constant int ERR_READ_ONLY = 2; ///< Attempt to write a read-only parameter
/** Parameter Unit */
enumeration Unit {
NONE, ///< No unit
NUMBER, ///< Number
BINARY, ///< Binary
TEMP_ABS, ///< Absolute temperature
TEMP_REL, ///< Relative temperature
BAR, ///< Bar
PASCAL, ///< Pascal
SIEMENS, ///< Siemens
METER, ///< Meter
VOLT, ///< Volt
AMPERE, ///< Ampere
HOURS, ///< Hours
MINUTES, ///< Minutes
SECONDS, ///< Seconds
TIME, ///< Time
METERS_PER_SECOND, ///< Meters/second
NEWTON, ///< Newton
GRAMMS, ///< Gramms
HUMIDITY_REL, ///< Relative humidity
HERTZ, ///< Hertz
OHM, ///< Ohm
PERCENT, ///< Percent
LITERS_PER_MINUTE, ///< Liters/minute
LITERS_PER_HOUR ///< Liters/hour
};
/** Parameter Status */
structure Status {
boolean switchedOn; ///< LHX On / Off
boolean active; ///< Active
boolean overflow; ///< Overflow
boolean underflow; ///< Underflow
boolean valid; ///< Valid
};
/** Parameter Metadata */
structure MetaData {
Unit unit; ///< Parameter unit
string id; ///< Parameter ID
double defaultValue; ///< Default value
double min; ///< Minimum value
double max; ///< Maximum value
boolean read_only; ///< \c true for read-only parameters
int decDigits; ///< Number of decimal digits
};
/** Parameter Value */
structure Value {
time timestamp; ///< Timestamp of last sample
Status status; ///< The state of the parameter
double value; ///< The value of the parameter
};
/** Event: Parameter metadata has been changed */
valueobject MetaDataChangedEvent extends idl.Event {
MetaData oldMetaData; ///< Metadata before change
MetaData newMetaData; ///< Metadata after change
};
/** Event: Parameter value has changed */
valueobject ValueChangedEvent extends idl.Event {
Value newValue; ///< New parameter value
};
/**
* Retrieve the parameter metadata.
*
* @return Parameter metadata
*/
MetaData getMetaData();
/**
* Retrieve the parameter value.
*
* @return Parameter value
*/
Value getValue();
/**
* Retrieve the parameter raw value.
*
* @return Raw value
*/
int getRawValue();
/**
* Change the parameter value.
*
* @param rawValue New value
* @param validateRange validate value against parameter range
*
* @return 0 if OK
* @return ERR_INVALID_PARAMS if any parameter value is invalid
* @return ERR_READ_ONLY if attempting to write read only parameter
*/
int setRawValue(in int rawValue, in boolean validateRange);
};
}
#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