Before a management application can initiate any management activity through the DMI, the application must register with the service layer. The command block used for registration is the DmiRegisterMgmtReq block.
The format for the command block is: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
Variable Name
³ Table 21. DmiRegisterMgmtReq Command Block ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ OFFSET ³ SIZE ³ TYPE ³ VARIABLE NAME ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 0 ³ 64 ³ STRUCT ³ DmiMgmtCommand ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 64 ³ 4 ³ PTR ³ pConfirmFunc ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 68 ³ 4 ³ PTR ³ pIndicationFunc ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
DmiMgmtCommand
Variable Description
void pConfirmFunc(PTR cmd)
The variable cmd points to the command block that has completed. If pConfirmFunc() is set to zero, the management application cannot use DmiInvoke to issue management directives but can still receive indications, if pIndicationFunc() is non-zero. pIndicationFunc
void pIndicationFunc(DmiIndicate *buf)
The variable buf points to a DmiIndicate block.
Issuing DmiRegisterMgmtReq displays an example of how to issue the DmiRegisterMgmtReq
command block to the MI. IssuingDmiRegisterMgmtReq
ULONG IssueReg(void) // attempt to register with the service layer { DMI_RegisterMgmtReq_t *reg; ULONG RC; /* Register with the Service Layer. */ reg = (DMI_RegisterMgmtReq_t *)malloc(sizeof(DMI_RegisterMgmtReq_t)); memset((void *)reg,0,sizeof(DMI_RegisterMgmtReq_t)); reg->DmiMgmtCommand.iLevelCheck = DMI_LEVEL_CHECK; reg->DmiMgmtCommand.iCmdHandle = YOUR_COMMAND_HANDLE; // set the command counter reg->DmiMgmtCommand.iCnfBufLen = 4000UL; // set the size of the response reg->DmiMgmtCommand.pCnfBuf = malloc(4000); // set up the response buffer reg->DmiMgmtCommand.iRequestCount = 1; reg->DmiMgmtCommand.iCmdLen = sizeof(DMI_RegisterMgmtReq_t); reg->DmiMgmtCommand.iCommand = DmiRegisterMgmtCmd; reg->pIndicationFunc = (DMI_FUNC3_OUT) myEventHandler; reg->pConfirmFunc = (DMI_FUNC3_OUT) myCallBackFunc; if((RC = DmiInvoke((DMI_MgmtCommand_t *)reg)) != SLERR_NO_ERROR) { // call service layer and register free(reg->DmiMgmtCommand.pCnfBuf); free(reg); } return RC; }