Technical information

Programming - Asset Management
67
RMS Enterprise - NetLinx Programmer’s Guide
Updating Asset Parameter Values
Asset parameter value changes will need to be sent to RMS as they change on the NetLinx system. Parameters that have a high
frequency of changes should be throttled in a way that parameter updates are sent to RMS on a limited basis; possible limiting by
imposing logic where only changes that reach at certain statistical significance are sent or logic where changes are only updated on
a set time delay.
The RmsApi.axi Include File (which is already included by each asset monitoring module) provides the following wrapper
functions for updating asset parameter values with RMS.
These functions forward an immediate parameter value change to the RMS server:
RmsAssetParameterSetValueBoolean (see page 68)
RmsAssetParameterSetValueNumber (see page 69)
RmsAssetParameterSetValueDecimal (see page 69)
RmsAssetParameterSetValueLevel (see page 69)
RmsAssetParameterSetValue (see page 70)
RmsAssetParameterUpdateValue (see page 70)
These functions queue parameter value changes and only forward them to the RMS server when the Submit method is called. This
queuing technique should be used when there are more than 2 parameter updates that occur back-to-back.
RmsAssetParameterEnqueueSetValueBoolean (see page 71)
RmsAssetParameterEnqueueSetValueNumber (see page 71)
RmsAssetParameterEnqueueSetValueDecimal (see page 71)
RmsAssetParameterEnqueueSetValueLevel (see page 72)
RmsAssetParameterEnqueueSetValue (see page 72)
RmsAssetParameterEnqueueUpdateValue (see page 73)
RmsAssetParameterUpdatesSubmit (see page 74)
Asset Parameter Thresholds Functions (Cont.)
RmsAssetParameter
ThresholdEnqueueEx
Description: This function is used to add an asset parameter threshold on the asset parameter currently pending in the asset
parameter registration queue. This EXTENDED function accepts the data structure RmsAssetParameterThreshold as an
argument.
Arguments: see method signature below
Returns: 1 if call was successful; 0 if call was unsuccessful
Syntax:
DEFINE_FUNCTION CHAR RmsAssetParameterThresholdEnqueueEx(CHAR assetClientKey[],
CHAR parameterKey[],
RmsAssetParameterThreshold threshold)
{
STACK_VAR CHAR rmsCommand[RMS_MAX_CMD_LEN];
// ensure an asset client key has been provided
IF(assetClientKey == '')
{
SEND_STRING 0, '>>>> RMS API ERROR <RmsAssetParameterThresholdEnqueueEx> :: missing asset client key';
RETURN FALSE;
}
// ensure a parameter key has been provided
IF(parameterKey == '')
{
SEND_STRING 0, '>>>> RMS API ERROR <RmsAssetParameterThresholdEnqueueEx> :: missing parameter key';
RETURN FALSE;
}
// ensure a threshold name has been provided
IF(threshold.name == '')
{
SEND_STRING 0, '>>>> RMS API ERROR <RmsAssetParameterThresholdEnqueueEx> :: missing threshold name';
RETURN FALSE;
}
// ensure a threshold comparison operator has been provided
IF(threshold.comparisonOperator == '')
{
SEND_STRING
0, '>>>> RMS API ERROR <RmsAssetParameterThresholdEnqueueEx> :: missing threshold
comparison operator';
RETURN FALSE;
}