DmiRegisterCiInd

The DmiRegisterCiInd block can be used as follows:

The format for the command block is: ┌──────────────────────────────────────────────────────────────────────────────┐│Table44 .DmiRegisterCiIndCommandBlock │
├───────────────┬───────────────┬───────────────┬──────────────────────────────┤
│ OFFSET │ SIZE │ TYPE │ VARIABLE NAME │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 0 │ 64 │ STRUCT │ DmiMgmtCommand │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 68 │ 4 │ INT │ iComponentId │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 72 │ 4 │ PTR │ pAccessFunc │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 76 │ 4 │ PTR │ pCancelFunc │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 80 │ 4 │ INT │ iAccessListCount │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 84 │ 8 │ STRUCT │ DmiAccessData[ ] │
└───────────────┴───────────────┴───────────────┴──────────────────────────────┘

Variable Name

DmiMgmtCommand iComponentId pAccessFunc pCancelFunc iAccessListCount DmiAccessData[ ]

The format of the DmiAccessData block is: ┌──────────────────────────────────────────────────────────────────────────────┐│Table45 .DmiAccessDataCommandBlock │
├───────────────┬───────────────┬───────────────┬──────────────────────────────┤
│ OFFSET │ SIZE │ TYPE │ VARIABLE NAME │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 0 │ 4 │ INT │ iGroupId │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 4 │ 4 │ INT │ iAttributeId │
└───────────────┴───────────────┴───────────────┴──────────────────────────────┘

Variable Name

iGroupId iAttributeId

Issuing DmiRegisterCiInd displays an example of how to issue the DmiRegisterCiInd command to the CI. IssuingDmiRegisterCiInd

ULONG RegisterCI(ULONG ComponentID)
{
ULONG Size,x;
DMI_RegisterCiInd_t    *ciRegister;
ULONG RC = SLERR_OUT_OF_MEMORY;
DMI_MgmtCommand_t      *dmiCommand;
DMI_AccessData_t       *accessList;


   Size = (ULONG) (sizeof(DMI_RegisterCiInd_t) + (3 * sizeof(DMI_AccessData_t)));   // get size of block
   ciRegister = malloc(Size);
   if(ciRegister != (DMI_RegisterCiInd_t *)NULL){
       memset(ciRegister,0,Size);   // clear out the whole thing first
       dmiCommand = &(ciRegister->DmiMgmtCommand);
       dmiCommand->iLevelCheck = DMI_LEVEL_CHECK;
       dmiCommand->iCommand = DmiRegisterCiCmd;
       dmiCommand->iCmdLen = Size;
       dmiCommand->iCnfBufLen = 4000UL;
       dmiCommand->pCnfBuf = malloc(4000UL);

       ciRegister->iComponentId = ComponentID;          // assign the ID from install time
       ciRegister->pAccessFunc = DmiCiInvoke;           // invoke entry point into component code
       ciRegister->pCancelFunc = DmiCiCancel;           // Cancel entry point into component code
       ciRegister->iAccessListCount = 4;                // this example has four attributes in one group
       accessList = &(ciRegister->DmiAccessListφ0∙);
       for(x = 1;x != 5;x++){
           accessList->iGroupId = 2;                    // assign the group ID from the MIF
           accessList->iAttributeId = x;                // assign the attribute DI from the MIF
           accessList++;
       }
       RC = DmiInvoke((DMI_MgmtCommand_t *)ciRegister);
       free(ciRegister);
    }
    return RC;
}


[Back: DmiCiUninstallData]
[Next: DmiRegisterCnf]