Technical information

Programming - Asset Management
56
RMS Enterprise - NetLinx Programmer’s Guide
The following code snippets provide an example of registering two asset parameters with RMS:
// volume level
RmsAssetParameterEnqueueLevel(assetClientKey, << asset key >
'touch.panel.volume.level', << param key >>
'Volume Level', << name >>
'Master volume level', << description >>
RMS_ASSET_PARAM_TYPE_NONE, << report type >>
panelInfo.volumeLevel, << init value >>
0, << minimum >>
100, << maximum >>
'%', << units >>
RMS_ALLOW_RESET_NO, << allow reset >>
0, << reset value >>
RMS_TRACK_CHANGES_NO, << track change>>
RMS_ASSET_PARAM_BARGRAPH_VOLUME_LEVEL); << bargraph >>
// volume mute
RmsAssetParameterEnqueueBoolean(assetClientKey,
'touch.panel.volume.mute',
'Volume Mute',
'Last reported volume mute state',
RMS_ASSET_PARAM_TYPE_NONE,
panelInfo.volumeMute,
RMS_ALLOW_RESET_NO,
FALSE,
RMS_TRACK_CHANGES_NO);
After all asset parameter registrations have been queued, you must perform a submit call to send all the registrations to the RMS
server.
// submit all parameter registrations
RmsAssetParameterSubmit(assetClientKey);
Asset Parameters - Required Information (Cont.)
Minimum Value (Signed Long)
[OPTIONAL]
This parameter attribute only applies to parameters of a numeric data type: Number, Decimal,
Level.
It is optional for data types Number and Decimal and required for data type Level.
This attribute specifies the lowest possible value that this parameter value can reach.
Maximum Value (Signed Long)
[OPTIONAL]
This parameter attribute only applies to parameters of a numeric data type: Number, Decimal,
Level.
It is optional for data types Number and Decimal and required for data type Level.
This attribute specifies the highest possible value that this parameter value can reach.
Enumeration (String)
[OPTIONAL]
This parameter attribute only applies to and is required for parameters of data type:
Enumeration.
This attribute should contain a pipe delimited list of string values.
Track Changes (Boolean)
[REQUIRED]
This parameter attribute determines if the value changes that this parameter reports to the
RMS server are tracked for historical and reporting purposes.
Only asset parameter values that have usefulness to reporting or historical reference should
be tracked.
Bargraph Key (String)
[OPTIONAL]
Asset parameters of data type Number, Level, or Decimal can have an associated bargraph
applied in the RMS web user interface.
Each bargraph has an associated key identifier.
A set of the default asset parameter bargraphs are listed as constants in the RmsApi.axi
Include File.
// RMS Asset Bargraph Keys
RMS_ASSET_PARAM_BARGRAPH_GENERAL_PURPOSE = 'general';
RMS_ASSET_PARAM_BARGRAPH_BATTERY_LEVEL = 'battery.level';
RMS_ASSET_PARAM_BARGRAPH_VOLUME_LEVEL = 'volume.level';
RMS_ASSET_PARAM_BARGRAPH_SIGNAL_STRENGTH = 'signal.strength';
RMS_ASSET_PARAM_BARGRAPH_LIGHT_LEVEL = 'light.level';
RMS_ASSET_PARAM_BARGRAPH_LAMP_CONSUMPTION = 'lamp.consumption';
RMS_ASSET_PARAM_BARGRAPH_TEMPERATURE = 'temperature';
Stock Parameters (Boolean)
[REQUIRED]