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 _CLDSMUTILS_H_ 00026 #define _CLDSMUTILS_H_ 00027 00028 00029 /*-------------------------------- Includes --------------------------------*/ 00030 00031 #include "clDsmSystem.h" 00032 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00038 00039 /*----------------------------- Exported Macros ----------------------------*/ 00040 00041 /* 00042 -- These macro definitions provide three 'priority' levels (0, 1, 2) of error 00043 -- checking on 8/16/32bit values stored in contiguous memory OR managed memory. 00044 -- The highest priority (0) is always performed and cannot be disabled, the 00045 -- lower two priorities can be optionally disabled for retail mode (at compile 00046 -- time). 00047 -- 00048 -- The lower priority levels (2 or 1 & 2) can be enabled/disabled for retail 00049 -- builds (via DSM_DATA_CHECK_LEVEL). 00050 -- 00051 -- Both lower levels (1 & 2) of checking are always enabled in debug mode 00052 -- 00053 -- Syntax is: 00054 -- <action>_UINT<sz>_L<lvl>CHK( pData, var<sz>, condn, dbgErrActn, relErrActn ) 00055 -- 00056 -- <action> = READ - Always reads value + advances read ptr 00057 -- <action> = GET - Always reads value only 00058 -- <action> = ADV - If checking level enabled (or debug mode) 00059 -- reads value + advances read ptr 00060 -- else 00061 -- advances read ptr only 00062 -- <sz> = 8, 16, 32 00063 -- <lvl> = 1 - Level 1 priority checking only 00064 -- <lvl> = 2 - Level 1 and level 2 checking 00065 -- 00066 -- var<sz> = 'temporary' variable to receive UINT<sz> 00067 -- *** NB. Must be of the correct type *** 00068 -- *** Is not used/assigned if <action> = ADV_ & checking disabled *** 00069 -- 00070 -- pData = pointer/reference to MSByte of UINT<size> in memory 00071 -- 00072 -- condn = valid condition to be checked for error (eg. var8 >= 4 ) 00073 -- 00074 -- dbgErrActn = command(s) to execute on error condition in debug builds 00075 -- relErrActn = command(s) to execute on error condition in all builds 00076 -- *** NB. dbgErrAction always executed before relErrAction *** 00077 -- 00078 */ 00079 #if !defined(DSM_DATA_CHECK_LEVEL) 00080 #define DSM_DATA_CHECK_LEVEL 1 00081 #endif 00082 00083 00084 /* -- Level 0 data checking always performed */ 00085 /* -- No advance only macros at level 0 since data always read and checked */ 00086 00087 #if (defined(NDEBUG) || defined(DSM_PROFILING_BUILD)) 00088 00089 #define READ_UINT8_L0CHK( pData, var8, condn, dbgErrActn, relErrActn ) \ 00090 READ_UINT8( pData, var8 ); \ 00091 if (!( condn )) { relErrActn; } 00092 00093 #define READ_UINT16_L0CHK( pData, var16, condn, dbgErrActn, relErrActn )\ 00094 READ_UINT16( pData, var16 ); \ 00095 if (!( condn )) { relErrActn; } 00096 00097 #define READ_UINT32_L0CHK( pData, var32, condn, dbgErrActn, relErrActn )\ 00098 READ_UINT32( pData, var32 ); \ 00099 if (!( condn )) { relErrActn; } 00100 00101 00102 #define GET_UINT8_L0CHK( pData, var8, condn, dbgErrActn, relErrActn ) \ 00103 GET_UINT8( pData, var8 ); \ 00104 if (!( condn )) { relErrActn; } 00105 00106 #define GET_UINT16_L0CHK( pData, var16, condn, dbgErrActn, relErrActn ) \ 00107 GET_UINT16( pData, var16 ); \ 00108 if (!( condn )) { relErrActn; } 00109 00110 #define GET_UINT32_L0CHK( pData, var32, condn, dbgErrActn, relErrActn ) \ 00111 GET_UINT32( pData, var32 ); \ 00112 if (!( condn )) { relErrActn; } 00113 00114 #else 00115 /* -- Debug build */ 00116 00117 #define READ_UINT8_L0CHK( pData, var8, condn, dbgErrActn, relErrActn ) \ 00118 READ_UINT8( pData, var8 ); \ 00119 if (!( condn )) { dbgErrActn; relErrActn; } 00120 00121 #define READ_UINT16_L0CHK( pData, var16, condn, dbgErrActn, relErrActn )\ 00122 READ_UINT16( pData, var16 ); \ 00123 if (!( condn )) { dbgErrActn; relErrActn; } 00124 00125 #define READ_UINT32_L0CHK( pData, var32, condn, dbgErrActn, relErrActn )\ 00126 READ_UINT32( pData, var32 ); \ 00127 if (!( condn )) { dbgErrActn; relErrActn; } 00128 00129 00130 #define GET_UINT8_L0CHK( pData, var8, condn, dbgErrActn, relErrActn ) \ 00131 GET_UINT8( pData, var8 ); \ 00132 if (!( condn )) { dbgErrActn; relErrActn; } 00133 00134 #define GET_UINT16_L0CHK( pData, var16, condn, dbgErrActn, relErrActn ) \ 00135 GET_UINT16( pData, var16 ); \ 00136 if (!( condn )) { dbgErrActn; relErrActn; } 00137 00138 #define GET_UINT32_L0CHK( pData, var32, condn, dbgErrActn, relErrActn ) \ 00139 GET_UINT32( pData, var32 ); \ 00140 if (!( condn )) { dbgErrActn; relErrActn; } 00141 00142 #endif 00143 00144 00145 /* -- Level 1 data checking is optional */ 00146 00147 #if DSM_DATA_CHECK_LEVEL >= 1 00148 00149 /* -- Level 1 data checking in all builds (default) */ 00150 00151 #if (defined(NDEBUG) || defined(DSM_PROFILING_BUILD)) 00152 00153 #define READ_UINT8_L1CHK( pData, var8, condn, dbgErrActn, relErrActn ) \ 00154 READ_UINT8( pData, var8 ); \ 00155 if (!( condn )) { relErrActn; } 00156 00157 #define READ_UINT16_L1CHK( pData, var16, condn, dbgErrActn, relErrActn )\ 00158 READ_UINT16( pData, var16 ); \ 00159 if (!( condn )) { relErrActn; } 00160 00161 #define READ_UINT32_L1CHK( pData, var32, condn, dbgErrActn, relErrActn )\ 00162 READ_UINT32( pData, var32 ); \ 00163 if (!( condn )) { relErrActn; } 00164 00165 #define ADV_UINT8_L1CHK READ_UINT8_L1CHK 00166 #define ADV_UINT16_L1CHK READ_UINT16_L1CHK 00167 #define ADV_UINT32_L1CHK READ_UINT32_L1CHK 00168 00169 #define GET_UINT8_L1CHK( pData, var8, condn, dbgErrActn, relErrActn ) \ 00170 GET_UINT8( pData, var8 ); \ 00171 if (!( condn )) { relErrActn; } 00172 00173 #define GET_UINT16_L1CHK( pData, var16, condn, dbgErrActn, relErrActn ) \ 00174 GET_UINT16( pData, var16 ); \ 00175 if (!( condn )) { relErrActn; } 00176 00177 #define GET_UINT32_L1CHK( pData, var32, condn, dbgErrActn, relErrActn ) \ 00178 GET_UINT32( pData, var32 ); \ 00179 if (!( condn )) { relErrActn; } 00180 00181 #else 00182 /* -- Debug build */ 00183 00184 #define READ_UINT8_L1CHK( pData, var8, condn, dbgErrActn, relErrActn ) \ 00185 READ_UINT8( pData, var8 ); \ 00186 if (!( condn )) { dbgErrActn; relErrActn; } 00187 00188 #define READ_UINT16_L1CHK( pData, var16, condn, dbgErrActn, relErrActn )\ 00189 READ_UINT16( pData, var16 ); \ 00190 if (!( condn )) { dbgErrActn; relErrActn; } 00191 00192 #define READ_UINT32_L1CHK( pData, var32, condn, dbgErrActn, relErrActn )\ 00193 READ_UINT32( pData, var32 ); \ 00194 if (!( condn )) { dbgErrActn; relErrActn; } 00195 00196 #define ADV_UINT8_L1CHK READ_UINT8_L1CHK 00197 #define ADV_UINT16_L1CHK READ_UINT16_L1CHK 00198 #define ADV_UINT32_L1CHK READ_UINT32_L1CHK 00199 00200 #define GET_UINT8_L1CHK( pData, var8, condn, dbgErrActn, relErrActn ) \ 00201 GET_UINT8( pData, var8 ); \ 00202 if (!( condn )) { dbgErrActn; relErrActn; } 00203 00204 #define GET_UINT16_L1CHK( pData, var16, condn, dbgErrActn, relErrActn ) \ 00205 GET_UINT16( pData, var16 ); \ 00206 if (!( condn )) { dbgErrActn; relErrActn; } 00207 00208 #define GET_UINT32_L1CHK( pData, var32, condn, dbgErrActn, relErrActn ) \ 00209 GET_UINT32( pData, var32 ); \ 00210 if (!( condn )) { dbgErrActn; relErrActn; } 00211 00212 #endif 00213 00214 #else 00215 00216 /* -- Level 1 data checking in debug builds only */ 00217 00218 #if (defined(NDEBUG) || defined(DSM_PROFILING_BUILD)) 00219 00220 #define READ_UINT8_L1CHK( pData, var8, condn, dbgErrActn, relErrActn )\ 00221 READ_UINT8( pData, var8 ) 00222 00223 #define READ_UINT16_L1CHK( pData, var16, condn, dbgErrActn, relErrActn)\ 00224 READ_UINT16( pData, var16 ) 00225 00226 #define READ_UINT32_L1CHK( pData, var32, condn, dbgErrActn, relErrActn)\ 00227 READ_UINT32( pData, var32 ) 00228 00229 #define ADV_UINT8_L1CHK( pData, var8, condn, dbgErrActn, relErrActn )\ 00230 SET_POS_REL( pData, 1 ) 00231 00232 #define ADV_UINT16_L1CHK( pData, var16, condn, dbgErrActn, relErrActn )\ 00233 SET_POS_REL( pData, 2 ) 00234 00235 #define ADV_UINT32_L1CHK( pData, var32, condn, dbgErrActn, relErrActn )\ 00236 SET_POS_REL( pData, 4 ) 00237 00238 #define GET_UINT8_L1CHK( pData, var8, condn, dbgErrActn, relErrActn )\ 00239 GET_UINT8( pData, var8 ) 00240 00241 #define GET_UINT16_L1CHK( pData, var16, condn, dbgErrActn, relErrActn)\ 00242 GET_UINT16( pData, var16 ) 00243 00244 #define GET_UINT32_L1CHK( pData, var32, condn, dbgErrActn, relErrActn)\ 00245 GET_UINT32( pData, var32 ) 00246 00247 #else 00248 /* -- Debug Build */ 00249 00250 #define READ_UINT8_L1CHK( pData, var8, condn, dbgErrActn, relErrActn )\ 00251 READ_UINT8( pData, var8 ); \ 00252 if (!( condn )) { dbgErrActn; } 00253 00254 #define READ_UINT16_L1CHK( pData, var16, condn, dbgErrActn, relErrActn)\ 00255 READ_UINT16( pData, var16 ); \ 00256 if (!( condn )) { dbgErrActn; } 00257 00258 #define READ_UINT32_L1CHK( pData, var32, condn, dbgErrActn, relErrActn)\ 00259 READ_UINT32( pData, var32 ); \ 00260 if (!( condn )) { dbgErrActn; } 00261 00262 #define ADV_UINT8_L1CHK READ_UINT8_L1CHK 00263 #define ADV_UINT16_L1CHK READ_UINT16_L1CHK 00264 #define ADV_UINT32_L1CHK READ_UINT32_L1CHK 00265 00266 #define GET_UINT8_L1CHK( pData, var8, condn, dbgErrActn, relErrActn )\ 00267 GET_UINT8( pData, var8 ); \ 00268 if (!( condn )) { dbgErrActn; } 00269 00270 #define GET_UINT16_L1CHK( pData, var16, condn, dbgErrActn, relErrActn)\ 00271 GET_UINT16( pData, var16 ); \ 00272 if (!( condn )) { dbgErrActn; } 00273 00274 #define GET_UINT32_L1CHK( pData, var32, condn, dbgErrActn, relErrActn)\ 00275 GET_UINT32( pData, var32 ); \ 00276 if (!( condn )) { dbgErrActn; } 00277 00278 #endif 00279 #endif 00280 00281 00282 /* -- Level 2 data checking is optional */ 00283 00284 #if DSM_DATA_CHECK_LEVEL >= 2 00285 00286 /* -- Level 2 data checking in all builds */ 00287 00288 #if (defined(NDEBUG) || defined(DSM_PROFILING_BUILD)) 00289 00290 #define READ_UINT8_L2CHK( pData, var8, condn, dbgErrActn, relErrActn ) \ 00291 READ_UINT8( pData, var8 ); \ 00292 if (!( condn )) { relErrActn; } 00293 00294 #define READ_UINT16_L2CHK( pData, var16, condn, dbgErrActn, relErrActn )\ 00295 READ_UINT16( pData, var16 ); \ 00296 if (!( condn )) { relErrActn; } 00297 00298 #define READ_UINT32_L2CHK( pData, var32, condn, dbgErrActn, relErrActn )\ 00299 READ_UINT32( pData, var32 ); \ 00300 if (!( condn )) { relErrActn; } 00301 00302 #define ADV_UINT8_L2CHK READ_UINT8_L2CHK 00303 #define ADV_UINT16_L2CHK READ_UINT16_L2CHK 00304 #define ADV_UINT32_L2CHK READ_UINT32_L2CHK 00305 00306 #define GET_UINT8_L2CHK( pData, var8, condn, dbgErrActn, relErrActn ) \ 00307 GET_UINT8( pData, var8 ); \ 00308 if (!( condn )) { relErrActn; } 00309 00310 #define GET_UINT16_L2CHK( pData, var16, condn, dbgErrActn, relErrActn ) \ 00311 GET_UINT16( pData, var16 ); \ 00312 if (!( condn )) { relErrActn; } 00313 00314 #define GET_UINT32_L2CHK( pData, var32, condn, dbgErrActn, relErrActn ) \ 00315 GET_UINT32( pData, var32 ); \ 00316 if (!( condn )) { relErrActn; } 00317 00318 #else 00319 /* -- Debug build */ 00320 00321 #define READ_UINT8_L2CHK( pData, var8, condn, dbgErrActn, relErrActn ) \ 00322 READ_UINT8( pData, var8 ); \ 00323 if (!( condn )) { dbgErrActn; relErrActn; } 00324 00325 #define READ_UINT16_L2CHK( pData, var16, condn, dbgErrActn, relErrActn )\ 00326 READ_UINT16( pData, var16 ); \ 00327 if (!( condn )) { dbgErrActn; relErrActn; } 00328 00329 #define READ_UINT32_L2CHK( pData, var32, condn, dbgErrActn, relErrActn )\ 00330 READ_UINT32( pData, var32 ); \ 00331 if (!( condn )) { dbgErrActn; relErrActn; } 00332 00333 #define ADV_UINT8_L2CHK READ_UINT8_L2CHK 00334 #define ADV_UINT16_L2CHK READ_UINT16_L2CHK 00335 #define ADV_UINT32_L2CHK READ_UINT32_L2CHK 00336 00337 #define GET_UINT8_L2CHK( pData, var8, condn, dbgErrActn, relErrActn ) \ 00338 GET_UINT8( pData, var8 ); \ 00339 if (!( condn )) { dbgErrActn; relErrActn; } 00340 00341 #define GET_UINT16_L2CHK( pData, var16, condn, dbgErrActn, relErrActn ) \ 00342 GET_UINT16( pData, var16 ); \ 00343 if (!( condn )) { dbgErrActn; relErrActn; } 00344 00345 #define GET_UINT32_L2CHK( pData, var32, condn, dbgErrActn, relErrActn ) \ 00346 GET_UINT32( pData, var32 ); \ 00347 if (!( condn )) { dbgErrActn; relErrActn; } 00348 00349 #endif 00350 00351 #else 00352 00353 /* -- Level 2 data checking in debug builds only (default) */ 00354 00355 #if (defined(NDEBUG) || defined(DSM_PROFILING_BUILD)) 00356 00357 #define READ_UINT8_L2CHK( pData, var8, condn, dbgErrActn, relErrActn )\ 00358 READ_UINT8( pData, var8 ) 00359 00360 #define READ_UINT16_L2CHK( pData, var16, condn, dbgErrActn, relErrActn)\ 00361 READ_UINT16( pData, var16 ) 00362 00363 #define READ_UINT32_L2CHK( pData, var32, condn, dbgErrActn, relErrActn)\ 00364 READ_UINT32( pData, var32 ) 00365 00366 #define ADV_UINT8_L2CHK( pData, var8, condn, dbgErrActn, relErrActn )\ 00367 SET_POS_REL( pData, 1 ) 00368 00369 #define ADV_UINT16_L2CHK( pData, var16, condn, dbgErrActn, relErrActn )\ 00370 SET_POS_REL( pData, 2 ) 00371 00372 #define ADV_UINT32_L2CHK( pData, var32, condn, dbgErrActn, relErrActn )\ 00373 SET_POS_REL( pData, 4 ) 00374 00375 #define GET_UINT8_L2CHK( pData, var8, condn, dbgErrActn, relErrActn )\ 00376 GET_UINT8( pData, var8 ) 00377 00378 #define GET_UINT16_L2CHK( pData, var16, condn, dbgErrActn, relErrActn)\ 00379 GET_UINT16( pData, var16 ) 00380 00381 #define GET_UINT32_L2CHK( pData, var32, condn, dbgErrActn, relErrActn)\ 00382 GET_UINT32( pData, var32 ) 00383 00384 #else 00385 00386 #define READ_UINT8_L2CHK( pData, var8, condn, dbgErrActn, relErrActn )\ 00387 READ_UINT8( pData, var8 ); \ 00388 if (!( condn )) { dbgErrActn; } 00389 00390 #define READ_UINT16_L2CHK( pData, var16, condn, dbgErrActn, relErrActn)\ 00391 READ_UINT16( pData, var16 ); \ 00392 if (!( condn )) { dbgErrActn; } 00393 00394 #define READ_UINT32_L2CHK( pData, var32, condn, dbgErrActn, relErrActn)\ 00395 READ_UINT32( pData, var32 ); \ 00396 if (!( condn )) { dbgErrActn; } 00397 00398 #define ADV_UINT8_L2CHK READ_UINT8_L2CHK 00399 #define ADV_UINT16_L2CHK READ_UINT16_L2CHK 00400 #define ADV_UINT32_L2CHK READ_UINT32_L2CHK 00401 00402 #define GET_UINT8_L2CHK( pData, var8, condn, dbgErrActn, relErrActn )\ 00403 GET_UINT8( pData, var8 ); \ 00404 if (!( condn )) { dbgErrActn; } 00405 00406 #define GET_UINT16_L2CHK( pData, var16, condn, dbgErrActn, relErrActn)\ 00407 GET_UINT16( pData, var16 ); \ 00408 if (!( condn )) { dbgErrActn; } 00409 00410 #define GET_UINT32_L2CHK( pData, var32, condn, dbgErrActn, relErrActn)\ 00411 GET_UINT32( pData, var32 ); \ 00412 if (!( condn )) { dbgErrActn; } 00413 00414 #endif 00415 #endif 00416 00417 00418 00419 00420 /* 00421 -- These macros provide standardised reading of 8/16/32bit values from 00422 -- contiguous memory (assuming Big endian data) 00423 -- 00424 -- 'GET' macros 'return' the value and do not change the data pointer 00425 -- 00426 -- 'READ' macros write the value into a parameter and increment the data 00427 -- pointer by the data length 00428 */ 00429 00430 /* 00431 -- pData type is U8BIT*, opVar type is U8BIT 00432 -- On entry - pData->MSByte 00433 -- On exit - pData->MSByte 00434 */ 00435 #define GET_UINT8_C( pData, opVar ) opVar = *(pData) 00436 00437 00438 /* 00439 -- pData type is U8BIT*, opVar type is U16BIT 00440 -- On entry - pData->MSByte 00441 -- On exit - pData->MSByte 00442 */ 00443 #define GET_UINT16_C( pData, opVar ) \ 00444 { \ 00445 U16BIT result; \ 00446 \ 00447 result = (U16BIT)*(pData); \ 00448 opVar = (U16BIT)((result << 8) | *((pData) + 1)); \ 00449 } 00450 00451 00452 /* 00453 -- pData type = U8BIT*, opVar type = U16BIT 00454 -- On entry - pData->MSByte 00455 -- On exit - pData->MSByte 00456 */ 00457 #define GET_UINT32_C( pData, opVar ) \ 00458 { \ 00459 U32BIT result; \ 00460 \ 00461 result = (U32BIT)*(pData); \ 00462 result = (U32BIT)((result << 8) | *((pData) + 1)); \ 00463 result = (U32BIT)((result << 8) | *((pData) + 2)); \ 00464 opVar = (U32BIT)((result << 8) | *((pData) + 3)); \ 00465 } 00466 00467 00468 /* 00469 -- pData type is U8BIT*, opVar type is U8BIT 00470 -- On entry - pData->MSByte 00471 -- On exit - pData += 1 00472 */ 00473 #define READ_UINT8_C( pData, opVar ) (opVar = *(pData)++) 00474 00475 00476 /* 00477 -- pData type is U8BIT*, opVar type is U16BIT 00478 -- On entry - pData->MSByte 00479 -- On exit - pData += 2 00480 */ 00481 #define READ_UINT16_C( pData, opVar ) \ 00482 { \ 00483 U16BIT result; \ 00484 \ 00485 result = (U16BIT)*(pData)++; \ 00486 opVar = (U16BIT)((result << 8) | *(pData)++); \ 00487 } 00488 00489 00490 /* 00491 -- pData type = U8BIT*, opVar type = U16BIT 00492 -- On entry - pData->MSByte 00493 -- On exit - pData += 4 00494 */ 00495 #define READ_UINT32_C( pData, opVar ) \ 00496 { \ 00497 U32BIT result; \ 00498 \ 00499 result = (U32BIT)*(pData)++; \ 00500 result = (U32BIT)((result << 8) | *(pData)++); \ 00501 result = (U32BIT)((result << 8) | *(pData)++); \ 00502 opVar = (U32BIT)((result << 8) | *(pData)++); \ 00503 } 00504 00505 00506 /* 00507 -- This macro provides standardised reading of object key values from 00508 -- contiguous memory (assuming Big endian data). 00509 -- 00510 -- Uses switch to make it fast (& avoid loop or function call overhead 00511 -- of memcpy). Currently only used in two places so code overhead 00512 -- not a problem. 00513 -- 00514 -- pData type = U8BIT*, objKey type = ObjectKey_t, valid type = BOOLEAN 00515 -- On entry - pData -> objectKeyLength field 00516 -- On exit - If valid: pData += objectKeyLength + 1 00517 -- Else: pData set back to initial position 00518 */ 00519 #define READ_OBJECT_KEY_C( pData, objKey, valid ) \ 00520 { \ 00521 U8BIT objKeyLen; \ 00522 U8BIT* pResultData = objKey.data; \ 00523 \ 00524 objKeyLen = *(pData)++; \ 00525 \ 00526 valid = TRUE; \ 00527 objKey.length = objKeyLen; \ 00528 \ 00529 switch (objKeyLen) { \ 00530 \ 00531 case 1: \ 00532 *pResultData = *(pData)++; \ 00533 break; \ 00534 \ 00535 case 2: \ 00536 *(pResultData)++ = *(pData)++; \ 00537 *pResultData = *(pData)++; \ 00538 break; \ 00539 \ 00540 case 3: \ 00541 *(pResultData)++ = *(pData)++; \ 00542 *(pResultData)++ = *(pData)++; \ 00543 *pResultData = *(pData)++; \ 00544 break; \ 00545 \ 00546 case 4: \ 00547 *(pResultData)++ = *(pData)++; \ 00548 *(pResultData)++ = *(pData)++; \ 00549 *(pResultData)++ = *(pData)++; \ 00550 *pResultData = *(pData)++; \ 00551 break; \ 00552 \ 00553 default: \ 00554 objKey.length = 0; \ 00555 pData -= 1; \ 00556 valid = FALSE; \ 00557 break; \ 00558 } \ 00559 } 00560 00561 00562 /*------------------------------ Exported Types ----------------------------*/ 00563 00564 00565 /*------------------------------ Exported Data -----------------------------*/ 00566 00567 00568 /*--------------------------- Exported Prototypes --------------------------*/ 00569 00570 00571 clDsmObjectKind_t convertObjectKindStr( U32BIT objectKindStr ); 00572 00573 clDsmErr_t handleInLoopError( pclDsmInstData_t idp, 00574 clDsmErr_t currErr, clDsmErr_t newErr ); 00575 00576 void readUInt16Seq( MemSeqRef memAreaRef, U16BIT *pUi16 ); 00577 00578 void readUInt32Seq( MemSeqRef memAreaRef, U32BIT *pUi32 ); 00579 00580 void getUInt8Seq( MemSeqRef memAreaRef, U8BIT *pUi8 ); 00581 00582 void getUInt16Seq( MemSeqRef memAreaRef, U16BIT *pUi16 ); 00583 00584 void getUInt32Seq( MemSeqRef memAreaRef, U32BIT *pUi32 ); 00585 00586 void readObjectKeySeq( MemSeqRef memAreaRef, ObjectKey_t *pObjectKey, 00587 BOOLEAN *pValid ); 00588 00589 00590 /* -- CONTIGUOUS MEMORY DATA ACCESS FUNCTIONS */ 00591 00592 #include "defMemUtilsContig.h" /* -- Default mem type for functions */ 00593 00594 U16BIT getIorInfoContig( const MemPtr mpIorData, U32BIT *pIorTypeId, 00595 ObjectLocation_t *pLocation, DeliveryParaTap_t *pTap ); 00596 00597 00598 /* -- MANAGED MEMORY DATA ACCESS FUNCTIONS */ 00599 00600 #include "defMemUtilsMgd.h" /* -- Default mem type for functions */ 00601 00602 U16BIT getIorInfoSeq( const MemPtr mpIorData, U32BIT *pIorTypeId, 00603 ObjectLocation_t *pLocation, DeliveryParaTap_t *pTap ); 00604 00605 00606 /*----------------------------------------------------------------------------*/ 00607 00608 #ifdef __cplusplus 00609 } 00610 #endif 00611 #endif /* _CLDSMUTILS_H_ */