AMX RMS Technické informace Strana 69

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 220
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 68
Programming - Asset Management
51
RMS Enterprise - NetLinx Programmer’s Guide
Asset Registration Functions (Cont.)
RmsAssetRegister
AmxDevice
Description: This method is the used exclusively to perform asset registration for AMX hardware based devices. This method
should only be used when registering a AMX hardware based device. The RMS Client will interrogate the NetLinx device
information data structure from the NetLinx device manager and include the NetLinx device information with the asset
registration.
Arguments:
DEV device - asset physical device instance
RmsAsset asset - asset configuration to register
Returns:
1 if asset registration call was successful; 0 if asset registration call was unsuccessful
Syntax:
DEFINE_FUNCTION CHAR RmsAssetRegisterAmxDevice(DEV device, RmsAsset asset)
{
STACK_VAR CHAR rmsCommand[RMS_MAX_CMD_LEN];
// ensure RMS is ONLINE, REGISTERED, and ready for ASSET registration
IF(![vdvRMS,RMS_CHANNEL_ASSETS_REGISTER])
{
SEND_STRING 0, '>>>> RMS API ERROR <RmsAssetRegisterAmxDevice> :: RMS is not ready to accept asset
management registrations.';
RETURN FALSE;
}
// the asset client key is the DPS string
// for NetLinx-based devices
IF(asset.clientKey == '')
{
asset.clientKey = RmsDevToString(device);
}
// create asset registration send command
rmsCommand = RmsPackCmdHeader('ASSET.REGISTER.AMX.DEV');
rmsCommand = RmsPackCmdParam(rmsCommand,RmsDevToString(device));
rmsCommand = RmsPackCmdParam(rmsCommand,asset.name);
rmsCommand = RmsPackCmdParam(rmsCommand,asset.clientKey);
rmsCommand = RmsPackCmdParam
(rmsCommand,asset.assetType);
rmsCommand = RmsPackCmdParam(rmsCommand,asset.globalKey);
// add device to registration queue
SEND_COMMAND vdvRMS, rmsCommand;
// now that the asset has been created in the
// asset registration queue, finalize and submit
// the asset
RETURN RmsAssetRegistrationSubmit(asset);
}
Zobrazit stránku 68
1 2 ... 64 65 66 67 68 69 70 71 72 73 74 ... 219 220

Komentáře k této Příručce

Žádné komentáře