49 MemPtr mpModuleInfoDesc;
52 MemPos currPos, endPos;
54 U8BIT descriptorLength;
59 dsmAssert(( mpModuleInfoDescStart != NULL ));
60 dsmAssert(( pModuleInfo != NULL ));
64 MEMPTR_OPEN( mpModuleInfoDescStart, mpModuleInfoDesc );
67 READ_UINT16( mpModuleInfoDesc, pModuleInfo->moduleId );
71 READ_UINT32_L0CHK( mpModuleInfoDesc, pModuleInfo->moduleSize,
72 pModuleInfo->moduleSize != 0,
73 dsmDP2((
"DATA ERROR: Module size = %u\n", pModuleInfo->moduleSize)),
78 pModuleInfo->blkRcvd = 0;
82 READ_UINT8( mpModuleInfoDesc, pModuleInfo->version );
85 SET_POS_REL( mpModuleInfoDesc, 1 );
90 READ_UINT32( mpModuleInfoDesc, pModuleInfo->profileInfo.moduleTimeout );
93 READ_UINT32( mpModuleInfoDesc, pModuleInfo->profileInfo.blockTimeout );
96 READ_UINT32( mpModuleInfoDesc, pModuleInfo->profileInfo.minBlockTime );
100 READ_UINT8_L1CHK( mpModuleInfoDesc, tapsCount, tapsCount >= 1,
101 dsmDP2((
"DATA ERROR: Module info tapsCount (< 1) = %u\n", ui8)),
102 goto _return_False );
109 READ_UINT16( mpModuleInfoDesc, pModuleInfo->profileInfo.tap.id );
113 READ_UINT16_L0CHK( mpModuleInfoDesc, ui16, ui16 == BIOP_OBJECT_USE,
114 dsmDP2((
"DATA ERROR: Module info 1st tapUse (!= BIOP_OBJECT_USE) = %u\n", ui16)),
115 goto _return_False );
118 READ_UINT16( mpModuleInfoDesc, pModuleInfo->profileInfo.tap.associationTag );
121 ADV_UINT8_L2CHK( mpModuleInfoDesc, ui8, ui8 == 0x00,
122 dsmDP2((
"DATA ERROR: Module info tap selectorLength (!= 0) = %u\n", ui8)),
123 goto _return_False );
126 while (--tapsCount > 0) {
129 SET_POS_REL( mpModuleInfoDesc, 6 );
132 READ_UINT8( mpModuleInfoDesc, ui8 );
135 SET_POS_REL( mpModuleInfoDesc, (S32BIT)ui8 );
142 READ_UINT8( mpModuleInfoDesc, userInfoLength );
145 pModuleInfo->profileInfo.compressed = FALSE;
146 pModuleInfo->profileInfo.originalSize = pModuleInfo->moduleSize;
148 if (userInfoLength > 0) {
153 GET_POS( mpModuleInfoDesc, currPos );
154 endPos = currPos + userInfoLength;
156 while (currPos < endPos) {
161 READ_UINT8( mpModuleInfoDesc, descriptorTag );
164 READ_UINT8( mpModuleInfoDesc, descriptorLength );
166 switch (descriptorTag )
168 case DESCRIPTOR_COMP_MODULE_TAG:
173 ADV_UINT8_L1CHK( mpModuleInfoDesc, ui8, (ui8 & 0x0f) == 0x08,
174 dsmDP2((
"DATA ERROR: Module info compressionMethod (!= 0x08) = %u\n", ui8)),
175 goto _return_False );
178 pModuleInfo->profileInfo.compressed = TRUE;
181 READ_UINT32( mpModuleInfoDesc,
182 pModuleInfo->profileInfo.originalSize );
187 case DESCRIPTOR_MHP_CACHING_PRIORITY:
189 READ_UINT32( mpModuleInfoDesc, pModuleInfo->priority );
190 READ_UINT32( mpModuleInfoDesc, pModuleInfo->transparency );
194 dsmDP2((
"INFO: Module - Unknown descriptor tag: %x\n", descriptorTag));
196 SET_POS_REL( mpModuleInfoDesc, (S32BIT)descriptorLength );
200 GET_POS( mpModuleInfoDesc, currPos );
214 MEMPTR_CLOSE( mpModuleInfoDesc );
215 DEBUG_CHK( valid == TRUE,
216 dsmDP1((
"ERROR: getpModuleInfo failure (invalid)\n")) );