AMX RMS Información técnica Pagina 71

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 220
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 70
Programming - Asset Management
53
RMS Enterprise - NetLinx Programmer’s Guide
Asset Registration Functions (Cont.)
RmsAssetRegistration
Submit
Description: This function is used to perform the registration on a fully populated RmsAsset data object.
Note: This function is typically not accessed directly, but rather called by a another asset registration wrapper function.
Arguments:
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 RmsAssetRegistrationSubmit(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 <RmsAssetRegistrationSubmit> :: RMS is not ready to accept asset
management registrations.';
RETURN FALSE;
}
// add asset description
IF(asset.description != '')
{
rmsCommand = RmsPackCmdHeader('ASSET.DESCRIPTION');
rmsCommand = RmsPackCmdParam(rmsCommand,asset.clientKey);
rmsCommand = RmsPackCmdParam(rmsCommand,asset.description);
SEND_COMMAND vdvRMS, rmsCommand;
}
// add asset serial number
IF(asset.serialNumber != '')
{
rmsCommand = RmsPackCmdHeader('ASSET.SERIAL');
rmsCommand = RmsPackCmdParam(rmsCommand,asset.clientKey);
rmsCommand = RmsPackCmdParam(rmsCommand,asset.serialNumber
);
SEND_COMMAND vdvRMS, rmsCommand;
}
// add asset firmware version
IF(asset.firmwareVersion != '')
{
rmsCommand = RmsPackCmdHeader('ASSET.FIRMWARE');
rmsCommand = RmsPackCmdParam(rmsCommand,asset.clientKey);
rmsCommand = RmsPackCmdParam(rmsCommand,asset.firmwareVersion);
SEND_COMMAND vdvRMS, rmsCommand;
}
// add asset manufacturer information
IF(asset.manufacturerName != '')
{
rmsCommand = RmsPackCmdHeader('ASSET.MANUFACTURER');
rmsCommand = RmsPackCmdParam(rmsCommand,asset.clientKey);
rmsCommand = RmsPackCmdParam(rmsCommand,asset.manufacturerName);
rmsCommand = RmsPackCmdParam(rmsCommand,asset.manufacturerUrl);
SEND_COMMAND vdvRMS, rmsCommand;
}
// add asset manufacturer information
IF(asset.modelName != '')
{
rmsCommand = RmsPackCmdHeader('ASSET.MODEL'
);
rmsCommand = RmsPackCmdParam(rmsCommand,asset.clientKey);
rmsCommand = RmsPackCmdParam(rmsCommand,asset.modelName);
rmsCommand = RmsPackCmdParam(rmsCommand,asset.modelUrl);
SEND_COMMAND vdvRMS, rmsCommand;
}
// submit the asset registration now
rmsCommand = RmsPackCmdHeader('ASSET.SUBMIT');
rmsCommand = RmsPackCmdParam(rmsCommand,asset.clientKey);
SEND_COMMAND vdvRMS, rmsCommand;
RETURN TRUE;
}
Vista de pagina 70
1 2 ... 66 67 68 69 70 71 72 73 74 75 76 ... 219 220

Comentarios a estos manuales

Sin comentarios