Technical information

Programming - Asset Management
54
RMS Enterprise - NetLinx Programmer’s Guide
Registering Asset Parameters
The following callback method will be invoked in each asset monitoring module when it is time to register asset parameters with
RMS:
(***********************************************************)
(* Name: RegisterAssetParameters *)
(* Args: -none- *)
(* *)
(* Desc: This is a callback method that is invoked by *)
(* RMS to notify this module that it is time to *)
(* register this asset's parameters to be monitored *)
(* by RMS. *)
(* *)
(* This method should not be invoked/called *)
(* by any user implementation code. *)
(***********************************************************)
DEFINE_FUNCTION RegisterAssetParameters()
{
}
The RmsApi Include File (which is already included by each asset monitoring module) provides the following wrapper functions
for registering asset parameters with RMS:
RmsAssetParameterEnqueueEnumeration (see page 57)
RmsAssetParameterEnqueueDecimal (see page 57)
RmsAssetParameterEnqueueDecimalWithBargraph (see page 58)
RmsAssetParameterEnqueueLevel (see page 59)
RmsAssetParameterEnqueueNumber (see page 59)
RmsAssetParameterEnqueueNumberWithBargraph (see page 60)
RmsAssetParameterEnqueueString (see page 61)
RmsAssetParameterEnqueueBoolean (see page 61)
RmsAssetParameterEnqueue (see page 62)
RmsAssetParameterSubmit (see page 64)
RmsAssetParameterDelete (see page 64)
Asset Registration Functions (Cont.)
RmsAssetExclude Description: This function is used to define an exclusion an any asset attempting to register using the provided asset client
key string identifier.
Arguments:
CHAR assetClientKey[] - asset key to exclude
Returns:
1 if call was successful; 0 if call was unsuccessful
Syntax:
DEFINE_FUNCTION CHAR RmsAssetExclude(CHAR assetClientKey[])
{
STACK_VAR CHAR rmsCommand[RMS_MAX_CMD_LEN];
// ensure an asset client key has been provided
IF(assetClientKey == '')
{
SEND_STRING 0, '>>>> RMS API ERROR <RmsAssetExclude> :: missing asset client key';
RETURN FALSE;
}
// submit the asset exclusion now
rmsCommand = RmsPackCmdHeader('ASSET.EXCLUDE');
rmsCommand = RmsPackCmdParam(rmsCommand,assetClientKey);
rmsCommand = RmsPackCmdParam(rmsCommand,'true'); // force exclusion
SEND_COMMAND vdvRMS, rmsCommand;
RETURN TRUE;
}