Technical information

The RMS Enterprise SDK (v4)
27
RMS Enterprise - NetLinx Programmer’s Guide
See the Tracking Source Usage section on page 112 for more information.
RmsSourceUsage.axi - Wrapper Functions (Cont,)
RmsSourceUsage
AssignAssetMutExcl
Description: This function is used to assign a RMS asset to be monitored as a mutually exclusive source. This method
should be called on startup to assign each source based asset to an index for source usage monitoring.
Mutually exclusive source usage tracking only allows a single sources asset to be active at any given time. When using
mutually exclusive source tracking, you the implementation programmer are only responsible for 'Activating' the newly
selected source. The RMS source usage tracking module will automatically 'Deactivate' all other currently activated mutually
exclusive sources.
Note: If you combine both mutually exclusive and non-mutually exclusive source usage registrations, then be aware that
you cannot reuse index number. Each source usage asset but be assigned exclusively to a single index number.
Arguments:
index - source index position for source device
sourceDevice - device to use as a source device
Syntax:
DEFINE_FUNCTION RmsSourceUsageAssignAssetMutExcl(INTEGER index, DEV sourceDevice)
{
STACK_VAR CHAR commandString[RMS_MAX_CMD_LEN];
commandString = RmsPackCmdHeader('SOURCE.ASSIGN');
commandString = RmsPackCmdParam(commandString,ITOA(index));
commandString = RmsPackCmdParam(commandString,RmsDevToString(sourceDevice));
commandString = RmsPackCmdParam(commandString,ITOA(TRUE)); // set mutually exclusive flag
SEND_COMMAND vdvRMSSourceUsage, commandString;
}
RmsSourceUsage
ActivateSource
Description: This function is used to 'Activate' a source by it's index number. This function will activate either a mutually
exclusive or non-mutually exclusive tracked source asset.
Arguments:
sourceIndex - index of source to be activated
Syntax:
DEFINE_FUNCTION RmsSourceUsageActivateSource(INTEGER index)
{
STACK_VAR CHAR commandString[RMS_MAX_CMD_LEN];
commandString = RmsPackCmdHeader('SOURCE.ACTIVATE');
commandString = RmsPackCmdParam(commandString,ITOA(index));
SEND_COMMAND vdvRMSSourceUsage, commandString;
}
RmsSourceUsage
DeactivateSource
Description: This function is used to 'Deactivate' a source by it's index number. This function will deactivate either a
mutually exclusive or non-mutually exclusive tracked source asset.
Arguments:
sourceIndex - index of source to be deactivated
Syntax:
DEFINE_FUNCTION RmsSourceUsageDeactivateSource(INTEGER index)
{
STACK_VAR CHAR commandString[RMS_MAX_CMD_LEN];
commandString = RmsPackCmdHeader('SOURCE.DEACTIVATE');
IF(index > 0)
{
commandString = RmsPackCmdParam(commandString,ITOA(index));
}
SEND_COMMAND vdvRMSSourceUsage, commandString;
}
RmsSourceUsage
DeactivateAllSources
Description: This function is used to 'Deactivate' all currently active source assets. This function deactivates all mutually
exclusive and non-mutually exclusive tracked source assets.
Arguments: none
Syntax:
DEFINE_FUNCTION RmsSourceUsageDeactivateAllSources()
{
SEND_COMMAND vdvRMSSourceUsage, 'SOURCE.DEACTIVATE';
}