Technical information
Programming - Asset Management
66
RMS Enterprise - NetLinx Programmer’s Guide
// create a threshold for when the OVERCURRENT alarm occurs
RmsAssetParameterThresholdEnqueue(assetClientKey, << asset key >>
'pdu.overcurrent.alarm', << param key >>
'Overcurrent', << threshold name >>
RMS_STATUS_TYPE_MAINTENANCE, << status type >>
RMS_ASSET_PARAM_THRESHOLD_COMPARISON_EQUAL, << compare op >>
'true'); << threshold value >>
Asset Parameter Thresholds Functions
The Asset Parameter Thresholds functions in the RmsApi.axi Include File are described in the following table:
Asset Parameter Thresholds Functions
RmsAssetParameter
ThresholdEnqueue
Description: This function is used to add an asset parameter threshold on the asset parameter currently pending in the asset
parameter registration queue.
Arguments: see method signature below
Returns: 1 if call was successful; 0 if call was unsuccessful
Syntax:
DEFINE_FUNCTION CHAR RmsAssetParameterThresholdEnqueue(CHAR assetClientKey[],
CHAR parameterKey[],
CHAR thresholdName[],
CHAR thresholdStatusType[],
CHAR thresholdComparisonOperator[],
CHAR thresholdValue[])
{
STACK_VAR RmsAssetParameterThreshold threshold;
// setup threshold data structure
threshold.name = thresholdName;
threshold.statusType = thresholdStatusType;
threshold.comparisonOperator = thresholdComparisonOperator;
threshold.value = thresholdValue;
threshold.delayInterval = 0;
threshold.notifyOnTrip = TRUE;
threshold.notifyOnRestore = FALSE;
threshold.enabled = TRUE;
RETURN
RmsAssetParameterThresholdEnqueueEx(assetClientKey, parameterKey, threshold);
}