The following List Attribute commands use the DmiListAttributeReq command block:
The format for the command block is: ┌──────────────────────────────────────────────────────────────────────────────┐│Table30
.DmiListAttributeReqCommandBlock │
├───────────────┬───────────────┬───────────────┬──────────────────────────────┤
│ OFFSET │ SIZE │ TYPE │ VARIABLE NAME │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 0 │ 64 │ STRUCT │ DmiMgmtCommand │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 64 │ 4 │ INT │ iComponentId │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 68 │ 4 │ INT │ iGroupId │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 72 │ 4 │ INT │ iAttributeId │
└───────────────┴───────────────┴───────────────┴──────────────────────────────┘
Variable Name
DmiListAttributeCmd
Issuing DmiListAttributeReq displays an example of how to issue the DmiListAttributeReq
command to the MI. IssuingDmiListAttributeReq
ULONG IssueListAttributes(ULONG ComponentID,ULONG GroupID, ULONG AttribID,SHORT CommandType) { DMI_ListAttributeReq_t *ListAttr; ULONG RC; ListAttr = (DMI_ListAttributeReq_t *)malloc(sizeof(DMI_ListAttributeReq_t)); memset((void *)ListAttr,0,sizeof(DMI_ListAttributeReq_t)); ListAttr->DmiMgmtCommand.iLevelCheck = DMI_LEVEL_CHECK; ListAttr->DmiMgmtCommand.iMgmtHandle = YOUR_MGMT_HANDLE; // set the app handle ListAttr->DmiMgmtCommand.iCmdHandle = YOUR_COMMAND_HANDLE; // set the command counter ListAttr->DmiMgmtCommand.iCnfBufLen = 8000UL; // set the size of the response ListAttr->DmiMgmtCommand.pCnfBuf = (void *)malloc(8000UL); // set up the response buffer ListAttr->DmiMgmtCommand.iRequestCount = 1; ListAttr->DmiMgmtCommand.iCmdLen = sizeof(DMI_ListAttributeReq_t); ListAttr->iComponentId = ComponentID; // set to the currently selected component ListAttr->iGroupId = GroupID; // set to the currenly selected group ListAttr->iAttributeId = AttribID; switch(CommandType){ // this is the type of command to issue case 1: ListAttr->DmiMgmtCommand.iCommand = DmiListFirstAttributeCmd; // set the command break; case 0: ListAttr->DmiMgmtCommand.iCommand = DmiListNextAttributeCmd; // look for next one in list break; case 10: ListAttr->DmiMgmtCommand.iCommand = DmiListAttributeCmd; // get this specific one break; } if((RC = DmiInvoke((DMI_MgmtCommand_t *)ListAttr)) != SLERR_NO_ERROR){ // call the SL and register free(ListAttr->DmiMgmtCommand.pCnfBuf); free(ListAttr); } return RC; }