Technical information
Programming - Asset Management
108
RMS Enterprise - NetLinx Programmer’s Guide
Excluding Default Asset Control Methods
If the RMS Client and SDK register an asset control method by default that you don't want exposed in your system, you can define
an exclusion by calling the following method before the asset registration takes place. The suggested place to put this exclude call
would be immediately after the vdvRMS virtual device comes online.
RmsAssetControlMethodExclude
RmsAssetControl
MethodExclude
Description: This function is used to exclude a specific asset control method from being registered to the
specified asset client key.
Arguments:
• CHAR assetClientKey[] - asset client key
• CHAR methodKey[] - control method key
Returns: 1 if call was successful; 0 if call was unsuccessful
Syntax:
DEFINE_FUNCTION CHAR RmsAssetControlMethodExclude(CHAR assetClientKey[], CHAR methodKey[])
{
STACK_VAR CHAR rmsCommand[RMS_MAX_CMD_LEN];
// ensure an asset client key has been provided
IF(assetClientKey == '')
{
SEND_STRING 0, '>>>> RMS API ERROR <RmsAssetControlMethodExclude> :: missing asset
client key';
RETURN FALSE;
}
// ensure a method key has been provided
IF(methodKey == '')
{
SEND_STRING 0, '>>>> RMS API ERROR <RmsAssetControlMethodExclude> :: missing method
key';
RETURN FALSE;
}
// submit the asset method exclusion now
rmsCommand = RmsPackCmdHeader('ASSET.METHOD.EXCLUDE');
rmsCommand = RmsPackCmdParam(rmsCommand,assetClientKey);
rmsCommand = RmsPackCmdParam(rmsCommand,methodKey);
rmsCommand = RmsPackCmdParam(rmsCommand,'true');
// force exclusion
SEND_COMMAND vdvRMS, rmsCommand;
RETURN TRUE;
}