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; }