The measurement tag denotes a logical property of the hardware device. This logical property is usually stored in the hardware device and requires that commands to be sent to the device to read (readcommand tag) or write (writecommand tag) the value of the measurement. The signal tag is used to define the signal that will be triggered when the value of the measurement is sent by the hardware device. Hardware devices vary on how the measurements are implemented. Some hardware devices only support the reading of measurement values and do not support writing new values via messages. Other hardware devices support both reading and writing of the measurement. Some hardware devices support notification of the signal message when the value changes while other hardware device require that a read message be sent to get the measurement value. See the hardware device specifications to determine the correct tags that must be defined by this device.
Examples: measurement examples
| Name | Type | Description | Use |
<measurement> attributes
| id | ID | Specifies an unique identifier for this element. After defining an element with the id attribute, other elements can reference this element by using the idref attribute. Since the id attribute value is used by the code generator to generate field and method names, no spaces, periods or commas should be used. | optional |
| implementation | Name | Specifies the implementation class name. | optional |
| idref | IDREF | Specifies a reference to the element with the matching id attribute. The matching id attribute must be specified before the idref attribute can be used. | optional |
| type | "Boolean" "Integer" "List" "Long" "Map" "Number" "Object" "String" | Specifies the measurement data type. | optional |
| listen | boolean | Specifies the containing object to listen to this measurement. The default is false. | optional |
| triggeronsetvalue | boolean | Specifies to trigger the signal on set value. The default is true. | optional |
| triggeronreadcommand | boolean | Specifies to trigger the signal on read command. The default is true. | optional |
| executeread | boolean | Specifies the measurement supports executeRead. The default is true. | optional |
| executewrite | boolean | Specifies the measurement supports executeWrite. If both the setvalue and setwrite attributes are false, then the measurement is a read only measurement. The default is true. | optional |
| setvalue | boolean | Specifies the measurement supports setValue. If both the setvalue and setwrite attributes are false, then the measurement is a read only measurement. The default is true. | optional |
| error | boolean | Specifies the measurement can report an error. The default is true. | optional |
| Name | Description | Use |
<measurement> elements
| <description> | Specifies the measurement description. | 0 to unbounded |
| <history> | Specifies the measurement history. | 0 to unbounded |
| <optional> | Defines if this measurement is optional. | 0 to 1 |
| <deprecated> | Specifies that the contents of this element should be marked as deprecated. | 0 to 1 |
| <specreference> | Specification reference for this measurement. | 0 to unbounded |
| <key> | Specifies a unique measurement key. | 0 to 1 |
| <configuration> | Defines this measurement as a configuration measurement. | 0 to 1 |
| <rate> | Specifies the measurement polling rate in milliseconds. | 0 to 1 |
| <message> | Specifies the measurement message. | 0 to 1 |
| <data> | Specifies the measurement data. | 0 to unbounded |
| <readcommand> | Specifies the command to request a read of the current value of the measurement. | 0 to 1 |
| <writecommand> | Specifies the command to request a change of the measurement value. | 0 to 1 |
| <method> | Specifies the method. | 0 to 1 |
| <signal> | Specifies the signal containing the measurement value. | 0 to 1 |
| <measurement> | Defines the parent measurement. | 0 to unbounded |
| <field> | Specifies the field name to use on the receiving measurement. | 1 to 1 |
| <parameters> | Specifies a group of parameters. | 0 to unbounded |
| <units> | Specifies the measurement units. | 0 to 1 |
| <value> | Specifies the optional initial measurement value. | 0 to 1 |
| <maximum> | Specifies the maximum value. | 1 to 1 |
| <minimum> | Specifies the minimum value. | 1 to 1 |
| <negative> | Negate the value. | 1 to 1 |
| <not> | Logical not of a boolean value. | 1 to 1 |
| <scale> | Specifies a numeric scale value. | 1 to 1 |
| <shift> | Specifies an integer shift value. | 1 to 1 |
| <translate> | Specifies a numeric translate (add) value. | 1 to 1 |
| Sibling Name | Sibling Description |
<measurement> element siblings
| <command> | Defines a command supported by this concrete device. |
| <commands> | Specifies a command group. |
| <group> | Defines a group supported by this concrete device. |
| <signal> | Defines a signal supported by this concrete device. |
| <description> | Specifies the command description. |
| <history> | Specifies the command history. |
| <optional> | Defines if this command is optional. |
| <units> | Specifies the command data units. |
| <deprecated> | Specifies that the contents of this element should be marked as deprecated. |
| <specreference> | Specification reference for this command. |
| <key> | Specifies a unique command key. |
| <configuration> | Defines this command as a configuration command. |
| <commandreceived> | Specifies if a command message can be received from the device. |
| <rate> | Specifies the polling rate in milliseconds. |