Technical information
Programming - Advanced Topics
112
RMS Enterprise - NetLinx Programmer’s Guide
// CALLBACK METHOD FOR RMS CLIENT EXCEPTION EVENT NOTIFICATIONS
DEFINE_FUNCTION RmsEventException (CHAR exceptionMessage [],
CHAR commandHeader [])
{
// IMPLEMENT CUSTOM EXCEPTION HANDLING HERE
}
Asset Power / Energy Consumption
RMS Enterprise will automatically assume power consumption rates (Watts) based on the asset type an asset is defined with and
based on the power state of the device.
When the asset power is ON, the RMS server will apply the RUNTIME power rate (Watts) assigned to either the asset
model if configured, or asset type.
When the asset power is OFF, the RMS server will apply the STANDBY power rate (Watts) assigned to the asset model
or asset type.
This default automatic handling of asset power consumption (Watts) by the RMS server can be overridden if the asset registers a
parameter of type "POWER_CONSUMPTION". If the server detects this asset parameter registered to the asset by the RMS client,
then it will suspend all automatic handling of asset power consumption on behalf of this asset.
Registering an asset parameter of type "POWER_CONSUMPTION" means that the NetLinx programmer will be fully responsible
for providing the power consumption value (in Watts) to RMS as they change. This is necessary if the device can provide
information on its power consumption or if you have some power monitoring equipment that can monitor power consumption on
behalf of this asset.
If you wish to implement your own custom asset power consumption parameter for monitoring asset power, please review the
NetLinx source code in the RmsDuetLightSystemMonitor and RmsPowerDistributionUnitMonitor modules for concrete examples
on how to implement targeted asset power consumption rates for assets.
Tracking Source Usage
The RMS SDK includes a RmsSourceUsageMonitor module and a RmsSourceUsage Include File to provide source device usage
tracking in the RMS system.
Please review the RMS Source Usage Monitor Module & Include File section on page 24 for more information on source usage
tracking with the new RMS source usage monitoring module.
Enabling support for source usage tracking in your program is as simple as referencing the RmsSourceUsage.axi Include File and
defining a virtual device to represent the source usage module. This is illustrated in the code below:
// Define your source usage virtual device under the
// DEFINE_DEVICE section in your program
vdvRMSSourceUsage = 33002:1:0
// Include the RMS Source Usage wrapper functions and module
#INCLUDE 'RmsSourceUsage';
After you've declared that your program will be using Source Usage, the next step is to assign the devices that you'll be tracking to
a unique index. Each device is required to have a unique index.
For example:
// Assign Mutually Exclusive Devices
RmsSourceUsageAssignAssetMutExcl(1, dvDSS);
RmsSourceUsageAssignAssetMutExcl(2, dvDVR);
RmsSourceUsageAssignAssetMutExcl(3, dvDiscDevice);
RmsSourceUsageAssignAssetMutExcl(4, dvDocCamera);
// Assign Mutually Exclusive Virtual Devices
RmsSourceUsageAssignAssetMutExcl(5, vdvAuxInput);
RmsSourceUsageAssignAssetMutExcl(6, vdvLaptop);
If using the AMX NXA-PDU-1508-08 power management unit to monitor asset power
on behalf of other assets on the RMS client, then this asset parameter
implementation work has already been done inside the
RmsPowerDistributionUnitMonitor module.