The following List Group commands use the DmiListGroupReq command block:
All three List Group commands use the DmiListGroupReq block: ┌──────────────────────────────────────────────────────────────────────────────┐│Table27
.DmiListGroupReqCommandBlock │
├───────────────┬───────────────┬───────────────┬──────────────────────────────┤
│ OFFSET │ SIZE │ TYPE │ VARIABLE NAME │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 0 │ 64 │ STRUCT │ DmiMgmtCommand │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 64 │ 4 │ INT │ iComponentId │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ :68 │ 4 │ INT │ iGroupId │
└───────────────┴───────────────┴───────────────┴──────────────────────────────┘
Variable Name
DmiListGroupCmd
Issuing DmiListGroupReq displays an example of how to issue the DmiListGroupReq
command to the MI. IssuingDmiListGroupReq
ULONG IssueListGroup(ULONG ComponentID,ULONG GroupID,SHORT ListType)
{
DMI_ListGroupReq_t *ListGroup;
ULONG RC;
ListGroup = (DMI_ListGroupReq_t *)malloc(sizeof(DMI_ListGroupReq_t));
memset((void *)ListGroup,0,sizeof(DMI_ListGroupReq_t));
ListGroup->DmiMgmtCommand.iLevelCheck = DMI_LEVEL_CHECK;
ListGroup->DmiMgmtCommand.iMgmtHandle = YOUR_MGMT_HANDLE; // set the app handle
ListGroup->DmiMgmtCommand.iCmdHandle = YOUR_COMMAND_HANDLE; // set the command Handle
ListGroup->DmiMgmtCommand.iCnfBufLen = 8000UL; // set the size of the response buffer
ListGroup->DmiMgmtCommand.pCnfBuf = (void *)malloc(8000UL); // set up the response buffer
ListGroup->DmiMgmtCommand.iRequestCount = 1;
ListGroup->DmiMgmtCommand.iCmdLen = sizeof(DMI_ListGroupReq_t);
ListGroup->iComponentId = ComponentID; // set to the currently selected component
ListGroup->iGroupId = GroupID;
switch(ListType){
case 1:
ListComp->DmiMgmtCommand.iCommand = DmiListFirstGroupCmd; // set the command
break;
case 0:
ListComp->DmiMgmtCommand.iCommand = DmiListNextGroupCmd; // look for the next one in the list
break;
case 10:
ListComp->DmiMgmtCommand.iCommand = DmiListGroupCmd; // list just this one
break;
}
if((RC = DmiInvoke((DMI_MgmtCommand_t *)ListComp)) != SLERR_NO_ERROR){ // call the SL and register
free(ListComp->DmiMgmtCommand.pCnfBuf); // free up the confirm buffer
free(ListComp); // free the command block
}
return RC;
}