The DmiGetAttributeCmd command requests the current values of attributes within groups by using the DmiGetAttributeReq block.
The format for the command block is: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
Variable Name
³ Table 34. DmiGetAttributeReq Command Block ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ OFFSET ³ SIZE ³ TYPE ³ VARIABLE NAME ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 0 ³ 64 ³ STRUCT ³ DmiMgmtCommand ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 64 ³ 4 ³ INT ³ iComponentId ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 68 ³ 16 ³ STRUCT ³ DmiGetAttributeData[] ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
DmiMgmtCommand
Variable Description
The format for the DmiGetAttributeData block is as follows: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³Table35
.DmiGetAttributeDataBlock ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ OFFSET ³ SIZE ³ TYPE ³ VARIABLE NAME ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 0 ³ 4 ³ INT ³ iGroupId ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 4 ³ 4 ³ INT ³ iGroupKeyCount ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 8 ³ 4 ³ OFFSET ³ oGroupKeyList ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 12 ³ 4 ³ INT ³ iAttributeId ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Variable Name
Issuing DmiGetAttributeReq displays an example of how to issue the DmiGetAttributeReq
command to the MI. IssuingDmiGetAttributeReq
ULONG IssueLoadAttribute(ULONG CompID, ULONG GroupID, ULONG AttrID) // queries the service layer for // the attribute value { DMI_GetAttributeReq_t *ListComp; DMI_GroupKeyData_t *NewKey; ULONG RC; ListComp = (DMI_GetAttributeReq_t *)malloc(4000L); // allocate a big block, in case we have keys memset((void *)ListComp,0,sizeof(DMI_GetAttributeReq_t)); ListComp->DmiMgmtCommand.iLevelCheck = DMI_LEVEL_CHECK; ListComp->DmiMgmtCommand.iCommand = DmiGetAttributeCmd; // set the command ListComp->DmiMgmtCommand.iCmdLen = 4000L; ListComp->DmiMgmtCommand.iMgmtHandle = YOUR_MGMT_HANDLE; // set the app handle ListComp->DmiMgmtCommand.iCmdHandle = YOUR_COMMAND_HANDLE; // set the command counter ListComp->DmiMgmtCommand.iCnfBufLen = 4000UL; // set the size of the response ListComp->DmiMgmtCommand.pCnfBuf = (void *)malloc(4000UL); // set up the response buffer memset(ListComp->DmiMgmtCommand.pCnfBuf,0,4000UL); // clean out this thing ListComp->DmiMgmtCommand.iRequestCount = 1; ListComp->iComponentId = CompID; // set to the currently selected component ListComp->DmiGetAttributeListí0ù.iGroupId = GroupID; ListComp->DmiGetAttributeListí0ù.iAttributeId = AttrID; if(KEY_COUNT){ // there is a key list ListComp->DmiGetAttributeListí0ù.iGroupKeyCount = KEY_COUNT; NewKey = (DMI_GroupKeyData_t *)((BYTE *)ListComp + sizeof(DMI_GetAttributeReq_t)); // this is the // start of the keylist ListComp->DmiGetAttributeListí0ù.oGroupKeyList = (DMI_OFFSET)((DMI_OFFSET)NewKey - (DMI_OFFSET)ListComp); // Encode the key list here } if((RC = DmiInvoke((DMI_MgmtCommand_t *)ListComp)) != SLERR_NO_ERROR){ // call the SL and register free(ListComp->DmiMgmtCommand.pCnfBuf); // free up the response buffer free(ListComp); // free the command block } return RC; }