DSMCC
15.3.1
|
00001 /******************************************************************************* 00002 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org) 00003 * Copyright © 2004 Ocean Blue Software Ltd 00004 * Copyright © 2001 Koninklijke Philips Electronics N.V 00005 * 00006 * This file is part of a DTVKit Software Component 00007 * You are permitted to copy, modify or distribute this file subject to the terms 00008 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org 00009 * 00010 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 00011 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 00012 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 00013 * 00014 * If you or your organisation is not a member of DTVKit then you have access 00015 * to this source code outside of the terms of the licence agreement 00016 * and you are expected to delete this and any associated files immediately. 00017 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org 00018 *******************************************************************************/ 00025 #ifndef _CLDSMSYSTEM_H_ 00026 #define _CLDSMSYSTEM_H_ 00027 00028 00029 /*---includes for this file--------------------------------------------------*/ 00030 00031 #include "cldsmcc.h" 00032 #include "clDsmMemMgrAPI.h" 00033 #include "dsmDbg.h" 00034 00035 #ifdef __cplusplus 00036 extern "C" { 00037 #endif 00038 00039 00040 /*---Constant and macro definitions for public use---------------------------*/ 00041 00042 /* -- Turn off all static declarations in debug mode to enable 00043 -- glowcode profiler to detect them */ 00044 #if (!defined(NDEBUG) && defined(DSM_PROFILING_BUILD)) 00045 #define static 00046 #endif 00047 00048 /* -- Context defines */ 00049 #ifndef DSM_NO_MEM_CONTEXT 00050 #define DSM_CONTEXT_DEFN pclDsmInstData_t idp 00051 #define DSM_CONTEXT idp 00052 #define MEM_CONTEXT idp->memContext 00053 #endif 00054 00055 00056 /* -- General purpose defines */ 00057 00058 #define BIT0_MSK 0x01 00059 #define BIT1_MSK 0x02 00060 #define BIT2_MSK 0x04 00061 #define BIT3_MSK 0x08 00062 #define BIT4_MSK 0x10 00063 #define BIT5_MSK 0x20 00064 #define BIT6_MSK 0x40 00065 #define BIT7_MSK 0x80 00066 00067 #define BIT8_MSK 0x0100 00068 #define BIT9_MSK 0x0200 00069 #define BIT10_MSK 0x0400 00070 #define BIT11_MSK 0x0800 00071 #define BIT12_MSK 0x1000 00072 #define BIT13_MSK 0x2000 00073 #define BIT14_MSK 0x4000 00074 #define BIT15_MSK 0x8000 00075 00076 #define LSB1_MSK 0x01 00077 #define LSB2_MSK 0x03 00078 #define LSB3_MSK 0x07 00079 #define LSB4_MSK 0x0F 00080 #define LSB5_MSK 0x1F 00081 #define LSB6_MSK 0x3F 00082 #define LSB7_MSK 0x7F 00083 #define LSB8_MSK 0xFF 00084 00085 #define LSB9_MSK 0x01FF 00086 #define LSB10_MSK 0x03FF 00087 #define LSB11_MSK 0x07FF 00088 #define LSB12_MSK 0x0FFF 00089 #define LSB13_MSK 0x1FFF 00090 #define LSB14_MSK 0x3FFF 00091 #define LSB15_MSK 0x7FFF 00092 #define LSB16_MSK 0xFFFF 00093 00094 #define MOD2_MSK LSB1_MSK 00095 #define MOD4_MSK LSB2_MSK 00096 #define MOD8_MSK LSB3_MSK 00097 #define MOD16_MSK LSB4_MSK 00098 #define MOD32_MSK LSB5_MSK 00099 #define MOD64_MSK LSB6_MSK 00100 #define MOD128_MSK LSB7_MSK 00101 00102 00103 00104 /* -- DSMCC DEFINES */ 00105 00106 /* NB. All offsets assume that variable length fields are zero length */ 00107 00108 /* -- DSMCC section header defines */ 00109 #define DSIDII_ID 0x3B 00110 #define DDB_ID 0x3C 00111 #define STREAM_DESCR_ID 0x3D 00112 00113 #define SECTION_HDR_LEN 8 00114 #define MIN_SECTION_LEN 9 00115 #define MAX_SECTION_LEN 4093 00116 00117 #define MAX_DDB_BLOCKSIZE 4066 00118 00119 /* -- DSMCC Message Header (dsmccMessageHeader) defines */ 00120 #define DSMCC_MSG_HDR_LEN 12 00121 00122 /* -- DSI Message defines */ 00123 #define DSI_HDR_LEN 24 00124 #define MIN_SRG_INFO_LEN (IOR_HDR_LEN + \ 00125 PROFILE_TAG_BIOP_HDR_LEN + \ 00126 MIN_PROFILE_TAG_BIOP_DATA_LEN) 00127 #define MIN_DSI_MSG_BODY_LEN (DSI_HDR_LEN + \ 00128 MIN_SRG_INFO_LEN) 00129 #define MIN_DSI_MSG_LEN (DSMCC_MSG_HDR_LEN + \ 00130 MIN_DSI_MSG_BODY_LEN) 00131 00132 /* -- DII Message defines */ 00133 00134 #define MIN_DII_MSG_BODY_LEN 20 00135 #define MIN_DII_MSG_LEN (DSMCC_MSG_HDR_LEN + \ 00136 MIN_DII_MSG_BODY_LEN) 00137 00138 /* -- DDB message defines */ 00139 #define DSMCC_DOWNLOAD_HDR_LEN 12 00140 #define DDB_MSG_PAYLOAD_HDR_LEN 6 00141 #define MIN_DDB_PAYLOAD_DATA_LEN 0 00142 #define MIN_DDB_MSG_BODY_LEN (DDB_MSG_PAYLOAD_HDR_LEN + \ 00143 MIN_DDB_PAYLOAD_DATA_LEN) 00144 #define MIN_DDB_MSG_LEN (DSMCC_DOWNLOAD_HDR_LEN + \ 00145 MIN_DDB_MSG_BODY_LEN) 00146 #define MAX_DDB_BLOCKSIZE 4066 00147 00148 /* DSMCC Masks */ 00149 #define TRANSACTION_ID_UPDATED_MASK 0x00000001 00150 #define TRANSACTION_ID_IDENT_MASK 0x0000fffe 00151 #define TRANSACTION_ID_VERSION_MASK 0x3fff0000 00152 #define TRANSACTION_ID_ORIG_MASK 0xc0000000 00153 00154 /* DSM-CC Object header defines */ 00155 #define OBJECT_NUMBYTES_TO_MESSAGE_START 12 00156 #define BIOP_MAGIC 0x42494F50 00157 00158 /* DSMCC Profile Tags */ 00159 #define TAG_LITE_OPTIONS 0x49534f05 00160 #define TAG_BIOP 0x49534f06 00161 #define TAG_CONN_BINDER 0x49534f40 00162 #define TAG_SERVICE_LOCATION 0x49534f46 00163 #define TAG_OBJECT_LOCATION 0x49534f50 00164 00165 /* IOP::IOR defines */ 00166 #define IOR_HDR_LEN 12 00167 00168 /* BIOP::ProfileBody defines */ 00169 #define PROFILE_TAG_BIOP_HDR_LEN 10 00170 #define MIN_PROFILE_TAG_BIOP_DATA_LEN (MIN_OBJ_LOCATION_LEN + \ 00171 MIN_CONN_BINDER_LEN) 00172 00173 /* BIOP::ProfileBody - LiteOptionComponent defines */ 00174 #define MIN_OBJ_LOCATION_LEN 15 00175 #define MIN_OBJLOC_COMPONENT_DATA_LEN (MIN_OBJ_LOCATION_LEN - 5) 00176 #define MIN_CONN_BINDER_LEN 23 00177 #define MIN_CONBIND_COMPONENT_DATA_LEN (MIN_CONN_BINDER_LEN - 5) 00178 00179 00180 /* Tap use constants */ 00181 #define UNKNOWN_USE ((U16BIT) 0) 00182 #define MPEG_TS_UP_USE ((U16BIT) 1) /* MPEG transport upstream from Client */ 00183 #define MPEG_TS_DOWN_USE ((U16BIT) 2) /* MPEG transport downstream to Client */ 00184 #define MPEG_ES_UP_USE ((U16BIT) 3) /* MPEG elementary upstream from Client */ 00185 #define MPEG_ES_DOWN_USE ((U16BIT) 4) /* MPEG elementary downstream to Client */ 00186 #define DOWNLOAD_CTRL_USE ((U16BIT) 5) /* control request/response */ 00187 #define DOWNLOAD_CTRL_UP_USE ((U16BIT) 6) /* control request from Client */ 00188 #define DOWNLOAD_CTRL_DOWN_USE ((U16BIT) 7) /* control response to Client */ 00189 #define DOWNLOAD_DATA_USE ((U16BIT) 8) /* data request/response */ 00190 #define DOWNLOAD_DATA_UP_USE ((U16BIT) 9) /* data response upstream from Client */ 00191 #define DOWNLOAD_DATA_DOWN_USE ((U16BIT) 10) /* data block downstream to Client */ 00192 #define STR_NPT_USE ((U16BIT) 11) /* NPT Descriptors */ 00193 #define STR_STATUS_AND_EVENT_USE ((U16BIT) 12) /* Stream Mode and Event Descriptors */ 00194 #define STR_EVENT_USE ((U16BIT) 13) /* Stream Event Descriptor */ 00195 #define STR_STATUS_USE ((U16BIT) 14) /* Stream Mode Descriptor */ 00196 #define RPC_USE ((U16BIT) 15) /* RPC bi-directional */ 00197 #define IP_USE ((U16BIT) 16) /* IP bi-directional */ 00198 #define SDB_CTRL_USE ((U16BIT) 17) /* control channel for Switched Digital Broadcast */ 00199 #define T120_TAP1 ((U16BIT) 18) /* reserved for use and definition by T.120 */ 00200 #define T120_TAP2 ((U16BIT) 19) /* reserved for use and definition by T.120 */ 00201 #define T120_TAP3 ((U16BIT) 20) /* reserved for use and definition by T.120 */ 00202 #define T120_TAP4 ((U16BIT) 21) /* reserved for use and definition by T.120 */ 00203 #define BIOP_DELIVERY_PARA_USE ((U16BIT) 22) /* Module delivery parameters */ 00204 #define BIOP_OBJECT_USE ((U16BIT) 23) /* BIOP objects in Modules */ 00205 #define BIOP_ES_USE ((U16BIT) 24) /* Elementary Stream */ 00206 #define BIOP_PROGRAM_USE ((U16BIT) 25) /* Program */ 00207 #define BIOP_DNL_CTRL_USE ((U16BIT) 26) /* Download control messages */ 00208 00209 /* -- objectKind and IOR typeId strings */ 00210 #define SRG_STR 0x73726700 /* = "srg\0" */ 00211 #define DIR_STR 0x64697200 /* = "dir\0" */ 00212 #define FIL_STR 0x66696c00 /* = "fil\0" */ 00213 #define STR_STR 0x73747200 /* = "str\0" */ 00214 #define STE_STR 0x73746500 /* = "ste\0" */ 00215 00216 /* DSMCC Descriptor Tag found in DII moduleInfo and DSI groupInfo */ 00217 #define DESCRIPTOR_TYPE_TAG ((U8BIT) 1) 00218 #define DESCRIPTOR_NAME_TAG ((U8BIT) 2) 00219 #define DESCRIPTOR_INFO_TAG ((U8BIT) 3) 00220 #define DESCRIPTOR_MODULE_LINK_TAG ((U8BIT) 4) /* DII only */ 00221 #define DESCRIPTOR_CRC32_TAG ((U8BIT) 5) /* DII only */ 00222 #define DESCRIPTOR_LOCATION_TAG ((U8BIT) 6) 00223 #define DESCRIPTOR_EST_DOWNLOAD_TIME_TAG ((U8BIT) 7) 00224 #define DESCRIPTOR_GROUP_LINK_TAG ((U8BIT) 8) /* DSI only */ 00225 #define DESCRIPTOR_COMP_MODULE_TAG ((U8BIT) 9) /* DII only */ 00226 #define DESCRIPTOR_MHP_LABEL ((U8BIT) 0x70) /* DII only */ 00227 #define DESCRIPTOR_MHP_CACHING_PRIORITY ((U8BIT) 0x71) /* DII only */ 00228 00229 00230 /* -- MHEG Profile specific (generally useful) defines */ 00231 00232 /* -- Settings for UK MHEG profile 1 = 64 + 1 for null (v1.05, sections 3.11 and 8.3.3.3) */ 00233 /* -- BUT Settings for MHP = 254 + 1 for null (ETSI 101 812 (7/2000) section 14.1.4) */ 00234 #define MAX_PATH_NAME_SIZE 255 /* -- Including null terminator */ 00235 00236 /* -- NB. Smallest path element length is one char + one seperator char 00237 -- (eg. a/). Subtract one from MAX_PATH_NAME_SIZE for null 00238 -- terminator and add one to force a round up (since there may 00239 -- be no seperator char at start) */ 00240 #define MAX_DIRECTORY_DEPTH (((MAX_PATH_NAME_SIZE - 1) + 1) / 2) 00241 00242 00243 /* -- Implementation specific defines */ 00244 00245 /* -- Path seperator used for internal path represention only */ 00246 #define PATH_SEPERATOR_CHAR '/' 00247 00248 /* -- Min contiguous memory bytes at start of mem mgr block/mem area */ 00249 #define MIN_MEM_BLK_SIZE 256 00250 00251 /* -- Restricted to keep ModuleBuilder_t within MIN_MEM_BLK_SIZE 00252 -- Currently allows max broadcast (compressed) module size of 3.2MBytes */ 00253 #define MAX_BLOCKS_IN_MODULE 1600 00254 00255 /*** TODO: CHECK THIS IS SUFFICIENT IN ALL CASES ***/ 00256 #define NUM_INTERNAL_MEM_SEQ_MAX 128 00257 00258 /* -- Number of module acquisition (& decompress) attempts that will be 00259 -- made before giving up */ 00260 #define MAX_MODULE_DECOMPRESS_FAILURES 3 00261 00262 00263 /* 00264 -- Section filter defines 00265 -- 00266 -- NOTES: 00267 -- To help detect sections supplied from old (deleted) filters, make section 00268 -- filter heap bigger than max filters so memory not re-used immediately. 00269 -- 00270 */ 00271 #define SECTION_FILTER_HEAP_SLACK 16 00272 #define SECTION_FILTER_HEAP_SIZE (NUM_SECTION_FILTERS_MAX_DEFAULT + \ 00273 SECTION_FILTER_HEAP_SLACK) 00274 00275 00276 /* 00277 -- zlib heap size defines (for moduleDecompress) 00278 */ 00279 /* -- TODO: check 32K (was 16K) is always sufficient extra heap 00280 OR: pass zlib alloc funcs via core API so platform layer can decide 00281 where to get zlib memory */ 00282 /* RJH largest allocation yet seen is around 40k. Also some non-stack behaviour 00283 seen, resulting in external fragmentation. 00284 64k (32k window size + 32k extra) is probably a reasonable size for now, 00285 but REVISIT */ 00286 #define ZLIB_HEAP_NUM_BYTES (((U32BIT)1 << 15 /*MAX_WBITS*/ ) + (1024*32/*16*/)) 00287 #define ZLIB_HEAP_NUM_WORDS ((ZLIB_HEAP_NUM_BYTES + 3) >> 2) 00288 00289 00290 /* Object Carousel Linked List IDs */ 00291 #define OBJECT_CAROUSEL_LIST 0 00292 00293 #define NUM_LISTS_OBJECT_CAROUSEL 1 00294 00295 00296 /* Data Carousel Linked List IDs */ 00297 #define OC_DATA_CAROUSEL_LIST 0 00298 #define OC_DII_ACQUIRE_LIST 1 00299 00300 #define OC_LITE_OBJECT_LOAD_LIST 0 00301 #define NUM_LITE_OBJECT_LOAD_LIST 1 00302 00303 #define NUM_LISTS_DATA_CAROUSEL 2 00304 00305 00306 /* Module Linked List IDs */ 00307 #define DC_MODULE_LIST 0 00308 #define OC_MODULE_ACQUIRE_LIST 1 00309 #define MODULE_PRIORITY_LIST 2 00310 #define MODULE_LOADED_LIST 2 00311 #define MODULE_DELETE_LIST 2 00312 00313 #define NUM_LISTS_MODULE 3 00314 00315 00316 /* Object Linked List IDs */ 00317 #define CURR_OBJECT_LIST 0 00318 #define MODULE_OBJECT_LIST 1 /* -- Currently not used */ 00319 00320 #define NUM_LISTS_OBJECT 2 00321 00322 00323 /* Load Request Linked List IDs */ 00324 #define CURR_LOAD_REQUEST_LIST 0 00325 #define MODULE_LOAD_REQUEST_LIST 1 00326 00327 #define NUM_LISTS_LOAD_REQUEST 2 00328 00329 /* SI Query Linked List IDs */ 00330 #define CURR_SI_QUERY_LIST 0 00331 #define DUPLICATE_SI_QUERY_LIST 1 00332 00333 #define NUM_LISTS_SI_QUERY 2 00334 00335 /* 00336 -- General purpose debug check and action macro (disabled by NDEBUG) 00337 -- 00338 -- condn = valid condition to be checked for error (eg. err == CLDSM_OK ) 00339 -- dbgErrActn = command(s) to execute on error condition in debug builds 00340 */ 00341 00342 #ifdef NDEBUG 00343 #define DEBUG_CHK( condn, dbgActn ) 00344 #else 00345 #define DEBUG_CHK( condn, dbgActn ) if (!( condn )) { dbgActn; } 00346 #endif 00347 00348 00349 00350 /* 00351 -- Macro to provide API parameter checking that can be disabled in retail 00352 -- builds if required (via DSM_NO_API_PARAM_CHECK) 00353 -- 00354 -- API parameter checking in retail builds is enabled by default (ie. if 00355 -- DSM_NO_API_PARAM_CHECK is not defined). 00356 -- 00357 -- condn = valid condition to be checked for error (eg. err == CLDSM_OK ) 00358 -- dbgErrActn = command(s) to execute on error condition in debug builds 00359 -- relErrActn = command(s) to execute on error condition in all builds 00360 -- *** NB. dbgErrActn always executed before relErrActn *** 00361 -- 00362 */ 00363 #ifdef DSM_NO_API_PARAM_CHECK 00364 00365 /* -- API parameter checking in debug builds only */ 00366 00367 #ifdef NDEBUG 00368 00369 #define API_PARAM_CHK( condn, dbgErrActn, relErrActn ) 00370 00371 #else 00372 00373 #define API_PARAM_CHK( condn, dbgErrActn, relErrActn ) \ 00374 if (!( condn )) { dbgErrActn; } \ 00375 00376 #endif 00377 00378 #else 00379 00380 /* -- API parameter checking in all builds (default) */ 00381 00382 #define API_PARAM_CHK( condn, dbgErrActn, relErrActn ) \ 00383 if (!( condn )) { dbgErrActn; relErrActn; } \ 00384 00385 #endif 00386 00387 00388 00389 /* 00390 -- These macro definitions provide three 'priority' levels (0, 1, 2) of 00391 -- general purpose data error checking. 00392 -- The highest priority (0) is always performed and cannot be disabled, the 00393 -- lower two priorities can be optionally disabled for retail mode (at compile 00394 -- time). 00395 -- 00396 -- The lower priority levels (2 or 1 & 2) can be enabled/disabled for retail 00397 -- builds (via DSM_DATA_CHECK_LEVEL). 00398 -- 00399 -- Both lower levels (1 & 2) of checking are always enabled in debug mode 00400 -- 00401 -- The default data check level in retail builds is level 1 (ie. if 00402 -- DSM_DATA_CHECK_LEVEL is not defined). 00403 -- 00404 -- Syntax is: 00405 -- L<level>_DATA_CHK( condn, dbgErrActn, relErrActn ) 00406 -- 00407 -- <lvl> = 1 - Level 1 priority checking only 00408 -- <lvl> = 2 - Level 1 and level 2 checking 00409 -- 00410 -- condn = valid condition to be checked for error (eg. err == CLDSM_OK ) 00411 -- dbgErrActn = command(s) to execute on error condition in debug builds 00412 -- relErrActn = command(s) to execute on error condition in all builds 00413 -- *** NB. dbgErrActn always executed before relErrActn *** 00414 -- 00415 */ 00416 #if !defined(DSM_DATA_CHECK_LEVEL) 00417 #define DSM_DATA_CHECK_LEVEL 1 00418 #endif 00419 00420 00421 /* -- Level 0 data checking always performed */ 00422 00423 #define L0_DATA_CHK( condn, dbgErrActn, relErrActn ) \ 00424 if (!( condn )) { dbgErrActn; relErrActn; } \ 00425 00426 00427 #if DSM_DATA_CHECK_LEVEL >= 1 00428 00429 /* -- Level 1 data checking in all builds (default) */ 00430 00431 #define L1_DATA_CHK( condn, dbgErrActn, relErrActn ) \ 00432 if (!( condn )) { dbgErrActn; relErrActn; } \ 00433 00434 #else 00435 00436 /* -- Level 1 data checking in debug builds only */ 00437 00438 #if (defined(NDEBUG) || defined(DSM_PROFILING_BUILD)) 00439 00440 #define L1_DATA_CHK( condn, dbgErrActn, relErrActn ) 00441 00442 #else 00443 00444 #define L1_DATA_CHK( condn, dbgErrActn, relErrActn )\ 00445 if (!( condn )) { dbgErrActn; } \ 00446 00447 #endif 00448 00449 #endif 00450 00451 00452 #if DSM_DATA_CHECK_LEVEL >= 2 00453 00454 /* -- Level 2 data checking in all builds */ 00455 00456 #define L2_DATA_CHK( condn, dbgErrActn, relErrActn ) \ 00457 if (!( condn )) { dbgErrActn; relErrActn; } \ 00458 00459 #else 00460 00461 /* -- Level 2 data checking in debug builds only (default) */ 00462 00463 #if (defined(NDEBUG) || defined(DSM_PROFILING_BUILD)) 00464 00465 #define L2_DATA_CHK( condn, dbgErrActn, relErrActn ) 00466 00467 #else 00468 00469 #define L2_DATA_CHK( condn, dbgErrActn, relErrActn )\ 00470 if (!( condn )) { dbgErrActn; } \ 00471 00472 #endif 00473 00474 #endif 00475 00476 00477 00478 /* In debug only, this macro checks for error codes returned from memory API 00479 functions */ 00480 #ifndef NDEBUG 00481 #define CHECK_MEM_ERR( func ) \ 00482 { \ 00483 E_DsmMemErr memErr; \ 00484 \ 00485 memErr = func; \ 00486 if (memErr != MEM_NO_ERR) { \ 00487 dsmDP1(( "Memory error : %i \n", memErr )); \ 00488 dsmAssert(( memErr == MEM_NO_ERR )); \ 00489 } \ 00490 } 00491 00492 #else 00493 #define CHECK_MEM_ERR( x ) x 00494 #endif 00495 00496 00497 /*---Enumerations for public use---------------------------------------------*/ 00498 00499 /*---Global type defs for public use-----------------------------------------*/ 00500 00501 00502 /* General DSMCC types */ 00503 00504 typedef U8BIT ModuleVersion_t; 00505 00506 00507 /* Object Location Types */ 00508 typedef struct { 00509 U8BIT length; 00510 U8BIT data[4]; 00511 } ObjectKey_t , *pObjectKey_t; 00512 00513 00514 typedef struct { 00515 U32BIT carouselId; 00516 U16BIT moduleId; 00517 ObjectKey_t objectKey; 00518 U32BIT uiBindingTag; 00519 U8BIT dvbCarouselNSAPaddress[20]; 00520 S8BIT pathName[65];// TODO use [MAX_PATH_NAME_SIZE]; 00521 } ObjectLocation_t, *pObjectLocation_t; 00522 00523 00524 /* Tap Types */ 00525 typedef struct { 00526 /* use = BIOP_DELIVERY_PARA_USE */ 00527 U16BIT id; 00528 U16BIT associationTag; 00529 U32BIT transactionId; 00530 U32BIT timeout; 00531 } DeliveryParaTap_t, *pDeliveryParaTap_t; 00532 00533 00534 typedef struct { 00535 /* use = BIOP_OBJECT_USE */ 00536 U16BIT id; 00537 U16BIT associationTag; 00538 } ObjectTap_t, *pObjectTap_t; 00539 00540 00541 typedef struct s_LLControl *P_LLControl; 00542 typedef struct s_se_info* ps_se_info; 00543 00544 typedef struct s_ObjectCarousel *pObjectCarousel_t; 00545 typedef struct s_Module *pModule_t; 00546 00547 /* 00548 -- Structure type for DSM-CC Core Layer instance data 00549 */ 00550 00551 typedef struct _clDsmInstanceHandle_struct { 00552 00553 /* -- SETUP DATA (COPY) */ 00554 clDsmSetup_t setup; 00555 00556 /* -- Recursion depth counters for specific functions */ 00557 U32BIT pfrdoCallDepth; /* -- For preFetchRelativeDirObj() */ 00558 U32BIT pfdlfCallDepth; /* -- For preFetchDirLoadFinalise() */ 00559 U32BIT pfsdndCallDepth; /* -- For preFetchSubDirsAndNewDIIsFromLoadedDir() */ 00560 00561 /* -- Store for memory manager context (from memStart) */ 00562 void* memContext; 00563 00564 /* -- Store for current service info */ 00565 S_DvbLocator dvbLocator; 00566 BOOLEAN currentServiceSet; 00567 BOOLEAN cacheFull; 00568 00569 /* -- Store for SI query results */ 00570 BOOLEAN lastPIDResultStored; 00571 U16BIT lastServiceId; 00572 U16BIT lastAssociationTag; 00573 U16BIT lastPID; 00574 00575 /* -- Generation counter for siQuery results and sections */ 00576 U32BIT generationCount; 00577 00578 /* -- Monitor cache memory usage */ 00579 U32BIT cacheMemoryUsage; 00580 U32BIT cacheMaximumUsage; 00581 00582 /* -- Store of number of objects currently opened by clients */ 00583 /* TODO: Should be stored in OC when multi-carousel supported */ 00584 U32BIT dsmObjectsOpen; 00585 00586 /* -- Handle to section filter heap memory */ 00587 void* sectionFilterHeap; 00588 00589 /* -- zlib heap memory (for module decompress) */ 00590 /* TODO: malloc this in moduleDecompressInit ? */ 00591 U32BIT* zlibHeapPtr; 00592 U32BIT* zlibHeapTop; 00593 U32BIT zlibHeap[ ZLIB_HEAP_NUM_WORDS ]; 00594 00595 pObjectCarousel_t pCurrentCarousel; 00596 pObjectCarousel_t pBootingCarousel; 00597 00598 P_LLControl llcObjectCarousels; 00599 P_LLControl llcModulePriority; 00600 P_LLControl llcLoadedModules; 00601 P_LLControl llcExpiredModules; 00602 P_LLControl llcCurrObjects; 00603 P_LLControl llcCurrLoadRequests; 00604 P_LLControl llcCurrSiQueries; 00605 00606 ps_se_info hSubscribedEventList; 00607 00608 } clDsmInstData_t, *pclDsmInstData_t; 00609 00610 typedef struct _clDsmTimerManagement_struct { 00611 00612 void* mainTimerHandle; 00613 void* nextTimerHandle; 00614 U32BIT mainDuration; 00615 U32BIT nextDuration; 00616 00617 } clDsmTimerManagement_t, *pclDsmTimerManagement_t; 00618 00619 /*------------------------------ Exported Data -----------------------------*/ 00620 00621 00622 /*--------------------------- Exported Prototypes --------------------------*/ 00623 00624 clDsmErr_t clDsmUnloadAllObjects( clDsmInstHandle_t instance, E_DsmRstMode mode ); 00625 00626 /*----------------------------------------------------------------------------*/ 00627 00628 #ifdef __cplusplus 00629 } 00630 #endif 00631 #endif /* _CLDSMSYSTEM_H_ */