The following Set commands use the DmiSetAttributeReq command block:
The format for the command block is: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³Table37
.DmiSetAttributeReqCommandBlock ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ OFFSET ³ SIZE ³ TYPE ³ VARIABLE NAME ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 0 ³ 64 ³ STRUCT ³ DmiMgmtCommand ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 64 ³ 4 ³ INT ³ iComponentId ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 68 ³ 20 ³ STRUCT ³ DmiSetAttributeData[] ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Variable Name
DmiSetAttributeCmd
The format for the DmiSetAttributeData block is as follows: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³Table38
.DmiSetAttributeDataBlock ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ OFFSET ³ SIZE ³ TYPE ³ VARIABLE NAME ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 0 ³ 4 ³ INT ³ iGroupId ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 4 ³ 4 ³ INT ³ iGroupKeyCount ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 8 ³ 4 ³ OFFSET ³ oGroupKeyList ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 12 ³ 4 ³ INT ³ iAttributeId ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 16 ³ 4 ³ OFFSET ³ oAttributeValue ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Variable Name
There is no data returned from this call in the confirm buffer. The value of iStatus indicates either success or failure. In the case of failure, the value of (iCnfCount + 1) corresponds to the number of the command block that caused the error.
Issuing DmiSetAttributeReq displays an example of how to issue the DmiSetAttributeReq
command to the MI. IssuingDmiSetAttributeReq
ULONG IssueSetAttribute(ULONG CompID,ULONG GroupID, ULONG AttrID,char *Value,USHORT Len) // issues a set // to the SL { DMI_SetAttributeReq_t *ListComp; DMI_GroupKeyData_t *NewKey; ULONG RC; ListComp = (DMI_SetAttributeReq_t *)malloc(4000L); // allocate a big block, in case we have keys memset((void *)ListComp,0,sizeof(DMI_SetAttributeReq_t)); ListComp->DmiMgmtCommand.iLevelCheck = DMI_LEVEL_CHECK; 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 ListComp->DmiMgmtCommand.iRequestCount = 1; ListComp->DmiMgmtCommand.iCmdLen = 4000L; e number... ListComp->iComponentId = CompID; // set to the currently selected component ListComp->DmiMgmtCommand.iCommand = DmiSetAttributeCmd; // set the command ListComp->DmiSetAttributeListí0ù.iGroupId = GroupID; ListComp->DmiSetAttributeListí0ù.iAttributeId = AttrID; ListComp->DmiSetAttributeListí0ù.oAttributeValue = sizeof(DMI_SetAttributeReq_t); memcpy((char *)((BYTE *)ListComp + sizeof(DMI_SetAttributeReq_t)),Value,Len); if(KEY_COUNT){ // there is a key list ListComp->DmiSetAttributeListí0ù.iGroupKeyCount = KEY_COUNT; NewKey = (DMI_GroupKeyData_t *)((BYTE *)ListComp + sizeof(DMI_SetAttributeReq_t) + Len); // this is // the start of the keylist ListComp->DmiSetAttributeListí0ù.oGroupKeyList = (DMI_OFFSET)((BYTE *)NewKey - (BYTE *)ListComp); // Encode the key list here... } if((RC = DmiInvoke((DMI_MgmtCommand_t *)ListComp)) != SLERR_NO_ERROR) { // call SL and register free(ListComp->DmiMgmtCommand.pCnfBuf); free(ListComp); } return RC; }