changeset 1:864b8cc0cf63

src/gpf2: preened GPF goo from TCS211
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 23:38:58 +0000 (2016-09-25)
parents 945cf7f506b2
children c41a534f33c6
files src/gpf2/ccd/bitfun.h src/gpf2/ccd/ccd.h src/gpf2/ccd/ccd_base.mk src/gpf2/ccd/ccd_err.h src/gpf2/ccd/ccd_globs.h src/gpf2/ccd/ccd_inc.mk src/gpf2/ccd/ccd_lnt.mk src/gpf2/ccd/ccddata.h src/gpf2/ccd/ccddata.mk src/gpf2/ccd/ccddata_dep.mk src/gpf2/ccd/ccddata_exp.mk src/gpf2/ccd/ccddata_tap_priv.h src/gpf2/ccd/ccddata_version.h src/gpf2/ccd/ccdedit.mk src/gpf2/ccd/ccdtable.h src/gpf2/ccd/makefile src/gpf2/ccd/mall src/gpf2/ccd/mall.bat src/gpf2/frame/cust_os/cust_os.h src/gpf2/frame/cust_os/makefile src/gpf2/frame/frame.def src/gpf2/frame/frame.h src/gpf2/frame/frame_ps.def src/gpf2/frame/mall.bat src/gpf2/frame/nuc/os_defs.h src/gpf2/frame/prf_func.c src/gpf2/frame/route.h src/gpf2/inc/CDG_ENTER.h src/gpf2/inc/CDG_LEAVE.h src/gpf2/inc/Ccdedit.h src/gpf2/inc/alert.h src/gpf2/inc/ccd_codingtypes.h src/gpf2/inc/ccdapi.h src/gpf2/inc/dar_func.h src/gpf2/inc/dio.h src/gpf2/inc/dmi.h src/gpf2/inc/drvconf.h src/gpf2/inc/esf_func.h src/gpf2/inc/extdspl.h src/gpf2/inc/frm_defs.h src/gpf2/inc/frm_ext.h src/gpf2/inc/frm_glob.h src/gpf2/inc/frm_types.h src/gpf2/inc/gdi.h src/gpf2/inc/glob_defs.h src/gpf2/inc/gsi.h src/gpf2/inc/header.h src/gpf2/inc/ind2str.h src/gpf2/inc/ipcapi.h src/gpf2/inc/nuc/arm7/nucleus.h src/gpf2/inc/nuc/cs_defs.h src/gpf2/inc/nuc/dm_defs.h src/gpf2/inc/nuc/ev_defs.h src/gpf2/inc/nuc/mb_defs.h src/gpf2/inc/nuc/os_const.h src/gpf2/inc/nuc/os_glob.h src/gpf2/inc/nuc/os_types.h src/gpf2/inc/nuc/pi_defs.h src/gpf2/inc/nuc/pm_defs.h src/gpf2/inc/nuc/qu_defs.h src/gpf2/inc/nuc/sm_defs.h src/gpf2/inc/nuc/tc_defs.h src/gpf2/inc/nuc/tm_defs.h src/gpf2/inc/os.h src/gpf2/inc/p_frame.h src/gpf2/inc/p_mem.h src/gpf2/inc/pco_const.h src/gpf2/inc/pco_inifile.h src/gpf2/inc/pco_pdi.h src/gpf2/inc/pco_util.h src/gpf2/inc/pco_view_core.h src/gpf2/inc/pco_view_framesupp.h src/gpf2/inc/pco_view_templ.h src/gpf2/inc/pcon.h src/gpf2/inc/pdi.h src/gpf2/inc/pei.h src/gpf2/inc/prf_func.h src/gpf2/inc/printtofile.h src/gpf2/inc/pub_L1_misc_enter.h src/gpf2/inc/pub_L1_misc_leave.h src/gpf2/inc/remu.h src/gpf2/inc/stddefs.h src/gpf2/inc/tap.h src/gpf2/inc/tdc.h src/gpf2/inc/tdc_base.h src/gpf2/inc/tdc_msg.h src/gpf2/inc/tdc_prim.h src/gpf2/inc/tok.h src/gpf2/inc/tools.h src/gpf2/inc/tst_mux.h src/gpf2/inc/tstheader.h src/gpf2/inc/typedefs.h src/gpf2/inc/vsi.h
diffstat 93 files changed, 22077 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/bitfun.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,68 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   : bitfun.h
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Condat Coder Decoder
+|             Prototypes of the elementary bit manipulation functions
++----------------------------------------------------------------------------- 
+*/ 
+
+
+#ifndef __BITFUN
+#define __BITFUN
+
+
+#ifndef __BITFUN_C__
+
+EXTERN void   bf_writePadBits      (T_CCD_Globs *globs);
+EXTERN void   bf_writeVal          (ULONG value, ULONG bSize, T_CCD_Globs *globs);
+EXTERN ULONG  bf_getBits           (ULONG  len, T_CCD_Globs *globs);
+EXTERN void   bf_writeBitStr_PER   (USHORT len, T_CCD_Globs *globs);
+EXTERN void   bf_readBitStr_PER    (USHORT len, T_CCD_Globs *globs);
+EXTERN void   bf_writeBits         (ULONG  len, T_CCD_Globs *globs);
+EXTERN void   bf_readBits          (ULONG  len, T_CCD_Globs *globs);
+EXTERN void   bf_writeBitChunk     (ULONG  len, T_CCD_Globs *globs);
+EXTERN void   bf_readBitChunk      (ULONG  len, T_CCD_Globs *globs);
+EXTERN BOOL   bf_readBit           (T_CCD_Globs *globs);
+EXTERN void   bf_writeBit          (BOOL Bit, T_CCD_Globs *globs);
+EXTERN UBYTE  bf_decodeByteNumber  (const ULONG len, T_CCD_Globs *globs);
+EXTERN ULONG  bf_decodeShortNumber (const ULONG len, T_CCD_Globs *globs);
+EXTERN ULONG  bf_decodeLongNumber  (UBYTE len, T_CCD_Globs *globs);
+EXTERN void   bf_codeShortNumber   (UBYTE len, USHORT val, T_CCD_Globs *globs);
+EXTERN void   bf_codeByteNumber    (UBYTE len, UBYTE val, T_CCD_Globs *globs);
+EXTERN void   bf_codeLongNumber    (UBYTE len, ULONG val, T_CCD_Globs *globs);
+EXTERN void   bf_recodeShortNumber (USHORT pos, UBYTE len, USHORT val, T_CCD_Globs *globs);
+EXTERN void   bf_recodeByteNumber  (USHORT pos, UBYTE len, UBYTE  val, T_CCD_Globs *globs);
+EXTERN void   bf_recodeBit         (USHORT pos, UBYTE Bit, T_CCD_Globs *globs);
+EXTERN void   bf_rShift8Bit        (USHORT srcBitPos, USHORT bitLen, T_CCD_Globs *globs);
+
+#endif /* __BITFUN_C__ */
+
+/* a Macro for incrementing the position in the bitbuffer         */
+/* _bitpos, _bytepos and _byteoffs are recalculated               */
+
+#define bf_incBitpos(A, globs) globs->bitpos = (USHORT)(globs->bitpos+(A));\
+                        globs->bytepos = (USHORT)(globs->bitpos >> 3);\
+                        globs->byteoffs = (UBYTE)(globs->bitpos & 7)
+#define bf_setBitpos(A, globs) globs->bitpos = (USHORT)(A);\
+                        globs->bytepos = (USHORT)(globs->bitpos >> 3);\
+                        globs->byteoffs = (UBYTE)(globs->bitpos & 7)
+
+/*
+ * end of bitstream if we can not read almost 4 bits
+ */
+#define bf_endOfBitstream(globs) (globs->bitpos >= globs->maxBitpos)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccd.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,413 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   : ccd.h
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Condat Coder Decoder
+|             Global function prototypes
++----------------------------------------------------------------------------- 
+*/ 
+
+
+#ifndef CCD_H
+#define CCD_H
+
+/* Start addresses of ccddata tables */
+#ifndef CCD_C
+extern const T_CCD_VarTabEntry*   mvar;
+extern const T_CCD_SpareTabEntry* spare;
+extern const T_CCD_CalcTabEntry*  calc;
+extern const T_CCD_CompTabEntry*  mcomp;
+extern const T_CCD_ElemTabEntry*  melem;
+extern const T_CCD_CalcIndex*     calcidx;
+extern const T_CCD_ValTabEntry*   mval;
+#endif /* !CCD_C */
+
+/*
+ * Chain of error information.
+ */
+typedef struct ccd_error_list
+{
+  T_CCD_ERR_ENTRY entry;
+  struct ccd_error_list *next;
+} T_CCD_ERR_LIST;
+
+/*
+ * Head of the error information chain.
+ */
+typedef struct ccd_err_list_head
+{
+  T_CCD_ERR_LIST *first_error;
+  T_CCD_ERR_LIST **act_error;
+  int            num_errors;
+} T_CCD_ERR_LIST_HEAD;
+
+typedef struct ccd_store_list
+{
+  ULONG store[3];
+  /* for future use to extend register capacity  */
+  /* T_CCD_STORE_LIST *next; */
+} T_CCD_STORE_LIST;
+
+/*
+ * CCD list of all tasks
+ */
+typedef struct ccd_task_table
+{
+  T_CCD_Globs* ccd_globs;
+  U8* decmsgbuf;
+  T_CCD_ERR_LIST_HEAD* ccd_err_list;
+  T_CCD_STORE_LIST* ccd_store;
+} T_CCD_TASK_TABLE;
+
+/*
+ * Macros for forcing n-byte aligned addresses to byte arrays
+ */
+#ifndef BUFFER_ALIGNMENT
+  #define BUFFER_ALIGNMENT 3
+#endif
+
+#define ALIGN_BUF(uabuf) (UBYTE*) ((((U32)uabuf) + BUFFER_ALIGNMENT) & \
+                                   (~BUFFER_ALIGNMENT))
+
+/*
+ * Error behaviour to use with ccd_setError()
+ */
+#ifdef BREAK
+#undef BREAK
+#endif
+
+#define BREAK                0
+#define CONTINUE             1
+
+#define END_OF_COMPOSITION   0x7e
+
+/*
+ * Functions defined in ccd.c
+ */
+EXTERN BOOL   ccd_conditionOK       (const ULONG  e_ref,
+                                     T_CCD_Globs *globs);
+
+EXTERN BOOL   ccd_calculateRep      (const ULONG  e_ref,
+                                     ULONG       *repeat,
+                                     ULONG       *max_repeat,
+                                     T_CCD_Globs *globs);
+
+EXTERN void   ccd_performOperations (ULONG        num_of_ops,
+                                     ULONG        op_def_ref,
+                                     T_CCD_Globs *globs);
+
+EXTERN void   ccd_encodeComposition (const ULONG  c_ref,
+                                     T_CCD_Globs *globs);
+
+EXTERN void   ccd_decodeComposition (const ULONG  c_ref,
+                                     T_CCD_Globs *globs);
+extern int    ccd_check_pointer     (U8* ptr);
+
+/* from ccd_err.c */
+extern void   ccd_setError          (T_CCD_Globs *globs,
+                                     UBYTE      ErrCode,
+                                     UBYTE      Action,
+                                     USHORT     first_par, ...);
+extern void   ccd_recordFault       (T_CCD_Globs *globs,
+                                     UBYTE      ErrCode,
+                                     UBYTE      Action,
+                                     T_ERR_INFO error_info,
+                                     U8        *err_IEaddr);
+extern void   ccd_err_reset         (T_CCD_ERR_LIST_HEAD* eentry);
+extern void   ccd_err_free          (T_CCD_ERR_LIST_HEAD* eentry);
+extern int    ccd_err_init          (T_CCD_ERR_LIST_HEAD** eentry);
+extern void   ccd_err_exit          (void);
+extern T_CCD_Globs* ccd_GetGlobVars (T_CCD_ERR_LIST_HEAD** eentry, 
+                                     T_CCD_STORE_LIST** stoentry);
+extern void ccd_FreeGlobVars        (T_CCD_Globs* globs);
+extern void ccd_common_decode_init  (U16 l_buf,
+                                     U16 o_buf,
+                                     U8 *buf,
+                                     T_CCD_Globs *globs);
+extern void ccd_dump_msg            (U16 l_buf,
+                                     U16 o_buf,
+                                     U8 *buf,
+                                     T_CCD_Globs *globs);
+/* from ccd_store.c */
+extern void ccd_store_exit          (void);
+extern UBYTE ccd_writeStore         (T_CCD_Globs *globs, ULONG regNo, ULONG value);
+extern UBYTE ccd_getStore           (T_CCD_Globs *globs, ULONG regNo, ULONG *value);
+extern int   ccd_store_init         (T_CCD_STORE_LIST** stoentry);
+
+/* from ccd_patch.c */
+extern int ccd_patch (T_CCD_Globs* globs, int validflag);
+                                     /*
+ *
+ * Functions defined in cdc_std.c
+ */
+/*
+ * STANDARD codecs
+ */
+EXTERN SHORT  cdc_std_decode        (const ULONG  c_ref,
+                                     const ULONG  e_ref,
+                                     T_CCD_Globs *globs);
+
+EXTERN SHORT  cdc_std_encode        (const ULONG  c_ref,
+                                     const ULONG  e_ref,
+                                     T_CCD_Globs *globs);
+
+EXTERN void   cdc_decodeElemvalue   (ULONG        e_ref,
+                                     ULONG       *repeat, 
+                                     T_CCD_Globs *globs);
+
+EXTERN void   cdc_encodeElemvalue   (ULONG        e_ref,
+                                     ULONG        repeat, 
+                                     T_CCD_Globs *globs);
+
+#ifdef DEBUG_CCD
+EXTERN void   TRACE_CCD             (T_CCD_Globs  *globs,
+                                     char         *format, ...);
+#endif
+
+
+typedef struct
+{
+  BOOL gotTag;
+  BOOL gotLen; 
+} T_TLV_SORT;
+
+/* 
+ * Functions defined in cdc_com.c
+ */
+EXTERN void   cdc_BCD_decode        (const ULONG e_ref, 
+                                     UBYTE       startDigit, 
+                                     T_CCD_Globs *globs);
+
+EXTERN void   cdc_BCD_encode        (const ULONG e_ref, 
+                                     UBYTE       startDigit, 
+                                     T_CCD_Globs *globs);
+                                     
+EXTERN SHORT  cdc_tlv_decode        (const ULONG  c_ref,
+                                     const ULONG  e_ref,
+                                     const T_TLV_SORT  *tlv_inf,
+                                     T_CCD_Globs *globs);
+
+EXTERN void   cdc_tlv_encode        (const ULONG  e_ref,
+                                     UBYTE        lenT,
+                                     UBYTE        lenL, 
+                                     T_CCD_Globs *globs);
+
+EXTERN void   cdc_GSM_start         (T_CCD_Globs *globs);
+
+EXTERN U16    cdc_isPresent         (const ULONG  e_ref,
+                                     T_CCD_Globs *globs);
+
+EXTERN BOOL   is_pointer_type       (const ULONG  e_ref);
+EXTERN BOOL   is_variable_type      (const ULONG  e_ref);
+
+EXTERN SHORT  PER_CommonBegin       (const ULONG  e_ref,
+                                     ULONG       *maxRep, 
+                                     T_CCD_Globs *globs);
+
+EXTERN U8     *PER_allocmem         (const ULONG  e_ref,
+                                     ULONG        repeat,
+                                     T_CCD_Globs *globs);
+
+EXTERN USHORT PER_allocmem_and_update (const ULONG  e_ref,
+                                       ULONG        repeat, 
+                                       T_CCD_Globs *globs);
+
+/* 
+ * Rest of the CCD coding functions e.g. GSM4_TLV, CSN1_S1 
+ */
+
+/* 
+ * Functions used for standard IEs of GSM
+ */
+EXTERN SHORT cdc_gsm1v_decode   (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm1v_encode   (const ULONG c_Ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm1tv_decode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm1tv_encode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm2t_decode   (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm2t_encode   (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm3v_decode   (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm3v_encode   (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm3tv_decode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm3tv_encode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm4lv_decode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm4lv_encode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm4tlv_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm4tlv_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm5v_decode   (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm5v_encode   (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm5tv_decode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm5tv_encode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm5tlv_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm5tlv_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm6tlv_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm6tlv_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm7lv_decode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm7lv_encode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+
+/* 
+ * Functions used for BCD digits 
+ */
+EXTERN SHORT cdc_bcdodd_decode     (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_bcdodd_encode     (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_bcdeven_decode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_bcdeven_encode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_bcd_nofill_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_bcd_nofill_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_bcd_mnc_decode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_bcd_mnc_encode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+
+/* 
+ * Functions used for ASN1 BER
+ */
+EXTERN SHORT cdc_gsm1asn_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_gsm1asn_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+
+/* 
+ * Functions used for rest octets
+ */
+EXTERN const UBYTE padding_bits[];
+EXTERN const UBYTE padding_bits_prev[];
+#define GET_HL(bit)     (padding_bits[globs->bitpos%8] ^ bit)
+#define GET_HL_PREV(bit) (padding_bits_prev[globs->bitpos%8] ^ bit)
+EXTERN SHORT cdc_csn1_s1_decode      (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_s1_encode      (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_s0_decode      (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_s0_encode      (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_shl_decode     (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_shl_encode     (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_padd_decode         (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_padd_encode         (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_padd_0_decode       (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_padd_0_encode       (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_hl_flag_decode      (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_hl_flag_encode      (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_concat_decode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_concat_encode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_break_cond_decode   (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_break_cond_encode   (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_choice1_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_choice1_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_choice2_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_choice2_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_shl_opt_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_shl_opt_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_s1_opt_decode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_s1_opt_encode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_s0_opt_decode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_csn1_s0_opt_encode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+
+/* 
+ * Functions used for fax and data
+ */
+EXTERN SHORT cdc_t30_ident_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_t30_ident_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+                                 
+/* 
+ * Functions and types used for decoding frequency lists, fdd_cell_information 
+ * and tdd_cell_information
+ */
+#if defined CCD_TEST
+#include <stdlib.h>
+#define  MALLOC(P,S) P = (void*)malloc(S)
+#define  MFREE(P)    free(P)
+#endif
+
+typedef struct
+{
+  U8 length;
+  U8 count;
+} T_W_PARAM;
+
+EXTERN const T_W_PARAM param_1024[];
+EXTERN const T_W_PARAM param_512[];
+
+#define BITOFFSET_LIST          1024
+#define T_LIST_MAX_SIZE 128 /* 1024/8 = 128 */
+
+typedef struct
+{
+  U8 channels [T_LIST_MAX_SIZE];
+} T_LIST;
+
+#define FDD_CI_LIST     1
+#define TDD_CI_LIST     2
+#define FREQUENCY_LIST  3
+EXTERN U8 ByteBitMask[];
+EXTERN long for_modulo (long a, long b);
+EXTERN void cdc_decode_param       (const T_W_PARAM *param,short *w, U16 ListLength, T_CCD_Globs *globs);
+EXTERN void cdc_decode_frequencies (short original_range, short *w, short offset, U8 callerID, T_CCD_Globs *globs);
+EXTERN SHORT cdc_freq_list_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_freq_list_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_fdd_ci_decode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_fdd_ci_encode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_tdd_ci_decode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_tdd_ci_encode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+
+/* 
+ * Functions used for ASN1 PER
+ */
+EXTERN void  PER_Decode_ASN1_CHOICE_alterative (const ULONG e_ref, T_ENUM UnionTag, T_CCD_Globs *globs);
+EXTERN void  PER_Encode_ASN1_CHOICE_alterative (const ULONG e_ref, T_ENUM UnionTag, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_choice_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_choice_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_integ_encode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_integ_decode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_octet_encode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_octet_decode  (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_seq_decode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_seq_encode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_bitstring_decode   (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_bitstring_encode   (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+
+/* 
+ * Functions used for ASN1 PER extensible
+ */
+EXTERN const UBYTE bitSize[];
+EXTERN U32   Read_NormallySmallNonNegativeWholeNr (T_CCD_Globs *globs);
+EXTERN void  Write_NormallySmallNonNegativeWholeNr (U32 Value, T_CCD_Globs *globs);
+EXTERN U32   Read_OpenTpye_Length (T_CCD_Globs *globs);
+EXTERN void  Write_OpenTpye_Length (U32 Value, T_CCD_Globs *globs);
+
+EXTERN SHORT cdc_asn1_choice_ext_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_choice_ext_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+
+EXTERN void  Read_unique_Integer (const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_integ_ext_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_integ_ext_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+
+EXTERN void  Read_SEQ_BitMap  (const ULONG first_elem, const ULONG last_elem, T_CCD_Globs *globs);
+EXTERN void  Write_SEQ_BitMap (const ULONG first_elem, const ULONG last_elem, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_seq_ext_decode   (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_seq_ext_encode   (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+                                       
+EXTERN SHORT cdc_asn1_obj_id_decode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_obj_id_encode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+
+EXTERN SHORT cdc_asn1_open_type_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_asn1_open_type_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+/* 
+ * Extra functions
+ */
+EXTERN SHORT cdc_no_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_no_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+
+/* 
+ * Functions used for umts message extensions
+ */
+EXTERN SHORT cdc_noncritical_ext_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_noncritical_ext_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_critical_ext_decode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+EXTERN SHORT cdc_critical_ext_encode    (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs);
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccd_base.mk	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,374 @@
+#----------------------------------------------------------------------------- 
+#  Project :  
+#  Modul   :  ccd_base.mk
+#----------------------------------------------------------------------------- 
+#  Copyright 2002 Texas Instruments Berlin, AG 
+#                 All rights reserved. 
+# 
+#                 This file is confidential and a trade secret of Texas 
+#                 Instruments Berlin, AG 
+#                 The receipt of or possession of this file does not convey 
+#                 any rights to reproduce or disclose its contents or to 
+#                 manufacture, use, or sell anything it may describe, in 
+#                 whole, or in part, without the specific written consent of 
+#                 Texas Instruments Berlin, AG. 
+#----------------------------------------------------------------------------- 
+#  Purpose : Basic definitions for building ccddata.
+#----------------------------------------------------------------------------- 
+ifdef PROJECT
+  PROST=$(PROJECT)
+endif
+ifndef PROJECT
+  PROJECT=$(PROST)
+endif
+
+GPF:=$(subst \,/,$(GPF))
+TESTROOT:=$(subst \,/,$(TESTROOT))
+
+CP=cp
+RM=rm -f
+
+GPFINCDIR=$(GPF)/inc
+GPFLIBDIR=$(GPF)/LIB/$(TARGET)$(DEBUGDIR)
+GPFBINDIR=$(GPF)/BIN$(DEBUGDIR)
+GPFPRJDIR=$(GPF)/PROJECT/$(PROJECT)/lib/$(TARGET)
+
+VPATH=$(OBJDIR)
+
+CCDDIR=.
+
+# toolset
+ifdef TOOL_CHOICE
+TSDIR:=/ts$(TOOL_CHOICE)
+else
+TSDIR:=
+endif
+
+ifdef PATH_CC_1_22E 
+ Path:=$(PATH_CC_1_22E);$(Path)
+ C_DIR:=$(PATH_CC_1_22E)
+endif
+
+ifeq ($(TOOL_CHOICE), 3)
+ CFLAGS= --align_structs=4 -pden -q -o 
+ ifndef PATH_CC_2_54 
+   PATH_CC_2_54=C:/Dvpt_tools/Codegen/TMS4701x_2.54
+ endif
+ Path:=$(PATH_CC_2_54)/bin;$(Path)
+ INCLUDES += -I"$(PATH_CC_2_54)/include"
+endif
+
+ifeq ($(TOOL_CHOICE), 5)
+ CFLAGS= --align_structs=4 -pden -q -o
+ ifndef PATH_CC_2_55 
+   PATH_CC_2_55=C:\Dvpt_tools\Codegen\TMS4701x_2.55
+ endif
+ Path:=$(PATH_CC_2_55)/bin;$(Path)
+ INCLUDES += -I"$(PATH_CC_2_55)/include"
+endif
+
+ifeq ($(TOOL_CHOICE), 6)
+  # --code_state=16 => -mt
+  # --endian=little => -me
+  CFLAGS= -mv=5e --abi=ti_arm9_abi
+  CFLAGS+= -pden -pdv -mf -ms -qq -disable_branch_chaining -pi
+  CFLAGS+= -O=2
+  ifndef PATH_CC_4_11 
+    PATH_CC_4_11=C:\Dvpt_tools\Codegen\TMS4701x_4.11
+  endif
+  Path:=$(PATH_CC_4_11)/bin;$(Path)
+  INCLUDES += -I"$(PATH_CC_4_11)/include"
+endif
+
+# Suffixes for the name of the output file  - e.g. ccd_cdg_tr_po_db.lib
+ifeq ($(TRACE), 1)
+   trTail :=_tr
+   DEFINES+=-DDEBUG_CCD
+else 
+   trTail:=
+endif
+
+ifeq ($(TARGET), arm7)
+   tTail :=_na
+else
+   ifeq ($(TARGET), nucwin)
+      tTail :=_nw
+   else
+      ifeq ($(TARGET), win32)
+         tTail := _wn
+      else
+        ifeq ($(TARGET), psos)
+           tTail :=_po
+        endif
+      endif
+   endif   
+endif
+
+DEBUGDIR=
+ifeq ($(DEBUG), 1)
+   ifeq ($(TARGET),win32)
+     DEBUGDIR=/debug
+   endif
+   dbTail :=_db
+else 
+   dbTail:=
+endif
+
+OBJDIR=obj/ccddata/$(PROST)/$(TARGET)$(TSDIR)$(DEBUGDIR)
+
+ifeq ($(TARGET), linuxpc)
+  OSENV=sus
+endif
+
+ifeq ($(TARGET), rtlpc)
+  OSENV=sus
+  RTL_VERSION=2.0
+  RTL_DIR=/opt/rtldk-$(RTL_VERSION)/rtlinuxpro
+  include $(RTL_DIR)/rtl.mk
+endif
+
+ifeq ($(TARGET), linuxarm)
+  OSENV=sus
+endif
+
+ifeq ($(TARGET), solsparc)
+  OSENV=sus
+endif
+
+ifeq ($(OSENV), sus)
+  MKDIR = mkdir
+else
+  MKDIR = $(GPF)/tools/bin/mkdir
+  SHELL=$(GPF)/tools/bin/sh.exe
+endif
+
+# sus environments
+ifeq ($(OSENV), sus)
+  INCLUDES+=-I. -I$(GPFINCDIR) -I$(CCDDIR)
+  DEFINES+=$(PROSTCFLAGS) -DNEW_ENTITY -DNEW_FRAME -DCCDDATA_STATIC_DATA
+  ifeq ($(CDEMSTR), 0)
+    DEFINES += -DCCDDATA_NO_CDEMSTR
+  endif
+  ifeq ($(CCDENT), 0)
+    DEFINES += -DCCDDATA_NO_CCDENT
+  endif
+  ifeq ($(CCDALIAS), 0)
+    DEFINES += -DCCDDATA_NO_ALIAS
+  endif
+  ifeq ($(CCDDATA_U32), 1)
+    DEFINES += -DCCDDATA_U32
+  endif
+   ifeq ($(TARGET), rtlpc)
+     COPTSNF = $(CFLAGS)
+     MKLIB= $(AR) ruv $@
+     DEFINES += -D_RT_LINUX_
+   else
+     ifeq ($(TARGET), linuxarm)
+       CC=arm-linux-gcc
+       MKLIB= arm-linux-ar ruv $@
+       RANLIB= arm-linux-ranlib
+       DEFINES += -DGSP_TARGET
+     else
+       ifeq ($(TARGET), solsparc)
+         CC=gcc
+         MKLIB= ar ruv $@
+         RANLIB= ranlib
+       else
+         CC=gcc
+         MKLIB= ar ruv $@
+         RANLIB= ranlib
+       endif
+     endif
+   endif
+  CFLAGS+=-c $(DEFINES) $(INCLUDES) -o $(OBJDIR)/$@
+  # Debug
+  ifeq ($(DEBUG), 1)
+    CFLAGS += -g
+  endif
+endif
+
+# win32
+ifeq ($(TARGET),win32)
+  CC=cl
+  INCLUDES+=-I"." -I"$(GPFINCDIR)" -I"$(CCDDIR)"
+  DEFINES+=$(PROSTCFLAGS) -DWIN32 -DNEW_ENTITY -DNEW_FRAME -D_TOOLS_
+  ifeq ($(CDEMSTR), 0)
+    DEFINES += -DCCDDATA_NO_CDEMSTR
+  endif
+  ifeq ($(CCDENT), 0)
+    DEFINES += -DCCDDATA_NO_CCDENT
+  endif
+  ifeq ($(CCDALIAS), 0)
+    DEFINES += -DCCDDATA_NO_ALIAS
+  endif
+  ifeq ($(CCDDATA_U32), 1)
+    DEFINES += -DCCDDATA_U32
+  endif
+
+  CFLAGS=/nologo /c /W3 /Zp1 $(DEFINES) $(INCLUDES) /Fo$(OBJDIR)/
+  LINK=link.exe
+  MKLIB=lib.exe
+  # Debug
+  ifeq ($(DEBUG), 1)
+    CFLAGS += /Fr$(OBJDIR)/ /MDd /Zi /Fd$(OBJDIR)/
+    LDFLAGS_DLL += /DEBUG /incremental:no /pdb:none
+  else
+    CFLAGS += /MD
+  endif
+
+endif
+
+# nucwin
+ifeq ($(TARGET),nucwin)
+  CC=cl
+  INCLUDES+=-I"." -I"$(GPFINCDIR)" -I"$(CCDDIR)"
+  DEFINES+=$(PROSTCFLAGS) -DWIN32 -DNEW_ENTITY -DNEW_FRAME -DCCDDATA_STATIC_DATA
+  ifeq ($(CDEMSTR), 0)
+    DEFINES += -DCCDDATA_NO_CDEMSTR
+  endif
+  ifeq ($(CCDENT), 0)
+    DEFINES += -DCCDDATA_NO_CCDENT
+  endif
+  ifeq ($(CCDALIAS), 0)
+    DEFINES += -DCCDDATA_NO_ALIAS
+  endif
+  ifeq ($(CCDDATA_U32), 1)
+    DEFINES += -DCCDDATA_U32
+  endif
+  CFLAGS=/nologo /c /W3 /Zp1 $(DEFINES) $(INCLUDES) /Fo$(OBJDIR)/
+  MKLIB=lib.exe
+  LDFLAGS+=/nologo $(PROSTLDFLAGS)
+  # Debug
+  ifeq ($(DEBUG), 1)
+  CFLAGS += /Fr$(OBJDIR)/ /MTd /Zi /Fd$(OBJDIR)/
+  else
+  CFLAGS += /MT
+  endif
+endif # target == nucwin
+
+# arm7
+ifeq ($(TARGET), arm7)
+   CC=cl470
+   CFLAGS+=-me -mt
+   ifeq ($(TOOL_CHOICE), )
+    CFLAGS+= -mw -x -pw2 -o -q
+   endif
+   ifeq ($(DEBUG), 1)
+     ifeq ($(TOOL_CHOICE), )
+        CFLAGS += -g
+      else
+        CFLAGS += -gt
+      endif
+      CFLAGS += -mn
+   endif
+   CFLAGS+=-fr $(OBJDIR) -c 
+   DEFINES+=-d_TMS470 -dNEW_FRAME -dNEW_ENTITY -dCCDDATA_STATIC_DATA
+   ifeq ($(CDEMSTR), 0)
+     DEFINES += -dCCDDATA_NO_CDEMSTR
+   endif
+   ifeq ($(CCDENT), 0)
+     DEFINES += -dCCDDATA_NO_CCDENT
+   endif
+   ifeq ($(CCDALIAS), 0)
+     DEFINES += -dCCDDATA_NO_ALIAS
+   endif
+   ifeq ($(CCDDATA_U32), 1)
+     DEFINES += -dCCDDATA_U32
+   endif
+   INCLUDES+=-I"." -I"$(GPFINCDIR)" -I"$(CCDDIR)"
+   CFLAGS+=$(DEFINES) $(INCLUDES)
+   MKLIB=ar470
+endif # target == arm7
+
+ifeq ($(TARGET), arm9)
+
+   CC=cl470
+   CFLAGS+=-me -mt -o
+   ifeq ($(DEBUG), 1)
+     ifeq ($(TOOL_CHOICE), 6)
+       CFLAGS += --symdebug:coff
+     else
+       # toolsets 3 and 5
+       CFLAGS += -gt
+     endif
+     CFLAGS += -mn 
+   endif
+
+   CFLAGS+=-fr $(OBJDIR) -c 
+   DEFINES+=-d_TMS470 -dNEW_FRAME -dNEW_ENTITY -dCCDDATA_STATIC_DATA
+   DEFINES += -dCCDDATA_U32
+   ifeq ($(CDEMSTR), 0)
+     DEFINES += -dCCDDATA_NO_CDEMSTR
+   endif
+   ifeq ($(CCDENT), 0)
+     DEFINES += -dCCDDATA_NO_CCDENT
+   endif
+   ifeq ($(CCDALIAS), 0)
+     DEFINES += -dCCDDATA_NO_ALIAS
+   endif
+   INCLUDES+=-I"." -I"$(GPFINCDIR)" -I"$(CCDDIR)"
+   CFLAGS+=$(DEFINES) $(INCLUDES)
+   MKLIB=ar470
+endif # target == arm9
+
+# arm_b16
+ifeq ($(TARGET), arm_b16)
+   CC=armcc
+   CFLAGS+=-Epl -Wx -O0
+   ifeq ($(DEBUG), 1)
+     CFLAGS+=-g
+   endif
+   CFLAGS+=-o $(OBJDIR)/$@ -c
+   DEFINES+=-D_TMS470 -DNEW_FRAME -DNEW_ENTITY -DCCDDATA_STATIC_DATA
+   INCLUDES+=-I"." -I"$(GPFINCDIR)" -I"$(CCDDIR)"
+   CFLAGS+=$(DEFINES) $(INCLUDES)
+   MKLIB=armar
+endif # target == arm_b16
+
+# arm_b32
+ifeq ($(TARGET), arm_b32)
+   CC=armcc
+   CFLAGS+=-Epl -Wx -O0
+   ifeq ($(DEBUG), 1)
+     CFLAGS+=-g
+   endif
+   CFLAGS+=-o $(OBJDIR)/$@ -c
+   DEFINES+=-D_TMS470 -DNEW_FRAME -DNEW_ENTITY -DCCDDATA_STATIC_DATA
+   INCLUDES+=-I"." -I"$(GPFINCDIR)" -I"$(CCDDIR)"
+   CFLAGS+=$(DEFINES) $(INCLUDES)
+   MKLIB=armar
+endif # target == arm_b32
+
+# psos
+ifeq ($(TARGET), psos)
+   CC=cc386
+   COPTS_FILE:=c.opt
+   -include $(PSS_BSP)/bsp.mk# board support settings e.g. MODEL, FPU
+   ifeq ( FPU,H )
+      FPUOPT = -VNDP
+   else 
+      FPUOPT=
+   endif
+   _CFLAGS+=-c -VANSI -VLONGNAME -VSTRICT -VSPROTO -VROM -VBSS -V$(MODEL)
+   _CFLAGS+=$(FPUOPT) -VNOSIGNEDCHAR
+   ifeq ($(DEBUG), 1)
+      _CFLAGS+=-VXDB
+   endif
+   DEFINES+=-DMODEL=$(MODEL) -DPSOS=1 -DNEW_FRAME -DNEW_ENTITY
+   DEFINES+=-DCCDDATA_STATIC_DATA
+   ifeq ($(CDEMSTR), 0)
+     DEFINES += -DCCDDATA_NO_CDEMSTR
+   endif
+   ifeq ($(CCDENT), 0)
+     DEFINES += -DCCDDATA_NO_CCDENT
+   endif
+   ifeq ($(CCDALIAS), 0)
+     DEFINES += -DCCDDATA_NO_ALIAS
+   endif
+   ifeq ($(CCDDATA_U32), 1)
+     DEFINES += -DCCDDATA_U32
+   endif
+   INCLUDES+=-I. -I$(PSS_ROOT)/include -I$(PSS_BSP) -I$(PSS_ROOT)/bsps/devices
+   CFLAGS=@c.opt -o $(OBJDIR)/$@
+   MKLIB=lib386
+endif # target == psos
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccd_err.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,83 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   : ccd_err.h
++----------------------------------------------------------------------------- 
+|  Copyright 2004 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Condat Coder Decoder
+|             Definition of CCD Error table
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef __CCD_ERR_H
+#define __CCD_ERR_H
+
+#include "ccdapi.h"
+
+#define ERR_TXT_LEN 30
+#if defined (DEBUG_CCD)
+
+/*
+ * CCD Error table
+ */
+
+char* ccdErrCodeTable[] = 
+{
+  "ERR_NO_MORE_ERROR",
+  "ERR_INVALID_CALC",
+  "ERR_PATTERN_MISMATCH",
+  "ERR_COMPREH_REQUIRED",
+  "ERR_IE_NOT_EXPECTED",
+  "ERR_IE_SEQUENCE",
+  "ERR_MAX_IE_EXCEED",
+  "ERR_MAND_ELEM_MISS",
+  "ERR_EOC_TAG_MISSING",
+  "ERR_INVALID_MID",
+  "ERR_INVALID_TYPE",
+  "ERR_MAX_REPEAT",
+  "ERR_NO_MEM",
+  "ERR_ADDRESS_INFOMATION_PART",
+  "ERR_DISTRIBUTION_PART",
+  "ERR_NON_DISTRIBUTION_PART",
+  "ERR_MESSAGE_ESCAPE",
+  "ERR_IGNORE",
+  "ERR_DUMMY",
+  "ERR_DUMMY",
+  "ERR_INTERNAL_ERROR",
+  "ERR_DEFECT_CCDDATA",
+  "ERR_END_OF_BUF",
+  "ERR_INT_VALUE",
+  "ERR_LONG_MSG",
+  "ERR_ASN1_ENCODING",
+  "ERR_ASN1_MAND_IE",
+  "ERR_ASN1_OPT_IE",
+  "ERR_ASN1_COND_IE",
+  "ERR_COND_ELEM_MISS",
+  "ERR_BUFFER_OF",
+  "ERR_NONCRITICAL_EXT",
+  "ERR_CRITICAL_EXT",
+  "ERR_INVALID_CCDID",
+  "ERR_MSG_LEN",
+  "ERR_INVALID_PTR",
+  "ERR_PROTOCOL_EXTENSION",
+  "ERR_BITSTR_COMP",
+  "ERR_ELEM_LEN",
+  "ERR_LEN_MISMATCH",
+  "ERR_CONCAT_LEN",
+  "ERR_UNEXPECT_PAD",
+  "ERR_CSN1_CHOICE",
+  "MAX_CCD_ERROR"
+};
+#endif /* DEBUG_CCD */
+ 
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccd_globs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,187 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   : ccd_globs.h
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Condat Coder Decoder
+|             Definition of C struct containing ccd internal global variables
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef __CCD_GLOBS_H
+#define __CCD_GLOBS_H
+
+#include <setjmp.h>
+#include "ccdtable.h"
+/*
+ * Constants needed for ccd_globs.h
+ */
+#include "ccdapi.h"
+
+#if !defined (CCDDATA_DYN) && !defined (CCD_TEST)
+#include "vsi.h"
+#endif
+
+/*
+ * stack size for the UPN calculator
+ */
+#define MAX_UPN_STACK_SIZE 20
+#define MAX_KEEP_REG_SIZE  15
+
+/*
+ * the two constants give the size of the iei table
+ */
+#define MAX_IE_PER_MSG         40
+#define MAX_RECURSIONS_PER_MSG 8
+
+#ifdef CCD_GPRS_ONLY
+#define CCD_ERR_STK_SZ (MAX_RECURSIONS_PER_MSG+2)
+#else
+#define CCD_ERR_STK_SZ 50 
+#endif
+
+/*
+ * constants and types needed for error handling
+ */
+#define MAX_ERRORS 10 
+
+#define ENCODE_FUN   0
+#define DECODE_FUN   1
+
+/*
+ * declare a table for the iei processing. This table
+ * contains for each iei a low and high boundary of
+ * valid repeats and the actual number of repeats
+ */
+typedef struct
+{
+  unsigned   valid:4;
+  unsigned   multiple:2;
+  unsigned   exhausted:2; /* for GSM1_ASN elements */
+/*  BOOL   choice;   version does not use GSM1_ASNCHC */
+/*  UBYTE  min_amount; seams to be an unused variable */
+  UBYTE  max_amount;
+  UBYTE  act_amount;
+  UBYTE  ident;
+} T_IEI_TABLE;
+
+
+/*
+ * for each msg an initialisation of e.g. the iei_table is to
+ * perform. See cdc_GSM_start();
+ */
+
+typedef struct
+{
+  unsigned      valid:4;
+  unsigned      EOCPending:4; /* for ASN1-BER elements only */
+  UBYTE         countSkipped; /* for GSM1_ASN elements */
+  USHORT        melemStart;
+  USHORT        melemLast;
+  USHORT        ieTableLen;
+  T_IEI_TABLE   iei_table[MAX_IE_PER_MSG];
+} T_IEI_CONTEXT;
+
+
+
+typedef struct
+{
+#if defined (CCDDATA_DYN) || defined (CCD_TEST)
+  int me;
+#else
+  T_HANDLE me;        /* entity calling CCD */
+#endif
+  SHORT   CCD_Error;  /* return variable overwritten by ccd_setError */
+
+  /*
+   * variable used for processing of nested information elements
+   */
+  UBYTE   ccd_recurs_level;
+
+  /*
+   * ccd uses setjmp() and longjmp to process some error cases.
+   */
+  BOOL    jmp_mark_set;
+  jmp_buf jmp_mark;
+
+#ifdef DYNAMIC_ARRAYS
+  /*
+   * Pointer to head of allocation chain for primitives with pointer types.
+   */
+  U8     *alloc_head;
+#endif
+
+  /*
+   * variables used for bit buffering and manipulation of a message
+   */
+  UBYTE  *bitbuf;
+  UBYTE  *pstruct;
+  ULONG   pstructOffs;
+  USHORT  bitpos;
+  USHORT  bytepos;
+  USHORT  buflen;
+  USHORT  bitoffs;
+  USHORT  lastbytepos16;
+  USHORT  lastbytepos32;
+  USHORT  maxBitpos;
+  UBYTE   byteoffs;
+  /*
+   * variables used by the UPN caculator 
+   */
+  UBYTE   SP;
+  ULONG   Stack[MAX_UPN_STACK_SIZE];
+  ULONG   KeepReg[MAX_KEEP_REG_SIZE];
+  BOOL    StackOvfl;
+
+  /* 
+   * variable used when detecting unknown extensions 
+   * of IEs of type CCDTYPE_GSM5_TLV.
+   */
+  BOOL    SeekTLVExt;
+
+  /*
+   * variables used as cash to keep data on octet boundaries
+   */
+  USHORT  last16Bit;
+  ULONG   last32Bit;
+
+#ifdef ERR_TRC_STK_CCD
+  U16     error_stack[CCD_ERR_STK_SZ];/*??*/
+#endif /* ERR_TRC_STK_CCD */
+  U8      errLabel;
+  U8      continue_array;
+  U16     msgLen;
+
+  /*
+   * variables used by the modules in cdc_gsm.c 
+   */
+  T_IEI_CONTEXT iei_ctx[MAX_RECURSIONS_PER_MSG];  
+  USHORT  RefBeforeError;
+  USHORT  akt1VPos;
+  USHORT  next1VPos;
+  BOOL    TagPending; 
+  UBYTE   PendingTag; 
+  BOOL    SequenceError;
+  BOOL    Swap1V_inProgress;
+  UBYTE   last_level;
+  UBYTE   numEOCPending;
+
+#ifdef DEBUG_CCD
+  BOOL    TraceIt;
+  char    buf[33];
+#endif
+
+} T_CCD_Globs;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccd_inc.mk	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,114 @@
+#----------------------------------------------------------------------------- 
+#  Project :  
+#  Modul   :  ccd_inc.mk
+#----------------------------------------------------------------------------- 
+#  Copyright 2002 Texas Instruments Berlin, AG 
+#                 All rights reserved. 
+# 
+#                 This file is confidential and a trade secret of Texas 
+#                 Instruments Berlin, AG 
+#                 The receipt of or possession of this file does not convey 
+#                 any rights to reproduce or disclose its contents or to 
+#                 manufacture, use, or sell anything it may describe, in 
+#                 whole, or in part, without the specific written consent of 
+#                 Texas Instruments Berlin, AG. 
+#----------------------------------------------------------------------------- 
+# Purpose : Some general definition also used in CCD\util.
+#----------------------------------------------------------------------------- 
+
+#-------------------------Suffixes for the name of the output file
+#---------e.g. ccd_tr_rt_po_db.lib
+
+ifdef TOOL_CHOICE
+  TSDIR:=/ts$(TOOL_CHOICE)
+  tsTail  :=_ts$(TOOL_CHOICE)
+else
+  TSDIR:=
+endif
+
+ifeq ($(TRACE), 1)
+   trTail :=_tr
+   TRACEDIR=/trace
+else 
+   trTail:=
+   TRACEDIR=
+endif
+
+ifeq ($(MEMSUPER), 1)
+  PSDIR=/ps
+  pstail :=_ps
+else
+  PSDIR=
+  pstail:=
+endif
+
+ifeq ($(DEBUG), 1)
+   DEBUGDIR=/debug
+   dbTail :=_db
+else 
+   DEBUGDIR=
+   dbTail:=
+endif
+
+SECTION=
+secTail=
+ifeq ($(RUN_FLASH), 1)
+  SECTION=/fl
+  secTail:=_fl
+endif
+ifeq ($(RUN_INT_RAM), 1)
+  SECTION=/ir
+  secTail:=_ir
+endif
+
+ifeq ($(TARGET), nuc)
+   tTail :=_na7
+   ifeq ($(PLATFORM), arm7)
+      tTail :=_na7
+      ifeq ($(DYNARR), 1)
+        DADIR=/da
+        datail :=_da
+      else
+        DADIR=
+        datail:=
+      endif
+   else
+      ifeq ($(PLATFORM), arm9)
+         tTail :=_na9
+      else
+        ifeq ($(PLATFORM), pc)
+           tTail :=_npc
+        endif #pc
+      endif #arm9
+   endif #arm7
+else
+   ifeq ($(TARGET), win32)
+     tTail :=_wn
+   else
+     ifeq ($(TARGET), linuxpc)
+      tTail :=_lpc
+      OSENV=sus
+     else
+       ifeq ($(TARGET), rtlpc)
+        tTail :=_rlp
+        OSENV=sus
+        RTL_VERSION=2.0
+        RTL_DIR=/opt/rtldk-$(RTL_VERSION)/rtlinuxpro
+        include $(RTL_DIR)/rtl.mk
+       else
+         ifeq ($(TARGET), linuxarm)
+          tTail :=_la9
+          OSENV=sus
+          else
+           ifeq ($(TARGET), solsparc)
+            tTail :=_ssp
+            OSENV=sus
+            BYTESEX=motorola
+           endif #solsparc
+         endif #linuxarm
+       endif #rtlpc
+     endif #linuxpc
+   endif #win32  
+endif #nuc
+
+XXX:=$(tTail)$(trTail)$(dbTail)$(pstail)$(datail)$(secTail)$(tsTail)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccd_lnt.mk	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,35 @@
+#----------------------------------------------------------------------------- 
+#  Project :  
+#  Modul   :  ccd_lnt.mk
+#----------------------------------------------------------------------------- 
+#  Copyright 2002 Texas Instruments Berlin, AG 
+#                 All rights reserved. 
+# 
+#                 This file is confidential and a trade secret of Texas 
+#                 Instruments Berlin, AG 
+#                 The receipt of or possession of this file does not convey 
+#                 any rights to reproduce or disclose its contents or to 
+#                 manufacture, use, or sell anything it may describe, in 
+#                 whole, or in part, without the specific written consent of 
+#                 Texas Instruments Berlin, AG. 
+#----------------------------------------------------------------------------- 
+# Purpose : Some general definition for lint.
+#----------------------------------------------------------------------------- 
+LINT_EXE=lint-nt.exe
+LINT_OPT+=-i/gpf/TEMPLATE/lint -u options.lnt -v -b
+LINT_OPT+=-emacro(\*,va_start,va_arg,va_end)
+
+ifeq ($(CC),cl)
+  LINT_OPT+=-D_WIN32 -D_M_IX86 -D_MSC_VER=1100
+endif
+ifeq ($(CC),cl470)
+  INCLUDE=$(C_DIR)
+  ifeq ($(PLATFORM),arm9)
+    LINT_OPT+=-D__TMS470__
+  endif
+endif
+
+lint: $(LNTFILES)
+
+$(LNTFILES): %.lto:	%.c
+	-$(LINT_EXE) $(LINT_OPT) $(DEFINES) $(INCLUDES) "$<"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccddata.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,140 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   : ccddata.h 
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Exports of the Ccddata Lib/Dll.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef CCDDATA_H
+#define CCDDATA_H
+
+/*==== INCLUDES =============================================================*/
+#include "pdi.h"
+
+/*==== CONSTS ===============================================================*/
+#define CCDDATA_CCDENT_INVALID -1
+#define CCDDATA_MCONST_ERROR   -1
+#define CCDDATA_PCONST_ERROR   -1
+
+#define CCDDATA_DLL_OK          0
+#define CCDDATA_DLL_ALREADY   -10
+#define CCDDATA_DLL_LOADLIB   -11
+#define CCDDATA_DLL_LOADFUN   -12
+#define CCDDATA_DLL_REGISTER  -13
+
+/*==== TYPES =================================================================*/
+#if defined __CCD_GLOBS_H
+typedef	SHORT (*T_FUNC_POINTER)(const ULONG cref, const ULONG eref, T_CCD_Globs *globs);
+typedef struct
+{
+  T_FUNC_POINTER enc;
+  T_FUNC_POINTER dec;
+} T_FUNC_STRUCT;
+#endif
+
+typedef struct
+{
+  int p1;
+  int p2;
+} T_COMENDPOINTS;
+/*==== EXPORTS ===============================================================*/
+
+/* Use CCDDATA_DLL_FUNC only for optmizations. The extern declarations
+ * also work if the function are in a dll.
+ */
+#ifndef CCDDATA_DLL_FUNC
+ #define CCDDATA_IMPORT_FUNC extern
+#else /* CCDDATA_DLL_FUNC */
+ #define CCDDATA_IMPORT_FUNC extern __declspec(dllimport)
+#endif /* CCDDATA_DLL_FUNC */
+
+/* ccddata_load.c */
+extern int ccddata_init (const char* dllname,
+                         int reload,
+                         void (*ccddata_init_notify)(void),
+                         void (*ccddata_exit_notify)(void));
+extern int ccddata_exit (void);
+extern char* ccddata_dllname (void);
+
+/* ccd_config.c */
+#if defined(CCD_C) || defined(PDI_C)
+UBYTE* ccddata_get_mi_length (void);
+#endif
+#ifdef CCD_C
+UBYTE cdc_init (T_FUNC_POINTER codec[][2]);
+UBYTE* ccddata_get_decmsgbuffer (void);
+#endif
+
+/* ccddata_pdi.c */
+CCDDATA_IMPORT_FUNC int ccddata_get_pdi_dinfo (const T_PDI_DECODEINFO* (*dinfo) );
+/* ccddata_mconst.c */
+CCDDATA_IMPORT_FUNC int ccddata_get_num_of_entities(void);
+CCDDATA_IMPORT_FUNC int ccddata_get_max_message_id(void);
+CCDDATA_IMPORT_FUNC int ccddata_get_max_bitstream_len(void);
+CCDDATA_IMPORT_FUNC int ccddata_get_max_mstruct_len(void);
+CCDDATA_IMPORT_FUNC int ccddata_mccd_symbols(void);
+/* ccddata_pconst.c */
+CCDDATA_IMPORT_FUNC int ccddata_get_max_sap_num(void);
+CCDDATA_IMPORT_FUNC int ccddata_get_max_primitive_id(void);
+CCDDATA_IMPORT_FUNC int ccddata_get_max_pstruct_len(void);
+/* ccddata_ccdmtab.c */
+CCDDATA_IMPORT_FUNC const T_CCD_VarTabEntry*  ccddata_get_mvar (USHORT idx);
+CCDDATA_IMPORT_FUNC const T_CCD_SpareTabEntry* ccddata_get_spare (USHORT idx);
+CCDDATA_IMPORT_FUNC const T_CCD_CalcTabEntry* ccddata_get_calc (USHORT idx);
+CCDDATA_IMPORT_FUNC const T_CCD_CompTabEntry* ccddata_get_mcomp (USHORT idx);
+CCDDATA_IMPORT_FUNC const T_CCD_ElemTabEntry* ccddata_get_melem (USHORT idx);
+CCDDATA_IMPORT_FUNC const T_CCD_CalcIndex* ccddata_get_calcidx (USHORT idx);
+CCDDATA_IMPORT_FUNC USHORT ccddata_get_mmtx (USHORT entity,
+                                        USHORT msgid,
+                                        USHORT index); 
+/* ccddata_ccdptab.c */
+CCDDATA_IMPORT_FUNC const T_CCD_VarTabEntry* ccddata_get_pvar (USHORT idx);
+CCDDATA_IMPORT_FUNC const T_CCD_CompTabEntry* ccddata_get_pcomp (USHORT idx);
+CCDDATA_IMPORT_FUNC const T_CCD_ElemTabEntry* ccddata_get_pelem (USHORT idx);
+CCDDATA_IMPORT_FUNC USHORT ccddata_get_pmtx (USHORT sap,
+                                        USHORT primid,
+                                        USHORT index);
+/* ccddata_cdemval.c */
+CCDDATA_IMPORT_FUNC const T_CCD_ValTabEntry* ccddata_get_mval (USHORT idx);
+CCDDATA_IMPORT_FUNC const T_CCD_StrTabEntry* ccddata_get_mstr (USHORT idx);
+/* ccddata_cdepval.c */
+CCDDATA_IMPORT_FUNC const T_CCD_ValTabEntry* ccddata_get_pval (USHORT idx);
+CCDDATA_IMPORT_FUNC const T_CCD_StrTabEntry* ccddata_get_pstr (USHORT idx);
+
+/* ccddata_ccdent.c */
+#ifndef CCDDATA_CCDENT_C
+CCDDATA_IMPORT_FUNC short ccddata_get_ccdent (char* entname);
+CCDDATA_IMPORT_FUNC const char * ccddata_get_entname (short ccdent);
+#endif /* !CCDDATA_CCDENT_C*/
+
+/* ccddata_alias.c */
+CCDDATA_IMPORT_FUNC char* ccddata_get_alias (USHORT idx, int from_msg);
+
+/* ccddata_version.c */
+CCDDATA_IMPORT_FUNC char* ccddata_get_version ();
+CCDDATA_IMPORT_FUNC int   ccddata_get_table_version ();
+
+/* ccddata_eg.c */
+#ifndef CCDDATA_EG_C
+CCDDATA_IMPORT_FUNC int    ccddata_eg_nodes (void);
+CCDDATA_IMPORT_FUNC char** ccddata_eg_nodenames (void);
+CCDDATA_IMPORT_FUNC char*  ccddata_eg_adjacent (int idx);
+CCDDATA_IMPORT_FUNC int    ccddata_eg_saps (void);
+CCDDATA_IMPORT_FUNC char** ccddata_eg_sapnames (void);
+CCDDATA_IMPORT_FUNC T_COMENDPOINTS*  ccddata_eg_comendpoints (int idx);
+#endif /* !CCDDATA_EG_C */
+
+#endif /* !CCDDATA_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccddata.mk	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,278 @@
+#----------------------------------------------------------------------------- 
+#  Project :  
+#  Modul   :  ccddata.mk
+#----------------------------------------------------------------------------- 
+#  Copyright 2002 Texas Instruments Berlin, AG 
+#                 All rights reserved. 
+# 
+#                 This file is confidential and a trade secret of Texas 
+#                 Instruments Berlin, AG 
+#                 The receipt of or possession of this file does not convey 
+#                 any rights to reproduce or disclose its contents or to 
+#                 manufacture, use, or sell anything it may describe, in 
+#                 whole, or in part, without the specific written consent of 
+#                 Texas Instruments Berlin, AG. 
+#----------------------------------------------------------------------------- 
+#  Purpose : Building Ccddata Dll/Lib. 
+#----------------------------------------------------------------------------- 
+
+ifndef TARGET
+  TARGET=win32
+endif
+
+ifeq ($(TARGET), nuc)
+  override TARGET=arm7
+endif
+PLATFORM=$(TARGET)
+
+COFILES=
+
+include ccd_base.mk
+
+ifeq ($(PROST), g23net)
+  CDGINCDIR=$(TESTROOT)/Cdginc
+  PROSTCFLAGS= #??? -DOPTION_MULTITHREADED -DSHARED_CCD
+endif
+
+ifeq ($(PROST), g23m)
+  CDGINCDIR=$(TESTROOT)/ms/CDGINC
+endif
+
+ifeq ($(PROST), gsm)
+  CDGINCDIR=$(TESTROOT)/ms/CDGINC
+endif
+
+ifeq ($(PROST), gprs)
+  ifeq ($(TARGET), arm7)
+    CDGINCDIR=$(TESTROOT)/cdginc/cdginc_vo
+  else
+    CDGINCDIR=$(TESTROOT)/ms/CDGINC
+  endif
+endif
+
+ifeq ($(PROST), generic)
+  ifndef CDGINCDIR
+    CDGINCDIR=$(GPF)/util/teststack/inc/cdginc/
+  endif
+endif
+
+ifndef CCDDATADIR
+  CCDDATADIR=$(GPFPRJDIR)
+endif
+override CCDDATADIR:=$(subst \,/,$(CCDDATADIR))
+
+CCDDATA_OBJECTS=ccddata_ccd.obj ccddata_mconst.obj ccddata_ccdmtab.obj\
+                ccddata_cdemval.obj ccddata_ccdent.obj 
+CCDDATA_OBJFILES=$(patsubst %.obj,$(OBJDIR)/%.obj,$(CCDDATA_OBJECTS))
+
+CCDDATA_EXE_OBJECTS=cdt.obj
+CCDDATA_EXE_OBJFILES=$(patsubst %.obj,$(OBJDIR)/%.obj,$(CCDDATA_EXE_OBJECTS))
+
+LNTFILES=$(patsubst %.obj,%.lto,$(CCDDATA_OBJECTS))
+
+# win32
+ifeq ($(TARGET),win32)
+
+include ccddata_version.h
+
+ifeq ($(LOAD),1)
+  PART=load
+  DLL_PREFIX=
+  CCDDATA_OBJECTS = ccddata_load.obj
+  COFILES+=$(CCDDATA_LIB)
+  LDFLAGS_DLL+=/IMPLIB:$(CCDDATA_IMPLIB)
+  DEFINES+=-DCCDDATA_LOAD
+else
+  PART=dll
+  DLL_PREFIX=cddl_
+  LDFLAGS_DLL+=/COMMENT:CCDDATA_$(CCDDATA_VERSION)
+  CCDDATA_OBJECTS += ccddata_pconst.obj ccddata_ccdptab.obj \
+                   ccddata_cdemstr.obj ccddata_cdepval.obj \
+                   ccddata_tap_priv.obj ccddata_alias.obj \
+                   ccddata_version.obj ccddata_eg.obj ccddata_pdi.obj
+endif
+
+  include ccddata_exp.mk
+
+  CCDDATA_LIB=$(GPFBINDIR)/ccddata_$(PART).dll
+  CCDDATA_IMPLIB=$(subst win32,WIN32,$(GPFLIBDIR)/ccddata_$(PART).lib)
+  CCDDATA_IMPLIB_LOCAL=$(OBJDIR)/ccddata_$(PART).lib
+  COFILES+=$(CCDDATA_IMPLIB)
+
+  CCDEDIT_LIB=$(GPFLIBDIR)/ccdedit.lib
+  CCD_LIB=$(GPFLIBDIR)/ccd.lib
+  PCON_LIB=$(GPFLIBDIR)/pcon.lib
+  FRAME_LIB=$(GPFLIBDIR)/frame.lib
+
+  CCDDATA_EXE=$(GPFBINDIR)/cdt.exe
+
+  INCLUDES+=-I"$(CDGINCDIR)"
+  DEFINES+=-DCCDDATA_DABSTR
+  LDFLAGS_DLL+=/nologo /dll $(PROSTLDFLAGS) $(CCDEDIT_LIB)
+  ifneq ($(LOAD),1)
+    LDFLAGS_DLL+=/IMPLIB:$(CCDDATA_IMPLIB_LOCAL)
+  else
+    LINK_EXPORTS+=/EXPORT:ccddata_init /EXPORT:ccddata_exit\
+                  /EXPORT:ccddata_dllname /SECTION:.shared,RWS
+  endif
+  LDFLAGS_DLL+=/OUT:"$@" $(LINK_EXPORTS) 
+  LDFLAGS_DLL+= $(PCON_LIB) $(CCD_LIB) $(FRAME_LIB) 
+
+  LDFLAGS_EXE=/nologo /OUT:"$@" $(PROSTLDFLAGS)
+
+  ifeq ($(DEBUG), 1)
+    LDFLAGS_EXE += /DEBUG /incremental:no /pdb:none
+  endif
+
+  ccddata: all
+
+  $(CCDDATA_LIB): $(CCDDATA_OBJECTS) 
+	$(LINK) $(LDFLAGS_DLL) $(CCDDATA_OBJFILES)
+
+  cdt: $(CCDDATA_EXE) 
+
+  $(CCDDATA_EXE): $(CCDDATA_EXE_OBJECTS) 
+	-cleartool co -nda -nc $@
+	$(LINK) $(LDFLAGS_EXE) $(CCDDATA_EXE_OBJFILES) $(CCDDATA_IMPLIB)
+
+else
+  CCDDATA_OBJECTS += ccd_config.obj
+endif # target == win32
+
+# nucwin
+ifeq ($(TARGET),nucwin)
+  CCDDATA_LIB=$(CCDDATADIR)/ccddata.lib
+  INCLUDES+=-I"$(CDGINCDIR)"
+  LDFLAGS+=/OUT:"$(CCDDATA_LIB)"
+  # currently for all nucwin: put the p* info for PCON in the lib
+  CCDDATA_OBJECTS += ccddata_pconst.obj ccddata_ccdptab.obj 
+  # and for the concept of synchronous frame with the tap inside
+  # of the protocol stack include also most of the rest of ccddata; it
+  # should not matter even without the tap
+  CCDDATA_OBJECTS += ccddata_cdemstr.obj ccddata_cdepval.obj \
+                   ccddata_tap_priv.obj ccddata_alias.obj
+
+  $(CCDDATA_LIB): $(CCDDATA_OBJECTS) 
+	$(MKLIB) $(LDFLAGS) $(CCDDATA_OBJFILES)
+
+endif # target == nucwin
+
+# nuc
+ifeq ($(TARGET),arm7)
+  CCDDATA_OBJECTS += ccddata_pconst.obj ccddata_ccdptab.obj
+  ifeq ($(CCD_SYMBOLS), 1)
+    CCDDATA_OBJECTS += ccddata_alias.obj 
+  endif
+  CCDDATA_LIB=$(CCDDATADIR)/ccddata.lib
+  override CCDDATA_LIB:=$(subst \,/,$(CCDDATA_LIB))
+  INCLUDES+=-I"$(CDGINCDIR)"
+  LDFLAGS+=-rq $@  
+  $(CCDDATA_LIB): $(CCDDATA_OBJECTS) 
+	$(MKLIB) $(LDFLAGS) $(CCDDATA_OBJFILES)
+endif # target == arm7
+
+# arm9
+ifeq ($(TARGET),arm9)
+    CCDDATA_OBJECTS += ccddata_pconst.obj ccddata_ccdptab.obj
+    ifeq ($(CCD_SYMBOLS), 1)
+      CCDDATA_OBJECTS += ccddata_alias.obj 
+    endif
+    CCDDATA_LIB=$(CCDDATADIR)/ccddata.lib
+    INCLUDES+=-I"$(CDGINCDIR)"
+    LDFLAGS+=-rq $@
+    $(CCDDATA_LIB): $(CCDDATA_OBJECTS) 
+	$(MKLIB) $(LDFLAGS) $(CCDDATA_OBJFILES)
+endif # target = arm9
+
+# arm_b16
+ifeq ($(TARGET),arm_b16)
+  CCDDATA_LIB=$(CCDDATADIR)/ccddata.lib
+  INCLUDES+=-I"$(CDGINCDIR)"
+  LDFLAGS+=-rv $@
+  $(CCDDATA_LIB): $(CCDDATA_OBJECTS) 
+	$(MKLIB) $(LDFLAGS) $(CCDDATA_OBJFILES)
+endif # target == arm_b16
+
+# arm_b32
+ifeq ($(TARGET),arm_b32)
+  CCDDATA_LIB=$(CCDDATADIR)/ccddata.lib
+  INCLUDES+=-I"$(CDGINCDIR)"
+  LDFLAGS+=-rv $@
+  $(CCDDATA_LIB): $(CCDDATA_OBJECTS) 
+	$(MKLIB) $(LDFLAGS) $(CCDDATA_OBJFILES)
+endif # target == arm_b32
+
+# psos
+ifeq ($(TARGET),psos)
+  CCDDATA_LIB=$(CCDDATADIR)/ccddata.lib
+  INCLUDES+=-I"$(CDGINCDIR)"
+  LDFLAGS+=$@
+  $(CCDDATA_LIB): $(COPTS_FILE) $(CCDDATA_OBJECTS) 
+	$(MKLIB) $(LDFLAGS) $(CCDDATA_OBJFILES)
+	$(RM) $(COPTS_FILE)
+
+$(COPTS_FILE):
+	@echo $(_CFLAGS) >  c.opt
+	@echo $(INCLUDES) >> c.opt
+	@echo $(DEFINES) >> c.opt
+
+endif # target == psos
+
+# sus environments
+ifeq ($(OSENV), sus)
+  CCDDATA_LIB=$(CCDDATADIR)/libccddata.a
+  INCLUDES+=-I$(CDGINCDIR)
+  # currently for all emulations: put the p* info for PCON in the lib
+  CCDDATA_OBJECTS += ccddata_pconst.obj ccddata_ccdptab.obj 
+  # and for the concept of synchronous frame with the tap inside
+  # of the protocol stack include also most of the rest of ccddata; it
+  # should not matter even without the tap
+  CCDDATA_OBJECTS += ccddata_cdemstr.obj ccddata_cdepval.obj \
+                   ccddata_tap_priv.obj ccddata_alias.obj
+
+  $(CCDDATA_LIB): $(CCDDATA_OBJECTS) 
+	$(MKLIB) $(CCDDATA_LIB) $(CCDDATA_OBJFILES)
+	$(RANLIB) $(CCDDATA_LIB)
+
+endif # sus
+
+all:  $(CCDDATA_LIB)
+
+exe: $(CCDDATA_EXE)
+
+$(CCDDATA_OBJECTS) $(CCDDATA_EXE_OBJECTS):\
+	            %.obj:	%.c $(OBJDIR)
+	$(CC) $(CFLAGS) "$<"
+
+CCDDATA_LIBDIR=$(subst \,/,$(dir $(CCDDATA_LIB))).
+
+$(CCDDATA_LIB): $(CCDDATA_LIBDIR) $(CCDEDIT_LIB)
+
+$(OBJDIR) $(CCDDATA_LIBDIR):
+	@$(MKDIR) -p $@
+
+clean:
+	$(RM) $(OBJDIR)/ccddata* $(OBJDIR)/ccd_config* $(OBJDIR)/cdt.obj \
+	  $(CCDDATA_LIB)
+
+help:
+	@echo Usage: gnumake -f ccddata.mk [ DEBUG=1 ] TARGET=target
+	@echo with target: arm7, arm9, arm_b16, arm_b32, nucwin, win32, or psos
+	@echo further options:
+	@echo CCDENT=0 when the file ccdent.cdg does not exist in the\
+	               cdginc directory
+	@echo CCDALIAS=0 when the files malias.cdg and palias.cdg do not exist\
+	                 in the cdginc directory
+	@echo CDEMSTR=0 when the file cdemstr.cdg.cdg does not exist\
+	                 in the cdginc directory
+	@echo CDGINCDIR=path with the path to the cdginc directory
+	@echo CCDDATA_LIB=path with the path to the ccddata lib to be built
+
+ci:
+	-cleartool ci -nc $(COFILES)
+
+co:
+	-cleartool co -nda -nc $(COFILES)
+
+-include ccd_lnt.mk
+include ccddata_dep.mk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccddata_dep.mk	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,42 @@
+#----------------------------------------------------------------------------- 
+#  Project :  
+#  Modul   :  ccddata_dep.mk
+#----------------------------------------------------------------------------- 
+#  Copyright 2002 Texas Instruments Berlin, AG 
+#                 All rights reserved. 
+# 
+#                 This file is confidential and a trade secret of Texas 
+#                 Instruments Berlin, AG 
+#                 The receipt of or possession of this file does not convey 
+#                 any rights to reproduce or disclose its contents or to 
+#                 manufacture, use, or sell anything it may describe, in 
+#                 whole, or in part, without the specific written consent of 
+#                 Texas Instruments Berlin, AG. 
+#----------------------------------------------------------------------------- 
+#  Purpose : Dependencies for Ccddata.
+#----------------------------------------------------------------------------- 
+ccddata_pconst.obj: ccddata_pconst.c $(CDGINCDIR)/pconst.cdg
+ccddata_mconst.obj: ccddata_mconst.c $(CDGINCDIR)/mconst.cdg
+ccddata_ccdmtab.obj: ccddata_ccdmtab.c $(CDGINCDIR)/mconst.cdg \
+  $(GPFINCDIR)/typedefs.h ccdtable.h
+ccddata_ccdptab.obj: ccddata_ccdptab.c $(CDGINCDIR)/pconst.cdg \
+  $(GPFINCDIR)/typedefs.h ccdtable.h
+ccddata_cdemval.obj: ccddata_cdemval.c \
+  $(GPFINCDIR)/typedefs.h ccdtable.h
+ccddata_cdepval.obj: ccddata_cdepval.c \
+  $(GPFINCDIR)/typedefs.h ccdtable.h
+ccddata_tap_priv.obj: ccddata_tap_priv.c ccddata_tap_priv.h \
+  $(GPFINCDIR)/typedefs.h $(CDGINCDIR)/mconst.cdg
+ccd_config.obj: ccd_config.c ccd.h ccd_globs.h $(GPFINCDIR)/ccd_codingtypes.h \
+  $(GPFINCDIR)/typedefs.h $(GPFINCDIR)/header.h $(CDGINCDIR)/mconst.cdg
+ccddata_ccdent.obj: ccddata_ccdent.c ccd.h ccddata.h $(CDGINCDIR)/mconst.cdg \
+  $(GPFINCDIR)/typedefs.h
+ccddata_cdemstr.obj: ccddata_cdemstr.c $(CDGINCDIR)/mconst.cdg \
+  $(GPFINCDIR)/typedefs.h ccdtable.h
+ccddata_alias.obj: ccddata_alias.c $(CDGINCDIR)/malias.cdg \
+  $(CDGINCDIR)/palias.cdg $(GPFINCDIR)/typedefs.h ccdtable.h
+cdt.obj: cdt.c ccddata.h ccddata_version.h $(GPFINCDIR)/typedefs.h
+ccddata_eg.obj: ccddata_eg.c
+ccddata_load.obj: ccddata_load.c $(GPFINCDIR)/typedefs.h $(GPFINCDIR)/vsi.h\
+  ccdtable.h $(GPFINCDIR)/Ccdedit.h $(GPFINCDIR)/pdi.h $(GPFINCDIR)/pcon.h\
+  ccddata.h ccddata_tap_priv.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccddata_exp.mk	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,136 @@
+#----------------------------------------------------------------------------- 
+#  Project :  
+#  Modul   :  ccddata_exp.mk
+#----------------------------------------------------------------------------- 
+#  Copyright 2002 Texas Instruments Berlin, AG 
+#                 All rights reserved. 
+# 
+#                 This file is confidential and a trade secret of Texas 
+#                 Instruments Berlin, AG 
+#                 The receipt of or possession of this file does not convey 
+#                 any rights to reproduce or disclose its contents or to 
+#                 manufacture, use, or sell anything it may describe, in 
+#                 whole, or in part, without the specific written consent of 
+#                 Texas Instruments Berlin, AG. 
+#----------------------------------------------------------------------------- 
+#  Purpose : Define exports of ccddata_dll.dll and ccddata_load.dll.
+#----------------------------------------------------------------------------- 
+LINK_EXPORTS=
+# ccddata_pdi.c
+   LINK_EXPORTS+=/EXPORT:ccddata_get_pdi_dinfo
+# ccddata_mconst.c
+   LINK_EXPORTS+=/EXPORT:ccddata_get_num_of_entities
+   LINK_EXPORTS+=/EXPORT:ccddata_get_max_message_id
+   LINK_EXPORTS+=/EXPORT:ccddata_get_max_bitstream_len
+   LINK_EXPORTS+=/EXPORT:ccddata_get_max_mstruct_len
+   LINK_EXPORTS+=/EXPORT:ccddata_mccd_symbols
+# ccddata_pconst.c
+   LINK_EXPORTS+=/EXPORT:ccddata_get_max_sap_num
+   LINK_EXPORTS+=/EXPORT:ccddata_get_max_primitive_id
+   LINK_EXPORTS+=/EXPORT:ccddata_get_max_pstruct_len
+# ccddata_ccdmtab.c
+   LINK_EXPORTS+=/EXPORT:ccddata_get_mvar
+   LINK_EXPORTS+=/EXPORT:ccddata_get_spare
+   LINK_EXPORTS+=/EXPORT:ccddata_get_calc
+   LINK_EXPORTS+=/EXPORT:ccddata_get_mcomp
+   LINK_EXPORTS+=/EXPORT:ccddata_get_melem
+   LINK_EXPORTS+=/EXPORT:ccddata_get_mmtx
+   LINK_EXPORTS+=/EXPORT:ccddata_get_calcidx
+# ccddata_ccdptab.c
+   LINK_EXPORTS+=/EXPORT:ccddata_get_pvar
+   LINK_EXPORTS+=/EXPORT:ccddata_get_pcomp
+   LINK_EXPORTS+=/EXPORT:ccddata_get_pelem
+   LINK_EXPORTS+=/EXPORT:ccddata_get_pmtx
+# ccddata_cdemval.c
+   LINK_EXPORTS+=/EXPORT:ccddata_get_mval
+# ccddata_cdemstr.c
+   LINK_EXPORTS+=/EXPORT:ccddata_get_mstr
+# ccddata_cdepval.c
+   LINK_EXPORTS+=/EXPORT:ccddata_get_pval
+   LINK_EXPORTS+=/EXPORT:ccddata_get_pstr
+# ccd_config.c
+   LINK_EXPORTS+=/EXPORT:ccddata_get_mi_length
+   LINK_EXPORTS+=/EXPORT:ccddata_get_decmsgbuffer
+# ccddata_tap_priv.c
+   LINK_EXPORTS+=/EXPORT:ccddata_tap_check_pd
+   LINK_EXPORTS+=/EXPORT:ccddata_tap_get_pd
+# ccddata_ccdent.c
+   LINK_EXPORTS+=/EXPORT:ccddata_get_ccdent
+   LINK_EXPORTS+=/EXPORT:ccddata_get_entname
+# ccddata_alias.c
+   LINK_EXPORTS+=/EXPORT:ccddata_get_alias
+# ccddata_version.c
+   LINK_EXPORTS+=/EXPORT:ccddata_get_version
+   LINK_EXPORTS+=/EXPORT:ccddata_get_table_version
+# ccddata_eg.c
+   LINK_EXPORTS+=/EXPORT:ccddata_eg_nodes
+   LINK_EXPORTS+=/EXPORT:ccddata_eg_nodenames
+   LINK_EXPORTS+=/EXPORT:ccddata_eg_adjacent
+   LINK_EXPORTS+=/EXPORT:ccddata_eg_saps
+   LINK_EXPORTS+=/EXPORT:ccddata_eg_sapnames
+   LINK_EXPORTS+=/EXPORT:ccddata_eg_comendpoints
+# ccdedit.c
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_init
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_get_comp
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_prim_first
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_prim_next
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_msg_first
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_msg_next
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_comp_first
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_comp_next
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_get_symval
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_read_elem
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_write_prepare
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_write_elem
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_get_type
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_get_primcode
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_get_msgcode
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_get_is_downlink
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_get_comp_index
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_get_element_name
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)cde_get_array_kind
+
+   OFT_EXPORTS:=$(LINK_EXPORTS)
+# pdi.obj
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)pdi_createDefContext
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)pdi_createContext
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)pdi_destroyContext
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)pdi_startPrim
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)pdi_getDecodeInfo
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)pdi_getEntityByPD
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)pdi_pd2name
+
+# ccd.c
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_set_patch_infos
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_init
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_begin
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_end
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_codeMsg
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_codeMsgPtr
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_decodeMsg
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_decodeMsgPtr
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_exit
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_init_ccddata
+# cdc_std.c
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_decodeByte
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_codeByte
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_codeLong
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_decodeLong
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_bitcopy
+# ccd_err.c
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_getFirstError
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_getNextError
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_getFirstFault
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_getNextFault
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_free_faultlist
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_get_numFaults
+# ccd_elem.c
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_decodeElem
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)ccd_encodeElem
+# pcon.c
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)pcon_init_prim_coding
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)pcon_decodePrim
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)pcon_codePrim
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)pcon_init_ccddata
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)pcon_make_filter
+   LINK_EXPORTS+=/EXPORT:$(DLL_PREFIX)pcon_filter_decode_prim
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccddata_tap_priv.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,58 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   :  ccddata_priv.h 
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Function that belongs to tap_tdl.c, but is are based
+|             on the constants (CCDENT_...) generated by ccdgen
+|             (mconst.cdg). Therefore it must be placed in the ccddata_dll.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef CCDDATA_TAP_PRIV_H
+#define CCDDATA_TAP_PRIV_H
+
+/*==== INCLUDES =============================================================*/
+
+/*==== CONSTS ===============================================================*/
+
+#define TAP_PD_CC       3
+#define TAP_PD_MM       5
+#define TAP_PD_GMM      8
+#define TAP_PD_SM       10
+#define TAP_PD_RR       6
+#define TAP_PD_SS       11
+#define TAP_PD_SMS      9
+#define TAP_PD_TST      15
+#define TAP_PD_XX       1
+
+#define TAP_PD_ABIS             0
+#define TAP_PD_OK               128
+#define TAP_PD_INVALID          -1
+#define TAP_NOPD_NOMT           70
+#define TAP_NOPD_MT             80
+#define TAP_RR_SHORT            90
+
+/*==== TYPES =================================================================*/
+
+/*==== EXPORTS ===============================================================*/
+
+#ifndef CCDDATA_TAP_PRIV_C
+
+CCDDATA_IMPORT_FUNC int ccddata_tap_get_pd   (UCHAR comp);
+CCDDATA_IMPORT_FUNC int ccddata_tap_check_pd (UCHAR comp, UCHAR pd);
+
+#endif /* !CCDDATA_TAP_PRIV_C*/
+
+#endif /* !CCDDATA_TAP_PRIV_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccddata_version.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,1 @@
+CCDDATA_VERSION="1.8.5"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccdedit.mk	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,76 @@
+#----------------------------------------------------------------------------- 
+#  Project :  
+#  Modul   :  ccdedit.mk
+#----------------------------------------------------------------------------- 
+#  Copyright 2002 Texas Instruments Berlin, AG 
+#                 All rights reserved. 
+# 
+#                 This file is confidential and a trade secret of Texas 
+#                 Instruments Berlin, AG 
+#                 The receipt of or possession of this file does not convey 
+#                 any rights to reproduce or disclose its contents or to 
+#                 manufacture, use, or sell anything it may describe, in 
+#                 whole, or in part, without the specific written consent of 
+#                 Texas Instruments Berlin, AG. 
+#----------------------------------------------------------------------------- 
+#  Purpose : Build ccdedit.lib.
+#----------------------------------------------------------------------------- 
+GPFINCDIR=$(GPF)/inc
+GPFLIBDIR=$(GPF)/LIB
+
+VPATH=$(OBJDIR)
+
+CCDDIR=.
+CCDEDIT_LIBNAME=ccdedit.lib
+CCDEDIT_LOCAL_LIB=$(OBJDIR)/$(CCDEDIT_LIBNAME)
+CCDEDIT_LIB=$(subst \,/,$(GPFLIBDIR)/$(TARGET)$(DEBUGDIR)/$(CCDEDIT_LIBNAME))
+CC=cl.exe
+INCLUDES=-I "$(CCDDIR)" -I "$(GPFINCDIR)"
+DEFINES=$(PROSTCFLAGS) -DWIN32 -DCCD_SYMBOLS -DCCDDATA_LOAD -D_TOOLS_
+CFLAGS=/nologo /c /W3 /Zp1 /Zl $(DEFINES) $(INCLUDES)
+LINK=link.exe
+MKLIB=lib.exe
+LDFLAGS_LIB=/nologo /OUT:"$(CCDEDIT_LOCAL_LIB)"
+OBJECTS = ccdedit.obj pdi.obj
+OBJFILES=$(patsubst %.obj,$(OBJDIR)/%.obj,$(OBJECTS))
+TARGET=WIN32
+# Debug
+ifeq ($(DEBUG), 1)
+  DEBUGDIR=/debug
+  CFLAGS += /Fr$(OBJDIR)/ /Z7 -D _MT -D _DLL -D _DEBUG
+else
+  DEBUGDIR=
+  CFLAGS += -D _MT -D _DLL
+endif
+OBJDIR=obj/ccdedit$(DEBUGDIR)
+
+all: $(CCDEDIT_LOCAL_LIB)
+
+export: $(CCDEDIT_LIB)
+
+colib:
+	-cleartool co -nda -nc $(CCDEDIT_LIB)
+
+cilib:
+	-cleartool ci -nc $(CCDEDIT_LIB)
+
+$(CCDEDIT_LIB): $(CCDEDIT_LOCAL_LIB)
+	cp "$<" $@
+
+$(CCDEDIT_LOCAL_LIB): $(OBJDIR) $(OBJECTS)
+	$(MKLIB) $(LDFLAGS_LIB) $(OBJFILES)
+
+$(OBJDIR):
+	@gmkdir -p $(OBJDIR)
+
+$(OBJECTS): %.obj:	%.c
+	$(CC) $(CFLAGS) "$<" /Fo$(OBJDIR)/$@
+
+clean:
+	rm -f $(OBJDIR)/ccdedit.* $(OBJDIR)/pdi.*
+
+ccdedit.obj: ccdedit.c $(GPFINCDIR)/typedefs.h $(CCDDIR)/ccdtable.h \
+  $(CCDDIR)/ccddata.h $(GPFINCDIR)/ccdedit.h
+
+pdi.obj: pdi.c $(GPFINCDIR)/typedefs.h $(CCDDIR)/ccdtable.h \
+  $(CCDDIR)/ccddata.h $(GPFINCDIR)/pdi.h $(GPFINCDIR)/CCDAPI.H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/ccdtable.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,150 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   : ccdtable.h
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Condat Conder Decoder
+|             Type definitions for the coding/decoding tables
+|             The tables are generated by CCDGEN.
++----------------------------------------------------------------------------- 
+*/ 
+
+
+#ifndef __CCDTABLE
+#define __CCDTABLE
+
+#define CCDDATA_TABLE_VERSION 1
+
+#ifdef WIN32
+  #ifndef CCDDATA_U32
+  #define CCDDATA_U32
+  #endif
+#endif
+
+/*
+ * Table entry for a variable
+ */
+typedef struct
+{
+#ifdef CCD_SYMBOLS
+  char     *name;
+  USHORT    longNameRef;
+#endif
+  USHORT    bSize;
+  USHORT    cSize;
+  char      cType;
+  UBYTE     numValueDefs;
+  USHORT    valueDefs;
+} T_CCD_VarTabEntry;
+
+/*
+ * Table entry for a spare
+ */
+typedef struct
+{
+  ULONG     value;
+  UBYTE     bSize;
+} T_CCD_SpareTabEntry;
+
+/*
+ * Table entry for an element
+ */
+typedef struct
+{
+  UBYTE     codingType;
+  BOOL      optional;
+  char      extGroup;
+  char      repType;
+  USHORT    calcIdxRef;
+  USHORT    maxRepeat;
+#ifdef CCDDATA_U32
+  U32       structOffs;
+#else /* CCDDATA_U32 */
+  USHORT    structOffs;
+#endif /* CCDDATA_U32 */
+  USHORT    ident;
+  char      elemType;
+  USHORT    elemRef;
+} T_CCD_ElemTabEntry;
+
+/*
+ * Table entry for a calculation index
+ */
+typedef struct
+{
+  UBYTE     numCondCalcs;
+  USHORT    condCalcRef;
+  UBYTE     numPrologSteps;
+  USHORT    prologStepRef;
+  USHORT    numRepCalcs;
+  USHORT    repCalcRef;
+} T_CCD_CalcIndex;
+
+
+/*
+ * Definition entry for a composition
+ */
+typedef struct
+{
+#ifdef CCD_SYMBOLS
+  char     *name;
+  USHORT    longNameRef;
+#endif
+#ifdef CCDDATA_U32
+  U32       cSize;
+  U32       bSize;
+#else /* CCDDATA_U32 */
+  USHORT    cSize;
+  USHORT    bSize;
+#endif /* CCDDATA_U32 */
+  USHORT    numOfComponents;
+  USHORT    componentRef;
+} T_CCD_CompTabEntry;
+
+/*
+ * Definition entry for a calculation
+ */
+typedef struct
+{
+  char      operation;
+  ULONG     operand;
+} T_CCD_CalcTabEntry;
+
+/*
+ * Definition entry for a value
+ */
+typedef struct
+{
+  USHORT    valStringRef;
+  UBYTE      isDefault;
+  S32     startValue;
+  S32     endValue;
+} T_CCD_ValTabEntry;
+
+typedef char * T_CCD_StrTabEntry;
+
+typedef struct
+{
+  char* as_name;
+} T_CCD_ALIASTABLE;
+
+typedef struct
+{
+  USHORT  numitems;
+  USHORT  idx;
+} T_CCD_MTXIDX;
+
+#define NO_REF 0xffff
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/makefile	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,458 @@
+#----------------------------------------------------------------------------- 
+#  Project :  
+#  Modul   :  makefile
+#----------------------------------------------------------------------------- 
+#  Copyright 2002 Texas Instruments Deutschland GmbH
+#                 All rights reserved. 
+# 
+#                 This file is confidential and a trade secret of Texas 
+#                 Instruments Deutschland GmbH
+#                 The receipt of or possession of this file does not convey 
+#                 any rights to reproduce or disclose its contents or to 
+#                 manufacture, use, or sell anything it may describe, in 
+#                 whole, or in part, without the specific written consent of 
+#                 Texas Instruments Deutschland GmbH. 
+#----------------------------------------------------------------------------- 
+#  Purpose:   (gnu-) makefile to build libraries of the Condat Coder Decoder
+#             targets:  ccd.dll, ccd.lib and clean
+#             Hint: To achieve variations of ccd.lib you need to set some 
+#             environment variables, e.g. DEBUG and TRACE. To ease the building 
+#             process you can also use the batch file "m.bat".
+#-----------------------------------------------------------------------------
+
+include ccd_inc.mk
+
+VPATH=$(OBJDIR)
+
+#---------- Directories
+GPF:=$(subst \,/,$(GPF))
+
+# force to use sh.exe in gpf
+ifneq ($(OSENV), sus)
+SHELL=$(GPF)/tools/bin/sh.exe
+endif
+
+ifeq "$(CLEARCASE_PRIMARY_GROUP)" ""
+  CLRCAS=0
+else
+  ifeq "$(IN_VOB)" "FALSE"
+    CLRCAS=0
+  else
+    CLRCAS=1
+  endif
+endif
+
+ifdef PATH_CC_1_22E 
+ Path:=$(PATH_CC_1_22E);$(Path)
+ PATH:=$(PATH_CC_1_22E);$(PATH)
+ C_DIR:=$(PATH_CC_1_22E)
+endif
+
+ifeq ($(TOOL_CHOICE), 3)
+ COPTS= --align_structs=4 -pden 
+ ifndef PATH_CC_2_54 
+   PATH_CC_2_54=C:/Dvpt_tools/Codegen/TMS4701x_2.54
+ endif
+ Path:=$(PATH_CC_2_54)/bin;$(Path)
+ INCLUDES += -I"$(PATH_CC_2_54)/include"
+endif
+
+ifeq ($(TOOL_CHOICE), 5)
+ COPTS= --align_structs=4 -pden 
+ ifndef PATH_CC_2_55 
+   PATH_CC_2_55=C:/Dvpt_tools/Codegen/TMS4701x_2.55
+ endif
+ Path:=$(PATH_CC_2_55)/bin;$(Path)
+ INCLUDES += -I"$(PATH_CC_2_55)/include"
+endif
+
+ifeq ($(TOOL_CHOICE), 6)
+  # --code_state=16 => -mt
+  # --endian=little => -me
+  COPTS= -mv=5e --abi=ti_arm9_abi
+  COPTS+= -pden -pdv -mf -ms -qq -disable_branch_chaining -pi
+  COPTS+= -O=2
+  ifndef PATH_CC_4_11 
+    PATH_CC_4_11=C:/Dvpt_tools/Codegen/TMS4701x_4.11
+  endif
+  Path:=$(PATH_CC_4_11)/bin;$(Path)
+  INCLUDES += -I"$(PATH_CC_4_11)/include"
+endif
+
+# for created object files
+ifeq ($(PLATFORM), )
+OBJDIR=obj/ccd/$(TARGET)$(TRACEDIR)$(DEBUGDIR)$(PSDIR)
+else
+OBJDIR=obj/ccd/$(TARGET)/$(PLATFORM)$(TSDIR)$(TRACEDIR)$(DEBUGDIR)$(PSDIR)$(DADIR)$(SECTION)
+endif
+
+# guarantee / as path seperator even if OBJDIR is set with the make call
+override OBJDIR:=$(subst \,/,$(OBJDIR))
+
+# for stack calculation
+GAWK=$(GPF)/tools/bin/gawk.exe
+AWK_PROG=$(GPF)/BIN/cg$(tTail).awk
+
+# for created libraries
+LIBDIR=../LIB
+BINDIR=../BIN$(DEBUGDIR)
+
+FRAMELIB_DIR	=../lib/win32$(DEBUGDIR)
+
+# for CCD source files
+CCD_SRC=./
+
+
+#---------- shell calls
+RM      =       rm -rf
+ECHO	= 	@echo
+ifeq ($(OSENV), sus)
+  MKDIR =       mkdir
+else
+  MKDIR =       $(GPF)/tools/bin/mkdir
+endif
+
+ifeq ($(CLRCAS), 1)
+  CHECKOUT = -cleartool co -nda -nc
+  CHECKIN = -cleartool ci -nc
+else
+  CHECKOUT = attrib -r
+  CHECKIN = attrib +r
+endif
+
+CO_LIBS = $(CCD_LIB)
+
+_CCD_OBJS = ccd.$(OBJTAIL) bitfun.$(OBJTAIL) cdc_std.$(OBJTAIL) \
+            cdc_com.$(OBJTAIL) ccd_err.$(OBJTAIL) ccd_store.$(OBJTAIL)\
+        gsm1_tv.$(OBJTAIL) gsm1_v.$(OBJTAIL) gsm2_t.$(OBJTAIL) gsm3_tv.$(OBJTAIL) gsm3_v.$(OBJTAIL) gsm4_lv.$(OBJTAIL) \
+        gsm4_tlv.$(OBJTAIL) gsm5_tlv.$(OBJTAIL) gsm5_tv.$(OBJTAIL) gsm5_v.$(OBJTAIL) gsm6_tlv.$(OBJTAIL) gsm7_lv.$(OBJTAIL) \
+        bcd_mnc.$(OBJTAIL) bcd_nofill.$(OBJTAIL) bcdeven.$(OBJTAIL) bcdodd.$(OBJTAIL) \
+        gsm1_asn.$(OBJTAIL) \
+        csn1_s1.$(OBJTAIL) csn1_sh.$(OBJTAIL) s_padding.$(OBJTAIL) t30_ident.$(OBJTAIL) \
+                asn1_bitstr.$(OBJTAIL) asn1_octet.$(OBJTAIL) asn1_integ.$(OBJTAIL) \
+                asn1_seq.$(OBJTAIL) asn1_choice.$(OBJTAIL) no_code.$(OBJTAIL)\
+                asn1_choice_ext.$(OBJTAIL) asn1_seq_ext.$(OBJTAIL) asn1_integ_ext.$(OBJTAIL) \
+                asn1_opentype.$(OBJTAIL) asn1_objid.$(OBJTAIL)\
+                noncritical_ext.$(OBJTAIL) critical_ext.$(OBJTAIL)\
+                ccd_elem.$(OBJTAIL) s_padding_0.$(OBJTAIL) csn1_s0.$(OBJTAIL) hl_flag.$(OBJTAIL) \
+                freq_list.$(OBJTAIL) fdd_ci.$(OBJTAIL) tdd_ci.$(OBJTAIL) freq_list_com.$(OBJTAIL) \
+                csn1_concat.$(OBJTAIL) break_cond.$(OBJTAIL) csn1_sx.$(OBJTAIL) \
+                csn1_choice_1.$(OBJTAIL) csn1_choice_2.$(OBJTAIL) csn1_choice_x.$(OBJTAIL) \
+                csn1_sh_opt.$(OBJTAIL) csn1_s1_opt.$(OBJTAIL) csn1_s0_opt.$(OBJTAIL)
+
+ifeq ($(TARGET), win32)
+_CCD_OBJS += ccd_config.obj ccd_patch.obj
+endif
+
+#----------------------------------- Special settings for each target 
+#----------Nucleus
+ifeq ($(TARGET), nuc)
+ifeq ($(PLATFORM), arm7)
+
+   ifeq ($(TOOL_CHOICE), )
+    COPTS+= -mw -x -pw2
+   endif
+
+   CC=cl470
+   COPTS+= -me -mt -q
+   ifeq ($(ASM_ONLY), 1)
+     COPTS+= -q -n -x0 -fs $(OBJDIR)
+     MKLIB = $(GAWK) -f $(AWK_PROG) > $(CCD_LIB)
+     OBJTAIL = asm
+     CCD_LIB = $(OBJDIR)/ccd$(XXX).pa
+   else
+     COPTS+= -o 
+     MKLIB = ar470  $(LFLAGS)
+     LIBEXT = lib
+     OBJTAIL = obj
+     CCD_LIB = $(LIBDIR)/ccd$(XXX).$(LIBEXT)
+   endif
+
+   ifeq ($(DEBUG), 1)
+      ifeq ($(TOOL_CHOICE), )
+        COPTS += -g
+      else
+        COPTS += -gt
+      endif
+      COPTS += -mn   
+   endif
+   COPTS += -fr $(OBJDIR) -c 
+
+   ifeq ($(TRACE), 1)
+     DEFINES += -dDEBUG_CCD -dERR_TRC_STK_CCD
+   endif
+
+   ifeq ($(RUN_INT_RAM), 1)
+     DEFINES += -dRUN_INT_RAM
+   endif
+
+   ifeq ($(RUN_FLASH), 1)
+     DEFINES += -dRUN_FLASH
+   endif
+
+   ifeq ($(MEMSUPER), 1)
+     DEFINES += -dMEMORY_SUPERVISION
+   endif
+
+   INCLUDES += -I"." -I"../inc" -I"../inc/nuc"
+   ifeq ($(DYNARR), 1)
+     DEFINES += -dDYNAMIC_ARRAYS
+   endif
+   DEFINES += -dM_INTEL -dSHARED_VSI -dSHARED_CCD
+   DEFINES += -dCCDDATA_STATIC_DATA
+   DEFINES += -d_TMS470 -dNEW_ENTITY -dERR_TRACE_CCD
+   COPTSNF  = $(COPTS) $(DEFINES) $(INCLUDES)
+   INCLUDELIST = $(INCLUDES)
+   DEFINELIST = $(subst -d,-D,$(DEFINES))
+   COMMLFLAGS = -rq $@             
+   LFLAGS = $(COMMLFLAGS)
+
+endif       # platform: arm7, TI compiler
+endif       # target: nucleus OS
+
+#----------Nucleus & arm9
+ifeq ($(TARGET), nuc)
+ifeq ($(PLATFORM), arm9)
+
+   CC=cl470
+   COPTS+= -me -mt -q
+
+   ifeq ($(ASM_ONLY), 1)
+     COPTS+= -n -pn -pi -fs $(OBJDIR) 
+     MKLIB = $(GAWK) -f $(AWK_PROG) > $(CCD_LIB)
+     OBJTAIL = asm
+     CCD_LIB = $(OBJDIR)/ccd$(XXX).pa
+   else
+     COPTS+= -c -o  
+     MKLIB=ar470  $(LFLAGS)
+     LIBEXT=lib
+     OBJTAIL=obj
+     CCD_LIB=$(LIBDIR)/ccd$(XXX).$(LIBEXT)
+     ifeq ($(DEBUG), 1)
+        COPTS += -mn   
+     endif
+   endif
+
+   ifeq ($(DEBUG), 1)
+      ifeq ($(TOOL_CHOICE), 6)
+        COPTS += --symdebug:coff
+       else
+       # toolset 3 and 5
+        COPTS += -gt
+      endif
+      COPTS += -mn   
+   endif
+   COPTS += -fr $(OBJDIR)
+
+   ifeq ($(TRACE), 1)
+     DEFINES += -dDEBUG_CCD -dERR_TRC_STK_CCD
+   endif
+   ifeq ($(MEMSUPER), 1)
+     DEFINES += -dMEMORY_SUPERVISION
+   endif
+
+   INCLUDES += -I"." -I"../inc" -I"../inc/nuc" 
+
+   DEFINES += -dM_INTEL -dSHARED_VSI -dCCD_PLUGIN_GSM -dSHARED_CCD
+   DEFINES += -dCCDDATA_STATIC_DATA -dDYNAMIC_ARRAYS
+   DEFINES += -d_TMS470 -dNEW_ENTITY -dERR_TRACE_CCD
+   DEFINES += -dCCDDATA_U32
+   ifeq ($(CCD_SYMBOLS), 1)
+     DEFINES += -dCCD_SYMBOLS
+   endif
+
+   COPTSNF  = $(COPTS) $(DEFINES) $(INCLUDES)
+   COMMLFLAGS = -rq $@             
+   LFLAGS=$(COMMLFLAGS)
+
+endif       # platform: arm9, TI compiler
+endif       # target: nucleus OS
+
+#----------NucleusWin
+ifeq ($(TARGET), nuc)
+ifeq ($(PLATFORM), pc)
+
+   CC=cl
+   COPTS = /c /nologo /W3 /GX /Zp1
+   COPTS += /Fo$(OBJDIR)/
+   ifeq ($(DEBUG), 1)
+     COPTS += /MTd /Z7 
+   else
+     COPTS += /MT
+   endif
+
+   ifeq ($(GLOBS), 1)
+     _CCD_OBJS = pc_globs.obj
+     CCD_LIB = $(OBJDIR)/pc_globs.exe
+     MKLIB = link.exe /out:$@ $(LFLAGS) /INCREMENTAL:NO /PDB:NONE
+   else
+     CCD_LIB = $(LIBDIR)/ccd$(XXX).$(LIBEXT)
+     MKLIB = link.exe -lib /out:$@ $(LFLAGS)
+   endif
+
+   ifeq ($(TRACE), 1)
+     DEFINES += -DDEBUG_CCD -DERR_TRC_STK_CCD
+   endif
+   ifeq ($(MEMSUPER), 1)
+     DEFINES += -DMEMORY_SUPERVISION
+   endif
+
+   INCLUDES = -I"." -I"../inc" -I"../inc/nuc" 
+   DEFINES += -D"M_INTEL" -D"SHARED_VSI" -D"SHARED_CCD"\
+              -D"CCDDATA_STATIC_DATA" -D"DYNAMIC_ARRAYS"\
+              -D"CCD_SYMBOLS" -D"NEW_ENTITY" -D"WIN32"\
+              -D"ERR_TRACE_CCD"
+   COPTSNF = $(COPTS) $(DEFINES) $(INCLUDES)
+   INCLUDELIST = $(subst /I ,-I,$(INCLUDES))
+   DEFINELIST = $(subst /D ,-D,$(DEFINES))
+   COMMLFLAGS =  /nologo  #/subsystem:console  /machine:I386
+   LFLAGS = $(COMMLFLAGS)
+   LIBEXT = lib
+   OBJTAIL = obj
+
+endif       # platform: PC
+endif       # target: nucleus OS
+
+#----------------------------------- Special settings for each target 
+#----------Win32
+ifeq ($(TARGET), win32)
+   LIBDIR=../LIB/WIN32$(DEBUGDIR)
+   CCD_IMPORTLIB=$(LIBDIR)/ccd.lib
+
+   CC=cl
+   COPTS += /c /nologo /W3 /GX /Zp1
+
+   ifeq ($(DEBUG), 1)
+     COPTS += /MDd /Z7 
+   else
+     COPTS += /MD
+   endif
+
+   COPTS += /Fo./$(OBJDIR)/
+   INCLUDES = -I"." -I"../inc" -I"../inc/vcms" -I"../inc/vcms/win32"
+   DEFINES += -D"M_INTEL" -D"_TOOLS_" -D"CCDDATA_LOAD"\
+            -D"WIN32" -D"TARGET_WIN32" -D"CCD_SYMBOLS" -D"CCD_MK"
+
+   DEFINES += -D"SHARED_VSI" -D"SHARED_CCD"\
+              -D"NEW_ENTITY" -D"DYNAMIC_ARRAYS" -D"ERR_TRACE_CCD"
+   DEFINES += -D"ERR_TRC_STK_CCD" -D"DEBUG_CCD"
+
+   COPTSNF = $(COPTS) $(DEFINES) $(INCLUDES)
+   INCLUDELIST=$(INCLUDES)
+   DEFINELIST=$(DEFINES)
+   COMMLFLAGS += /nologo /subsystem:console /machine:I386
+
+   LFLAGS = $(COMMLFLAGS)
+   MKLIB = lib.exe /out:$@ $(LFLAGS)
+   LIBEXT = lib
+   OBJTAIL = obj
+   CCD_LIB = $(LIBDIR)/ccd.$(LIBEXT)
+
+endif         # target: win32
+
+ifeq ($(OSENV), sus)
+   COPTS += -c -o $(OBJDIR)/$@
+   ifeq ($(DEBUG), 1)
+     COPTS += -g
+   endif
+   ifeq ($(TRACE), 1)
+        DEFINES += -DDEBUG_CCD -DERR_TRC_STK_CCD
+   endif
+   ifeq ($(MEMSUPER), 1)
+        DEFINES += -DMEMORY_SUPERVISION
+   endif
+
+   INCLUDES = -I. -I../inc -I../inc/$(OSENV)
+   DEFINES += -DSHARED_VSI -DSHARED_CCD\
+              -DCCDDATA_STATIC_DATA -DDYNAMIC_ARRAYS\
+              -DNEW_ENTITY \
+              -DERR_TRACE_CCD
+   ifeq ($(BYTESEX), motorola)
+     DEFINES += -DM_MOTOROLA 
+   else
+     DEFINES += -DM_INTEL 
+   endif
+   ifeq ($(TARGET), rtlpc)
+     COPTSNF = $(CFLAGS)
+     MKLIB= i386-linux-ar ruv $@
+     RANLIB= i386-linux-ranlib
+     DEFINES += -D_RT_LINUX_ -DCCD_SYMBOLS 
+   else
+     ifeq ($(TARGET), linuxarm)
+       CC=arm-linux-gcc
+       MKLIB= arm-linux-ar ruv $@
+       RANLIB= arm-linux-ranlib
+       DEFINES += -DGSP_TARGET -DCCD_SYMBOLS 
+     else
+       ifeq ($(TARGET), solsparc)
+         CC=gcc
+         MKLIB= ar ruv $@
+         RANLIB= ranlib
+         DEFINES += -DCCD_SYMBOLS 
+       else
+         CC=gcc
+         MKLIB= ar ruv $@
+         RANLIB= ranlib
+         DEFINES += -DCCD_SYMBOLS 
+       endif
+     endif
+   endif
+   COPTSNF += $(COPTS) $(DEFINES) $(INCLUDES)
+
+   LIBEXT = a
+   OBJTAIL = o
+   CCD_LIB = $(LIBDIR)/libccd$(XXX).$(LIBEXT)
+endif
+
+#########################   Rules and targets   ##########################
+.PHONY:	all clean
+
+all: $(OBJDIR) $(CCD_LIB)
+
+CCD_OBJS=$(patsubst %.$(OBJTAIL),$(OBJDIR)/%.$(OBJTAIL),$(_CCD_OBJS))
+LNTFILES=$(patsubst %.$(OBJTAIL),%.lto,$(_CCD_OBJS))
+
+objdir $(OBJDIR):
+	@echo Creating object directory "$(OBJDIR)"
+	$(MKDIR) -p $(OBJDIR)
+
+$(_CCD_OBJS) : %.$(OBJTAIL) : $(CCD_SRC)/%.c
+	$(CC) $(COPTSNF) $<
+
+$(CCD_LIB) : $(_CCD_OBJS)  makefile $(CCD_DEF)
+	$(MKLIB) $(CCD_OBJS)
+ifeq ($(OSENV), sus)
+	$(RANLIB) $@
+endif
+
+colibs:
+	$(CHECKOUT) $(CO_LIBS)
+
+cilibs:
+	$(CHECKIN) $(CO_LIBS)
+
+help:
+	$(ECHO) usage...
+	$(ECHO) building:
+	$(ECHO) "gnumake TARGET={nuc|win32|vxworks|psos}\
+	         [PLATFORM={arm7|arm|pc}] [CPU=PPC603] [DEBUG={1|0}]\
+	         [TRACE={1|0}] [THUMB_MODE=1] [MEMSUPER={0|1} ..."
+	$(ECHO) cleaning:
+	$(ECHO) "gnumake clean TARGET={nuc|win32|vxworks|psos}\
+	         [PLATFORM={arm7|arm|pc}] [CPU=PPC603] [DEBUG={1|0}]\
+	         [TRACE={1|0}] [THUMB_MODE=1] [MEMSUPER={0|1} ..."
+
+SRCFILES=$(patsubst %.$(OBJTAIL),%.c,$(_CCD_OBJS))
+CCD_DEP=dep_ccd$(XXX).mk
+
+clean:
+	$(RM) $(CCD_OBJS) $(CCD_LIB)
+
+depend: $(SRCFILES)
+	@touch $(CCD_DEP)
+	makedepend -b -f$(CCD_DEP) $^ -Y -o.$(OBJTAIL) $(INCLUDELIST)\
+	    $(DEFINELIST)
+	$(RM) $(CCD_DEP).bak
+
+include ccd_lnt.mk
+-include $(CCD_DEP)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/mall	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,139 @@
+#!/bin/sh
+
+help ()
+{
+  echo "Usage: $0 { -help|-gmake|-l <LABEL>|-clean|-exp|-unco}"
+  exit 0
+}
+
+error ()
+{
+  grep "error " $err_file
+  echo "Errors occurred! See $err_file for details."
+  exit 1
+}
+
+if [ "$WINWORD" != "" ] ; then
+# Windows environment
+  OSENV=windows
+  if [ "$CLEARCASE_PRIMARY_GROUP" == "" ] ; then
+    HAVE_CC=0
+  else
+    cleartool lsview -cview >nul 2>&1
+    if [ $? == 0 ] ; then
+      HAVE_CC=1
+    else
+      HAVE_CC=0
+    fi
+  fi
+else
+  OSENV=`uname`
+  cleartool lsview -cview >/dev/null 2>&1
+  if [ $? == 0 ] ; then
+    HAVE_CC=1
+  else
+    HAVE_CC=0
+  fi
+fi
+
+if [ $HAVE_CC == 1 ] ; then
+  M="clearmake -V -C gnu"
+else
+  if [ $OSENV == windows ] ; then
+    M="gnumake -r"
+  else
+    M="make -r"
+  fi
+fi
+
+name=CCD
+name_small=ccd
+err_file=../$name_small.err
+ver=0
+maketarget="colibs all"
+
+if [ "$1" != "" ] ; then 
+
+  case "$1" in
+    -clean)
+       maketarget=clean
+       ;;
+    -gmake)
+       if [ $OSENV == windows ] ; then
+         M="gnumake -r"
+       else
+         M="make -r"
+       fi
+       ;;
+    -test)
+       echo testing not yet implemented
+       exit 0
+       ;;
+    -exp)
+       maketarget="colibs all cilibs"
+       ;;
+    -l)
+       echo labelling not yet implemented
+       exit 0
+       ;;
+    -help)
+       help
+       ;;
+    *) 
+       echo Unknown option "$1"
+       help
+       ;;
+  esac
+
+fi
+
+rm -f $err_file
+
+if [ "$maketarget" == clean ] ; then
+  echo "*** cleaning $name ***" | tee -a $err_file
+elif [ "$maketarget" == "colibs all cilibs" ] ; then
+  echo "*** making and checking in $name ***" | tee -a $err_file
+else
+  echo "*** making $name ***" | tee -a $err_file
+fi
+
+case "$OSENV" in
+  windows)
+	   echo "Use mall.bat to build under windows environments." >> $err_file
+		 error
+     ;;
+
+  Linux)
+     echo $M $maketarget TARGET=linuxpc DEBUG=0 TRACE=0 MEMSUPER=0 >> $err_file
+     $M $maketarget TARGET=linuxpc DEBUG=0 TRACE=0 MEMSUPER=0 >> $err_file 2>&1
+     if [ $? != 0 ] ; then error ; fi
+     echo $M $maketarget TARGET=linuxpc DEBUG=1 TRACE=0 MEMSUPER=0 >> $err_file
+     $M $maketarget TARGET=linuxpc DEBUG=1 TRACE=0 MEMSUPER=0 >> $err_file 2>&1
+     if [ $? != 0 ] ; then error ; fi
+     echo $M $maketarget TARGET=linuxpc DEBUG=1 TRACE=1 MEMSUPER=0 >> $err_file
+     $M $maketarget TARGET=linuxpc DEBUG=1 TRACE=1 MEMSUPER=0 >> $err_file 2>&1
+     if [ $? != 0 ] ; then error ; fi
+     echo $M $maketarget TARGET=linuxarm DEBUG=0 TRACE=0 MEMSUPER=0 >> $err_file
+     $M $maketarget TARGET=linuxarm DEBUG=0 TRACE=0 MEMSUPER=0 >> $err_file 2>&1
+     if [ $? != 0 ] ; then error ; fi
+     echo $M $maketarget TARGET=linuxarm DEBUG=1 TRACE=0 MEMSUPER=0 >> $err_file
+     $M $maketarget TARGET=linuxarm DEBUG=1 TRACE=0 MEMSUPER=0 >> $err_file 2>&1
+     if [ $? != 0 ] ; then error ; fi
+     echo $M $maketarget TARGET=linuxarm DEBUG=1 TRACE=1 MEMSUPER=0 >> $err_file
+     $M $maketarget TARGET=linuxarm DEBUG=1 TRACE=1 MEMSUPER=0 >> $err_file 2>&1
+     if [ $? != 0 ] ; then error ; fi
+     ;;
+  Solaris)
+     echo $M $maketarget TARGET=solsparc DEBUG=0 TRACE=0 MEMSUPER=0 >> $err_file
+     $M $maketarget TARGET=solsparc DEBUG=0 TRACE=0 MEMSUPER=0 >> $err_file 2>&1
+     if [ $? != 0 ] ; then error ; fi
+     echo $M $maketarget TARGET=solsparc DEBUG=1 TRACE=0 MEMSUPER=0 >> $err_file
+     $M $maketarget TARGET=solsparc DEBUG=1 TRACE=0 MEMSUPER=0 >> $err_file 2>&1
+     if [ $? != 0 ] ; then error ; fi
+     echo $M $maketarget TARGET=solsparc DEBUG=1 TRACE=1 MEMSUPER=0 >> $err_file
+     $M $maketarget TARGET=solsparc DEBUG=1 TRACE=1 MEMSUPER=0 >> $err_file 2>&1
+     if [ $? != 0 ] ; then error ; fi
+     ;;
+esac
+
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/ccd/mall.bat	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,280 @@
+@echo off
+rem build all CCD variants
+setlocal
+
+set name=CCD
+set name_small=ccd 
+set err_file=..\%name_small%.err
+
+@if x%_4ver% == x goto need4nt
+@if x%1 == x-help goto help
+@if x%1 == x-guitest goto guitest
+@if x%1 == x-test goto test
+
+REM default is gnumake:
+set M=gnumake -r
+REM use clearmake if under ClearCase
+set IN_VOB=FALSE
+REM is clearcase installed ?
+if "%CLEARCASE_PRIMARY_GROUP%" == "" goto options
+REM are we using a clearcase view ?
+cleartool lsview -cview >nul 2>>&1
+if errorlevel 1 goto options
+REM on a clearcase view: use clearmake in gnu mode:
+set M=clearmake -V -C gnu
+set IN_VOB=TRUE
+
+:options
+REM set default options
+set clean=0
+set def_ver=DEV_BUILD
+set ver=0
+set maketarget=colibs all
+REM parse command line options
+:parse_opt
+iff "%1" == "-gmake" then
+  set M=gnumake -r
+elseiff "%1" == "-clean" then
+  iff "%maketarget%" == "colibs all cilibs" then
+	  echo mall: option -clean ignored when -exp is given
+	else
+    set maketarget=clean
+  endiff
+elseiff "%1" == "-l" then
+  iff "%2" == "" then
+    echo error: no label name specified !
+    goto help
+  endiff
+  set ver=%2
+  shift
+elseiff "%1" == "-exp" then
+  iff %maketarget% == clean then
+    echo mall: option -exp ignored when -clean is given
+  else
+    set maketarget=colibs all cilibs
+  endiff
+elseiff "%1" == "-n" then
+  set M=echo
+  shift
+elseiff "%1" != "" then
+  goto help
+endiff
+shift
+if "%1" != "" goto parse_opt 
+
+if exist %err_file% del %err_file% >nul
+
+if %ver% != 0 echo "using label %ver% (not implemented yet) ..."
+
+iff %maketarget% == clean then
+  echo *** cleaning CCD libs *** | tee /a %err_file%
+else
+  echo *** making CCD libs *** | tee /a %err_file%
+endiff
+
+rem nuc Libraries
+:arm7
+echo ********** nuc arm7        **********        | tee /a %err_file%
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+rem ********** nuc arm7: splitted libraries ir/fl
+rem RUN_FLASH=1 RUN_INT_RAM=0
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+rem RUN_FLASH=0 RUN_INT_RAM=1
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo ********** nuc arm7 ts3    **********        | tee /a %err_file%
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=3 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 TOOL_CHOICE=3 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+rem ********** nuc arm7 ts3 + DYNARR=1
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo ********** nuc arm9 ts3    **********        | tee /a %err_file%
+echo %M% TARGET=nuc PLATFORM=arm9 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm9 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=3 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo ********** nuc arm9 ts6    **********        | tee /a %err_file%
+echo %M% TARGET=nuc PLATFORM=arm9 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=6 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm9 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=6 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=6 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=6 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=6 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=6 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo ********** nuc pc          **********        | tee /a %err_file%
+echo %M% TARGET=nuc PLATFORM=pc DEBUG=0 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=pc DEBUG=0 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=pc DEBUG=1 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=pc DEBUG=1 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=pc DEBUG=1 TRACE=1 MEMSUPER=0 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=pc DEBUG=1 TRACE=1 MEMSUPER=0 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=nuc PLATFORM=pc DEBUG=1 TRACE=1 MEMSUPER=1 %maketarget% >>%err_file%
+%M% TARGET=nuc PLATFORM=pc DEBUG=1 TRACE=1 MEMSUPER=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+rem win32 Libraries
+echo ********** win32           **********        | tee /a %err_file%
+echo %M% TARGET=win32 DEBUG=0 TRACE=0 %maketarget% >>%err_file%
+%M% TARGET=win32 DEBUG=0 TRACE=0 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+echo %M% TARGET=win32 DEBUG=1 TRACE=1 %maketarget% >>%err_file%
+%M% TARGET=win32 DEBUG=1 TRACE=1 %maketarget% >>%err_file% 2>>&1
+if %? != 0 goto err
+
+goto final
+
+:help
+text
+usage:
+mall {-help | 
+      { [-l <LABEL>] | -clean | -exp | -gmake } 
+     }
+example: mall -l CCD_1.7.1 
+-clean: clean objects
+-exp  : export, i.e. checkin the built items
+-gmake: use gnumake anyhow
+endtext
+goto end
+
+:guitest
+text
+Tool without GUI - in consequence no GUI test implemented
+endtext
+goto end
+
+:test
+text
+Test CCD functionality with GPF teststack:
+- Change to /gpf/util/teststack:
+- Call </gpf/util/teststack/mall.bat> to build teststack
+- Call </gpf/util/teststack/mall.bat -test> to build and execute testsuite 
+endtext
+goto end
+
+:need4nt
+@echo Error: 4DOS or 4NT is needed
+goto end
+
+:err
+grep "error " %err_file% 
+@echo Errors occured ! See %err_file% for details.
+endlocal
+quit 1
+
+:final
+grep "warning " %err_file% 2> nul 
+
+:end
+endlocal
+quit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/frame/cust_os/cust_os.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,183 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       cust_os.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for the communication between L1 and L23 entities. 
+|             This interface file provides an abstraction of the VSI 
+|             interface, e.g. to avoid that macros like PALLOC need to be used
+|             by the customer.
++----------------------------------------------------------------------------- 
+*/ 
+#ifndef CUST_OS_H
+#define CUST_OS_H
+
+/*==== INCLUDES =============================================================*/
+
+/*==== CONSTS ===============================================================*/
+
+#define OSX_OK     0
+#define OSX_ERROR -1
+
+#define L1S_TRACE_DISABLE           "L1S_TRACE_DISABLE"
+#define L1S_TRACE_ENABLE            "L1S_TRACE_ENABLE"
+#define NO_SPECIAL_MPHC_RXLEV_REQ   "NO_SPEC_MPHC_RXLEV_REQ"
+
+/*==== TYPES ================================================================*/
+
+/* Necessary defintions*/
+typedef enum
+{
+  L1_QUEUE,    /* internal L1 communication          */
+  DL_QUEUE,    /* L1->DL                             */
+  RR_QUEUE,    /* L1->RR                             */
+  GRR_QUEUE,   /* L1->GRR                            */
+  LLC_QUEUE,   /* L1->LLC e.g. ciphering via CCI     */
+  SNDCP_QUEUE, /* L1->SNDCP e.g. compression via CCI */
+  GPF_ACI_QUEUE,   /* L1->ACI                        */
+  MAX_OSX_QUEUE
+} T_ENUM_OS_QUEUE;
+
+typedef T_ENUM_OS_QUEUE ENUM_OS_QUEUE;
+
+typedef struct {
+       char dummychar;
+} DummyStruct;
+
+typedef struct xSignalHeaderStruct
+{
+  int           SignalCode;
+  int           _dummy1;
+  int           _dummy2;
+  int           _dummy3;
+  DummyStruct   *SigP;
+  int           _dummy4;
+} xSignalHeaderRec;
+
+typedef struct
+{
+  int caller;
+  int queue_handle;
+  unsigned short queue_type;
+} T_OSX_REGISTER;
+
+
+/*==== EXPORTS ==============================================================*/
+
+/*
+ * =================================================
+ * functional interface to the GPF frame environment
+ * =================================================
+ */
+
+/*
+ * initialize queue_type to queue_handle conversion table
+ */
+void _osx_init ( void );
+
+/*
+ * dynamic osx configuration
+ */
+int _osx_config ( const char *config );
+
+/*
+ * open an cust_os communication channel
+ */
+#ifdef _OSX_ON_OS_
+int               _osx_open       (int,unsigned short,int,int);
+#else
+int               _osx_open       (int,unsigned short,int);
+#endif
+
+/*
+ * allocation of a primitive container with a specific size e.g. sizeof (T_XXX_REQ)
+ */
+xSignalHeaderRec* osx_alloc_prim   (unsigned long);
+
+xSignalHeaderRec* int_osx_alloc_prim    (int,unsigned long, int);
+
+/*
+ * allocation of a memory section with a specific size
+ */
+void*             osx_alloc_mem    (unsigned long);
+
+void*             int_osx_alloc_mem     (int,unsigned long);
+
+/*
+ * deallocation of one primitive container
+ */
+void              osx_free_prim    (xSignalHeaderRec*);
+
+void              int_osx_free_prim     (int,xSignalHeaderRec*);
+
+/*
+ * deallocation of one memory section
+ */
+void              osx_free_mem     (void*);
+
+void              int_osx_free_mem      (int,void*);
+
+/*
+ * reception of a primitive. This function should be called from a thread. It suspends
+ * the thread on an empty queue. Queue is specified by an idetifier, 
+ */
+xSignalHeaderRec* osx_receive_prim (T_ENUM_OS_QUEUE);
+
+/*
+ * reception of a primitive. This function should be called from a thread. It suspends
+ * the thread on an empty queue. Queue is specified by its handle
+ */
+xSignalHeaderRec *int_osx_receive_prim  (int,int);
+
+/*
+ * send a primtive to a queue specified by an identifier (no frame handle!)
+ */
+void              osx_send_prim   (xSignalHeaderRec*, T_ENUM_OS_QUEUE);
+
+/*
+ * send a primtive to a queue specified by a handle
+ */
+void              int_osx_send_prim  (int,xSignalHeaderRec*, int);
+
+/*
+ * send a signal with a special signal code (ULONG) and a pointer to a specific memory
+ * area to a queue specified by an identifier
+ */
+void              osx_send_sig  (unsigned long, void *, T_ENUM_OS_QUEUE);
+
+/*
+ * send a signal with a special signal code (ULONG) and a pointer to a specific memory
+ * area to a queue specified by its handle
+ */
+void               int_osx_send_sig  (int,unsigned long,void*,int);
+
+/*
+ * ================================================
+ * customizations for the L1 from Texas Instruments
+ * ================================================
+ */
+#define L1C1_QUEUE  L1_QUEUE
+#define DLL1_QUEUE  DL_QUEUE
+#define RRM1_QUEUE  RR_QUEUE
+#define GRRM1_QUEUE GRR_QUEUE
+#define BACK_QUEUE  L1_QUEUE
+#define ACI_QUEUE   GPF_ACI_QUEUE
+
+#define os_alloc_sig   osx_alloc_prim
+#define os_free_sig    osx_free_prim
+#define os_send_sig    osx_send_prim
+#define os_receive_sig osx_receive_prim
+
+#define MEM_BUF_SIZE(SIG_PAR_SIZE) (SIG_PAR_SIZE + sizeof (xSignalHeaderRec))
+
+#endif /* CUST_OS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/frame/cust_os/makefile	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,463 @@
+#######################  Makefile for GNU make    #####################
+#                                                                     
+#           makefile to build cust.lib 
+#                                             
+#           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~               
+#           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~               
+#                                                                     
+#           targets:  
+#
+#           osx.lib    functions which belong neither to frame nor to tif, somehow old files
+#           clean          delete temp files                           
+#                                                                     
+#######################################################################
+
+OWN_MAKELEVEL=0
+
+#---------- Directories
+# to add the right header file for the specified board type
+BOARD=5
+
+ifdef TOOL_CHOICE
+  TS:=/ts$(TOOL_CHOICE)
+  tsTail  :=_ts$(TOOL_CHOICE)
+else
+  TS:=
+endif
+
+ifdef PATH_CC_1_22E 
+ PATH:=$(PATH_CC_1_22E);$(PATH)
+ C_DIR:=$(PATH_CC_1_22E)
+endif
+
+ifeq ($(TOOL_CHOICE), 3)
+ COPTS= --align_structs=4 -pden -o -q
+ ifndef PATH_CC_2_54 
+   PATH_CC_2_54=C:/Dvpt_tools/Codegen/TMS4701x_2.54
+ endif
+ Path:=$(PATH_CC_2_54)/bin;$(Path)
+ INCLUDES += -I"$(PATH_CC_2_54)/include"
+endif
+
+ifeq ($(TOOL_CHOICE), 5)
+ COPTS= --align_structs=4 -pden -o -q
+ ifndef PATH_CC_2_55 
+   PATH_CC_2_55=C:\Dvpt_tools\Codegen\TMS4701x_2.55
+ endif
+ Path:=$(PATH_CC_2_55)/bin;$(Path)
+ INCLUDES += -I"$(PATH_CC_2_55)/include"
+endif
+
+ifeq ($(TOOL_CHOICE), 6)
+  # --code_state=16 => -mt
+  # --endian=little => -me
+  # what is -ml?
+  COPTS= -mv=5e --abi=ti_arm9_abi
+  COPTS+= -pden -pdv -mf -ms -qq -disable_branch_chaining -pi
+  ifndef PATH_CC_4_11 
+    PATH_CC_4_11=C:\Dvpt_tools\Codegen\TMS4701x_4.11
+  endif
+  Path:=$(PATH_CC_4_11)/bin;$(Path)
+  INCLUDES += -I"$(PATH_CC_4_11)/include"
+endif
+
+# for created object files
+ifeq ($(TARGET), nuc)
+  OBJDIR=obj/$(TARGET)/$(PLATFORM)$(DB)$(OSAL)$(PS)$(OPT)$(TS)
+else
+  OBJDIR=obj/$(TARGET)$(DB)$(OSAL)$(PS)
+endif
+
+ifeq "$(CLEARCASE_PRIMARY_GROUP)" ""
+  CLRCAS=0
+else
+  ifeq "$(IN_VOB)" "FALSE"
+    CLRCAS=0
+  else
+    CLRCAS=1
+  endif
+endif
+
+ifeq ($(CLRCAS), 1)
+  CHECKOUT = -cleartool co -nc
+  CHECKIN = -cleartool ci -nc
+else
+  CHECKOUT = attrib -r
+  CHECKIN = attrib +r
+endif
+
+VPATH=$(OBJDIR);$(OSX_SRC)
+
+# for created libraries
+LIBDIR=../../LIB
+
+# Lint
+LINT=lint-nt.exe
+LINT_INC=-i/gpf/template/lint/
+LINT_OPT_FILE=/gpf/template/lint/options.lnt
+
+#-------------------------Suffixes for the name of the output file
+#---------e.g. osx_na7_db.lib
+
+ifeq ($(TARGET), nuc)
+  ifeq ($(PLATFORM), arm7)
+    tTail :=_na7
+  else
+    ifeq ($(PLATFORM), arm9)
+      tTail :=_na9
+    else
+      ifeq ($(PLATFORM), pc)
+        tTail :=_npc
+      endif
+    endif
+  endif
+endif
+ifeq ($(TARGET), linuxpc)
+  tTail :=_lpc
+  OSENV=sus
+  NO_LINT=1
+else
+ ifeq ($(TARGET), rtlpc)
+   tTail :=_rlp
+   OSENV=sus
+   NO_LINT=1
+   RTL_VERSION=2.0
+   RTL_DIR=/opt/rtldk-$(RTL_VERSION)/rtlinuxpro
+   include $(RTL_DIR)/rtl.mk
+ else
+   ifeq ($(TARGET), linuxarm)
+     tTail :=_la9
+     OSENV=sus
+     NO_LINT=1
+   else
+     ifeq ($(TARGET), solsparc)
+       tTail :=_ssp
+       OSENV=sus
+       NO_LINT=1
+     endif
+   endif
+ endif
+endif
+
+#---------- shell calls
+RM      =       -rm -rf
+ifeq ($(OSENV), sus)
+  MKDIR   =       mkdir
+else
+  MKDIR   =       gmkdir
+endif
+COPY    =       cp
+COPTS_FILE =
+CLEARTOOL  = cleartool
+
+ifeq ($(DEBUG), 1)
+   dbTail :=_db
+   DB=/db
+else 
+   dbTail:=
+endif
+
+ifeq ($(OS_ONLY), 1)
+   osTail :=_os
+   OSAL=/os
+else 
+   osTail:=
+endif
+
+ifeq ($(NO_OPT), 1)
+  DISABLE_OPT:=1
+  OPT:=/no
+   noTail:=_no
+else
+  DISABLE_OPT:=0
+  OPT:=
+  noTail:=
+endif
+
+ifeq ($(MEMSUPER), 2)
+   msTail :=_ps
+   PS=/ps
+endif
+ifeq ($(MEMSUPER), 1)
+   msTail :=_pm
+endif
+ifeq ($(MEMSUPER), 0) 
+   msTail:=
+   PS=
+endif
+
+XXX:=$(tTail)$(osTail)$(dbTail)$(msTail)$(noTail)$(tsTail)
+
+#---------- Special settings for each target: for Nucleus/arm7
+ifeq ($(TARGET), nuc)
+  ifeq ($(PLATFORM), arm7)
+
+   LINT_OPTS = $(LINT_INC) -I"$(subst \,/,$(C_DIR))" -u $(LINT_OPT_FILE)
+
+   ifeq ($(MEMSUPER), 2)
+      DEFINES =  -dMEMORY_SUPERVISION -dOPTIMIZE_POOL
+   endif
+   ifeq ($(MEMSUPER), 1)
+      DEFINES = -dMEMORY_SUPERVISION
+   endif
+
+   ifeq ($(TOOL_CHOICE), )
+    COPTS+= -mw -x -pw2 -q -o
+   endif
+
+   CC=cl470
+   COPTS+= -me -mt
+
+   ifeq ($(DEBUG), 1)
+     ifeq ($(TOOL_CHOICE), )
+        COPTS += -g
+     else
+        COPTS += -gt
+     endif
+     COPTS += -mn   
+   endif
+
+  ifeq ($(OS_ONLY), 1)
+    DEFINES += -d_OSX_ON_OS_
+  else
+    COPTS+= -o3
+  endif
+
+   COPTS += -fr $(OBJDIR) -c 
+
+   INCLUDES += -I"." -I"..\..\INC" -I"..\..\INC\NUC" 
+
+   DEFINES += -d_TARGET_ -d_NUCLEUS_
+   COPTSNF = $(COPTS) $(DEFINES) $(INCLUDES)
+   COMMLFLAGS = -rq $@      # only one command is allowed and it is "r" for replace
+   LFLAGS=$(COMMLFLAGS)
+   LIB = ar470  $(LFLAGS)
+   LIBEXT=lib
+   OSX_LIB=$(LIBDIR)/osx$(XXX).$(LIBEXT)
+   OBJTAIL=obj
+
+   clean:
+	@$(RM) obj/$(TARGET)/$(PLATFORM)$(DB)$(OSAL)$(PS)$(TS)/*.obj
+	@$(RM) $(OSX_LIB)
+
+
+endif         # platform: arm7
+endif         # target: nucleus
+
+
+#---------- Special settings for each target: for Nucleus/arm9
+ifeq ($(TARGET), nuc)
+  ifeq ($(PLATFORM), arm9)
+
+   INCLUDES = -I"." -I"..\..\INC" -I"..\..\INC\NUC" 
+
+   CC=cl470
+
+    COPTS+= -me -mt
+
+    ifneq ($(DISABLE_OPT), 1)
+      ifeq ($(TOOL_CHOICE), 6)
+        COPTS+= -O=2
+      else
+        COPTS+= -o
+      endif
+    endif
+
+   ifeq ($(DEBUG), 1)
+     ifeq ($(TOOL_CHOICE), 6)
+       COPTS += --symdebug:coff
+     else
+       COPTS += -gt
+       # toolsets 3 und 5
+     endif
+     COPTS += -mn   
+   endif
+
+   LINT_OPTS = $(LINT_INC) -I"$(subst \,/,$(C_DIR))" -u $(LINT_OPT_FILE)
+
+   ifeq ($(MEMSUPER), 2)
+      DEFINES =  -dMEMORY_SUPERVISION -dOPTIMIZE_POOL
+   endif
+   ifeq ($(MEMSUPER), 1)
+      DEFINES = -dMEMORY_SUPERVISION
+   endif
+
+   ifeq ($(OS_ONLY), 1)
+      DEFINES += -d_OSX_ON_OS_
+   endif	  
+
+   COPTS += -fr $(OBJDIR) -c 
+
+   DEFINES += -d_TARGET_ -d_NUCLEUS_
+   COPTSNF = $(COPTS) $(DEFINES) $(INCLUDES)
+   COMMLFLAGS = -rq $@      # only one command is allowed and it is "r" for replace
+   LFLAGS=$(COMMLFLAGS)
+   LIB=ar470  $(LFLAGS)
+   LIBEXT=lib
+   OSX_LIB=$(LIBDIR)/osx$(XXX).$(LIBEXT)
+   OBJTAIL=obj
+
+   clean:
+	@$(RM) obj/$(TARGET)/$(PLATFORM)$(DB)$(OSAL)$(PS)$(RV)$(OPT)$(TS)/*.obj
+	@$(RM) $(OSX_LIB)
+
+
+endif         # platform: arm9
+endif         # target: nucleus
+
+#----------NucleusWin
+ifeq ($(TARGET), nuc)
+  ifeq ($(PLATFORM), pc)
+
+    CC=cl
+    COPTS = /c /nologo /W3 /GX /Zp1 /GZ
+    INCLUDES = -I"." -I"..\..\inc" -I"..\..\inc\nuc"
+    LINT_OPT_FILE += co-msc50.lnt
+    LINT_OPTS = $(LINT_INC) -D_WIN32 -D_M_IX86 -I"NUC" -u $(LINT_OPT_FILE)
+
+    ifeq ($(DEBUG), 1)
+      COPTS += /MD /DEBUG /Z7
+      DEFINES += -D"_DEBUG" -D"NU_DEBUG"
+    else
+      COPTS += /MT
+    endif
+
+    COPTS += /FR"..\..\temp\nucwin"  /Fd"..\..\temp\nucwin" /Fo./$(OBJDIR)/
+
+    ifeq ($(OS_ONLY), 1)
+	  DEFINES += -D"_OSX_ON_OS_"
+    endif
+
+    ifeq ($(MEMSUPER), 2)
+      DEFINES +=  -D"MEMORY_SUPERVISION"  -D"OPTIMIZE_POOL"
+    endif
+    ifeq ($(MEMSUPER), 1)
+      DEFINES += -D"MEMORY_SUPERVISION"
+    endif
+
+    DEFINES += -D"_NUCLEUS_" 
+    COPTSNF = $(COPTS) $(DEFINES) $(INCLUDES)
+    COPTS_FILE =
+    INCLUDELIST=$(subst /I ,-I,$(INCLUDES))
+    DEFINELIST=$(subst /D ,-D,$(DEFINES))
+
+    COMMLFLAGS =  /nologo  /subsystem:console  /machine:I386
+    LFLAGS=$(COMMLFLAGS) #/debug??
+    LIB=LIB /out:$@ $(LFLAGS)
+    LIBEXT=lib
+    OBJTAIL=obj
+    OSX_LIB=$(LIBDIR)/osx$(XXX).$(LIBEXT)
+
+    clean:
+	@$(RM) obj/$(TARGET)/$(PLATFORM)$(DB)$(OSAL)$(PS)$(RV)/*.obj
+	@$(RM) $(OSX_LIB)
+
+  endif
+endif         # nucleus && pc
+
+ifeq ($(OSENV), sus)
+
+    #_OS_LAYER += os_ctb.o
+    OS_LAYER_SRC:=./$(OSENV)/
+    COPTS = -c -o$(OBJDIR)/$@
+    INCLUDES = -I. -I../../inc/$(OSENV) -I../../inc
+    ifeq ($(TARGET), linuxtool)
+      DEFINES += -D_TOOLS_
+    endif
+
+    DEFINES += -DPURE_USER_MODE #-DGSP_OSL_LOG
+    ifeq ($(OS_ONLY), 1)
+      DEFINES += -D_OSX_ON_OS_
+    endif
+
+    ifeq ($(DEBUG), 1)
+      COPTS += -g
+      DEFINES += -DOSL_DEBUG
+    endif
+
+    ifeq ($(MEMSUPER), 2)
+      DEFINES +=  -DMEMORY_SUPERVISION  -DOPTIMIZE_POOL
+    endif
+    ifeq ($(MEMSUPER), 1)
+      DEFINES += -DMEMORY_SUPERVISION
+    endif
+
+   ifeq ($(TARGET), rtlpc)
+     COPTSNF = $(CFLAGS)
+     MKLIB= i386-linux-ar ruv $@
+     RANLIB= i386-linux-ranlib
+     DEFINES += -D_RT_LINUX_
+   else
+     ifeq ($(TARGET), linuxarm)
+       CC=arm-linux-gcc
+       MKLIB= arm-linux-ar ruv $@
+       RANLIB= arm-linux-ranlib
+       DEFINES += -D_TARGET -D_LINUX_ -DGSP_OSL_LOG
+     else
+       ifeq ($(TARGET), solsparc)
+         CC=gcc
+         MKLIB= ar ruv $@
+         RANLIB= ranlib
+         DEFINES += -D_SOLARIS_ -D_LINUX_
+       else
+         CC=gcc
+         MKLIB= ar ruv $@
+         RANLIB= ranlib
+         DEFINES += -D_LINUX_
+       endif
+     endif
+   endif
+    COPTSNF += $(COPTS) $(DEFINES) $(INCLUDES)
+    COPTS_FILE =
+    INCLUDELIST=$(subst /I ,-I,$(INCLUDES))
+    DEFINELIST=$(subst /D ,-D,$(DEFINES))
+
+    LIB=ar ruv $@
+    LIBEXT=a
+    OBJTAIL=o
+    OSX_LIB=$(LIBDIR)/libosx$(XXX).$(LIBEXT)
+
+    clean:
+		@$(RM) obj/$(TARGET)/$(PLATFORM)$(DB)$(PS)/*.$(OBJTAIL)
+		@$(RM) $(FRAME_LIB)
+
+endif # osenv = sus
+#########################  osx.lib    ##################################
+OSX_INC = ../../inc/typedefs.h ../../inc/vsi.h ../../inc/header.h cust_os.h
+
+OSX_SRC=./
+
+_OSX_OBJS = osx.$(OBJTAIL)
+OSX_OBJS=$(patsubst %.$(OBJTAIL),$(OBJDIR)/%.$(OBJTAIL),$(_OSX_OBJS))
+
+
+foo:
+	echo $(OSX_OBJS)
+	echo $(_OSX_OBJS)
+	echo $(OBJDIR)
+	echo $(OBJTAIL)
+
+osx.$(LIBEXT): $(COPTS_FILE) $(OSX_LIB)
+
+$(OBJDIR) :
+	$(MKDIR) -p $(OBJDIR)
+
+$(OSX_LIB) : $(OBJDIR) $(COPTS_FILE) $(_OSX_OBJS)  makefile
+# OWN_MAKELEVEL == 0 if makefile called directly, == 1 if nested
+  ifneq ($(OWN_MAKELEVEL), 0)
+	@echo checking out and touching using $(MAKE) 
+		$(CHECKOUT) $@
+		touch -c $@
+   else
+		gnumake MAKE=gnumake OWN_MAKELEVEL=1 $(subst \,/,$@ $<)
+		@echo proceeding using $(MAKE) 
+		$(LIB)  $(OSX_OBJS) 
+    ifeq ($(OSENV), sus)
+			$(RANLIB) $@
+    endif
+  endif
+
+
+$(_OSX_OBJS) : %.$(OBJTAIL) : $(OSX_SRC)/%.c  $(OSX_INC)
+#	$(LINT) $(LINT_OPTS) $(DEFINES) $(INCLUDES) $<
+	$(CC) $(COPTSNF) $<
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/frame/frame.def	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,138 @@
+LIBRARY
+DESCRIPTION "GPS Frame"
+EXPORTS
+ vsi_m_new
+ vsi_m_free
+ vsi_m_cfree
+ vsi_m_cnew
+ vsi_m_attach
+ vsi_m_init
+ vsi_p_create
+ vsi_p_exit
+ vsi_p_delete
+ vsi_p_start
+ vsi_p_stop
+ vsi_p_handle
+ vsi_p_name
+ vsi_c_open
+ vsi_c_close
+ vsi_c_clear
+ vsi_c_send
+ vsi_c_free
+ vsi_c_pfree
+ vsi_c_new
+ vsi_c_new_sdu
+ vsi_c_pnew
+ vsi_c_await
+ vsi_c_primitive
+ vsi_c_psend
+ vsi_c_pmax_size
+ vsi_c_sync
+ vsi_c_alloc_send
+ vsi_c_ppass
+ vsi_free
+ vsi_drpo_new
+ vsi_drp_new
+ vsi_dp_new
+ vsi_dp_sum
+ vsi_dp_max_size
+ vsi_t_start
+ vsi_t_pstart
+ vsi_t_stop
+ vsi_t_status
+ vsi_t_config
+ vsi_s_open
+ vsi_s_close
+ vsi_s_get
+ vsi_s_release
+ vsi_o_ttrace
+ _vsi_o_ttrace
+ vsi_o_itrace
+ _vsi_o_itrace
+ vsi_o_ptrace
+ vsi_o_error_ttrace
+ vsi_o_func_ttrace
+ vsi_o_event_ttrace
+ vsi_o_strace
+ vsi_o_assert
+ vsi_o_set_htrace
+ vsi_gettaskname
+ vsi_gettaskhandle
+ vsi_e_name
+ vsi_e_handle
+ vsi_gettaskflags
+ vsi_gettracemask
+ vsi_settracemask
+ vsi_t_time
+ vsi_t_sleep
+ vsi_d_create
+ vsi_d_init
+ vsi_d_exit
+ vsi_d_open
+ vsi_d_close
+ vsi_d_read
+ vsi_d_write
+ vsi_d_setsignal
+ vsi_d_resetsignal
+ vsi_d_setconfig
+ vsi_d_getconfig
+ vsi_d_flush
+ vsi_trc_free
+ vsi_trcsuspend
+ vsi_object_info
+ pf_StartAllTasks
+ pf_CreateAllEntities
+ pf_Init
+ pf_get_frameenv
+ os_CreateTask
+ os_DestroyTask
+ os_StartTask
+ os_StopTask
+ os_GetTaskName
+ os_GetTaskHandle
+ os_SuspendTask
+ os_TaskInformation
+ os_CreateQueue
+ os_DestroyQueue
+ os_OpenQueue
+ os_GetQueueName
+ os_create_extq
+ os_CloseQueue
+ os_SendToQueue
+ os_ReceiveFromQueue
+ os_QueueInformation
+ os_CreatePartitionPool
+ os_AllocatePartition
+ os_DeallocatePartition
+ os_CreateMemoryPool
+ os_AllocateMemory
+ os_DeallocateMemory
+ os_PartitionInformation
+ os_MemoryInformation
+ os_CreateTimer
+ os_DestroyTimer
+ os_StartTimer
+ os_StopTimer
+ os_QueryTimer
+ os_TimerInformation
+ os_CreateSemaphore
+ os_DestroySemaphore
+ os_OpenSemaphore
+ os_CloseSemaphore
+ os_ObtainSemaphore
+ os_ReleaseSemaphore
+ os_SemaphoreInformation
+ os_GetTime
+ os_ObjectInformation
+ SuppressOK
+ rt_RouteRead
+ EntityNameBuf
+ trc_hCommTrace
+ FRM_TST_NAME
+ FRM_RCV_NAME
+ FRM_SYST_NAME
+ FRM_PCO_NAME
+ ext_data_pool_handle
+ int_data_pool_handle
+ PrimGroupHandle
+ DmemGroupHandle
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/frame/frame.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,148 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       frame.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for the frame.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef FRAME_H
+#define FRAME_H
+
+/*==== INCLUDES =============================================================*/
+
+
+/*==== TYPES ================================================================*/
+
+typedef enum { TST_ADR, RCV_ADR, END_OF_COMP_TABLE } T_COMPONENT_ID;
+
+typedef struct 
+{
+  void *RcvAdr;
+  void *TstAdr;
+  void *DrvListAdr;
+  void *InitFuncAdr;
+  UBYTE *FrameEnvAdr;
+} T_CONFIGURATION_ADDRESS;
+
+/*==== CONSTANTS ============================================================*/
+
+#define PF_OK     0
+#define PF_ERROR  -1
+
+#define VSI_CALLER                   0,
+
+#ifdef __FRAME_C__
+  #ifndef RUN_INT_RAM
+    char FRM_TST_NAME[RESOURCE_NAMELEN]  = { 'T','S','T',0x0,0x0,0x0,0x0,0x0 };
+    char FRM_RCV_NAME[RESOURCE_NAMELEN]  = { 'R','C','V',0x0,0x0,0x0,0x0,0x0 };
+    char FRM_SYST_NAME[RESOURCE_NAMELEN] = { 'S','Y','S','T',0x0,0x0,0x0,0x0 };
+    char FRM_PCO_NAME [RESOURCE_NAMELEN] = { 'P','C','O',0x0,0x0,0x0,0x0,0x0 };
+    char const *syst_wrn = "SYSTEM WARNING:";
+  #else
+    extern char FRM_TST_NAME[];
+    extern char FRM_RCV_NAME[];
+    extern char FRM_SYST_NAME[];
+    extern char FRM_PCO_NAME[];
+  #endif
+#else
+    extern char const *syst_wrn;
+#endif
+
+/*
+ * Tokens of the system primitives
+ */
+#define SYSPRIM_REDIRECT_TOKEN   "REDIRECT"
+#define SYSPRIM_CONNECT_TOKEN    "CONNECT"
+#define SYSPRIM_DISCONNECT_TOKEN "DISCONNECT"
+#define SYSPRIM_DUPLICATE_TOKEN  "DUPLICATE"
+#define SYSPRIM_CONFIG_TOKEN     "CONFIG"
+#define SYSPRIM_MEMCHECK_TOKEN   "MEMCHECK"
+#define SYSPRIM_RESET_TOKEN      "RESET"
+#define SYSPRIM_VERSION_TOKEN    "VERSION"
+#define SYSPRIM_CLEAR_TOKEN      "CLEAR"
+#define SYSPRIM_NULL_TOKEN       "NULL"
+#define SYSPRIM_TRACECLASS_TOKEN "TRACECLASS"
+#define SYSPRIM_DISPLAY_TOKEN    "DISPLAY"
+#define SYSPRIM_BOOT_TOKEN       "BOOT"
+#define SYSPRIM_SHOW_MEMORY      "MEMORY"
+#define SYSPRIM_TRC_SUSPEND      "TRCSUSPEND"
+#define SYSPRIM_READ_ROUTING     "ROUTING"
+#define SYSPRIM_STR2IND_VERSION  "STR2INDVERSION"
+#define SYSPRIM_EXIT_TOKEN       "EXIT"
+#define SYSPRIM_REGISTER_TOKEN   "REGISTER"
+#define SYSPRIM_WITHDRAW_TOKEN   "WITHDRAW"
+#define SYSPRIM_STATUS_TOKEN     "STATUS"
+#define SYSPRIM_SUPPRESS_OK      "SUPPRESS_OK"
+#define SYSPRIM_GET_STACK_TIME   "GET_STACK_TIME"
+#define SYSPRIM_IS_STACK_TIME    "IS_STACK_TIME"
+#define SYSPRIM_READ_FFS_DAR     "READ_DAR_FILE"
+#define SYSPRIM_SELECT_TIME_TDMA "TIME_TDMA"
+#define SYSPRIM_CHECK_OWNER      "PPM_CHECK_OWNER"
+#define SYSPRIM_TST_SYNC_REQ     "TST_SYNC_REQ"
+#define SYSPRIM_TST_SYNC_CNF     "TST_SYNC_CNF"
+#define SYSPRIM_TST_SYNC_REJ     "TST_SYNC_REJ"
+#define SYSPRIM_ROUTE_DESCLIST   "ROUTE_DESCLIST"
+#define SYSPRIM_READ_COM_MATRIX  "READ_COM_MATRIX"
+#define SYSPRIM_ISOLATE_TOKEN    "ISOLATE"
+#define SYSPRIM_REGISTER_ERR_IND "REG_ERROR_IND"
+#define SYSPRIM_WITHDRAW_ERR_IND "WITHDRAW_ERROR_IND"
+#define SYSPRIM_CHECK_DESCLIST   "CHECK_DESCLIST"
+#define SYSPRIM_PCHECK           "PCHECK"
+
+
+#define PERIODIC_TIMER      0x8000
+#define TIMEOUT_OCCURRED    0x4000
+#define TIMER_HANDLE_MASK  (~(PERIODIC_TIMER|TIMEOUT_OCCURRED))
+
+/*
+ * message prioritiey
+ */
+#define MSG_PRIMITIVE_PRIO   OS_NORMAL
+#define MSG_SIGNAL_PRIO      OS_URGENT
+#define MSG_TRACE_PRIO       OS_NORMAL
+/*
+ * length for traces
+ */
+#define ITRACE_LEN            (2*sizeof(USHORT)+1)
+#define PTRACE_LEN_OPC16      18
+#define PTRACE_LEN_OPC32      22
+#define STRACE_LEN            80
+
+#define TRACE_TEXT_SIZE    	  (sizeof(T_S_HEADER)+TTRACE_LEN)
+#define TRACE_INDEX_SIZE      (sizeof(T_S_HEADER)+ITRACE_LEN)
+#define TRACE_PRIM_SIZE       (sizeof(T_S_HEADER)+PTRACE_LEN_OPC32)
+#define TRACE_STATE_SIZE    	(sizeof(T_S_HEADER)+STRACE_LEN)
+
+/*==== PROTOTYPES ===========================================================*/
+
+GLOBAL void pf_Init (T_CONFIGURATION_ADDRESS *ConfigAddress);
+GLOBAL SHORT pf_CreateAllEntities (void);
+GLOBAL SHORT pf_StartAllTasks ( void );
+GLOBAL void pf_Timeout (T_HANDLE TaskHandle, T_HANDLE EntityHandle, USHORT TimerIndex );
+GLOBAL void pf_ProcessSystemPrim ( T_HANDLE TaskHandle, T_VOID_STRUCT *pPrim);
+GLOBAL int pf_handle_warning ( USHORT cause, const char * const format,...);
+GLOBAL void InitializeTimer   (void);
+GLOBAL void InitializeTrace   (void);
+GLOBAL void TracePoolstatus   (T_HANDLE Caller );
+GLOBAL void InitializePPM     (void);
+GLOBAL void InitializeDriverConfig (void);
+
+#ifdef _TOOLS_
+extern USHORT pf_get_frameenv (void);
+void set_stack_time (ULONG time);
+void get_local_time (ULONG *time);
+#endif /* _TOOLS_ */
+
+#endif /* FRAME_H */               
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/frame/frame_ps.def	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,97 @@
+LIBRARY
+DESCRIPTION "GPS Frame"
+EXPORTS
+ vsi_m_new
+ vsi_m_free
+ vsi_c_open
+ vsi_c_close
+ vsi_c_clear
+ vsi_c_send
+ vsi_c_free
+ vsi_c_new
+ vsi_c_await
+ vsi_c_primitive
+ vsi_t_start
+ vsi_t_pstart
+ vsi_t_stop
+ vsi_t_status
+ vsi_t_config
+ vsi_s_open
+ vsi_s_close
+ vsi_s_get
+ vsi_s_release
+ vsi_o_ttrace
+ vsi_o_itrace
+ vsi_o_ptrace
+ vsi_o_strace
+ vsi_o_assert
+ vsi_gettaskname
+ vsi_gettaskhandle
+ vsi_gettaskflags
+ vsi_gettracemask
+ vsi_settracemask
+ vsi_t_time
+ vsi_t_sleep
+ vsi_d_init
+ vsi_d_open
+ vsi_d_close
+ vsi_d_read
+ vsi_d_write
+ vsi_d_setsignal
+ vsi_d_resetsignal
+ vsi_d_setconfig
+ vsi_d_getconfig
+ vsi_ppm_new
+ vsi_ppm_rec 
+ vsi_ppm_reuse
+ vsi_ppm_access
+ vsi_ppm_send
+ vsi_ppm_free
+ vsi_trc_free
+ vsi_trc_new
+ vsi_trcsuspend
+ pf_StartAllTasks
+ pf_CreateAllEntities
+ pf_Init
+ os_CreateTask
+ os_DestroyTask
+ os_StartTask
+ os_StopTask
+ os_GetTaskName
+ os_GetTaskHandle
+ os_SuspendTask
+ os_TaskInformation
+ os_CreateQueue
+ os_DestroyQueue
+ os_OpenQueue
+ os_CloseQueue
+ os_SendToQueue
+ os_ReceiveFromQueue
+ os_QueueInformation
+ os_CreatePartitionPool
+ os_AllocatePartition
+ os_DeallocatePartition
+ os_CreateMemoryPool
+ os_AllocateMemory
+ os_DeallocateMemory
+ os_PartitionInformation
+ os_MemoryInformation
+ os_CreateTimer
+ os_DestroyTimer
+ os_StartTimer
+ os_StopTimer
+ os_QueryTimer
+ os_TimerInformation
+ os_CreateSemaphore
+ os_DestroySemaphore
+ os_OpenSemaphore
+ os_CloseSemaphore
+ os_ObtainSemaphore
+ os_ReleaseSemaphore
+ os_SemaphoreInformation
+ os_GetTime
+ os_ObjectInformation
+ CondatMemPoolHandle
+ PrimGroupHandle
+ TestGroupHandle
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/frame/mall.bat	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,714 @@
+@echo off
+rem ----------------------------------------------------------------------------- 
+rem  Project :  
+rem  Modul   :  
+rem ----------------------------------------------------------------------------- 
+rem  Copyright 2004 Texas Instruments Deutschland, AG 
+rem                 All rights reserved. 
+rem 
+rem                 This file is confidential and a trade secret of Texas 
+rem                 Instruments Berlin, AG 
+rem                 The receipt of or possession of this file does not convey 
+rem                 any rights to reproduce or disclose its contents or to 
+rem                 manufacture, use, or sell anything it may describe, in 
+rem                 whole, or in part, without the specific written consent of 
+rem                 Texas Instruments Deutschland, AG. 
+rem ----------------------------------------------------------------------------- 
+rem |  Purpose :  build all FRAME variants
+rem ----------------------------------------------------------------------------- 
+setlocal
+
+set name=FRAME
+set name_small=frame 
+set err_file=%name_small%.err
+
+@if x%_4ver% == x goto need4nt
+@if x%1 == x-help goto help
+@if x%1 == x-test goto test
+@if x%1 == x-guitest goto test
+
+REM default is gnumake:
+set M=gnumake -r
+set MAKE=gnumake
+REM use clearmake if under ClearCase
+REM is clearcase installed ?
+if "%CLEARCASE_PRIMARY_GROUP%" == "" goto options
+REM are we using a clearcase view ?
+cleartool lsview -cview >nul 2>>&1
+if errorlevel 1 goto options
+REM on a clearcase view: use clearmake in gnu mode:
+set M=clearmake -V -C gnu SHELL=%TESTDRIVE%/gpf/tools/bin/sh.exe
+set MAKE=clearmake
+
+:options
+REM set default options
+set clean=0
+set def_ver=DEV_BUILD
+set ver=0
+REM parse command line options
+:parse_opt
+if "%1" == "-clean" set clean=1
+iff "%1" == "-l" then
+  iff "%2" == "" then
+    echo error: no label name specified !
+    goto help
+  endiff
+  set ver=%2
+  shift
+endiff
+shift
+if "%1" != "" goto parse_opt 
+
+if %ver% != 0 echo "using label %ver% (not implemented yet) ..."
+
+
+cd ..\..\gpf
+if exist %err_file% del %err_file% >nul
+
+if %clean% == 1 goto clean
+
+echo *** making FRAME/MISC/TIF libs ***              										>>%err_file% 2>>&1
+
+call initvars gprs ms %TESTDRIVE% \g23m\condat  											>>%err_file% 2>>&1
+
+
+rem nuc arm7 Libraries
+echo ********** nuc arm7        **********      											>>%err_file% 2>>&1
+cd frame
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7
+%M% frame.lib TARGET=nuc PLATFORM=arm7														>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1
+%M% frame.lib TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1										>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 RUN_FLASH=1
+%M% frame.lib TARGET=nuc PLATFORM=arm7 RUN_FLASH=1											>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1
+%M% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1												>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1
+%M% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1								>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1
+%M% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2		
+%M% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_INT_RAM=1	
+%M% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_INT_RAM=1						>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_FLASH=1	
+%M% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_FLASH=1						>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 TOOL_CHOICE=3
+%M% frame.lib TARGET=nuc PLATFORM=arm7 TOOL_CHOICE=3											>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1 TOOL_CHOICE=3
+%M% frame.lib TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 RUN_FLASH=1 TOOL_CHOICE=3
+%M% frame.lib TARGET=nuc PLATFORM=arm7 RUN_FLASH=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 TOOL_CHOICE=3
+%M% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 TOOL_CHOICE=3									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1 TOOL_CHOICE=3
+%M% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1 TOOL_CHOICE=3						>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1 TOOL_CHOICE=3
+%M% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1 TOOL_CHOICE=3						>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3		
+%M% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3						>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_INT_RAM=1	TOOL_CHOICE=3
+%M% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_INT_RAM=1	TOOL_CHOICE=3			>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_FLASH=1 TOOL_CHOICE=3	
+%M% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_FLASH=1 TOOL_CHOICE=3			>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib    TARGET=nuc PLATFORM=arm7 OS_ONLY=1 TOOL_CHOICE=3
+%M% frame.lib TARGET=nuc PLATFORM=arm7 OS_ONLY=1 TOOL_CHOICE=3									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib    TARGET=nuc PLATFORM=arm7 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3
+%M% frame.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+if %? != 0 goto err
+
+cd ..\tst
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7					
+%M% tif.lib TARGET=nuc PLATFORM=arm7														>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1			
+%M% tif.lib TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1											>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 RUN_FLASH=1			
+%M% tif.lib TARGET=nuc PLATFORM=arm7 RUN_FLASH=1											>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1				
+%M% tif.lib TARGET=nuc PLATFORM=arm7 DEBUG=1												>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1		
+%M% tif.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1		
+%M% tif.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2			
+%M% tif.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2										>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_INT_RAM=1	
+%M% tif.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_INT_RAM=1						>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_FLASH=1	
+%M% tif.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_FLASH=1							>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 TOOL_CHOICE=3					
+%M% tif.lib TARGET=nuc PLATFORM=arm7 TOOL_CHOICE=3												>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1 TOOL_CHOICE=3			
+%M% tif.lib TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 RUN_FLASH=1 TOOL_CHOICE=3			
+%M% tif.lib TARGET=nuc PLATFORM=arm7 RUN_FLASH=1 TOOL_CHOICE=3									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 TOOL_CHOICE=3				
+%M% tif.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 TOOL_CHOICE=3										>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1 TOOL_CHOICE=3		
+%M% tif.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1 TOOL_CHOICE=3						>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1 TOOL_CHOICE=3		
+%M% tif.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3			
+%M% tif.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_INT_RAM=1 TOOL_CHOICE=3	
+%M% tif.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_INT_RAM=1 TOOL_CHOICE=3			>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_FLASH=1 TOOL_CHOICE=3	
+%M% tif.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_FLASH=1 TOOL_CHOICE=3				>>..\%err_file% 2>>&1
+if %? != 0 goto err
+
+cd ..\misc
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm7
+%M% misc.lib TARGET=nuc PLATFORM=arm7														>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1
+%M% misc.lib TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1											>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm7 RUN_FLASH=1
+%M% misc.lib TARGET=nuc PLATFORM=arm7 RUN_FLASH=1											>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm7 DEBUG=1
+%M% misc.lib TARGET=nuc PLATFORM=arm7 DEBUG=1												>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1
+%M% misc.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1
+%M% misc.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm7 TOOL_CHOICE=3
+%M% misc.lib TARGET=nuc PLATFORM=arm7 TOOL_CHOICE=3											>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1 TOOL_CHOICE=3
+%M% misc.lib TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm7 RUN_FLASH=1 TOOL_CHOICE=3
+%M% misc.lib TARGET=nuc PLATFORM=arm7 RUN_FLASH=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm7 DEBUG=1 TOOL_CHOICE=3
+%M% misc.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 TOOL_CHOICE=3									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1 TOOL_CHOICE=3
+%M% misc.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1 TOOL_CHOICE=3						>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1 TOOL_CHOICE=3
+%M% misc.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1 TOOL_CHOICE=3						>>..\%err_file% 2>>&1
+if %? != 0 goto err
+
+rem nuc arm9 Libraries
+echo ********** nuc arm9        **********      											>>..\%err_file% 2>>&1
+cd ..\frame
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=3					
+%M% frame.lib TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=3											>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=3				
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=3									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3		
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3						>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm9 ESF=1 TOOL_CHOICE=3					
+%M% frame.lib TARGET=nuc PLATFORM=arm9 ESF=1 TOOL_CHOICE=3										>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1 TOOL_CHOICE=3				
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1 TOOL_CHOICE=3		
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1 TOOL_CHOICE=3					>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=3
+%M% frame.lib TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=3									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib TARGET=nuc PLATFORM=arm9 OS_ONLY=1 ESF=1 TOOL_CHOICE=3
+%M% frame.lib TARGET=nuc PLATFORM=arm9 OS_ONLY=1 ESF=1 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 ESF=1 TOOL_CHOICE=3
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 ESF=1 TOOL_CHOICE=3					>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 ESF=1 TOOL_CHOICE=3 NO_OPT=1
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 ESF=1 TOOL_CHOICE=3 NO_OPT=1			>>..\%err_file% 2>>&1
+if %? != 0 goto err
+cd ..\tst
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=3					
+%M% tif.lib TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=3												>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=3				
+%M% tif.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=3										>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3			
+%M% tif.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm9 ESF=1 TOOL_CHOICE=3					
+%M% tif.lib TARGET=nuc PLATFORM=arm9 ESF=1 TOOL_CHOICE=3										>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1 TOOL_CHOICE=3				
+%M% tif.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1 TOOL_CHOICE=3			
+%M% tif.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1 TOOL_CHOICE=3					>>..\%err_file% 2>>&1
+if %? != 0 goto err
+cd ..\misc
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=3					
+%M% misc.lib TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=3											>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=3				
+%M% misc.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=3									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+cd ..\frame
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=6					
+%M% frame.lib TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=6											>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=6				
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=6									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=6		
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=6						>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm9 ESF=1 TOOL_CHOICE=6					
+%M% frame.lib TARGET=nuc PLATFORM=arm9 ESF=1 TOOL_CHOICE=6										>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1 TOOL_CHOICE=6				
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1 TOOL_CHOICE=6								>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1 TOOL_CHOICE=6		
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1 TOOL_CHOICE=6					>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=6
+%M% frame.lib TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=6									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=6
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=6							>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib TARGET=nuc PLATFORM=arm9 OS_ONLY=1 ESF=1 TOOL_CHOICE=6
+%M% frame.lib TARGET=nuc PLATFORM=arm9 OS_ONLY=1 ESF=1 TOOL_CHOICE=6							>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 ESF=1 TOOL_CHOICE=6
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 ESF=1 TOOL_CHOICE=6					>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 ESF=1 TOOL_CHOICE=6 NO_OPT=1
+%M% frame.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 ESF=1 TOOL_CHOICE=6 NO_OPT=1			>>..\%err_file% 2>>&1
+if %? != 0 goto err
+cd ..\tst
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=6					
+%M% tif.lib TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=6												>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=6				
+%M% tif.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=6										>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=6			
+%M% tif.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=6							>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm9 ESF=1 TOOL_CHOICE=6					
+%M% tif.lib TARGET=nuc PLATFORM=arm9 ESF=1 TOOL_CHOICE=6										>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1 TOOL_CHOICE=6				
+%M% tif.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1 TOOL_CHOICE=6								>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1 TOOL_CHOICE=6			
+%M% tif.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1 TOOL_CHOICE=6					>>..\%err_file% 2>>&1
+if %? != 0 goto err
+cd ..\misc
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=6					
+%M% misc.lib TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=6											>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=6				
+%M% misc.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=6									>>..\%err_file% 2>>&1
+if %? != 0 goto err
+
+rem nucwin Libraries
+echo ********** nuc pc          **********      											>>..\%err_file% 2>>&1
+cd ..\frame
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=pc					
+%M% frame.lib TARGET=nuc PLATFORM=pc														>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=pc DEBUG=1				
+%M% frame.lib TARGET=nuc PLATFORM=pc DEBUG=1												>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.lib TARGET=nuc PLATFORM=pc DEBUG=1 MEMSUPER=2			
+%M% frame.lib TARGET=nuc PLATFORM=pc DEBUG=1 MEMSUPER=2										>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib    TARGET=nuc PLATFORM=pc OS_ONLY=1
+%M% frame.lib TARGET=nuc PLATFORM=pc OS_ONLY=1												>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% os.lib    TARGET=nuc PLATFORM=pc DEBUG=1 OS_ONLY=1
+%M% frame.lib TARGET=nuc PLATFORM=pc DEBUG=1 OS_ONLY=1										>>..\%err_file% 2>>&1
+if %? != 0 goto err
+cd ..\tst
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=pc					
+%M% tif.lib TARGET=nuc PLATFORM=pc															>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=pc DEBUG=1				
+%M% tif.lib TARGET=nuc PLATFORM=pc DEBUG=1													>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.lib   TARGET=nuc PLATFORM=pc DEBUG=1 MEMSUPER=2			
+%M% tif.lib TARGET=nuc PLATFORM=pc DEBUG=1 MEMSUPER=2										>>..\%err_file% 2>>&1
+if %? != 0 goto err
+cd ..\misc
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=pc					
+%M% misc.lib TARGET=nuc PLATFORM=pc															>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.lib  TARGET=nuc PLATFORM=pc DEBUG=1				
+%M% misc.lib TARGET=nuc PLATFORM=pc DEBUG=1													>>..\%err_file% 2>>&1
+if %? != 0 goto err
+
+rem win32 Libraries
+echo ********** win32           **********      											>>..\%err_file% 2>>&1
+cd ..\misc
+echo %MAKE% misc.dll  TARGET=win32						
+%M% misc.dll TARGET=win32																	>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% misc.dll  TARGET=win32 DEBUG=1					
+%M% misc.dll TARGET=win32 DEBUG=1															>>..\%err_file% 2>>&1
+if %? != 0 goto err
+cd ..\frame
+echo %MAKE% frame.dll TARGET=win32						
+%M% frame.dll TARGET=win32																	>>..\%err_file% 2>>&1
+echo %MAKE% frame.dll TARGET=win32 DEBUG=1					
+%M% frame.dll TARGET=win32 DEBUG=1															>>..\%err_file% 2>>&1
+cd ..\tst
+echo %MAKE% tif.dll   TARGET=win32						
+%M% tif.dll TARGET=win32																	>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% tif.dll   TARGET=win32 DEBUG=1					
+%M% tif.dll TARGET=win32 DEBUG=1															>>..\%err_file% 2>>&1
+if %? != 0 goto err
+cd ..\frame
+echo %MAKE% frame.dll TARGET=win32						
+%M% frame.dll TARGET=win32																	>>..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% frame.dll TARGET=win32 DEBUG=1					
+%M% frame.dll TARGET=win32 DEBUG=1															>>..\%err_file% 2>>&1
+if %? != 0 goto err
+
+echo ********** OSX             **********      											>>..\%err_file% 2>>&1
+cd ..\frame\cust_os
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm7					
+%M% osx.lib TARGET=nuc PLATFORM=arm7														>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1				
+%M% osx.lib TARGET=nuc PLATFORM=arm7 DEBUG=1												>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2			
+%M% osx.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2										>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm7 TOOL_CHOICE=3					
+%M% osx.lib TARGET=nuc PLATFORM=arm7 TOOL_CHOICE=3												>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 TOOL_CHOICE=3				
+%M% osx.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 TOOL_CHOICE=3										>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3			
+%M% osx.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3							>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm7 OS_ONLY=1 TOOL_CHOICE=3					
+%M% osx.lib TARGET=nuc PLATFORM=arm7 OS_ONLY=1 TOOL_CHOICE=3									>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm7 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3				
+%M% osx.lib TARGET=nuc PLATFORM=arm7 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3							>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=3					
+%M% osx.lib TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=3												>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=3				
+%M% osx.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=3										>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3			
+%M% osx.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2	TOOL_CHOICE=3							>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=3					
+%M% osx.lib TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=3								    >>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3				
+%M% osx.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3						    >>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3	NO_OPT=1			
+%M% osx.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3 NO_OPT=1					>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=6					
+%M% osx.lib TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=6												>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=6				
+%M% osx.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=6										>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=6			
+%M% osx.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2	TOOL_CHOICE=6							>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=6					
+%M% osx.lib TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=6								    >>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=6				
+%M% osx.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=6						    >>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=6	NO_OPT=1			
+%M% osx.lib TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=6 NO_OPT=1					>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=pc OS_ONLY=1					
+%M% osx.lib TARGET=nuc PLATFORM=pc OS_ONLY=1												>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+echo %MAKE% osx.lib   TARGET=nuc PLATFORM=pc DEBUG=1 OS_ONLY=1				
+%M% osx.lib TARGET=nuc PLATFORM=pc DEBUG=1 OS_ONLY=1										>>..\..\%err_file% 2>>&1
+if %? != 0 goto err
+
+goto final
+
+
+:clean
+
+echo *** cleaning FRAME/MISC/TIF libs ***
+echo *** cleaning FRAME/MISC/TIF libs ***            								>>%err_file% 2>>&1
+
+echo ********** nuc arm7        **********
+echo ********** nuc arm7        **********      									>>%err_file% 2>>&1
+cd frame
+%M% clean TARGET=nuc PLATFORM=arm7													>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1									>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 RUN_FLASH=1										>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1											>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_INT_RAM=1					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_FLASH=1					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 TOOL_CHOICE=3										>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 RUN_FLASH=1 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1 TOOL_CHOICE=3					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1 TOOL_CHOICE=3					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_INT_RAM=1 TOOL_CHOICE=3		>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_FLASH=1 TOOL_CHOICE=3		>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 OS_ONLY=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3						>>..\%err_file% 2>>&1
+cd ..\tst
+%M% clean TARGET=nuc PLATFORM=arm7													>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1									>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 RUN_FLASH=1										>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1											>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_INT_RAM=1					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_FLASH=1					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 TOOL_CHOICE=3										>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 RUN_FLASH=1 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1 TOOL_CHOICE=3					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1 TOOL_CHOICE=3					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_INT_RAM=1 TOOL_CHOICE=3		>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 RUN_FLASH=1 TOOL_CHOICE=3		>>..\%err_file% 2>>&1
+cd ..\misc
+%M% clean TARGET=nuc PLATFORM=arm7													>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1									>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 RUN_FLASH=1										>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1											>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 TOOL_CHOICE=3										>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 RUN_INT_RAM=1 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 RUN_FLASH=1 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_INT_RAM=1 TOOL_CHOICE=3					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 RUN_FLASH=1 TOOL_CHOICE=3					>>..\%err_file% 2>>&1
+
+echo ********** nuc arm9        **********
+echo ********** nuc arm9        **********      									>>..\%err_file% 2>>&1
+cd ..\frame
+%M% clean TARGET=nuc PLATFORM=arm9													>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1											>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 ESF=1											>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1									>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 OS_ONLY=1										>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 OS_ONLY=1 ESF=1									>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 ESF=1							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=3										>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 ESF=1 TOOL_CHOICE=3									>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1 TOOL_CHOICE=3				>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3						>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=3	ESF=1						>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3	ESF=1				>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3	ESF=1 NO_OPT=1		>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=6										>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=6								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=6					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 ESF=1 TOOL_CHOICE=6									>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1 TOOL_CHOICE=6							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1 TOOL_CHOICE=6				>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=6								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=6						>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=6	ESF=1						>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=6	ESF=1				>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=6	ESF=1 NO_OPT=1		>>..\%err_file% 2>>&1
+cd ..\tst
+%M% clean TARGET=nuc PLATFORM=arm9													>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1											>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 ESF=1											>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1									>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=3										>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 ESF=1 TOOL_CHOICE=3									>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1 TOOL_CHOICE=3							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1	TOOL_CHOICE=3				>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=6										>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=6								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=6					>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 ESF=1 TOOL_CHOICE=6									>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 ESF=1 TOOL_CHOICE=6							>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 ESF=1	TOOL_CHOICE=6				>>..\%err_file% 2>>&1
+cd ..\misc
+%M% clean TARGET=nuc PLATFORM=arm9													>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1											>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=3										>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=3								>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=6										>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=6								>>..\%err_file% 2>>&1
+
+echo ********** nuc pc          **********
+echo ********** nuc pc          **********      									>>..\%err_file% 2>>&1
+cd ..\frame
+%M% clean TARGET=nuc PLATFORM=pc													>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=pc DEBUG=1											>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=pc DEBUG=1 MEMSUPER=2									>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=pc OS_ONLY=1											>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=pc DEBUG=1 OS_ONLY=1									>>..\%err_file% 2>>&1
+cd ..\tst
+%M% clean TARGET=nuc PLATFORM=pc													>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=pc DEBUG=1											>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=pc DEBUG=1 MEMSUPER=2									>>..\%err_file% 2>>&1
+cd ..\misc
+%M% clean TARGET=nuc PLATFORM=pc													>>..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=pc DEBUG=1											>>..\%err_file% 2>>&1
+
+echo ********** win32           **********
+echo ********** win32           **********      									>>..\%err_file% 2>>&1
+cd ..\frame
+%M% clean TARGET=win32																>>..\%err_file% 2>>&1
+%M% clean TARGET=win32 DEBUG=1														>>..\%err_file% 2>>&1
+cd ..\tst
+%M% clean TARGET=win32																>>..\%err_file% 2>>&1
+%M% clean TARGET=win32 DEBUG=1														>>..\%err_file% 2>>&1
+cd ..\misc
+%M% clean TARGET=win32																>>..\%err_file% 2>>&1
+%M% clean TARGET=win32 DEBUG=1														>>..\%err_file% 2>>&1
+
+echo ********** OSX				**********
+echo ********** OSX				**********      									>>..\%err_file% 2>>&1
+cd ..\frame\cust_os
+%M% clean TARGET=nuc PLATFORM=arm7													>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1											>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2								>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9													>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1											>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2								>>..\..\%err_file% 2>>&1
+rem %M% clean TARGET=nuc PLATFORM=arm9 OS_ONLY=1									>>..\..\%err_file% 2>>&1
+rem %M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1							>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 TOOL_CHOICE=3										>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 TOOL_CHOICE=3								>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3					>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 OS_ONLY=1 TOOL_CHOICE=3								>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm7 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3						>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=3										>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=3								>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=3					>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=3								>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3						>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=3	NO_OPT=1			>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 TOOL_CHOICE=6										>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 TOOL_CHOICE=6								>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 MEMSUPER=2 TOOL_CHOICE=6					>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 OS_ONLY=1 TOOL_CHOICE=6								>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=6						>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=arm9 DEBUG=1 OS_ONLY=1 TOOL_CHOICE=6	NO_OPT=1			>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=pc OS_ONLY=1											>>..\..\%err_file% 2>>&1
+%M% clean TARGET=nuc PLATFORM=pc DEBUG=1 OS_ONLY=1									>>..\..\%err_file% 2>>&1
+
+
+goto final
+
+
+:help
+text
+usage:
+mall {-help | 
+      { [-l <LABEL>] | -clean } 
+     }
+example: mall -l FRAME_2.7.1 
+endtext
+goto end
+
+:need4nt
+@echo Error: 4DOS or 4NT is needed
+goto end
+
+:err
+set C_DIR=%V122_DIR%
+cd..
+grep "error " %err_file% 
+@echo Errors occured ! See %err_file% for details.
+endlocal
+quit 1
+
+goto final
+
+:test
+rem TEMP HACK
+echo no automated tests supported so far :-(
+goto final
+
+
+:final
+grep "warning " %err_file% 2> nul
+
+:end
+endlocal
+quit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/frame/nuc/os_defs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,26 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       os_defs.h.c
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for the fixed dimensions of frame.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef OS_DEFS_H
+#define OS_DEFS_H
+
+
+#include "glob_defs.h"
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/frame/prf_func.c	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,380 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       prf_func.c
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  This Modul defines the profiler interface functions.
++----------------------------------------------------------------------------- 
+*/ 
+
+
+
+#ifndef __PRF_FUNC_C__
+#define __PRF_FUNC_C__
+#endif
+
+/*==== INCLUDES ===================================================*/
+
+#include "typedefs.h"
+#include "glob_defs.h"
+#include "vsi.h"
+#include "os.h"
+#include "prf_func.h"
+#include "string.h"
+
+/*==== TYPES ======================================================*/
+
+
+/*==== CONSTANTS ==================================================*/
+
+
+/*==== EXTERNALS ==================================================*/
+
+extern ULONG TraceMask[];
+extern T_HANDLE e_running[];
+
+/*==== VARIABLES ==================================================*/
+
+#ifndef RUN_INT_RAM
+ T_PROFILER_FUNC prf_func; 
+#else
+ extern T_PROFILER_FUNC prf_func; 
+ extern void prf_register ( T_PROFILER_FUNC * func );
+#endif 
+  
+/*==== LINT =======================================================*/
+
+
+/*==== FUNCTIONS ==================================================*/
+
+#ifndef RUN_INT_RAM
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_init
++------------------------------------------------------------------------------
+|  Description  :  initialize profiler API function pointer table.
+|
+|  Parameters   :  void
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void prf_init ( void )
+{
+  if ( prf_func.magic_nr != PRF_INITIALIZED )
+  {
+    memset ( &prf_func, 0, sizeof ( T_PROFILER_FUNC ) );
+  }
+}
+#endif
+
+
+#ifndef RUN_INT_RAM
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_register
++------------------------------------------------------------------------------
+|  Description  :  register the profiler API functions.
+|
+|  Parameters   :  func - pointer to API function pointer table
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void prf_register ( T_PROFILER_FUNC * func )
+{
+  prf_func.log_entity_create      = func->log_entity_create;
+  prf_func.log_entity_delete      = func->log_entity_delete;
+  prf_func.log_entity_activate    = func->log_entity_activate;
+  prf_func.log_function_entry     = func->log_function_entry;
+  prf_func.log_function_exit      = func->log_function_exit;
+  prf_func.log_point_of_interest  = func->log_point_of_interest;
+  prf_func.magic_nr = PRF_INITIALIZED;
+}
+#endif
+
+#ifndef RUN_FLASH
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_log_entity_create
++------------------------------------------------------------------------------
+|  Description  :  log entity create
+|
+|  Parameters   :  entity - unique entity indentifier
+|                  name   - entity name
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void prf_log_entity_create ( void * entity, const char * name )
+{
+  if ( prf_func.log_entity_create != NULL )
+  {
+    prf_func.log_entity_create ( entity, name );
+  }
+}
+#endif
+
+#ifndef RUN_FLASH
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_log_entity_delete
++------------------------------------------------------------------------------
+|  Description  :  log entity delete
+|
+|  Parameters   :  entity - unique entity indentifier
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void prf_log_entity_delete ( void * entity )
+{
+  if ( prf_func.log_entity_delete != NULL )
+  {
+    prf_func.log_entity_delete ( entity );
+  }
+}
+#endif
+
+#ifndef RUN_FLASH
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_log_entity_activate
++------------------------------------------------------------------------------
+|  Description  :  log entity activate
+|
+|  Parameters   :  entity - unique entity indentifier
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void prf_log_entity_activate ( void * entity )
+{
+  if ( prf_func.log_entity_activate != NULL )
+  {
+    prf_func.log_entity_activate ( entity );
+  }
+}
+#endif
+
+#ifndef RUN_FLASH
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_log_function_entry
++------------------------------------------------------------------------------
+|  Description  :  log function entry
+|
+|  Parameters   :  function - unique function indentifier
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void prf_log_function_entry ( void * function )
+{
+T_HANDLE caller;
+
+  caller = e_running [ os_MyHandle() ];
+  if ( TraceMask [ caller ] & TC_PROFILER )
+  {
+    if ( prf_func.log_function_entry != NULL )
+    {
+      prf_func.log_function_entry ( function );
+    }
+  }
+}
+#endif
+
+#ifndef RUN_FLASH
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_log_function_exit
++------------------------------------------------------------------------------
+|  Description  :  log function exit
+|
+|  Parameters   :  function - unique function indentifier
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void prf_log_function_exit ( void * function )
+{
+T_HANDLE caller;
+
+  caller = e_running [ os_MyHandle() ];
+  if ( TraceMask [ caller ] & TC_PROFILER )
+  {
+    if ( prf_func.log_function_exit != NULL )
+    {
+      prf_func.log_function_exit ( function );
+    }
+  }
+}
+#endif
+
+#ifndef RUN_FLASH
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_log_point_of_interest
++------------------------------------------------------------------------------
+|  Description  :  log point of interest
+|
+|  Parameters   :  poi - unique function indentifier
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void prf_log_point_of_interest ( const char * poi )
+{
+T_HANDLE caller;
+
+  caller = e_running [ os_MyHandle() ];
+  if ( TraceMask [ caller ] & TC_PROFILER )
+  {
+    if ( prf_func.log_point_of_interest != NULL )
+    {
+      prf_func.log_point_of_interest ( poi );
+    }
+  }
+}
+#endif
+
+//#define TEST_PROFILER_API
+#ifdef TEST_PROFILER_API
+
+#ifndef RUN_FLASH
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_register
++------------------------------------------------------------------------------
+|  Description  :  register the profiler API functions.
+|
+|  Parameters   :  func - pointer to API function pointer table
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void log_entity_create ( void * entity, const char * name )
+{
+  vsi_o_ttrace ( e_running[os_MyHandle()], TC_SYSTEM, "PRF: Create entity %s, id=%d", name, entity );
+}
+#endif
+
+#ifndef RUN_FLASH
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_log_entity_delete
++------------------------------------------------------------------------------
+|  Description  :  log entity delete
+|
+|  Parameters   :  entity - unique entity indentifier
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void log_entity_delete ( void * entity )
+{
+  vsi_o_ttrace ( e_running[os_MyHandle()], TC_SYSTEM, "PRF: Delete entity id=%d", entity );
+}
+#endif
+
+#ifndef RUN_FLASH
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_log_entity_activate
++------------------------------------------------------------------------------
+|  Description  :  log entity activate
+|
+|  Parameters   :  entity - unique entity indentifier
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void log_entity_activate ( void * entity )
+{
+T_HANDLE caller;
+extern T_HANDLE TST_Handle;
+
+  caller = e_running[os_MyHandle()];
+  if ( caller != TST_Handle )
+    vsi_o_ttrace ( caller, TC_SYSTEM, "PRF: Activate entity %d", entity );
+}
+#endif
+
+#ifndef RUN_FLASH
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_log_function_entry
++------------------------------------------------------------------------------
+|  Description  :  log function entry
+|
+|  Parameters   :  function - unique function indentifier
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void log_function_entry ( void * function )
+{
+  vsi_o_ttrace ( e_running[os_MyHandle()], TC_SYSTEM, "PRF: Function entry %s", function );
+}
+#endif
+
+#ifndef RUN_FLASH
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_log_function_exit
++------------------------------------------------------------------------------
+|  Description  :  log function exit
+|
+|  Parameters   :  function - unique function indentifier
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void log_function_exit ( void * function )
+{
+  vsi_o_ttrace ( e_running[os_MyHandle()], TC_SYSTEM, "PRF: Function exit %s", function );
+}
+#endif
+
+#ifndef RUN_FLASH
+/*
++------------------------------------------------------------------------------
+|  Function     :  prf_log_point_of_interest
++------------------------------------------------------------------------------
+|  Description  :  log point of interest
+|
+|  Parameters   :  poi - unique function indentifier
+|
+|  Return       :  void
++------------------------------------------------------------------------------
+*/
+void log_point_of_interest ( const char * poi )
+{
+  vsi_o_ttrace ( e_running[os_MyHandle()], TC_SYSTEM, "PRF: POI %s", poi );
+}
+#endif
+
+#ifndef RUN_FLASH
+T_PROFILER_FUNC profiler_functions =
+{
+PRF_INITIALIZED,
+log_entity_create,
+log_entity_delete,
+log_entity_activate,
+log_function_entry,
+log_function_exit,
+log_point_of_interest,
+};
+#endif
+
+#endif /* TEST_PROFILER_API */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/frame/route.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,72 @@
+/* 
++----------------------------------------------------------------------------- 
+|  File:       route.h
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Type definitions and prototypes for routing.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef __ROUTE_H__
+#define __ROUTE_H__
+
+#define RT_DUPLICATE    0x01
+#define RT_REDIRECT     0x02
+#define RT_DESTROY      0x04
+#define RT_COMMAND_MASK (RT_DUPLICATE|RT_REDIRECT|RT_DESTROY)
+
+#define RT_CLEAR_ENTRY         0x10
+#define RT_ALL_DESTINATION     0x20
+
+typedef enum { RT_STORE = 1, RT_DELETE } RT_ENTRY;
+typedef enum { RT_PRIMITIVE_TYPE = 1, RT_SIGNAL_TYPE, RT_TIMEOUT_TYPE } RT_MESSAGE_TYPE;
+
+typedef struct _T_ROUTING_ENTRY
+{
+  T_HANDLE  SndTaskHandle;    /* sender of a mesage */
+  T_HANDLE	OldDestComHandle; /* original destination queue handle */
+  T_HANDLE	OldDestTaskHandle;/* original destination task handle */
+  T_HANDLE	NewDestComHandle;	/* new destination queue handle */
+  RT_MESSAGE_TYPE MsgType;    /* message type (primitive,timeout,signal) */
+  ULONG	  opcStatus;			    /* mask for messages to be routed */
+  ULONG 	opcMask;			      /* relevant bits in opcStatus */
+  int     Command;			      /* redirect/duplicate */
+  char ExtDest[RESOURCE_NAMELEN];
+  struct _T_ROUTING_ENTRY * pNextEntry;
+  struct _T_ROUTING_ENTRY * pPrevEntry;
+} T_FRM_ROUTING_TABLE_ENTRY;
+
+#define RT_OK        0
+#define RT_ERROR   (-1)
+#define RT_NO_MEM  (-2)
+
+#define ROUTE_ALL  (T_HANDLE)0xFFFF
+
+#define RT_CLEAR_TOKEN    "CLEAR"
+#define RT_ALL_TOKEN      "ALL"
+
+#define RT_SIGNAL_TOKEN   "S"
+#define RT_TIMEOUT_TOKEN  "T"
+
+GLOBAL SHORT rt_Init (void);
+GLOBAL SHORT rt_RoutingModify ( T_HANDLE TaskHandle, char *Command, char *String);
+GLOBAL SHORT rt_ConnectRoute ( T_HANDLE TaskHandle, char *Destination);
+GLOBAL SHORT rt_DisconnectRoute ( T_HANDLE TaskHandle, char *Destination);
+GLOBAL SHORT rt_Route ( T_HANDLE SndTaskHandle, T_HANDLE RcvComHandle, USHORT Prio, ULONG Suspend, OS_QDATA *Msg );
+GLOBAL SHORT rt_RouteRead ( T_HANDLE TaskHandle, char *token );               
+GLOBAL void rt_ExtPrimitive ( T_HANDLE TaskHandle, T_HANDLE DestComHandle, T_HANDLE OrgDestComHandle, char *ExtDest, OS_QDATA *Msg ) ;
+GLOBAL SHORT rt_isolate_entity ( T_HANDLE caller, char *entity );
+GLOBAL int rt_desclist_to_sdu ( T_HANDLE caller, T_HANDLE dst, T_PRIM_HEADER *prim, T_PRIM_HEADER **sdu_prim );
+               
+
+#endif /* ROUTE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/CDG_ENTER.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,232 @@
+
+/*
++------------------------------------------------------------------------------
+|  File:       cdg_enter.h
++------------------------------------------------------------------------------
+|                 Copyright Texas Instruments AG Berlin 2002-2003, Berlin
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Condat AG.
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments AG Berlin.
++------------------------------------------------------------------------------
+| Purpose:    Check the SrcFileTime of the cdginc header files at link time.
+|             
+|             The macros in this file help to detect version mismatch between 
+|             header files included for build of different libraries. 
+|             Example of a linker error: 
+|             xx_tdc_3_constraints.obj : error LNK2001: 
+|             unresolved external symbol 
+|             "char  BadLibVersionCheck____P_XX_TDC_3_VAL_H____Thu_Dec_12_17_49_56_2002" 
+|             (?BadLibVersionCheck____P_XX_TDC_3_VAL_H____Thu_Dec_12_17_49_56_2002@@3DA)
+|             \gpf\util\teststack\bin\test_xx_tdc\xx_tdc.dll : 
+|                                  fatal error LNK1120: 1 unresolved externals
+|             Error executing link.exe.
+| 
+|             The first group of macros (protected by CDG_ENTER) are necessary 
+|             to build the strings of type "BadLibVersionCheck__xxx".
+|  
+|             They need in turn other macros which are set in the *.h files of 
+|             cdginc, tdcinc or message_san.h directory.
+|             (e.g. CDG_ENTER__M_XX_VAL_H__FILE_TYPE) 
+|
+|             The check is done only for the header files of TDC, where 
+|             ENABLE__CDG_ENTER__SANITY_CHECK is switched on.
+|
++------------------------------------------------------------------------------
+*/
+#ifndef CDG_ENTER
+#define CDG_ENTER
+
+/*------- START <Fix for long identifiers for Arm 7 compiler - LHC> ----------*/
+/* ccdid.h */
+#define CCD_ID_UMTS_AS_ASN1__ho_to_utrancommand_r3_ies__spec_mode__preconf__pre_config_mode__default_config__default_config_mode                                                                      shortname001
+#define CCD_ID_UMTS_AS_ASN1__ho_to_utrancommand_r3_ies__spec_mode__preconf__pre_config_mode__default_config__default_config_identity                                                                  shortname002
+#define CCD_ID_UMTS_AS_ASN1__inter_freq_meas_quantity__reporting_criteria__inter_freq_reporting_criteria__mode_specific_info__fdd__freq_qual_estimate_quantity_fdd                                    shortname003
+#define CCD_ID_UMTS_AS_ASN1__inter_freq_meas_quantity__reporting_criteria__inter_freq_reporting_criteria__mode_specific_info__tdd__freq_qual_estimate_quantity_tdd                                    shortname004
+#define CCD_ID_UMTS_AS_ASN1__inter_freq_meas_quantity__reporting_criteria__inter_freq_reporting_criteria__mode_specific_info__body__fdd                                                               shortname005
+#define CCD_ID_UMTS_AS_ASN1__inter_freq_meas_quantity__reporting_criteria__inter_freq_reporting_criteria__mode_specific_info__body__tdd                                                               shortname006
+#define CCD_ID_UMTS_AS_ASN1__inter_freq_meas_quantity__reporting_criteria__inter_freq_reporting_criteria__mode_specific_info__body                                                                    shortname007
+#define CCD_ID_UMTS_AS_ASN1__inter_freq_meas_quantity__reporting_criteria__inter_freq_reporting_criteria__mode_specific_info                                                                          shortname008
+#define CCD_ID_UMTS_AS_ASN1__meas_results_on_rach__current_cell__mode_specific_info__fdd__meas_quantity__body__cpich_ec_n0                                                                            shortname009
+#define CCD_ID_UMTS_AS_ASN1__meas_results_on_rach__current_cell__mode_specific_info__fdd__meas_quantity__body__cpich_rscp                                                                             shortname010
+#define CCD_ID_UMTS_AS_ASN1__meas_results_on_rach__current_cell__mode_specific_info__fdd__meas_quantity__body__pathloss                                                                               shortname011
+#define CCD_ID_UMTS_AS_ASN1__meas_results_on_rach__current_cell__mode_specific_info__fdd__meas_quantity__body__spare                                                                                  shortname012
+#define CCD_ID_UMTS_AS_ASN1__meas_results_on_rach__current_cell__mode_specific_info__fdd__meas_quantity__body                                                                                         shortname013
+#define CCD_ID_UMTS_AS_ASN1__monitored_cell_rach_result__mode_specific_info__fdd__meas_quantity__body__cpich_ec_n0                                                                                    shortname014
+#define CCD_ID_UMTS_AS_ASN1__monitored_cell_rach_result__mode_specific_info__fdd__meas_quantity__body__cpich_rscp                                                                                     shortname015
+#define CCD_ID_UMTS_AS_ASN1__pusch_capacity_alloc_info__pusch_alloc__pusch_alloc_assignment__config__old_config__tfcs_id                                                                              shortname016
+#define CCD_ID_UMTS_AS_ASN1__pusch_capacity_alloc_info__pusch_alloc__pusch_alloc_assignment__config__old_config__pusch_identity                                                                       shortname017
+#define CCD_ID_UMTS_AS_ASN1__meas_control__r3__v_390_non_critical_extensions__v_3_a_0_non_critical_extensions__meas_control_v_3_a_0_ext                                                               shortname018
+#define CCD_ID_UMTS_AS_ASN1__meas_control__r3__v_390_non_critical_extensions__v_3_a_0_non_critical_extensions__non_critical_extensions                                                                shortname019
+#define CCD_ID_UMTS_AS_ASN1__meas_control__r3__v_390_non_critical_extensions__v_3_a_0_non_critical_extensions                                                                                         shortname020
+#define CCD_ID_UMTS_AS_ASN1__meas_control__r3__v_390_non_critical_extensions__v_3_a_0_non_critical_extensions__later_non_critical_extensions__meas_control_r3_add_ext                                 shortname021
+#define CCD_ID_UMTS_AS_ASN1__meas_control__r3__v_390_non_critical_extensions__v_3_a_0_non_critical_extensions__later_non_critical_extensions__non_critical_extensions                                 shortname022
+#define CCD_ID_UMTS_AS_ASN1__meas_control__r3__v_390_non_critical_extensions__v_3_a_0_non_critical_extensions__later_non_critical_extensions                                                          shortname023
+
+#define CCD_ID_UMTS_AS_ASN1__ue_positioning_pos_estimate_info__ref_time__cell_timing__mode_specific_info__body__fdd                                                                                   shortname026
+#define CCD_ID_UMTS_AS_ASN1__ue_positioning_pos_estimate_info__ref_time__cell_timing__mode_specific_info__body__tdd                                                                                   shortname027
+#define CCD_ID_UMTS_AS_ASN1__ue_positioning_pos_estimate_info__ref_time__cell_timing__mode_specific_info__body                                                                                        shortname028
+#define CCD_ID_UMTS_AS_ASN1__rrc_connection_setup_complete__v_370_non_critical_extensions__v_380_non_critical_extensions__v_3_a_0_non_critical_extensions__rrc_connection_setup_complete_v_3_a_0_ext  shortname029
+#define CCD_ID_UMTS_AS_ASN1__rrc_connection_setup_complete__v_370_non_critical_extensions__v_380_non_critical_extensions__v_3_a_0_non_critical_extensions__non_critical_extensions                    shortname030
+#define CCD_ID_UMTS_AS_ASN1__rrc_connection_setup_complete__v_370_non_critical_extensions__v_380_non_critical_extensions__rrc_connection_setup_complete_v_380_ext                                     shortname031
+#define CCD_ID_UMTS_AS_ASN1__rrc_connection_setup_complete__v_370_non_critical_extensions__v_380_non_critical_extensions__v_3_a_0_non_critical_extensions                                             shortname032
+#define CCD_ID_UMTS_AS_ASN1__rrc_connection_setup_complete__v_370_non_critical_extensions__v_380_non_critical_extensions                                                                              shortname033
+#define CCD_ID_UMTS_AS_ASN1__rrc_connection_setup_complete__v_370_non_critical_extensions__v_380_non_critical_extensions__v_3_a_0_non_critical_extensions__later_non_critical_extensions__rrc_connection_setup_complete_r3_add_ext          shortname034
+#define CCD_ID_UMTS_AS_ASN1__rrc_connection_setup_complete__v_370_non_critical_extensions__v_380_non_critical_extensions__v_3_a_0_non_critical_extensions__later_non_critical_extensions__non_critical_extensions                           shortname035
+#define CCD_ID_UMTS_AS_ASN1__rrc_connection_setup_complete__v_370_non_critical_extensions__v_380_non_critical_extensions__v_3_a_0_non_critical_extensions__later_non_critical_extensions                                                    shortname036
+#define CCD_ID_UMTS_AS_ASN1__ue_capab_info__v_370_non_critical_extensions__v_380_non_critical_extensions__v_3_a_0_non_critical_extensions__ue_capab_info_v_3_a_0_ext                                                                        shortname037
+#define CCD_ID_UMTS_AS_ASN1__ue_capab_info__v_370_non_critical_extensions__v_380_non_critical_extensions__v_3_a_0_non_critical_extensions__non_critical_extensions                                                                          shortname038
+#define CCD_ID_UMTS_AS_ASN1__ue_capab_info__v_370_non_critical_extensions__v_380_non_critical_extensions__v_3_a_0_non_critical_extensions                                                                                                   shortname039
+#define CCD_ID_UMTS_AS_ASN1__ue_capab_info__v_370_non_critical_extensions__v_380_non_critical_extensions__v_3_a_0_non_critical_extensions__later_non_critical_extensions__ue_capab_info_r3_add_ext                                          shortname040
+#define CCD_ID_UMTS_AS_ASN1__ue_capab_info__v_370_non_critical_extensions__v_380_non_critical_extensions__v_3_a_0_non_critical_extensions__later_non_critical_extensions__non_critical_extensions                                           shortname041
+#define CCD_ID_UMTS_AS_ASN1__meas_control_sys_info__use_of_hcs__hcs_not_used__cell_select_qual_measure__cpich_ec_n0__intra_freq_meas_sys_info                                                         shortname042
+#define CCD_ID_UMTS_AS_ASN1__meas_control_sys_info__use_of_hcs__hcs_not_used__cell_select_qual_measure__cpich_ec_n0__inter_freq_meas_sys_info                                                         shortname043
+#define CCD_ID_UMTS_AS_ASN1__meas_control_sys_info__use_of_hcs__hcs_not_used__cell_select_qual_measure__cpich_rscp__intra_freq_meas_sys_info                                                          shortname044
+#define CCD_ID_UMTS_AS_ASN1__meas_control_sys_info__use_of_hcs__hcs_not_used__cell_select_qual_measure__cpich_rscp__inter_freq_meas_sys_info                                                          shortname045
+#define CCD_ID_UMTS_AS_ASN1__meas_control_sys_info__use_of_hcs__hcs_used__cell_select_qual_measure__cpich_ec_n0__intra_freq_meas_sys_info                                                             shortname046
+#define CCD_ID_UMTS_AS_ASN1__meas_control_sys_info__use_of_hcs__hcs_used__cell_select_qual_measure__cpich_ec_n0__inter_freq_meas_sys_info                                                             shortname047
+#define CCD_ID_UMTS_AS_ASN1__meas_control_sys_info__use_of_hcs__hcs_used__cell_select_qual_measure__cpich_rscp__intra_freq_meas_sys_info                                                              shortname048
+#define CCD_ID_UMTS_AS_ASN1__meas_control_sys_info__use_of_hcs__hcs_used__cell_select_qual_measure__cpich_rscp__inter_freq_meas_sys_info                                                              shortname049
+#define CCD_ID_UMTS_AS_ASN1__pusch_capacity_alloc_info__pusch_alloc__pusch_alloc_assignment__config__new_config__pusch_info                                                                           shortname050
+#define CCD_ID_UMTS_AS_ASN1__pusch_capacity_alloc_info__pusch_alloc__pusch_alloc_assignment__config__new_config__pusch_identity                                                                       shortname051
+#define CCD_ID_UMTS_AS_ASN1__meas_control_sys_info__use_of_hcs__hcs_not_used__cell_select_qual_measure__body__cpich_rscp                                                                              shortname052
+#define CCD_ID_UMTS_AS_ASN1__meas_control_sys_info__use_of_hcs__hcs_not_used__cell_select_qual_measure__body__cpich_ec_n0                                                                             shortname053
+#define CCD_ID_UMTS_AS_ASN1__meas_control_sys_info__use_of_hcs__hcs_not_used__cell_select_qual_measure__body                                                                                          shortname054
+#define CCD_ID_UMTS_AS_ASN1__meas_control_sys_info__use_of_hcs__hcs_used__cell_select_qual_measure__body__cpich_rscp                                                                                  shortname055
+#define CCD_ID_UMTS_AS_ASN1__meas_control_sys_info__use_of_hcs__hcs_used__cell_select_qual_measure__body__cpich_ec_n0                                                                                 shortname056
+#define CCD_ID_UMTS_AS_ASN1__inter_rat_ho_info__v_390_non_critical_extensions__present__v_3_a_0_non_critical_extensions__inter_rat_ho_info_v_3_a_0_ext                                                shortname057
+#define CCD_ID_UMTS_AS_ASN1__inter_rat_ho_info__v_390_non_critical_extensions__present__v_3_a_0_non_critical_extensions__non_critical_extensions                                                      shortname058
+#define CCD_ID_UMTS_AS_ASN1__inter_rat_ho_info__v_390_non_critical_extensions__present__v_3_a_0_non_critical_extensions                                                                               shortname059
+#define CCD_ID_UMTS_AS_ASN1__inter_rat_ho_info__v_390_non_critical_extensions__present__v_3_a_0_non_critical_extensions__later_non_critical_extensions                                                shortname060
+#define CCD_ID_UMTS_AS_ASN1__inter_rat_ho_info__v_390_non_critical_extensions__present__v_3_a_0_non_critical_extensions__later_non_critical_extensions__inter_rat_ho_info_v_3_d_0_ext                 shortname061
+#define CCD_ID_UMTS_AS_ASN1__inter_rat_ho_info__v_390_non_critical_extensions__present__v_3_a_0_non_critical_extensions__later_non_critical_extensions__inter_rat_ho_info_r3_add_ext                  shortname062
+#define CCD_ID_UMTS_AS_ASN1__assistance_data_delivery__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions__assistance_data_delivery_r3_add_ext                                        shortname063
+#define CCD_ID_UMTS_AS_ASN1__assistance_data_delivery__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions__non_critical_extensions                                                    shortname064
+#define CCD_ID_UMTS_AS_ASN1__assistance_data_delivery__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions                                                                             shortname065
+#define CCD_ID_UMTS_AS_ASN1__cell_update_cnf__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions__cell_update_cnf_r3_add_ext                                                          shortname066
+#define CCD_ID_UMTS_AS_ASN1__cell_update_cnf__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions__non_critical_extensions                                                             shortname067
+#define CCD_ID_UMTS_AS_ASN1__cell_update_cnf__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions                                                                                      shortname068
+#define CCD_ID_UMTS_AS_ASN1__initial_direct_transfer__v_3_a_0_non_critical_extensions__later_non_critical_extensions__initial_direct_transfer_r3_add_ext                                              shortname069
+#define CCD_ID_UMTS_AS_ASN1__initial_direct_transfer__v_3_a_0_non_critical_extensions__later_non_critical_extensions__non_critical_extensions                                                         shortname070
+#define CCD_ID_UMTS_AS_ASN1__initial_direct_transfer__v_3_a_0_non_critical_extensions__later_non_critical_extensions                                                                                  shortname071
+#define CCD_ID_UMTS_AS_ASN1__phys_ch_reconf__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions__phys_ch_reconf_r3_add_ext                                                            shortname072
+#define CCD_ID_UMTS_AS_ASN1__phys_ch_reconf__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions__non_critical_extensions                                                              shortname073
+#define CCD_ID_UMTS_AS_ASN1__phys_ch_reconf__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions                                                                                       shortname074
+#define CCD_ID_UMTS_AS_ASN1__rb_release__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions__rb_release_r3_add_ext                                                                    shortname075
+#define CCD_ID_UMTS_AS_ASN1__rb_release__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions__non_critical_extensions                                                                  shortname076
+#define CCD_ID_UMTS_AS_ASN1__transport_ch_reconf__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions__transport_ch_reconf_r3_add_ext                                                  shortname077
+#define CCD_ID_UMTS_AS_ASN1__transport_ch_reconf__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions__non_critical_extensions                                                         shortname078
+#define CCD_ID_UMTS_AS_ASN1__transport_ch_reconf__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions                                                                                  shortname079
+#define CCD_ID_UMTS_AS_ASN1__utran_mobility_info__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions__utran_mobility_info_r3_add_ext                                                  shortname080
+#define CCD_ID_UMTS_AS_ASN1__utran_mobility_info__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions__non_critical_extensions                                                         shortname081
+#define CCD_ID_UMTS_AS_ASN1__utran_mobility_info__r3__v_3_a_0_non_critical_extensions__later_non_critical_extensions                                                                                  shortname082
+
+/* m_umts_as_asn1_inc.h */
+#define T_UMTS_AS_ASN1_inter_freq_meas_quantity__reporting_criteria__inter_freq_reporting_criteria__mode_specific_info__fdd                         shortname100
+#define T_UMTS_AS_ASN1_inter_freq_meas_quantity__reporting_criteria__inter_freq_reporting_criteria__mode_specific_info__tdd                         shortname101
+#define T_UMTS_AS_ASN1_inter_freq_meas_quantity__reporting_criteria__inter_freq_reporting_criteria__mode_specific_info__body                        shortname102
+#define T_UMTS_AS_ASN1_inter_freq_meas_quantity__reporting_criteria__inter_freq_reporting_criteria__mode_specific_info                              shortname103
+#define T_UMTS_AS_ASN1_rrc_connection_setup_complete__v_370_non_critical_extensions__v_380_non_critical_extensions__v_3_a_0_non_critical_extensions shortname104
+#define T_UMTS_AS_ASN1_rrc_connection_setup_complete__v_370_non_critical_extensions__v_380_non_critical_extensions                                  shortname105
+
+/* m_umts_as_asn1_inc.val */
+#define UMTS_AS_ASN1_UL_TIMESLOTS_CODES__MORE_TIMESLOTS__ADDITIONAL_TIMESLOTS__CONSECUTIVE__NUM_ADDITIONAL_TIMESLOTS__RANGE_MIN shortname200
+#define UMTS_AS_ASN1_UL_TIMESLOTS_CODES__MORE_TIMESLOTS__ADDITIONAL_TIMESLOTS__CONSECUTIVE__NUM_ADDITIONAL_TIMESLOTS__RANGE_MAX shortname201
+#define UMTS_AS_ASN1_INTER_FREQ_MEAS_QUANTITY__REPORTING_CRITERIA__INTER_FREQ_REPORTING_CRITERIA__MODE_SPECIFIC_INFO__FDD__TAG  shortname202
+#define UMTS_AS_ASN1_INTER_FREQ_MEAS_QUANTITY__REPORTING_CRITERIA__INTER_FREQ_REPORTING_CRITERIA__MODE_SPECIFIC_INFO__TDD__TAG  shortname203
+/*------- END <Fix for long identifiers for Arm 7 compiler - LHC>-----------*/
+
+
+
+//Mapping types due to issue/problem with CCDGEN_2.3.6 - KSP
+//typedef typename T_TDC_INTERFACE_UMTS_AS_ASN1_uarfcn T_TDC_INTERFACE_GSI_uarfcn
+#define T_TDC_INTERFACE_GSI_uarfcn T_TDC_INTERFACE_UMTS_AS_ASN1_uarfcn 
+#define T_TDC_HANDLE_GSI_uarfcn T_TDC_HANDLE_UMTS_AS_ASN1_uarfcn
+#define T_TDC_INTERFACE_GSI_primary_scrambling_code T_TDC_INTERFACE_UMTS_AS_ASN1_primary_scrambling_code 
+#define T_TDC_HANDLE_GSI_primary_scrambling_code T_TDC_HANDLE_UMTS_AS_ASN1_primary_scrambling_code 
+#define T_GSI_start_val T_UMTS_AS_ASN1_start_val
+
+
+/* we need a 2 stage approach to expand A and B before concatting them */
+#define CDG_ENTER_CONCATx(A,B) A##B
+#define CDG_ENTER_CONCAT(A,B) CDG_ENTER_CONCATx(A,B)
+#define CDG_ENTER_CONCAT3x(A,B,C) A##B##C
+#define CDG_ENTER_CONCAT3(A,B,C) CDG_ENTER_CONCAT3x(A,B,C)
+#define CDG_ENTER_CONCAT4x(A,B,C,D) A##B##C##D
+#define CDG_ENTER_CONCAT4(A,B,C,D) CDG_ENTER_CONCAT4x(A,B,C,D)
+
+/* we need a 2 stage approach to expand A before stringifying it */
+#define CDG_ENTER_STRINGx(A) #A
+#define CDG_ENTER_STRING(A) CDG_ENTER_STRINGx(A)
+
+#define CDG_ENTER_GET_PRAGMA(PRAGMA) CDG_ENTER_CONCAT3(CDG_ENTER_,CDG_ENTER__FILENAME,__##PRAGMA)
+
+/* CDG_ENTER_GET_FILE_TYPE is on the form: 
+  CDG_ENTER_FILE_TYPE__TDCINC
+                       <-FT-> 
+
+  FT = CDG_ENTER_GET_PRAGMA(_FILE_TYPE) = CDG_ENTER__P_XX_CCD_DSC_CPP__FILE_TYPE = TDCINC
+*/
+#define CDG_ENTER_GET_FILE_TYPE CDG_ENTER_CONCAT(CDG_ENTER_FILE_TYPE__,CDG_ENTER_GET_PRAGMA(FILE_TYPE))
+
+/* CDG_ENTER_SANITY_NAME is on the form:
+  BadLibVersionCheck____P_XX_TDC_3_VAL_H____Thu_Dec_12_17_49_56_2002
+                  <-- FILENAME  -->   <--   SRC_FILE_TIME   -->       
+*/
+#if 0
+#define CDG_ENTER_SANITY_NAME CDG_ENTER_CONCAT4(BadLibVersionCheck___,CDG_ENTER__FILENAME,___,CDG_ENTER_GET_PRAGMA(LAST_MODIFIED))
+#else
+#define CDG_ENTER_SANITY_NAME CDG_ENTER_CONCAT4(BadLibVersionCheck___,CDG_ENTER__FILENAME,___,CDG_ENTER_GET_PRAGMA(SRC_FILE_TIME))
+#endif
+
+/* create an enumerate sequence of the known file types so we can test which one we have with a '#if A == B' line */
+#define CDG_ENTER_FILE_TYPE__CDGINC 1
+#define CDG_ENTER_FILE_TYPE__TDCINC 2
+#define CDG_ENTER_FILE_TYPE__TDCINC_DSC 3
+#define CDG_ENTER_FILE_TYPE__TDCINC_MAIN 4
+#endif 
+
+/*
+ * The check will be done only for TDC files, where 
+ * ENABLE__CDG_ENTER__SANITY_CHECK is switched on.
+ */
+#if (CDG_ENTER_GET_FILE_TYPE == CDG_ENTER_FILE_TYPE__TDCINC) 
+#define ENABLE__CDG_ENTER__SANITY_CHECK 
+#endif
+
+#ifdef CDG_ENTER_DEBUG
+#pragma message (CDG_ENTER_STRING(CDG_ENTER__FILENAME))
+#pragma message (CDG_ENTER_STRING(CDG_ENTER_SANITY_NAME))
+#pragma message (CDG_ENTER_STRING(CDG_ENTER_GET_FILE_TYPE))
+#endif
+
+#ifdef ENABLE__CDG_ENTER__SANITY_CHECK 
+  #ifdef CDG_ENTER_DEFINE_SANITY
+  /* this part goes into ccddata.lib and tdcinc.lib */
+  char CDG_ENTER_SANITY_NAME;
+  #else
+    #ifdef CDG_ENTER_DEBUG
+    #pragma message (CDG_ENTER_STRING(CDG_ENTER_CONCAT(BadLibVersionCheck___,CDG_ENTER__FILENAME)))
+    #endif
+  /* this part goes into 
+    every stack file using a cdginc .h or .val files (ones for every file used)
+    and similar for tdc
+
+    expands to e.g. 
+      extern char BadLibVersionCheck____P_XX_TDC_3_VAL_H____Thu_Dec_12_17_49_56_2002
+  */
+  extern char CDG_ENTER_SANITY_NAME;
+  /* Originally it was this but since no one actually uses this stuff (we only have 
+    it for the linker to check that versions match) we can save memory by only 
+    storing the 8 lower bits.
+
+    expands to e.g. 
+      static char BadLibVersionCheck____P_XX_TDC_3_VAL_H = (char)(&BadLibVersionCheck____P_XX_TDC_3_VAL_H____Thu_Dec_12_17_49_56_2002);
+  */
+  static char CDG_ENTER_CONCAT(BadLibVersionCheck___,CDG_ENTER__FILENAME) = (char)(&CDG_ENTER_SANITY_NAME);
+  #endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/CDG_LEAVE.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,25 @@
+/*
++------------------------------------------------------------------------------
+|  File:       cdg_leave.h
++------------------------------------------------------------------------------
+|                 Copyright Texas Instruments AG Berlin 2002-2003, Berlin
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Condat AG.
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments AG Berlin.
++------------------------------------------------------------------------------
+| Purpose:    Epilog file for autogenerated files
+|             
+
+|
+| $Identity:$
++------------------------------------------------------------------------------
+*/
+
+#ifdef CDG_ENTER__WARNING_OFF
+  #error this stuff has been removed from \gpf\inc\cdg_enter.h
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/Ccdedit.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,364 @@
+/* 
++-------------------------------------------------------------------------------
+|  Project :  
+|  Modul   :  Ccdedit.h
++-------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++-------------------------------------------------------------------------------
+|  Purpose :  Coder Decoder Edit functions 
++-------------------------------------------------------------------------------
+*/ 
+
+#ifndef __CCDEDIT_H__
+#define __CCDEDIT_H__
+
+#ifdef __cplusplus
+extern  "C" {
+#endif /*_cplusplus*/
+
+/* 
+ * The handle structure for primitives/messages
+ */
+/*
+ * level of substructured elements in substructures
+ */
+#define MAX_LEVELS 20
+
+typedef enum
+{
+  TRAVERSE_ARRAY,
+  TRAVERSE_STRUCTURE
+} T_CTX_STATE;
+
+typedef enum
+{
+  NoArray,
+  FixArray,
+  VarArray
+} T_ATYPE;
+
+typedef enum
+{
+  FromMsg, FromPrim
+} T_ELM_SRC;
+
+typedef struct
+{
+  USHORT      structIdx;
+  USHORT      elemIdx;
+  UBYTE       elemType;   
+  T_CTX_STATE state;
+  USHORT      arrayIndex;
+  USHORT      repeats;                    /* valid repeats          */
+  USHORT      numElems;
+  U32         levelOffset;
+  T_ATYPE     arrayType;                  /* elem is an fix or      */
+                                          /* variable or no array   */
+} T_CCDE_CONTEXT;
+
+typedef struct
+{
+  UBYTE            level;
+  BOOL             canDescent;
+  T_ELM_SRC        source;
+  U32              maxCSize;
+  USHORT           lenVarPart;      /* length of the variable
+                                       part e.g. a SDU        */
+  T_CCDE_CONTEXT   context[MAX_LEVELS];
+} T_CCDE_HANDLE;
+
+typedef enum
+{
+  noptr,
+  usptr,
+  ctptr
+} T_PTRTYPE;
+
+/*
+ * The type of the C-structure component
+ */
+typedef enum
+{
+  T_none,
+  T_byte,
+  T_short,
+  T_long,
+  T_buffer,
+  T_struct,
+  T_union,
+  T_issdu,
+  T_ductrl
+} T_BTYPE;
+
+#define NO_REF              0xffff
+
+#define SHORT_NAME_LENGTH   256
+#define ALIAS_NAME_LENGTH   256
+#define LONG_NAME_LENGTH    100
+#define SYMBOLIC_VAL_LENGTH 150
+
+
+typedef struct
+{
+  T_ELM_SRC esource;                  /* source of element(MSG/PRIM)*/
+  T_BTYPE   btype;                        /* C-type of element      */
+  T_ATYPE   arrayType;                    /* elem is an fix or      */
+  T_PTRTYPE ptrtype;                      /* pointer type */
+  BOOL      isOptional;
+  BOOL      isValid;
+  U32       bytelen;                      /* length in byte         */
+  U32       offset;                       /* byteoffs in C-Structure*/
+                                          /* variable or no array   */
+  USHORT    maxRepeat;                    /* max repeats if isArray */
+  USHORT    validRepeats;                 /* valid repeats          */
+  USHORT    index;                        /* act. idx in array      */
+  USHORT    ccdIndex;
+  UBYTE     level;                        /* level of descending    */
+  BOOL      u_member;
+  U32       u_ctrl;                       /* union tag */
+  USHORT    elemref;                      /* elemref from [pm]elem.cdg */
+  USHORT    bitstring;                    /* it is an ANS1_BITSTRINGS */
+  USHORT    issigned;                     /* it is a signed variable */
+  USHORT    c_implicit;                   /* counter c_xxx is generated */
+  char      sname[SHORT_NAME_LENGTH+1];
+  char      aname[ALIAS_NAME_LENGTH+1];
+  char      lname[LONG_NAME_LENGTH+1];
+  char      symbolicValue[SYMBOLIC_VAL_LENGTH+1];
+  int       valcheck;                     /* indicates if value was in range */
+} T_CCDE_ELEM_DESCR;
+
+/*
+ * Definitions of returnvalues of the ccd_xxxx functions.
+ */
+
+#define CCDEDIT_OK                0
+#define CCDEDIT_PRIM_NOT_FOUND    1
+#define CCDEDIT_END_OF_PRIM       2
+#define CCDEDIT_PRIMITIVE_ERROR   3
+#define CCDEDIT_MESSAGE_NOT_FOUND 1
+#define CCDEDIT_END_OF_MSG        2
+#define CCDEDIT_MESSAGE_ERROR     3
+#define CCDEDIT_COMP_NOT_FOUND    1
+#define CCDEDIT_END_OF_COMP       2
+#define CCDEDIT_COMP_ERROR        3
+#define CCDEDIT_UTAG_ERROR        1
+#define CCDEDIT_DLL_ERROR        10
+#define CCDEDIT_ERROR            -2
+
+/* and for the former tdc functions */
+#define NO_ENTRY_FOUND  0xffffffff
+
+#if !defined (CCDDATA_PREF)
+#if defined (_TOOLS_) && defined (CCDDATA_LOAD)
+#define CCDDATA_PREF(cde_fun) cddl_##cde_fun
+#else
+#define CCDDATA_PREF(cde_fun) cde_fun
+#endif /* _TOOLS_ && CCDDATA_LOAD */
+#endif /* !CCDDATA_PREF */
+
+#ifndef CCDEDIT_C
+
+/*
+ * Initialize the internal data of ccdedit. Must be called before any
+ * of the other functions.
+ */
+extern void CCDDATA_PREF(cde_init) (void);
+
+/*
+ * This function works with similar results like cde_comp_first,
+ * but not the whole comp table is searched for the name of the
+ * component. Instead the previous set elemref in the
+ * parameter edescr is taken to directly jump to the component.
+ * The component found is compared with the given name in
+ * edescr. If equal chandle is defined. Otherwise there is an error.
+ */
+extern USHORT CCDDATA_PREF(cde_get_comp) (T_CCDE_HANDLE*     chandle,
+                                          T_CCDE_ELEM_DESCR* edescr);
+
+/*
+ * Selects the primitive for edit processing. The code of the
+ * primitive (primcode) must be passed to the function.
+ * The function returns a State and the primname in (*name)
+ * and a handle for this edit process (phandle).
+ * After a successful call the component maxCSize of the
+ * phandle contains the size of the C-Structure for this primitive. 
+ */
+extern USHORT CCDDATA_PREF(cde_prim_first)  (T_CCDE_HANDLE      * phandle,
+                                             ULONG               primcode,
+                                             char               * name);
+/*
+ * Get the next element of the selected primitive. All informations
+ * of this element is stored into the element descriptor (pdescr).
+ */
+extern USHORT CCDDATA_PREF(cde_prim_next)   (T_CCDE_HANDLE      * phandle,
+                                             UBYTE                descent,
+                                             T_CCDE_ELEM_DESCR  * pdescr);
+
+
+/*
+ * Selects the message for edit processing. The message type (type),
+ * the (entity) and the (direction) must be passed to this function.
+ * The function returns a State and the messagename in (*name)
+ * and a handle for this edit process (mhandle).
+ * After a successful call the component maxCSize of the
+ * mhandle contains the size of the C-Structure for this message. 
+ */
+extern USHORT CCDDATA_PREF(cde_msg_first)   (T_CCDE_HANDLE      * mhandle,
+                                             UBYTE                type,
+                                             UBYTE                direction,
+                                             UBYTE                entity,
+			                                       char               * name);
+
+
+/*
+ * Get the next element of the selected primitive. All informations
+ * of this element is stored into the element descriptor (iedescr).
+ */
+extern USHORT CCDDATA_PREF(cde_msg_next)    (T_CCDE_HANDLE      * mhandle,
+                                             UBYTE                descent,
+                                             T_CCDE_ELEM_DESCR  * iedescr);
+
+/*
+ * Selects at COMPOSITION (structure) for edit processing.
+ * The short name (compname) of this composition must be passed
+ * to this function.
+ * The function returns a State and ahandle for this
+ * edit process (chandle).
+ * This function may be used for sub-structures (compositions)
+ * of primitives and messages.
+ * After a successful call the component maxCSize of the
+ * chandle contains the size of the C-Structure for this composition. 
+ */
+extern USHORT CCDDATA_PREF(cde_comp_first)  (T_CCDE_HANDLE      * chandle,
+                                             T_ELM_SRC            source,
+                                             char               * compname);
+
+/*
+ * Get the next element of the selected composition. All informations
+ * of this element is stored into the element descriptor (cdescr).
+ */
+extern USHORT CCDDATA_PREF(cde_comp_next)   (T_CCDE_HANDLE      * chandle,
+                                             UBYTE                descent,
+                                             T_CCDE_ELEM_DESCR  * descr);
+
+/*
+ * Add the "Comment" of the SAP-/MSG-catalogues to the member symbolicValue
+ * of a given T_CCDE_ELEM_DESCR.
+ * This functionality was part of cde_read_elem and is now extracted
+ * to a dedicated function.
+ */
+extern char* CCDDATA_PREF(cde_get_symval)   (int                elem_value,
+                                             T_CCDE_ELEM_DESCR* edescr);
+
+/*
+ * Read the value of the element out of the C-Structure (cstruct)
+ * which containes a primitive or a decoded message. The infomations
+ * of the element is stored in the input parameter edescr, wich is
+ * previously assigned by a cde_xxxx_next () call. The value of this
+ * element is stored in the memory area addressed by (*value). 
+ * After this call, the component symbolicValue of the edescr-struct
+ * is updated with a symbolic value string, (if any defined).
+ */
+extern USHORT CCDDATA_PREF(cde_read_elem)   (T_CCDE_HANDLE      * handle,
+                                             void               * cstruct,
+                                             T_CCDE_ELEM_DESCR  * edescr,
+                                             UBYTE              * value);
+
+
+/*
+ * prepares the writing of elements, by setting valid flag,
+ * union controller and length of vaiable arrays if necessary.
+ * First version: union controller only.
+ */
+extern void CCDDATA_PREF(cde_write_prepare) (T_CCDE_HANDLE     * handle,
+                                       void              * cstruct,
+                                       T_CCDE_ELEM_DESCR * edescr);
+
+/*
+ * Store the value from the memory area which is addressed by (*value)
+ * into the corrensponding position into the C-Structure (cstruct)
+ * which containes a primitive or a decoded message. The infomations
+ * of the element is stored in the input parameter edescr, wich is
+ * previously assigned by a cde_xxxx_next () call.
+ */
+extern USHORT CCDDATA_PREF(cde_write_elem)  (T_CCDE_HANDLE      * handle,
+                                             void               * cstruct,
+                                             T_CCDE_ELEM_DESCR  * edescr,
+                                             UBYTE              * value);
+
+
+/*
+ * This function requests if the given name is the name of
+ * a primitive or of a message. If the function returns
+ * CCDEDIT_OK the return parameter source is set to FromPrim
+ * or to FromMsg. Otherwise CCDEDIT_PRIM_NOT_FOUND/CCD_EDIT_MESSAGE_NOT_FOUND
+ * is returned.
+ */
+extern USHORT CCDDATA_PREF(cde_get_type)    (char               * name,
+                                             T_ELM_SRC          * source);
+
+/*
+ * This function requests the opcode of a primitive. The 
+ * name of the primitive is given by the input paramater name.
+ * If the function returns CCDEDIT_OK the parameter primcode
+ * contains the 16 bit opcode. Otherwise CCDEDIT_PRIM_NOT_FOUND
+ * is returned.
+ */ 
+extern USHORT CCDDATA_PREF(cde_get_primcode) (char              * name,
+                                              ULONG             * primcode);
+
+
+
+/*
+ * This function requests the opcode, the direction and the
+ * entity index of a message. The name of the message is given
+ * by the input paramater name.
+ * If the function returns CCDEDIT_OK the return parameters types,
+ * direction and entity contains the right values.
+ * Otherwise CCDEDIT_MESSAGE_NOT_FOUND is returned.
+ */ 
+extern USHORT CCDDATA_PREF(cde_get_msgcode) (char               * name,
+                                             UBYTE              * type,
+                                             UBYTE              * direction,
+                                             UBYTE              * entity);
+
+/*
+ * This function finds out if an AIM is a downlink or uplink.
+ */
+extern int CCDDATA_PREF(cde_get_is_downlink) (ULONG comp_index);
+
+/*
+ * This function searches the comp index in either pcomp or mcomp
+ */
+extern ULONG CCDDATA_PREF(cde_get_comp_index) (CHAR* comp_name,
+                                               T_ELM_SRC table);
+
+/*
+ * This function gets the element name for a given index + offset.
+ */
+extern CHAR* CCDDATA_PREF(cde_get_element_name) (ULONG comp_index,
+                                                 USHORT elem_off,
+                                                 T_ELM_SRC table);
+
+/*
+ * This function gets the array kind - e.g. the cSize of the 
+ * arrays (byte, short og long).
+ */
+extern ULONG CCDDATA_PREF(cde_get_array_kind) (CHAR* var_name, T_ELM_SRC table);
+
+#endif /* !CCDEDIT_C */
+
+#ifdef __cplusplus
+}
+#endif /*_cplusplus*/
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/alert.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,53 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       alert.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  definitions for the ALERT macro.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef ALERT_H
+#define ALERT_H
+
+#undef ALERT
+#undef E_ALERT
+
+#ifndef ALERT_OFF
+  #include "typedefs.h"
+  #include "vsi.h" 
+  
+  extern BOOL _Alert(char *, T_HANDLE, ULONG);
+  extern BOOL alert_info(char *, ...);
+  #define NO_ALERT_INFO alert_info("")
+
+  #define _STR(x) _VAL(x)
+  #define _VAL(x) #x
+  /*
+   * The && FALSE in the end is just to notify the reader that 
+   * FALSE is always returned if the predicate evaluates to false.
+   */
+  #define ALERT(expression, alertclass, function) ((expression) ? ((void) 0) : \
+          (void) (_Alert(__FILE__ "(" _STR(__LINE__) ") \"" #expression "\"", VSI_CALLER TC_ALERT_##alertclass) && (function)))
+ 
+  #define E_ALERT(expression, alertclass, function) ((expression) ? (TRUE) : \
+          (BOOL)  (_Alert(__FILE__ "(" _STR(__LINE__) ") \"" #expression "\"", VSI_CALLER TC_ALERT_##alertclass) && (function) && FALSE))
+
+#else /* ALERT_OFF */
+  #define NO_ALERT_INFO (0)
+  #define ALERT(expression, alertclass, function)   ((void) 0)
+  #define E_ALERT(expression, alertclass, function) (expression)
+#endif /* ALERT_OFF */
+
+#endif /* ALERT_H */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/ccd_codingtypes.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,75 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   : ccd_codingtypes.h
++----------------------------------------------------------------------------- 
+|  Copyright 2004 Texas Instruments Deutschland GmbH
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Deutschland GmbH 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Deutschland GmbH. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definition of constant numbers for coding types used by CCD and 
+|             CCDDATA
++----------------------------------------------------------------------------- 
+*/
+
+#define MAX_CODEC_ID    0x2f
+
+/*
+ * These numbers refer to the place of each used en/decoding function 
+ * in the codec table. The first entry is reserved for cdc_STD_encode and
+ * cdc_STD_decode.
+ */
+#define CCDTYPE_GSM1_V                 0x1
+#define CCDTYPE_GSM1_TV                0x2
+#define CCDTYPE_GSM2_T                 0x3
+#define CCDTYPE_GSM3_V                 0x4
+#define CCDTYPE_GSM3_TV                0x5
+#define CCDTYPE_GSM4_LV                0x6
+#define CCDTYPE_GSM4_TLV               0x7
+#define CCDTYPE_GSM5_V                 0x8
+#define CCDTYPE_GSM5_TLV               0x9
+#define CCDTYPE_GSM6_TLV               0xa
+#define CCDTYPE_GSM7_LV                0xb
+#define CCDTYPE_GSM1_ASN               0xc
+#define CCDTYPE_BCDODD                 0xd
+#define CCDTYPE_BCDEVEN                0xe
+#define CCDTYPE_BCD_NOFILL             0xf
+#define CCDTYPE_BCD_MNC                0x10
+#define CCDTYPE_CSN1_S1                0x11
+#define CCDTYPE_CSN1_SHL               0x12
+#define CCDTYPE_S_PADDING              0x13
+#define CCDTYPE_T30_IDENT              0x14
+#define CCDTYPE_BITSTRING              0x15
+#define CCDTYPE_ASN1_INTEGER           0x16
+#define CCDTYPE_ASN1_SEQUENCE          0x17
+#define CCDTYPE_ASN1_CHOICE            0x18
+#define CCDTYPE_ASN1_OCTET             0x19
+#define CCDTYPE_NO_CODE                0x1a
+#define CCDTYPE_ASN1_INTEGER_EXTENSIBLE   0x1b
+#define CCDTYPE_ASN1_SEQUENCE_EXTENSIBLE  0x1c
+#define CCDTYPE_ASN1_CHOICE_EXTENSIBLE 0x1d
+#define CCDTYPE_ASN1_OBJ_ID            0x1e
+#define CCDTYPE_ASN1_OPEN_TYPE         0x1f
+#define CCDTYPE_NONCRITICAL_EXT        0x20
+#define CCDTYPE_CRITICAL_EXT           0x21
+#define CCDTYPE_S_PADDING_0            0x22
+#define CCDTYPE_CSN1_S0                0x23
+#define CCDTYPE_HL_FLAG                0x24
+#define CCDTYPE_FDD_CI                 0x25
+#define CCDTYPE_TDD_CI                 0x26
+#define CCDTYPE_FREQ_LIST              0x27
+#define CCDTYPE_CSN1_CONCAT            0x28
+#define CCDTYPE_BREAK_COND             0x29
+#define CCDTYPE_GSM5_TV                0x2a
+#define CCDTYPE_CSN1_CHOICE1           0x2b
+#define CCDTYPE_CSN1_CHOICE2           0x2c
+#define CCDTYPE_CSN1_SHL_OPT           0x2d
+#define CCDTYPE_CSN1_S1_OPT            0x2e
+#define CCDTYPE_CSN1_S0_OPT            0x2f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/ccdapi.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,557 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   :  ccdapi.h
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Condat Coder Decoder Application Interface
+|
+|             Use this header to integrate the condat coder decoder
+|             in your target system !
+|
+|             The application must define USE_DRIVER if CCD is
+|             not linked but used as a driver
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef CCDAPI_H
+#define CCDAPI_H
+
+#ifdef __cplusplus
+extern  "C" {
+#endif /*_cplusplus*/
+
+/**************************************************************
+  Types and constants for CCD
+  used in application, in stub1 (api) and in driver body
+ **************************************************************/
+
+/*==== CONSTANTS ==================================================*/
+/*
+ * constants for the direction-parameter for coding/decoding
+ */
+
+#define UPLINK             0
+#define DOWNLINK           1
+#define BOTH		   UPLINK
+
+                                /*  ccd Error codes */
+#define  ccdOK              0
+#define  ccdWarning         1
+#define  ccdError           2
+#ifdef _TOOLS_
+#define  CCD_DLL_ERROR     23
+#endif /* _TOOLS_ */
+
+/* reentrancy */
+#define CCD_REENTRANT      0
+
+/*
+ * Error codes to use with ccd_setError()
+ */
+#define ERR_NO_MORE_ERROR       0   /* Returned by ccd_getFirst/NextError   */
+                                    /* in case of the end of the error list */              
+
+#define ERR_INVALID_CALC        1   /* Invalid combination of calculations  */
+                                    /* Error params: none                   */
+
+#define ERR_PATTERN_MISMATCH    2   /* A spare pattern does not match with  */
+                                    /* the specified content                */
+                                    /* Error params[0] = bitposition        */
+
+#define ERR_COMPREH_REQUIRED    3   /* Comprehension of an unknown TAG      */
+                                    /* required.                            */
+                                    /* Error params[0] = TAG                */
+                                    /*             [1] = bitposition        */
+
+#define ERR_IE_NOT_EXPECTED     4   /* Unknown or unexpected TAG found      */
+                                    /* Error params[0] = TAG                */
+                                    /*             [1] = bitposition        */
+
+#define ERR_IE_SEQUENCE         5   /* A valid TAG is found but not in the  */
+                                    /* defined sequence.                    */
+                                    /* Error params[0] = TAG                */
+                                    /*             [1] = bitposition        */
+
+#define ERR_MAX_IE_EXCEED       6   /* A repeatable TAG is found but it     */
+                                    /* occurs more often than it is defined */
+                                    /* Error params[0] = TAG                */
+                                    /*             [1] = bitposition        */
+
+#define ERR_MAND_ELEM_MISS      7   /* A as mandatory defined element is    */
+                                    /* not in the message                   */
+                                    /* Error params: none                   */
+
+#define ERR_EOC_TAG_MISSING     8   /* A indefinite length is specified for */
+                                    /* an ASN.1 element but the correspond. */
+                                    /* End of Component TAG is missing      */
+                                    /* Error params[0] = TAG                */
+                                    /*             [1] = bitposition        */
+                          
+#define ERR_INVALID_MID         9   /* The message starts with an undefined */
+                                    /* message identifier; more exactly:    */
+                                    /* with the three given parameters mId, */
+                                    /* entity, and direction for the coding */
+                                    /* or decoding of a Message functions   */
+                                    /* CCD was not able to identify the     */
+                                    /* Message                              */
+                                    /* Error params[0] = Message ID         */
+
+#define ERR_INVALID_TYPE       10   /* The actual element has an invalid    */
+                                    /* type e.g. S_PADDING without a spare  */
+                                    /* Error params[0] = bitposition        */
+
+#define ERR_MAX_REPEAT         11   /* A repeatable element occurs to often */
+                                    /* in the message                       */
+
+#define ERR_NO_MEM             12   /* Memory allocation failed. May result */
+                                    /* occur when using pointer types.      */
+                                    /* (Dynamic array addition)             */
+
+#define ERR_ADDR_INFO_PART     13   /* CCD recognizes a message with a      */
+                                    /* disallowed addressing option         */
+
+#define ERR_DISTRIB_PART       14   /* CCD recognizes an error during       */
+                                    /* decoding of the message distribution */
+                                    /* part                                 */
+
+#define ERR_NON_DISTRIB_PART   15   /* CCD recognizes an error during       */
+                                    /* decoding of the message non-         */
+                                    /* distribution part                    */
+
+#define ERR_MESSAGE_ESCAPE     16   /* CCD detects an unknown message part, */
+                                    /* which is marked whith a message      */
+                                    /* escape error label being used to     */
+                                    /* provide an escape for, e.g. a future */
+                                    /* modification of the message syntax   */
+
+#define ERR_IGNORE             17   /* CCD detects a part of the message    */
+                                    /* that is syntactically incorrect and  */
+                                    /* is allowed to ignore this part       */
+
+#define ERR_18                 18   /* dummy to complete error list -       */
+                                    /* may be used in furture enhancement   */
+
+#define ERR_19                 19   /* dummy to complete error list -       */
+                                    /* may be used in furture enhancement   */
+
+#define ERR_INTERNAL_ERROR     20   /* An internal error occured            */
+                                    /* (hopefully not!)                     */
+                                    /* Error params[0] = none               */
+#define ERR_DEFECT_CCDDATA     21   /* The value read from a ccd table      */
+                                    /* (one of the *.cdg files) is not      */
+                                    /* expected by CCD, e.g. extGroup has   */ 
+                                    /* another value than ' ', '+', '-',    */
+                                    /* '!' or '#'.                          */ 
+                                    /* Error params[0] = bitposition        */
+                                    /* this error code is needed only in    */
+                                    /* the development phase.               */
+#define ERR_END_OF_BUF         22   /* According to the lenght indicator    */
+                                    /* there must be more bits to read but  */
+                                    /* end of bit buffer is reached         */
+
+#define ERR_INT_VALUE          23   /* Error on encoding of integer value.  */
+                                    /* IE of coding type ASN1_INTEGER is    */
+                                    /* out of the given range.              */
+
+#define ERR_LONG_MSG           24   /* UNUSED error code                    */
+                                    /* According to l_buf and due to an     */
+                                    /* unknown message extension there are  */
+                                    /* more bits to be decoded than CCD or  */
+                                    /* ccddata expects.                     */
+
+#define ERR_ASN1_ENCODING      25   /* Error on IE in the outermost level.  */
+#define ERR_ASN1_MAND_IE       26   /* Error on mandatory IE of type        */
+                                    /* ASN1_INTEGER. The decoded value is   */
+                                    /* out of the range given by the loaded */
+                                    /* ccd data tables.                     */
+                                    /* data tables.                         */
+#define ERR_ASN1_OPT_IE        27   /* Error on optional IE of type.        */
+                                    /* ASN1_INTEGER. The decoded value is   */
+                                    /* out of the range given by the loaded */
+                                    /* ccd data tables.                     */
+#define ERR_ASN1_COND_IE       28   /* UNUSED error code                    */ 
+#define ERR_COND_ELEM_MISS     29   /* UNUSED error code                    */
+                                    /* Condition is met but the IE is not   */
+                                    /* present in the message.              */
+#define ERR_BUFFER_OF          30   /* On coding, more bits were written,   */
+                                    /* than the input l_buf suggested.      */
+
+#define ERR_NONCRITICAL_EXT    31   /* Warning (if decoding) or error (if   */
+                                    /* encoding) on inappropriate usage of  */
+                                    /* a nonCriticalExtensions element.     */
+                                    /* The CCDTYPE_NONCRITICAL_EXTENSIONS   */
+                                    /* says the IE is not extended yet from */
+                                    /* a CCD point of view. So it needs     */
+                                    /* neither to be encoded nor decoded.   */
+                                    /* In the latter case additional parts  */
+                                    /* at the end the message will be       */
+                                    /* ignored by CCD. Known extensions are */
+                                    /* to be encoded by CCD.                */
+
+#define ERR_CRITICAL_EXT       32   /* Error on inappropriate usage of a    */
+                                    /* nonCriticalExtensions element. The   */
+                                    /* CCDTYPE_CRITICAL_EXTENSIONS says     */
+                                    /* the IE is not extended yet, from a   */
+                                    /* CCD point of view. So it needs not   */
+                                    /* to be encoded or decoded. In latter  */
+                                    /* case message is not comprehendable   */
+                                    /* and must be rejected.                */
+                                   
+#define ERR_INVALID_CCDID      33   /* The ccd identifier for the element   */
+                                    /* to be decoded did not result a valid */
+                                    /* data table entry.                    */
+
+#define ERR_MSG_LEN            34   /* Decoding is just finished. But the   */
+                                    /* CCD internal bit pointer is beyond   */
+                                    /* the given message length, l_buf e.g. */
+
+#define ERR_INVALID_PTR        35   /* Pointer used in C struct for encoding*/
+                                    /* is not valid.                        */
+#define ERR_PROTOCOL_EXTENSION 36   /* IE of type S_PADDING_0 is preceded   */
+                                    /* by 1 instead of 0.                   */
+                                    /* Error params[0] = CCDID              */
+                                    /*             [1] = bitposition        */
+
+#define ERR_BITSTR_COMP        37   /* Length of bit array encoded as       */
+                                    /* composition is bigger than expected  */
+                                    /* Error params[0] = CCDID              */
+                                    /*             [1] = addr in C-struct   */
+
+#define ERR_ELEM_LEN           38   /* The current information element's    */
+                                    /* length doesn't match to the length   */
+                                    /* required by its nested elements      */
+
+#define ERR_LEN_MISMATCH       39   /* The length of a superordinated       */
+                                    /* doesn't match to read an GSM5_V      */
+                                    /* element, which extends to the        */
+                                    /* message end.                         */
+
+#define ERR_CONCAT_LEN         40   /* Coding of a truncated concatenation  */
+                                    /* doesn't fill the rest of message     */
+                                    /* buffer.(length given by l_buf)       */
+
+#define ERR_UNEXPECT_PAD       41   /* an inchoate byte is filled with      */
+                                    /* padding bits which are not expected  */
+                                   
+#define ERR_CSN1_CHOICE        42   /* the number of CHOICE components      */
+                                    /* doesn't match to number of possible  */
+                                    /* alternatives                         */
+
+#define MAX_CCD_ERROR 43
+
+/*
+ * max number of parameters per error for parlist
+ * param ccd_getFirst/NextError
+ */
+#define MAX_ERR_PAR             3 
+#define CCD_ERR_KIND_PARA_LIST  1
+#define CCD_ERR_KIND_IE_TYPE    2
+
+
+/*==== TYPES ======================================================*/
+
+/*
+ * T_MSGBUF contains the coded message.
+ * o_buf specified the * offset (in Bits), * where the message
+ *       starts in the buffer.
+ * l_buf contains the * length (in Bits) of the coded message.
+ * buf   contains the * bitcoded message as an array of Bytes.
+ *
+ * (Do not modify this structure !)
+ */
+
+typedef struct
+{
+  USHORT l_buf;
+  USHORT o_buf;
+  UBYTE  buf [1];
+} T_MSGBUF;
+
+
+/*
+ * new style of error information container, used in umts
+ */
+#ifdef CCD_USE_ENUM_IDS
+#include "ccdid.h"      /* to get enumeration for fault elements */
+typedef T_CCD_ID T_ERR_INFO;
+#else
+typedef ULONG T_ERR_INFO;
+#endif
+
+typedef struct
+{
+  T_ERR_INFO  err_info;
+  ULONG       err_IEaddr;
+} T_CCD_ERR_TYPE;
+
+/*
+ * old style of error information container, used in gsm/gprs
+ */
+#define MAX_ERR_PAR 3
+typedef struct
+{
+  UBYTE  num_para;
+  USHORT err_list[MAX_ERR_PAR];
+} T_CCD_PARA_LIST;
+
+/* 
+ * union supports old and new type of error information container
+ */
+typedef union
+{
+  T_CCD_PARA_LIST  para_list;
+  T_CCD_ERR_TYPE   err_type;
+} T_CCD_ERR_PARA;
+
+/*
+ * general structure for error information passed to CCD caller 
+ */
+typedef struct
+{
+  UBYTE error;
+  UBYTE kind;
+  T_CCD_ERR_PARA para;
+} T_CCD_ERR_ENTRY;
+
+
+/**************************************************************
+  function codes for CCD interface functions
+  used in stub1 (application side) and stub2 (driver side)
+ **************************************************************/
+
+#define CCD_INIT       1
+#define CCD_CODMSG     2
+#define CCD_DECMSG     3
+#define CCD_DECBYTE    4
+#define CCD_CODBYTE    5
+#define CCD_DECLONG    6
+#define CCD_CODLONG    7
+#define CCD_BITCOPY    8
+#define CCD_FIRST_ERR  9
+#define CCD_NEXT_ERR   10
+
+#if !defined (CCDDATA_PREF)
+#if defined (_TOOLS_) && defined (CCDDATA_LOAD)
+#define CCDDATA_PREF(ccd_fun) cddl_##ccd_fun
+#else
+#define CCDDATA_PREF(ccd_fun) ccd_fun
+#endif /* _TOOLS_ && CCDDATA_LOAD */
+#endif /* !CCDDATA_PREF */
+
+#if defined _TOOLS_ || defined (CCD_TEST)
+/*
+ * Preparation for issue patching coded bits for generating
+ * air messages with errors. This feature is not yet supported
+ * by CCD.
+ */
+#define CCDP_NO_ERROR       0
+#define CCDP_NOT_FOUND      1
+#define CCDP_VALIDFLAG_SEEN 2
+#define CCDP_UNKNOWN_ERROR  3
+#define MAXREC 50
+typedef struct
+{
+  U16 elemid[MAXREC];
+  U16 numelems;
+  U16 bitwidth;
+  U8* bits;
+  U8  errorcode;
+} T_patch_info;
+#endif /* _TOOLS_ */
+
+/*==================== description  ===================================*/
+
+/*
+ * ccd_init
+ *
+ * Initializing the ccd-Module, must be called once before
+ * any encoding/decoding
+ */
+
+/*
+ * ccd_begin
+ *
+ * Returns the address of the CCD buffer for decoded
+ * messages and locks it until ccd_end() is called
+ */
+
+/*
+ * ccd_end
+ *
+ * Unlocks the CCD buffer for decoded
+ * messages
+ */
+
+/*
+ * ccd_codeMsg
+ *
+ * layer    : <IN>   	CCDENT_CMCE, CCDENT_MLE ..
+ * direction: <IN>   	UPLINK, DOWNLINK
+ * mBuf     : <IN>   	mBuf.o_buf - Offset in Bits from the
+ *                                   start of mBuf.buf.
+ *            <OUT>  	mBuf.l_buf - Contains the length of
+ *                                   the message in Bits after
+ *                                   coding.
+ *            <OUT>  	mBuf.buf   - Contains the bitcoded message
+ *                                   after coding.
+ * mStruct:    <IN>     Pointer to the message specific structure.
+ *                      The first element must contain the
+ *                 	message-type (PDU-Type) as a UBYTE value.
+ * 
+ * pt       :  <IN>     If pt != 0xff the CCD will not decode the
+ *                      the PDU-Type from the bitstream. In this
+ *                      case pt is the coding of the PDU-Type.  
+ */
+
+/*
+ * ccd_decodeMsg
+ *
+ * layer    :  <IN>    	CCDENT_CMCE, CCDENT_MLE, ...
+ * direction:  <IN>    	UPLINK, DOWNLINK
+ * mBuf     :  <IN>     mBuf.o_buf - Offset in Bits from start
+ *                                   of mBuf.buf where the
+ *                                   message starts.
+ *             <IN>    	mBuf.l_buf - Contains the length of the
+ *                                   message in Bits.
+ *             <IN>     mBuf.buf   - Contains the bitcoded message.
+ * mStruct  :  <OUT>    Pointer to the message specific structure.
+ *                      The first element contains the	message-type
+ *                      (PDU-Type) as a UBYTE value after decoding.
+ * pt       :  <IN>     If pt != 0xff the CCD will not decode the
+ *                      the PDU-Type from the bitstream. In this
+ *                      case pt is the coding of the PDU-Type.
+ */
+
+/**************************************************************
+  function prototypes for CCD interface functions
+  used in application, stub2 (driver side) and driver body
+ **************************************************************/
+#ifndef CCD_PATCH_C
+#ifdef _TOOLS_
+  extern int    CCDDATA_PREF(ccd_set_patch_infos)   (T_patch_info* pinfo);
+#endif /* _TOOLS_ */
+#endif /* CCD_PATCH_C */
+
+#ifndef CCD_C
+  extern BYTE   CCDDATA_PREF(ccd_init)              (void);
+  extern int    CCDDATA_PREF(ccd_exit)              (void);
+
+  extern UBYTE* CCDDATA_PREF(ccd_begin)             (void);
+
+  extern void   CCDDATA_PREF(ccd_end)               (void);
+
+  extern BYTE   CCDDATA_PREF(ccd_decodeMsg)         (UBYTE           entity,
+                                                     UBYTE           direction,
+                                                     T_MSGBUF       *mBuf,
+                                                     UBYTE          *mStruct,
+                                                     UBYTE           pt);
+
+  extern S8     CCDDATA_PREF(ccd_decodeMsgPtr)      (U8             entity,
+                                                     U8             direction,
+                                                     U16            l_buf,
+                                                     U16            o_buf,
+                                                     U8            *buf,
+                                                     U8           **mStructPtr,
+                                                     U8             pt);
+ 
+  extern BYTE   CCDDATA_PREF(ccd_codeMsg)           (UBYTE           entity,
+                                                     UBYTE           direction,
+                                                     T_MSGBUF        *mBuf,
+                                                     UBYTE           *mStruct,
+                                                     UBYTE           pt);
+
+  extern S8     CCDDATA_PREF(ccd_codeMsgPtr)        (U8           entity,
+                                                     U8           direction,
+                                                     U16         *l_buf,
+                                                     U16          o_buf,
+                                                     U8          *buf,
+                                                     U8          *mStruct,
+                                                     U8           pt);
+
+  extern UBYTE  ccd_setStore          (ULONG           regNo,
+                                                     ULONG           value);
+#ifdef _TOOLS_
+  extern ULONG  CCDDATA_PREF(ccd_init_ccddata)      (void);
+#else
+  extern int    ccd_register                        (int        decmsgbuf_size);
+#endif /* _TOOLS_ */
+#endif /*! CCD_C */
+
+#ifndef CCD_ELEM_C
+  extern int    CCDDATA_PREF(ccd_encodeElem)        (ULONG           ccdid,
+                                                     USHORT         *l_buf,
+                                                     USHORT          o_buf,
+                                                     UCHAR          *buf,
+                                                     UCHAR          *eStruct);
+
+  extern int   CCDDATA_PREF(ccd_decodeElem)         (ULONG           ccdid,
+                                                     USHORT          l_buf,
+                                                     USHORT          o_buf,
+                                                     UCHAR          *buf,
+                                                     UCHAR          *eStruct);
+
+#endif /* CCD_ELEM_C */
+
+#ifndef CCD_ERR_C
+  extern UBYTE  CCDDATA_PREF(ccd_getFirstError)     (UBYTE           entity,
+                                                     USHORT         *parlist);
+
+  extern UBYTE  CCDDATA_PREF(ccd_getNextError)      (UBYTE           entity,
+                                                     USHORT         *parlist);
+
+  extern ULONG  CCDDATA_PREF(ccd_getFirstFault)     
+                                             (T_CCD_ERR_ENTRY **ccd_err_entry);
+
+  extern ULONG  CCDDATA_PREF(ccd_getNextFault)  
+                                             (T_CCD_ERR_ENTRY **ccd_err_entry);
+
+  extern void   CCDDATA_PREF(ccd_free_faultlist)    (void);
+
+  extern int    CCDDATA_PREF(ccd_get_numFaults)     (void);
+#endif /*! CCD_ERR_C */
+
+#ifndef CDC_STD_C
+  extern BYTE   CCDDATA_PREF(ccd_decodeByte)        (UBYTE          *bitstream,
+                                                     USHORT          startbit,
+                                                     USHORT          bitlen,
+                                                     UBYTE          *value);
+
+  extern BYTE   CCDDATA_PREF(ccd_codeByte)          (UBYTE          *bitstream,
+                                                     USHORT          startbit,
+                                                     USHORT          bitlen,
+                                                     UBYTE           val);
+
+  extern BYTE   CCDDATA_PREF(ccd_codeLong)          (UBYTE          *bitstream,
+                                                     USHORT          startbit,
+                                                     USHORT          bitlen,
+                                                     ULONG           value);
+
+  extern BYTE   CCDDATA_PREF(ccd_decodeLong)        (UBYTE          *bitstream,
+                                                     USHORT          startbit,
+                                                     USHORT          bitlen,
+                                                     ULONG          *value);
+
+  extern void   CCDDATA_PREF(ccd_bitcopy)           (UBYTE          *dest,
+                                                     UBYTE          *source,
+                                                     USHORT          bitlen,
+                                                     USHORT          offset);
+#endif /*! CCD_STD_C */
+
+
+#ifdef __cplusplus
+}
+#endif /*_cplusplus*/
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/dar_func.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,52 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       dar_func.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  DAR properties.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef __DAR_FUNC_H__
+#define __DAR_FUNC_H__
+
+/*==== CONSTANTS ==================================================*/
+
+#define DAR_INITIALIZED   0xAFFEDEAD
+
+/*==== TYPES ======================================================*/
+
+typedef struct
+{
+  int (*diagnose_swe_filter) (int,char);
+  int (*diagnose_write)(char*,char,char,int);
+  int (*diagnose_write_emergency)(char*,char,int,int);
+  int (*diagnose_generate_emergency)(char*,char,int);
+  int gpf_use_id;
+  int new_entry;
+  char ascii_format;
+  char warning;
+  char error;
+} T_GPF_DAR_PROPERTIES;
+
+typedef struct
+{
+  unsigned int magic_nr;
+  T_GPF_DAR_PROPERTIES * properties;      
+} T_GPF_DAR_STRUCT;
+
+/*==== PROTOTYPES =================================================*/
+
+
+#endif /* __DAR_FUNC_H__ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/dio.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,578 @@
+/*
++-----------------------------------------------------------------------------
+|  Copyright 2004 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose : General definitions of DIO driver interface
++-----------------------------------------------------------------------------
+*/
+
+#ifndef __DIO_H__
+#define __DIO_H__
+
+/*==== INCLUDES =============================================================*/
+
+#include "gdi.h"
+
+/*==== DEFINITIONS ==========================================================*/
+
+/*
+ *  Device Type
+ */ 
+#define DIO_DATA_SER     0x00800000 /* device can transfer serial data       */
+#define DIO_DATA_PKT     0x00400000 /* device can transfer packet data       */
+#define DIO_DATA_MUX     0x00200000 /* device can start a multiplexer        */
+#define DIO_TYPE_ID      0x0000FF00 /* id to separate different capabilities */
+
+#define DIO_TYPE_SER     (DIO_DATA_SER | 0x00000100)                /* serial device */
+#define DIO_TYPE_SER_MUX (DIO_DATA_SER | DIO_DATA_MUX | 0x00000100) /* mux device    */
+#define DIO_TYPE_PKT     (DIO_DATA_PKT | 0x00000100)                /* packet device */
+
+/*
+ *  Device Flags
+ */
+#define DIO_FLAG_SLEEP   0x80000000 /* sleep state allowed                   */
+
+/*
+ * Baud rates 
+ */
+#define DIO_BAUD_921600  0x00800000
+#define DIO_BAUD_812500  0x00400000
+#define DIO_BAUD_460800  0x00200000
+#define DIO_BAUD_406250  0x00100000
+#define DIO_BAUD_230400  0x00080000
+#define DIO_BAUD_203125  0x00040000
+#define DIO_BAUD_115200  0x00020000
+#define DIO_BAUD_57600   0x00010000
+#define DIO_BAUD_38400   0x00008000
+#define DIO_BAUD_33900   0x00004000
+#define DIO_BAUD_28800   0x00002000
+#define DIO_BAUD_19200   0x00001000
+#define DIO_BAUD_14400   0x00000800
+#define DIO_BAUD_9600    0x00000400
+#define DIO_BAUD_7200    0x00000200
+#define DIO_BAUD_4800    0x00000100
+#define DIO_BAUD_2400    0x00000080
+#define DIO_BAUD_1200    0x00000040
+#define DIO_BAUD_600     0x00000020
+#define DIO_BAUD_300     0x00000010
+#define DIO_BAUD_150     0x00000008
+#define DIO_BAUD_110     0x00000004
+#define DIO_BAUD_75      0x00000002
+#define DIO_BAUD_AUTO    0x00000001 /* automatic baud rate detection */
+
+/*
+ * Character framing
+ */
+#define DIO_CF_7N1    0x00000800
+#define DIO_CF_7S1    0x00000400
+#define DIO_CF_7M1    0x00000200
+#define DIO_CF_7E1    0x00000100
+#define DIO_CF_7O1    0x00000080
+#define DIO_CF_7N2    0x00000040
+#define DIO_CF_8N1    0x00000020
+#define DIO_CF_8S1    0x00000010
+#define DIO_CF_8M1    0x00000008
+#define DIO_CF_8E1    0x00000004
+#define DIO_CF_8O1    0x00000002
+#define DIO_CF_8N2    0x00000001
+
+/*
+ * Types of flow control 
+ */
+#define DIO_FLOW_XTR_CTS   0x00000800  /* TX= transp. XON/XOFF   RX=CTS      */
+#define DIO_FLOW_XTR_XOFF  0x00000400  /* TX= transp. XON/XOFF   RX=XON/XOFF */
+#define DIO_FLOW_XTR_NO    0x00000200  /* TX= transp. XON/XOFF   RX=OFF      */
+#define DIO_FLOW_RTS_CTS   0x00000100  /* TX=RTS                 RX=CTS      */
+#define DIO_FLOW_RTS_XOFF  0x00000080  /* TX=RTS                 RX=XON/XOFF */
+#define DIO_FLOW_RTS_NO    0x00000040  /* TX=RTS                 RX=OFF      */
+#define DIO_FLOW_XON_CTS   0x00000020  /* TX=XON/XOFF            RX=CTS      */
+#define DIO_FLOW_XON_XOFF  0x00000010  /* TX=XON/XOFF            RX=XON/XOFF */
+#define DIO_FLOW_XON_NO    0x00000008  /* TX=XON/XOFF            RX=OFF      */
+#define DIO_FLOW_NO_CTS    0x00000004  /* TX=OFF                 RX=CTS      */
+#define DIO_FLOW_NO_XOFF   0x00000002  /* TX=OFF                 RX=XON/XOFF */
+#define DIO_FLOW_NONE      0x00000001  /* TX=OFF                 RX=OFF      */
+
+/*
+ * Serial device flags
+ */
+#define DIO_FLAG_SER_ESC   0x80000000  /* device supports esc seq detection  */
+
+/*
+ *  MUX mode
+ */
+#define DIO_MUX_I      0x00000008  /* advanced option with I frames   */
+#define DIO_MUX_UI     0x00000004  /* advanced option with UI frames  */
+#define DIO_MUX_UIH    0x00000002  /* advanced option with UIH frames */
+#define DIO_MUX_BASIC  0x00000001  /* basic option                    */
+
+/*
+ *  Sleep Mode
+ */
+#define DIO_SLEEP_ENABLE   0x01   /* enter sleep mode if possible */
+#define DIO_SLEEP_DISABLE  0x02   /* do not enter sleep mode      */
+
+/*
+ *  Special Guard Period
+ */
+#define DIO_ESC_OFF 0x0000   /* turn escape sequence detection off */
+
+/*
+ *  Device Mode
+ */
+#define DIO_MODE_MUX  0x00000002  /* acts as 27.010 multiplexer device */
+#define DIO_MODE_SER  0x00000001  /* acts as serial device             */
+
+/*
+ * Control Type
+ */
+#define DIO_CTRL_LINES 0x0001    /* associated structure is T_DIO_CTRL_LINES */
+#define DIO_CTRL_MUX   0x0002    /* associated structure is T_DIO_CTRL_MUX   */
+ 
+/* 
+ * Line State definition & control structure.
+ */
+#define DIO_SA          0x80000000  /* state: read=DTR  write-DSR            */
+#define DIO_SB          0x40000000  /* state: read=RTS  write=DCD            */
+#define DIO_X           0x20000000  /* state: read=RTS  write=CTS            */
+#define DIO_RING        0x10000000  /* state: ring indicator                 */
+#define DIO_ESC         0x08000000  /* state: escape sequence detested.      */
+#define DIO_MUX_STOPPED 0x04000000  /* multiplexer stopped                   */
+#define DIO_BRK         0x02000000  /* state: break received/to be sent      */
+#define DIO_BRKLEN      0x000000FF  /* state: break signal # of characters   */
+
+/*==== TYPES ================================================================*/
+
+/*
+ *  Device Capabilities
+ */ 
+typedef struct 
+{
+  U32         device_type; 
+  U32         device_flags; 
+  U16         mtu_control; 
+  U16         mtu_data; 
+  char const  *driver_name; 
+} T_DIO_CAP;
+
+typedef struct 
+{
+  U32         device_type; 
+  U32         device_flags; 
+  U16         mtu_control; 
+  U16         mtu_data; 
+  char const  *driver_name; 
+  U32         baudrate_auto; 
+  U32         baudrate_fixed; 
+  U32         char_frame; 
+  U32         flow_control; 
+  U32         ser_flags; 
+} T_DIO_CAP_SER;
+
+typedef struct 
+{
+  U32         device_type; 
+  U32         device_flags; 
+  U16         mtu_control; 
+  U16         mtu_data; 
+  char const  *driver_name; 
+  U32         baudrate_auto; 
+  U32         baudrate_fixed; 
+  U32         char_frame; 
+  U32         flow_control; 
+  U32         ser_flags; 
+  U32         mux_mode;
+} T_DIO_CAP_SER_MUX;
+
+typedef struct 
+{
+  U32         device_type; 
+  U32         device_flags; 
+  U16         mtu_control; 
+  U16         mtu_data; 
+  char const  *driver_name; 
+} T_DIO_CAP_PKT;
+
+/*
+ *  Device Control Block
+ */
+typedef struct
+{
+  U32                       device_type;              /*<  0:  4> device identifier with general capability information */
+  U8                        sleep_mode;               /*<  4:  1> enter sleep mode is possible or not                */
+  U8                        _align0;                  /*<  5:  1> alignment                                          */
+  U8                        _align1;                  /*<  6:  1> alignment                                          */
+  U8                        _align2;                  /*<  7:  1> alignment                                          */
+} T_DIO_DCB;
+
+typedef struct
+{
+  U32                       device_type;              /*<  0:  4> device identifier with general capability information */
+  U8                        sleep_mode;               /*<  4:  1> enter sleep mode is possible or not                */
+  U8                        _align0;                  /*<  5:  1> alignment                                          */
+  U8                        _align1;                  /*<  6:  1> alignment                                          */
+  U8                        _align2;                  /*<  7:  1> alignment                                          */
+  U32                       baudrate;                 /*<  8:  4> user set baudrate                                  */
+  U32                       char_frame;               /*< 12:  4> supported character framing                        */
+  U32                       flow_control;             /*< 16:  4> supported modes of flow control                    */
+  U8                        xon;                      /*< 20:  1> set/reset XON for flow control                     */
+  U8                        xoff;                     /*< 21:  1> set/reset XOFF for flow control                    */
+  U8                        esc_char;                 /*< 22:  1> ASCII character which is used in an escape sequence */
+  U8                        _align3;                  /*< 23:  1> alignment                                          */
+  U16                       guard_period;             /*< 24:  2> duration value for escape sequence                 */
+  U8                        _align4;                  /*< 26:  1> alignment                                          */
+  U8                        _align5;                  /*< 27:  1> alignment                                          */
+} T_DIO_DCB_SER;
+
+typedef struct
+{
+  U32                       device_type;              /*<  0:  4> device identifier with general capability information */
+  U8                        sleep_mode;               /*<  4:  1> enter sleep mode is possible or not                */
+  U8                        _align0;                  /*<  5:  1> alignment                                          */
+  U8                        _align1;                  /*<  6:  1> alignment                                          */
+  U8                        _align2;                  /*<  7:  1> alignment                                          */
+  U32                       baudrate;                 /*<  8:  4> user set baudrate                                  */
+  U32                       char_frame;               /*< 12:  4> supported character framing                        */
+  U32                       flow_control;             /*< 16:  4> supported modes of flow control                    */
+  U8                        xon;                      /*< 20:  1> set/reset XON for flow control                     */
+  U8                        xoff;                     /*< 21:  1> set/reset XOFF for flow control                    */
+  U8                        esc_char;                 /*< 22:  1> ASCII character which is used in an escape sequence */
+  U8                        _align3;                  /*< 23:  1> alignment                                          */
+  U16                       guard_period;             /*< 24:  2> duration value for escape sequence                 */
+  U8                        _align4;                  /*< 26:  1> alignment                                          */
+  U8                        _align5;                  /*< 27:  1> alignment                                          */
+  U32                       device_mode;              /*< 28:  4> work mode of device                                */
+  U32                       mux_mode;                 /*< 32:  4> supported multiplexer modes                        */
+  U16                       n1;                       /*< 36:  2> max frame size of mux frame                        */
+  U8                        n2;                       /*< 38:  1> max number of retransmissions                      */
+  U8                        t1;                       /*< 39:  1> acknowledgement timer                              */
+  U8                        t2;                       /*< 40:  1> response timer                                     */
+  U8                        t3;                       /*< 41:  1> wake up response timer                             */
+  U8                        k;                        /*< 42:  1> windows size                                       */
+  U8                        _align6;                  /*< 43:  1> alignment                                          */
+} T_DIO_DCB_SER_MUX;
+
+typedef struct
+{
+  U32                       device_type;              /*<  0:  4> device identifier with general capability information */
+  U8                        sleep_mode;               /*<  4:  1> enter sleep mode is possible or not                */
+  U8                        _align0;                  /*<  5:  1> alignment                                          */
+  U8                        _align1;                  /*<  6:  1> alignment                                          */
+  U8                        _align2;                  /*<  7:  1> alignment                                          */
+} T_DIO_DCB_PKT;
+
+/*
+ *  Data Control
+ */
+typedef struct 
+{
+  U16 control_type ; 
+  U16 length ; 
+}T_DIO_CTRL ; 
+
+typedef struct 
+{
+  U16 control_type; 
+  U16 length;
+  U32 state;
+} T_DIO_CTRL_LINES; 
+
+typedef struct 
+{
+  U16 control_type ; 
+  U16 length ; 
+  U32 state;
+}T_DIO_CTRL_MUX ; 
+
+/*
+ *  DIO Data format.
+ */
+typedef struct
+{
+  U8                        _align0;                  /*<  0:  1> alignment                                          */
+  U8                        _align1;                  /*<  1:  1> alignment                                          */
+  U16                       c_data;                   /*<  2:  2> counter                                            */
+  U8                        *ptr_data;                /*<  4:  4> pointer to  pointer to the first byte of the data buffer segment */
+} T_dio_segment;
+
+typedef struct
+{
+  U16                       length;                   /*<  0:  2> len of dio_ctrl                                    */
+  U8                        _align0;                  /*<  2:  1> alignment                                          */
+  U8                        c_dio_segment;            /*<  3:  1> counter                                            */
+  T_dio_segment             *ptr_dio_segment;         /*<  4:  4> pointer to Structured Element                      */
+} T_dio_buffer;
+
+/*==== PROTOTYPES ===========================================================*/
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_init
++------------------------------------------------------------------------------
+| Description : The function initializes the interface and the drivers.
+|
+| Parameters  : none
+|
+| Return      : DRV_OK          - Initialization successful
+|               DRV_INITIALIZED - Interface already initialized
+|               DRV_INITFAILURE - Initialization failed
+|
++------------------------------------------------------------------------------
+*/
+extern U16 dio_init(void);
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_user_init
++------------------------------------------------------------------------------
+| Description : The function sets the signal callback of a DIO user.
+|
+| Parameters  : user_name       - DIO user name
+|               drv_handle      - unique handle for this user
+|               signal_callback - callback function for this user
+|
+| Return      : DRV_OK             - Callback successfully set
+|               DRV_INVALID_PARAMS - The specified user does not exist
+|               DRV_INTERNAL_ERROR - Internal error
+|               DRV_NOTCONFIGURED  - DIO interface is not yet initialized.
+|
++------------------------------------------------------------------------------
+*/
+extern U16 dio_user_init(char const *      user_name,
+						 U16               drv_handle,
+						 T_DRV_CB_FUNC signal_callback);
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_user_exit
++------------------------------------------------------------------------------
+| Description : Termination of User Operation.
+|
+| Parameters  : user_name - DIO user name
+|
+| Return      : DRV_OK             - User operation successfully terminated.
+|               DRV_INVALID_PARAMS - User operation can not be terminated yet.
+|               DRV_INTERNAL_ERROR - Internal error
+|
++------------------------------------------------------------------------------
+*/
+extern U16 dio_user_exit(char const * user_name);
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_exit
++------------------------------------------------------------------------------
+| Description : Termination of the Interface.
+|
+| Parameters  : none
+|
+| Return      : none
+|
++------------------------------------------------------------------------------
+*/
+extern void dio_exit(void);
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_set_rx_buffer
++------------------------------------------------------------------------------
+| Description : This function provides a receive buffer to the driver.
+|
+| Parameters  : device - device number
+|               buffer - buffer to copy received data in it
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_BUFFER_FULL    - Buffer queue full.
+|               DRV_INVALID_PARAMS - The specified device does not exist or
+|                                    the data buffer is not big enough.
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_NOTCONFIGURED  - The device is not yet configured
+|
++------------------------------------------------------------------------------
+*/
+extern U16 dio_set_rx_buffer(U32            device,
+							 T_dio_buffer * buffer);
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_read
++------------------------------------------------------------------------------
+| Description : This function returns a receive buffer and control information.
+|
+| Parameters  : device       - device number
+|               control_info - control information from the driver
+|               buffer       - buffer with received data in it
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - The specified device does not exist
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_NOTCONFIGURED  - The device is not yet configured
+|
++------------------------------------------------------------------------------
+*/
+extern U16 dio_read(U32             device,
+					T_DIO_CTRL *    control_info,
+					T_dio_buffer ** buffer);
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_write
++------------------------------------------------------------------------------
+| Description : This function provides a send buffer to the driver which
+|               contains data to send.
+|
+| Parameters  : device       - device number
+|               control_info - control information for the driver
+|               buffer       - buffer with data to send
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_BUFFER_FULL    - Buffer queue full.
+|               DRV_INVALID_PARAMS - The specified device does not exist or
+|                                    the data buffer to big.
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_NOTCONFIGURED  - The device is not yet configured
+|
++------------------------------------------------------------------------------
+*/
+extern U16 dio_write(U32            device,
+					 T_DIO_CTRL *   control_info,
+					 T_dio_buffer * buffer);
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_get_tx_buffer
++------------------------------------------------------------------------------
+| Description : This function returns a send buffer provided via dio_write().
+|
+| Parameters  : device - device number
+|               buffer - return sent data buffer
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - The specified device does not exist
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_NOTCONFIGURED  - The device is not yet configured
+|
++------------------------------------------------------------------------------
+*/
+extern U16 dio_get_tx_buffer(U32             device,
+							 T_dio_buffer ** buffer);
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_clear
++------------------------------------------------------------------------------
+| Description : This function is used to clear the hardware send buffer.
+|
+| Parameters  : device - device number
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - The specified device does not exist
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_NOTCONFIGURED  - The device is not yet configured
+|               DRV_INPROCESS      - The driver is busy clearing the buffer
+|
++------------------------------------------------------------------------------
+*/
+extern U16 dio_clear(U32 device);
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_flush
++------------------------------------------------------------------------------
+| Description : With this function the driver is requested to inform the
+|               user, when data of the hardware send buffer have been written
+|               successfully.
+|
+| Parameters  : device - device number
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - The specified device does not exist
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_NOTCONFIGURED  - The device is not yet configured
+|               DRV_INPROCESS      - The driver is busy flushing the buffer
+|
++------------------------------------------------------------------------------
+*/
+extern U16 dio_flush(U32 device);
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_get_capabilities
++------------------------------------------------------------------------------
+| Description : This function is used to retrieve the capabilities of a device.
+|
+| Parameters  : device       - device number
+|               capabilities - Return: Pointer to the device capabilities
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - The specified device does not exist
+|               DRV_INTERNAL_ERROR - Internal driver error
+|
++------------------------------------------------------------------------------
+*/
+extern U16 dio_get_capabilities(U32                device,
+								T_DIO_CAP  ** capabilities);
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_set_config
++------------------------------------------------------------------------------
+| Description : This function is used to configure a device.
+|
+| Parameters  : device - device number
+|               dcb    - pointer to a device control block
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - parameter invalid or out of range
+|               DRV_INTERNAL_ERROR - Internal driver error
+|
++------------------------------------------------------------------------------
+*/
+extern U16 dio_set_config(U32         device,
+						  T_DIO_DCB * dcb);
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_get_config
++------------------------------------------------------------------------------
+| Description : This function reads the device configuration.
+|
+| Parameters  : device - device number
+|               dcb    - pointer to a device control block
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - The specified device does not exist or
+|                                    wrong Device Control Block provided.
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_NOTCONFIGURED  - The device is not yet configured
+|
++------------------------------------------------------------------------------
+*/
+extern U16 dio_get_config(U32         device,
+						  T_DIO_DCB * dcb);
+
+/*
++------------------------------------------------------------------------------
+| Function    : dio_close_device
++------------------------------------------------------------------------------
+| Description : This function is used to close a device.
+|
+| Parameters  : device - device number
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - The specified device can not be closed yet
+|               DRV_INTERNAL_ERROR - Internal driver error
+|
++------------------------------------------------------------------------------
+*/
+extern U16 dio_close_device(U32 device); 
+ 
+#endif /* __DIO_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/dmi.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,283 @@
+/*
++-----------------------------------------------------------------------------
+|  Project :
+|  Modul   : sas_dmi.h
++-----------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose : External interface for SAS_DMI support module
++-----------------------------------------------------------------------------
+*/
+
+#ifndef ANITESAS_DMI__H
+#define ANITESAS_DMI__H
+
+/*==== INCLUDES =============================================================*/
+/*==== CONSTS ===============================================================*/
+
+/*
+*   Nasty Tricks Department
+*/
+
+#define NULLSTRING    \0
+
+#define DMIVSI_CALLER proxyVsiCallerId,
+#define DMIVSI_CALLER_SINGLE proxyVsiCallerId
+#define G23_COMP_REF_TYPE T_HANDLE
+#define G23_NULL_COMP_REF (T_HANDLE)(0)
+
+/* End of N.T.D. */
+
+/*
+*   SAS DMI - Activate / Deactivate Commands
+*             (commands+values defined in Anite
+*             DMID spec. I2477D)
+*/
+
+#define G23_COMP_RR         1
+#define G23_COMP_ALR        2
+#define G23_COMP_PHY        3
+#define G23_COMP_CCD        9
+
+#define SASRPT_ON           1
+#define SASRPT_OFF          0
+#define SASRPT_IS_UPLINK    0
+#define SASRPT_IS_DOWNLINK  1
+#define SASRPT_MSGRSP       0
+#define SASRPT_MSGIGN       1
+#define SASRPT_IDLEMODE     1
+#define SASRPT_DEDIMODE     2
+
+/*
+*   SAS DMID - Activation/Deactivation Flags
+*               (set by corresponding SAS DMID
+*                commands - see above)
+*/
+
+#define SAS_RPRT_ACTIVE__IDLEMODE              0x0001
+#define SAS_RPRT_ACTIVE__DEDICATEDMODE         0x0002
+#define SAS_RPRT_ACTIVE__L3MSG                 0x0004
+#define SAS_RPRT_ACTIVE__L1MSG                 0x0008
+#define SAS_RPRT_ACTIVE__SYNC                  0x0010
+#define SAS_RPRT_ACTIVE__SACCH                 0x0020
+#define SAS_RPRT_ACTIVE__SACCHCOMPLETE         0x0040
+#define SAS_RPRT_ACTIVE__CHANREQIMMEDASSIGN    0x0080
+#define SAS_RPRT_ACTIVE__BCCH                  0x0100
+#define SAS_RPRT_ACTIVE__PAGE                  0x0200
+
+/*
+*   extern procedure prototypes
+*/
+
+#define START_FMT1    1
+#define START_FMT2    2
+
+/*==== TYPES ================================================================*/
+typedef struct _start_du
+{
+  U8    fmtDiscriminator;
+  union
+  {
+    U8              dummyPlaceHolder;
+#ifdef  __T_start__
+    T_start*        fmt1_Start;
+#endif
+#ifdef  __T_start_time__
+    T_start_time*   fmt2_Start;
+#endif
+  } u;
+} start_u;
+
+/*==== EXPORTS ==============================================================*/
+extern  void  SasDmi( U8 g23Component );
+
+extern  void  Dmi_SendReport_IdleMode( U8 g23Comp,
+                                       G23_COMP_REF_TYPE g23CompRef,
+                                       U16 Ssf,
+                                       U8 Ssr,
+                                       U16* Nf,
+                                       U8* Nr,
+                                       U8* Nb );
+extern  void  Dmi_SendReport_DedMode( U8 g23Comp,
+                                      G23_COMP_REF_TYPE g23CompRef,
+                                      U16 Ta,
+                                      U8 Pwr,
+                                      U8 Rlf,
+                                      U8 Rqf,
+                                      U8 Rls,
+                                      U8 Rqs, 
+                                      U16* Nf,
+                                      U8* Nr,
+                                      U8* Nb );
+
+extern  void  Dmi_SendReport_L3( U8 g23Comp,
+                                 G23_COMP_REF_TYPE g23CompRef,
+                                 U8 UlOrDl,
+                                 U16 L3MsgLen,
+                                 U8* L3Msg,
+                                 U8 L3MsgId );
+
+extern  void  Dmi_SendReport_L1( U8 g23Comp, G23_COMP_REF_TYPE g23CompRef );
+
+extern  void  Dmi_SendReport_Sync( U8 g23Comp,
+                                   G23_COMP_REF_TYPE g23CompRef,
+                                   U16 Fff,
+                                   U8 Bsic,
+                                   U32 Toffs );
+extern  void  Dmi_SendReport_Sacch( U8 g23Comp,
+                                    G23_COMP_REF_TYPE g23CompRef,
+                                    U8 Mrltc,
+                                    U8 Crltc,
+                                    U8 L3SiPdTi,
+                                    U8 L3MsgTyp );
+
+extern  void  Dmi_SendReport_SacchCompl( U8 g23Comp,
+                                         G23_COMP_REF_TYPE g23CompRef,
+                                         U16 MsgLen,
+                                         U8 Mrltc,
+                                         U8 Crltc,
+                                         U8* L2Msg );
+
+extern  void  Dmi_SendReport_ChanReq( U8 g23Comp,
+                                      G23_COMP_REF_TYPE g23CompRef,
+                                      U8 ChanReqData,
+                                      U32 ChanReqFrNum );
+extern  void  Dmi_SendReport_ImmedAssign( U8 g23Comp,
+                                          G23_COMP_REF_TYPE g23CompRef,
+                                          U16 L3MsgLen,
+                                          U8 RspOrIgn,
+                                          U8* L3Msg );
+extern  void  Dmi_SendReport_Bcch( U8 g23Comp,
+                                   G23_COMP_REF_TYPE g23CompRef,
+                                   U16 L3MsgLen,
+                                   U16 BcchFreq,
+                                   U8* L3BcchMsg );
+extern  void  Dmi_SendReport_Page( U8 g23Comp,
+                                   G23_COMP_REF_TYPE g23CompRef,
+                                   U16 L3MsgLen,
+                                   U8 Mdsc,
+                                   U8 Cdsc,
+                                   U8* L3PageMsg );
+
+extern  void  Dmi_SendReport_IdleChan( U8 g23Comp,
+                                       G23_COMP_REF_TYPE g23CompRef,
+                                       U16 Fff,
+                                       U8 Bsic,
+                                       U8 CombFlag,
+                                       U8 CchC,
+                                       U8 Mfrm,
+                                       U8 AgRes,
+                                       U8 CchG,
+                                       U8 Pmfrm,
+                                       U8 Pbi );
+
+extern  void  Dmi_SendReport_DedChan_NonHop( U8 g23Comp,
+                                             G23_COMP_REF_TYPE g23CompRef,
+                                             U16 ScFreq,
+                                             U8 ScBsic,
+                                             U8 ChTyp, 
+                                             U8 Tslot,
+                                             U8 SubCh,
+                                             U8 Tsc,
+                                             U8 GsmBa,
+                                             U16 DedFreq );
+
+extern  void  Dmi_SendReport_DedChan_Hop( U8 g23Comp,
+                                          G23_COMP_REF_TYPE g23CompRef,
+                                          U16 ScFreq,
+                                          U8 ScBsic,
+                                          U8 ChTyp,
+                                          U8 Tslot, 
+                                          U8 SubCh,
+                                          U8 Tsc,
+                                          U8 Maio,
+                                          U8 Hsn,
+                                          U8 GsmBa, 
+                                          start_u* StartTime,
+                                          U8 MaxLenChanList, 
+                                          U8* BeforeChanList,
+                                          U8* AfterChanList );
+
+/*---------------------------------------------------*/
+
+/*+Obsolete*/
+/*
+*   Features potentially obsoleted by Issue 1.4 of
+*   Anite DMI spec.
+*
+*   ** LEAVE IN CODE SINCE REFERENCED IN dmi.c
+*
+*               
+*/
+
+/* ...continuous reports... */
+
+#define SAS_RPRT_START__IDLEMODE              '1'
+#define SAS_RPRT_STOP__IDLEMODE               '6'
+#define SAS_RPRT_START__DEDICATEDMODE         '2'
+#define SAS_RPRT_STOP__DEDICATEDMODE          '7'
+#define SAS_RPRT_START__L3MSG                 '3'
+#define SAS_RPRT_STOP__L3MSG                  '8'
+#define SAS_RPRT_START__L1MSG                 '4'
+#define SAS_RPRT_STOP__L1MSG                  '9'
+#define SAS_RPRT_START__SYNC                  'S'
+#define SAS_RPRT_STOP__SYNC                   'T'
+#define SAS_RPRT_START__SACCH                 'A'
+#define SAS_RPRT_STOP__SACCH                  'B'
+#define SAS_RPRT__SACCHCOMPLETE               '\\'
+#define SAS_RPRT_START__SACCHCOMPLETE         'A'
+#define SAS_RPRT_STOP__SACCHCOMPLETE          'B'
+#define SAS_RPRT_START__CHANREQIMMEDASSIGN    'C'
+#define SAS_RPRT_STOP__CHANREQIMMEDASSIGN     'D'
+#define SAS_RPRT_START__BCCH                  'E'
+#define SAS_RPRT_STOP__BCCH                   'F'
+#define SAS_RPRT_START__PAGE                  'P'
+#define SAS_RPRT_STOP__PAGE                   'Q'
+
+/* ...once-off reports... */
+
+#define SAS_RPRT_ONCE__IDLECHAN               I
+#define SAS_RPRT_ONCE__DEDICATEDCHAN          J
+
+/* ...status getters/setters... */
+
+extern  U16  GetSasRptStatus_IdleMode( void );
+extern  U16  GetSasRptStatus_DedMode( void );
+extern  U16  GetSasRptStatus_L3( void );
+extern  U16  GetSasRptStatus_L1( void );
+extern  U16  GetSasRptStatus_Sync( void );
+extern  U16  GetSasRptStatus_Sacch( void );
+extern  U16  GetSasRptStatus_SacchCompl( void );
+extern  U16  GetSasRptStatus_ChanReq( void );
+extern  U16  GetSasRptStatus_Bcch( void );
+extern  U16  GetSasRptStatus_Page( void );
+
+extern  U16  HandleSasCmd( U8* SasCmd );
+
+extern  void  SetSasRptStatus_IdleMode( U16 OnOff );
+extern  void  SetSasRptStatus_DedMode( U16 OnOff );
+extern  void  SetSasRptStatus_L3( U16 OnOff );
+extern  void  SetSasRptStatus_L1( U16 OnOff );
+extern  void  SetSasRptStatus_Sync( U16 OnOff );
+extern  void  SetSasRptStatus_Sacch( U16 OnOff );
+extern  void  SetSasRptStatus_SacchCompl( U16 OnOff );
+extern  void  SetSasRptStatus_ChanReq( U16 OnOff );
+extern  void  SetSasRptStatus_Bcch( U16 OnOff );
+extern  void  SetSasRptStatus_Page( U16 OnOff );
+
+/*-Obsolete*/
+
+/*---------------------------------------------------*/
+
+
+
+#endif  /* ANITESAS_DMI__H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/drvconf.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,73 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       drvconf.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for the dynamic driver configuration.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef DRVCONF_H
+#define DRVCONF_H
+
+/*==== INCLUDES =============================================================*/
+#include "typedefs.h"
+#include "gdi.h"
+#include "vsi.h"
+
+/*==== CONSTS ===============================================================*/
+
+#if defined _TARGET_
+ #define MAX_AVAILABLE_DRV 1
+#else
+ #define MAX_AVAILABLE_DRV 6
+#endif
+
+#define TIF_NAME              "TIF"
+#define TR_NAME               "TR"
+#define EMI_NAME              "EMI"
+#define SOCKET_NAME           "SOCKET"
+#define MTST_NAME             "MTST"
+#define SER_NAME              "SER"
+#define THIF_LINK_NAME        "THIFLINK"
+#define USERSPACE_LINK_NAME   "USSPLINK"
+#define TITRC_NAME            "TITRC"
+#define NODRV_NAME            "NODRV"
+
+#define DRV_DEFAULT       "DEFAULT"
+#define DRV_TI_MODE       "TI_MODE"
+#define DRV_RAW_TI_MODE   "RAW_TI_MODE"
+#define TIF_PCON_ENABLE   "ENABLE_PCON"
+#define TR_STX_LF         "STX_LF"
+#define ENABLE_SYNC_MODE  "ENA_SYNC_MODE"
+#define DISABLE_SYNC_MODE "DIS_SYNC_MODE"
+
+#define FILTER            "FILTER"
+
+#define DRV_SIGTYPE_READ_L1   0x100
+#define DRV_SIGTYPE_READ_RIV  0x200
+
+/*==== TYPES ================================================================*/
+
+typedef struct
+{
+  T_DRV_LIST_ENTRY entry;  
+  USHORT drv_pos;
+} T_TST_DRV_ENTRY;
+
+/*==== EXPORTS ==============================================================*/
+
+SHORT tst_drv_open (char *drv_name, T_TST_DRV_ENTRY **drv_info );
+
+
+#endif /* DRVCONF_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/esf_func.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,46 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       esf_func.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  ESF API and types.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef __ESF_FUNC_H__
+#define __ESF_FUNC_H__
+
+/*==== CONSTANTS ==================================================*/
+
+#define ESF_INITIALIZED   0xAFFEDEAD
+
+/*==== TYPES ======================================================*/
+
+typedef struct
+{
+  unsigned int magic_nr;
+  void (*init_func1)(void);      
+  void (*init_func2)(void);      
+  void (*send_prim)(T_PRIM_HEADER *);      
+} T_ESF_FUNC;
+
+/*==== PROTOTYPES =================================================*/
+
+void esf_init ( void );
+void esf_register ( T_ESF_FUNC * func );
+void esf_init_func1 ( void );
+void esf_init_func2 ( void );
+void esf_send_prim ( T_PRIM_HEADER * );
+
+#endif /* __ESF_FUNC_H__ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/extdspl.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,80 @@
+#ifndef EXTDSPL_H
+#define EXTDSPL_H
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   :  
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions of the EXTDSPL service access point.
++----------------------------------------------------------------------------- 
+*/ 
+
+
+/*
+ * Definition of the SAP
+ */
+#define SAP_EXTDSPL
+
+
+/*
+ * Mask for Opcodes
+ */
+#define EXTDSPL_DL  0x7F00
+#define EXTDSPL_UL  0x3F00
+
+
+/*
+ * The primitves and their OPC's
+ */
+typedef struct 
+{
+  U32 dummy;
+} T_EXTDSPL_CAP_REQ;
+
+#define EXTDSPL_CAP_REQ 0x3F00
+
+
+typedef struct 
+{
+  U32 dummy;
+} T_EXTDSPL_DATA_REQ;
+
+#define EXTDSPL_DATA_REQ 0x3F01
+
+
+typedef struct 
+{
+  U16 width;
+  U16 height;
+  U16 bpp;
+  U8  _dallign1;
+  U8  _dallign2;
+} T_EXTDSPL_CAP_IND;
+
+#define EXTDSPL_CAP_IND 0x7F00
+
+
+typedef struct 
+{
+  U16 col;
+  U16 row;
+  U16 width;
+  U16 height;
+  T_sdu sdu;
+} T_EXTDSPL_DATA_IND;
+
+#define EXTDSPL_DATA_IND 0x7F01
+
+
+#endif /* EXTDSPL_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/frm_defs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,32 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       frm_defs.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for the fixed dimensions of frame.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef FRM_DEFS_H
+#define FRM_DEFS_H
+
+#include "glob_defs.h"
+
+#define NUM_OF_COMPONENT_TABLES      2
+#define MAX_TST_DRV                  5  /* maximal number of cascaded TST drivers */
+#define MAX_TST_DRV_CONF             3  /* maximal number of cascaded TST driver configurations */
+
+#define RANGES_PER_POOL              5
+#define ASSIGNED_BY_TI               0
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/frm_ext.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,47 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       frm_ext.h
++------------------------------------------------------------------------------
+|  Copyright 2005 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for Frame Extension Interface.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef FRM_EXT_H
+#define FRM_EXT_H
+
+/*==== TYPES ================================================================*/
+
+#ifndef _TOOLS_
+typedef struct
+{
+  unsigned int magic_nr;
+  int ret_ok;
+  int (*plemu_SendToQueue)(OS_HANDLE SndComHandle, OS_HANDLE RcvComHandle, 
+                           OS_HANDLE RcvQHandle, USHORT Prio, ULONG Suspend,
+                           OS_QDATA *Msg );      
+} T_lemu_SendToQueue;
+#endif
+
+/*==== PROTOTYPES ===============================================================*/
+
+void  fei_lemu_SendToQueue_init ( void );
+void  fei_lemu_SendToQueue_register(int(* func)(OS_HANDLE SndComHandle, OS_HANDLE RcvComHandle, 
+                           OS_HANDLE RcvQHandle, USHORT Prio, ULONG Suspend,
+                           OS_QDATA *Msg ), ULONG ret_ok);
+
+/*==== MACROS ================================================================*/
+
+#define LEMU_SENDTOQUEUE_INITIALIZED 0xaffedead
+
+#endif /* FRM_EXT_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/frm_glob.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,118 @@
+/*
++------------------------------------------------------------------------------
+|  File:       frm_glob.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose :  Global frame tables
++-----------------------------------------------------------------------------
+*/
+
+#ifndef FRM_GLOB_H
+#define FRM_GLOB_H
+
+/*==== INCLUDES =============================================================*/
+
+#include "frm_types.h"
+
+/*==== CONSTANTS ============================================================*/
+
+
+/*==== TYPES ================================================================*/
+
+/*==== VARIABLES ================================================================*/
+
+#ifndef CONFIG_MODULE
+extern USHORT MaxEntities;
+extern USHORT MaxCommunications;
+extern USHORT MaxSimultaneousTimer;
+extern USHORT MaxTimer;
+extern USHORT MaxSemaphores;
+extern USHORT NumberOfPPMPartitions;
+extern ULONG  MaxPrimPartSize;
+extern USHORT TextTracePartitionSize;
+extern T_VOID_STRUCT *processed_prim[];
+extern T_VOID_STRUCT *freed_prim[];
+extern T_HANDLE e_running[];
+extern T_FRM_TASK_TABLE_ENTRY pf_TaskTable[];
+extern ULONG TraceMask[];		
+extern char TracesAborted[];
+extern char PrimAborted[];
+extern char route_desclist[];
+extern T_HANDLE TimerHandleField[];
+
+#if !defined _TARGET_ && !defined _TOOLS_
+extern char pcheck_active[];
+#endif
+
+ #else /* CONFIG_MODULE */
+
+/* -------------- S H A R E D - BEGIN ---------------- */
+#ifdef _TOOLS_
+#pragma data_seg("FRAME_SHARED")
+#endif
+
+#ifndef DATA_INT_RAM
+
+/* declare on pointer for each entity for ccd error handling */
+struct ccd_task_table;
+struct ccd_task_table* ccd_task_list[MAX_ENTITIES+1];
+
+USHORT MaxEntities = MAX_ENTITIES;
+USHORT MaxTimer    = MAX_TIMER;
+#ifndef _TOOLS_
+/* 
+ * This way of setting the TST and RCV stacksize is chosen to keep it backwardscompatible,
+ * i.e. not change the behavior if the stacksizes are not define in the configuration
+ * file xxxconst.h.
+ */
+#ifdef TSTSND_STACK_SIZE
+const USHORT TST_SndStacksize = TSTSND_STACK_SIZE;
+#else
+const USHORT TST_SndStacksize = 0;
+#endif
+#ifdef TSTRCV_STACK_SIZE
+const USHORT TST_RcvStacksize = TSTRCV_STACK_SIZE;
+#else
+const USHORT TST_RcvStacksize = 0;
+#endif
+
+#endif /* _TOOLS_ */
+
+T_FRM_TASK_TABLE_ENTRY pf_TaskTable  [ MAX_ENTITIES + 1 ]={0};
+ULONG *Routing                       [ MAX_ENTITIES + 1 ]={0};
+ULONG TraceMask                      [ MAX_ENTITIES + 1 ]={0};
+char TracesAborted                   [ MAX_ENTITIES + 1 ]={0};
+char PrimAborted                     [ MAX_ENTITIES + 1 ]={0};
+#ifdef PRIM_AUTO_FREE
+T_VOID_STRUCT *processed_prim        [ MAX_ENTITIES + 1 ]={0};
+T_VOID_STRUCT *freed_prim            [ MAX_ENTITIES + 1 ]={0};
+#endif 
+T_HANDLE e_running                   [ MAX_ENTITIES + 1 ]={0};
+char route_desclist                  [ MAX_ENTITIES + 1 ]={0};
+T_DRV_TABLE_ENTRY DrvTable           [ MAX_TST_DRV + 1  ]={0};
+T_HANDLE TimerHandleField            [ MAX_TIMER + 1    ]={0};
+
+#if !defined _TARGET_ && !defined _TOOLS_
+char pcheck_active                   [ MAX_ENTITIES + 1 ]={0};
+#endif
+
+#endif /* DATA_INT_RAM */
+
+#ifdef _TOOLS_
+#pragma data_seg()
+#endif
+/* -------------- S H A R E D - END ---------------- */
+
+#endif /* CONFIG_MODULE */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/frm_types.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,139 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       frm_types.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for the Frame
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef FRM_TYPES_H
+#define FRM_TYPES_H
+
+/*==== INCLUDES =============================================================*/
+
+#include "pei.h"
+#include "gdi.h"
+
+/*==== CONSTANTS ============================================================*/
+
+/*==== TYPES ================================================================*/
+ 
+/*
+ * Type Definitions for Frame Management 
+ */
+
+typedef struct                                         
+{
+  char  	   Name[RESOURCE_NAMELEN];    /* name of task */
+  T_PEI_FUNC const *PeiTable;		/* addresses of pei_functions */
+  USHORT	   NumOfTimers;		    /* timers are created in pf_TaskEntry() */
+  USHORT	   QueueEntries;		  /* queue is created in pf_TaskEntry() */
+  T_HANDLE * FirstTimerEntry;   /* first entry in timer handle array */
+  T_HANDLE   MemPoolHandle;		  /* handle for memory pool access */
+  T_HANDLE   QueueHandle;		    /* own queue handle */
+  T_HANDLE   TaskHandle;		    /* own task handle */
+  U32        Flags;	            /* active/passive */
+} T_FRM_TASK_TABLE_ENTRY;
+
+typedef struct
+{
+   ULONG 	   TimerValue;			  /* value of timer */
+   ULONG 	   TimerMode;			    /* mode of timer */
+} T_FRM_TIMCFG_TABLE_ENTRY;
+
+typedef struct                                         
+{
+  char          *Name;               /* name of the driver */
+  T_HANDLE      ProcessHandle;       /* handle of the process to be notified */
+  USHORT        UpperDrv;            /* handle of driver in the upper layer */
+  USHORT        LowerDrv;            /* handle of driver in the lower layer */
+  USHORT        SignalTo;            /* handle of process to be notified at Callback */
+  T_DRV_EXPORT const *DrvInfo;
+} T_DRV_TABLE_ENTRY;
+
+typedef struct
+{
+  unsigned int part_num;
+  unsigned int part_size;
+  void * mem;
+} T_FRM_PARTITION_POOL_CONFIG;
+
+typedef struct
+{
+  char * name;
+  const T_FRM_PARTITION_POOL_CONFIG * grp_config;
+} T_FRM_PARTITION_GROUP_CONFIG;
+
+typedef struct                                         
+{
+  char *Name;
+  ULONG  Size;		
+  char  *PoolAddress;
+} T_MEMORY_POOL_CONFIG;
+
+typedef SHORT T_PEI_CREATE ( T_PEI_INFO const **Info );
+
+typedef struct
+{
+  T_PEI_CREATE *PeiCreate;
+  char         *Name;
+  int          Priority;
+} T_COMPONENT_ADDRESS;
+
+
+#ifdef MEMORY_SUPERVISION
+
+typedef struct                                         
+{
+  ULONG 	Total;		             /* total number of elements */
+  ULONG 	Current;		           /* current number of elements */
+  ULONG 	Maximum;	             /* maximum number of elements */
+  ULONG 	MaxByteMemory;         /* number of allocated bytes at maximum of elements */
+  ULONG 	MaxPartMemory;         /* number of allocated partitions at maximum of elements */
+} T_COUNTER;
+
+typedef struct                                         
+{
+  ULONG 	UsedSize;		           /* size of stored primitive */
+  ULONG   RequestedSize;         /* requested size during allocation */
+  ULONG   time;                  /* time when partition is touched */
+  USHORT  Status;   	           /* status of partition */
+  T_HANDLE owner;
+ 	ULONG   PrimOPC;	             /* opc of primitive that uses this partition */
+  void    *ptr;
+  const char    *Userfile;	     /* file that accesses partition */
+  int    Line;		               /* line where partition is accessed */
+} T_PARTITION_STATUS; 
+
+typedef struct                                         
+{
+  ULONG   PrimOPC;	             /* opc of primitive that does not fit in partition */
+  const char    *Userfile;	     /* file that access partition */
+  int  Line;		                 /* line where partition is accessed */
+} T_OVERSIZE_STATUS;
+
+typedef struct                                         
+{
+  T_PARTITION_STATUS	*PartitionStatus;
+  T_OVERSIZE_STATUS  	*PartitionOversize;
+  T_COUNTER	          *PartitionCounter;
+#ifdef OPTIMIZE_POOL
+  T_COUNTER          	*ByteCounter;
+  T_COUNTER          	*RangeCounter;
+#endif /* OPTIMIZE_POOL */
+} T_PARTITION_POOL_STATUS;
+
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/gdi.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,146 @@
+/*
++------------------------------------------------------------------------------
+|  File:       gdi.h
++------------------------------------------------------------------------------
+|                 Copyright Condat AG 1999-2001, Berlin
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Condat AG.
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Condat AG.
++------------------------------------------------------------------------------
+| Purpose:    General Definitions.
+| $Identity:$
++------------------------------------------------------------------------------
+*/
+
+#ifndef  GDI_H
+#define  GDI_H
+
+/*==== INCLUDES =============================================================*/
+
+#include "typedefs.h"
+
+/*==== DEFINITIONS ==========================================================*/
+/*--------------------------------
+   Return values
+  --------------------------------*/
+#ifdef DRV_OK
+ #undef DRV_OK
+#endif
+#define DRV_OK                   0
+#define DRV_BUFFER_FULL          1
+#define DRV_DISABLED             2
+#define DRV_ENABLED              3
+#define DRV_INITFAILURE          4
+#define DRV_INITIALIZED          5
+#define DRV_INTERNAL_ERROR       6
+#define DRV_INPROCESS            7
+#define DRV_INVALID_PARAMS       8
+#define DRV_NOTCONFIGURED        9
+#define DRV_RETVAL_USER          50
+
+/*--------------------------------
+   Signal types
+  --------------------------------*/
+#define DRV_SIGFCT_NOTAVAILABLE  0x01
+#define DRV_SIGTYPE_CLEAR        0x02
+#define DRV_SIGTYPE_FLUSH        0x04
+#define DRV_SIGTYPE_READ         0x08
+#define DRV_SIGTYPE_WRITE        0x10
+#define DRV_SIGTYPE_CONNECT      0x20
+#define DRV_SIGTYPE_DISCONNECT   0x40
+
+#define DRV_SIGTYPE_USER         0x80
+
+/*--------------------------------
+   Flags
+  --------------------------------*/
+#define CALLED_FROM_ISR          0x01
+
+/*--------------------------------
+   Buffer Types
+  --------------------------------*/
+#define DRV_BUFTYPE_READ         0x01
+#define DRV_BUFTYPE_WRITE        0x02
+
+/*==== TYPES ================================================================*/
+typedef void * drv_ProcHandle_Type;
+
+/*------------------------------------------------------------------------
+   T_DRV_SIGNAL - driver signal identification
+ 
+   The type defines the signal information data used to identify a signal. 
+   This data type is used to define and to report a signal. A signal is 
+   defined by a process calling the driver function drv_SetSignal. An 
+   event is signalled by driver by calling the pre-defined signal call-
+   back function.
+  -------------------------------------------------------------------------*/
+typedef struct
+{
+  USHORT              SignalType;
+  USHORT              DrvHandle;
+  ULONG               DataLength;
+  T_VOID_STRUCT       *UserData;
+} T_DRV_SIGNAL;
+
+/*------------------------------------------------------------------------
+   T_DRV_CB_FUNC - driver signal device control block
+  
+   This type defines a call-back function used to signal driver events,
+   e.g. driver is ready to accept data. The driver calls the signal
+   call-back function when a specific event occurs and the driver has
+   been instructed to signal the event to a specific process. A process
+   can set or reset event signalling by calling one of the driver 
+   functions drv_SetSignal or drv_ResetSignal. Event signalling can only
+   be performed when a call-back function has been installed at driver
+   initialization.
+  -------------------------------------------------------------------------*/
+typedef void (*T_DRV_CB_FUNC ) (T_DRV_SIGNAL * Signal);
+
+struct _T_DRV_EXPORT;
+
+typedef struct
+{
+#ifdef _TOOLS_
+  USHORT (*drv_Init)(USHORT,T_DRV_CB_FUNC,struct _T_DRV_EXPORT const**);
+#endif
+  void (*drv_Exit)(void);
+  USHORT (*drv_Read)(void*, ULONG*);
+  USHORT (*drv_Write)(void*, ULONG*);
+  USHORT (*drv_Look)(void*, ULONG*);
+  USHORT (*drv_Clear)(USHORT);
+  USHORT (*drv_Flush)(void);
+  USHORT (*drv_SetSignal)(USHORT);
+  USHORT (*drv_ResetSignal)(USHORT);
+  USHORT (*drv_SetConfig)(char*);
+  USHORT (*drv_GetConfig)(char*);
+  void (*drv_Callback)(T_DRV_SIGNAL*);
+} T_DRV_FUNC;
+
+typedef struct _T_DRV_EXPORT 
+{
+  const char    *Name;
+  USHORT   	    Flags;             /* Bit (0): CALLED_BY_ISR */
+  T_DRV_FUNC DrvFunc;
+} T_DRV_EXPORT;
+
+
+typedef struct
+{
+  char const *Name;
+  USHORT (*drv_Init)(USHORT, T_DRV_CB_FUNC, T_DRV_EXPORT const **);
+  char const *Process;
+  void const *DrvConfig;
+} T_DRV_LIST_ENTRY;
+
+typedef struct
+{
+  T_DRV_LIST_ENTRY DrvEntry [ 5 ];
+} T_DRV_LIST;
+
+/*==== END OF FILE ==========================================================*/
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/glob_defs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,31 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       glob_defs.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for the fixed dimensions of frame.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef GLOB_DEFS_H
+#define GLOB_DEFS_H
+
+#define GUARD_PATTERN        0xAFFEDEAD
+
+#ifdef _ESF_SUPPORT_
+ #define RESOURCE_NAMELEN           16
+#else
+ #define RESOURCE_NAMELEN            8
+#endif /* _ESF_SUPPORT_ */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/gsi.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,389 @@
+#ifndef GSI_H
+#define GSI_H
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   :  
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  These definitions provide a driver interface to multiple serial 
+|             ports.
++----------------------------------------------------------------------------- 
+*/ 
+
+
+/*==== INCLUDES =============================================================*/
+
+#include <gdi.h>
+
+/*==== DEFINITIONS ==========================================================*/
+
+/*
+ * Baud rates
+ */
+#define GSI_BAUD_AUTO                                      ( 1)
+#define GSI_BAUD_75                                        ( 2)
+#define GSI_BAUD_150                                       ( 3)
+#define GSI_BAUD_300                                       ( 4)
+#define GSI_BAUD_600                                       ( 5)
+#define GSI_BAUD_1200                                      ( 6)
+#define GSI_BAUD_2400                                      ( 7)
+#define GSI_BAUD_4800                                      ( 8)
+#define GSI_BAUD_7200                                      ( 9)
+#define GSI_BAUD_9600                                      (10)
+#define GSI_BAUD_14400                                     (11)
+#define GSI_BAUD_19200                                     (12)
+#define GSI_BAUD_28800                                     (13)
+#define GSI_BAUD_33900                                     (14)
+#define GSI_BAUD_38400                                     (15)
+#define GSI_BAUD_57600                                     (16)
+#define GSI_BAUD_115200                                    (17)
+#define GSI_BAUD_203125                                    (18)
+#define GSI_BAUD_406250                                    (19)
+#define GSI_BAUD_812500                                    (20)
+
+/*
+ * Bits per character
+ */
+#define GSI_CHAR5                                          ( 5)
+#define GSI_CHAR6                                          ( 6)
+#define GSI_CHAR7                                          ( 7)
+#define GSI_CHAR8                                          ( 8)
+
+/*
+ * Stop bits
+ */
+#define GSI_STOP1                                          ( 1)
+#define GSI_STOP15                                         (15)
+#define GSI_STOP2                                          ( 2)
+
+/*
+ * Parity bit
+ */
+#define GSI_PARITYNO                                       ( 1)
+#define GSI_PARITYODD                                      ( 2)
+#define GSI_PARITYEVEN                                     ( 3)
+#define GSI_PARITYSPACE                                    ( 4)
+
+/*
+ * Flow control
+ */
+#define GSI_FLOWNO                                         ( 1)
+#define GSI_FLOWHW                                         ( 2)
+#define GSI_FLOWSW                                         ( 3)
+
+/*
+ * Bit positions
+ */
+#define GSI_BRKLEN_POS                                     ( 0)
+#define GSI_BRK_POS                                        (25)
+#define GSI_DISC_POS                                       (26)
+#define GSI_ESC_POS                                        (27)
+#define GSI_RING_POS                                       (28)
+#define GSI_X_POS                                          (29)
+#define GSI_SB_POS                                         (30)
+#define GSI_SA_POS                                         (31)
+
+/*
+ * Bit masks
+ */
+#define GSI_BRKLEN_MASK               (255UL << GSI_BRKLEN_POS)
+#define GSI_BRK_MASK                       (1UL << GSI_BRK_POS)
+#define GSI_DISC_MASK                     (1UL << GSI_DISC_POS)
+#define GSI_ESC_MASK                       (1UL << GSI_ESC_POS)
+#define GSI_RING_MASK                     (1UL << GSI_RING_POS)
+#define GSI_X_MASK                           (1UL << GSI_X_POS)
+#define GSI_SB_MASK                         (1UL << GSI_SB_POS)
+#define GSI_SA_MASK                         (1UL << GSI_SA_POS)
+
+/*
+ * Size of the circular buffers used in the driver.
+ */
+#define GSI_MAX_BUFFER_SIZE                               (512)
+
+/*==== TYPES ================================================================*/
+
+/*
+ * Device Control Block
+ */
+typedef struct {
+  USHORT  Baud;
+  UBYTE   DataBits;
+  UBYTE   StopBits;
+  UBYTE   Parity;
+  UBYTE   RxFlowControl;
+  UBYTE   TxFlowControl;
+  USHORT  RxBufferSize;
+  USHORT  TxBufferSize;
+  USHORT  RxThreshold;
+  USHORT  TxThreshold;
+  UBYTE   XON;
+  UBYTE   XOFF;
+  UBYTE   EscChar;
+  USHORT  GuardPeriod;
+} T_GSI_DCB;
+
+/*==== FUNCTION PROTOTYPES ==================================================*/
+
+#ifdef _TARGET_
+/*
++------------------------------------------------------------------------------
+| Function    : GSI_Init
++------------------------------------------------------------------------------
+| Description : The function initializes the module and the connected serial 
+|               device.
+|
+| Parameters  : DeviceNo     - serial device number
+|               DrvHandle    - unique handle for this device
+|               CallbackFunc - callback function for this device
+|               DrvInfo      - pointer to the driver parameters
+|
+| Return      : DRV_OK             - Initialization successful
+|               DRV_INVALID_PARAMS - The specified device does not exist
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_INITIALIZED    - Driver already initialized
+|
++------------------------------------------------------------------------------
+*/
+extern USHORT GSI_Init (UBYTE         DeviceNo,
+                        USHORT        DrvHANDLE,
+                        T_DRV_CB_FUNC CallbackFunc,
+                        T_DRV_EXPORT  **DrvInfo);
+
+/*
++------------------------------------------------------------------------------
+| Function    : GSI_Exit
++------------------------------------------------------------------------------
+| Description : The function is called when the driver functionality is no 
+|               longer required. The driver terminates regardless of any 
+|               outstanding data to be sent.
+|
+| Parameters  : DeviceNo - serial device number
+|
+| Return      : no return value
+|
++------------------------------------------------------------------------------
+*/
+extern void GSI_Exit (UBYTE DeviceNo);
+
+/*
++------------------------------------------------------------------------------
+| Function    : GSI_Read
++------------------------------------------------------------------------------
+| Description : This function copies received data into a caller provided 
+|               buffer and returns the line status. It should always return 
+|               immediately after copying the data, without waiting for any 
+|               more data.
+|
+| Parameters  : DeviceNo - serial device number
+|               Buffer   - buffer to copy the data
+|               Length   - On call: size of Buffer; On return: copied bytes
+|               State    - line states of the serial connection
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - The specified device does not exist
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_NOTCONFIGURED  - The driver is not yet configured
+|
++------------------------------------------------------------------------------
+*/
+extern USHORT GSI_Read (UBYTE   DeviceNo,
+                        void    *Buffer,
+                        USHORT  *Length,
+                        ULONG   *State);
+
+/*
++------------------------------------------------------------------------------
+| Function    : GSI_Write
++------------------------------------------------------------------------------
+| Description : This functions copies the provided data into the buffer of the 
+|               driver and sets the line states. This function must return 
+|               immediately after copying, even if there is not enough space in 
+|               the driver buffer to copy all provided data.
+|
+| Parameters  : DeviceNo - serial device number
+|               Buffer   - buffer containing the data
+|               Length   - On call: size of data; On return: copied bytes
+|               State    - line states of the serial connection
+|               Mask     - manipulated State bits
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - The specified device does not exist
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_NOTCONFIGURED  - The driver is not yet configured
+|
++------------------------------------------------------------------------------
+*/
+extern USHORT GSI_Write (UBYTE  DeviceNo,
+                         void   *Buffer,
+                         USHORT *Length,
+                         ULONG  State,
+                         ULONG  Mask);
+
+/*
++------------------------------------------------------------------------------
+| Function    : GSI_Look
++------------------------------------------------------------------------------
+| Description : This function copies received data into a caller provided 
+|               buffer without delete the data in the driver buffer. It should 
+|               always return immediately after copying the data, without 
+|               waiting for any more data.
+|
+| Parameters  : DeviceNo - serial device number
+|               Buffer   - buffer to copy the data
+|               Length   - On call: size of Buffer; On return: copied bytes
+|               State    - line states of the serial connection
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - The specified device does not exist
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_NOTCONFIGURED  - The driver is not yet configured
+|
++------------------------------------------------------------------------------
+*/
+extern USHORT GSI_Look (UBYTE   DeviceNo,
+                        void    *Buffer,
+                        USHORT  *Length,
+                        ULONG   *State);
+
+/*
++------------------------------------------------------------------------------
+| Function    : GSI_Clear
++------------------------------------------------------------------------------
+| Description : This function is used to clear the device internal buffers.
+|
+| Parameters  : DeviceNo   - serial device number
+|               BufferType - buffer to be cleared
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - The specified device does not exist
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_INPROCESS      - The driver is busy clearing the buffers
+|
++------------------------------------------------------------------------------
+*/
+extern USHORT GSI_Clear (UBYTE  DeviceNo,
+                         USHORT BufferType);
+
+/*
++------------------------------------------------------------------------------
+| Function    : GSI_Flush
++------------------------------------------------------------------------------
+| Description : This function is used to flush the device internal transmit 
+|               buffer.
+|
+| Parameters  : DeviceNo - serial device number
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - The specified device does not exist
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_INPROCESS      - The driver is busy clearing the buffers
+|               DRV_NOTCONFIGURED  - The driver is not yet configured
+|
++------------------------------------------------------------------------------
+*/
+extern USHORT GSI_Flush (UBYTE  DeviceNo);
+
+/*
++------------------------------------------------------------------------------
+| Function    : GSI_SetSignal
++------------------------------------------------------------------------------
+| Description : This function enables indication signals from the driver. These 
+|               signals are sent via the device callback function.
+|
+| Parameters  : DeviceNo   - serial device number
+|               SignalType - Signal type to be set
+|
+| Return      : DRV_OK                  - Function successful
+|               DRV_INVALID_PARAMS      - parameters out of range
+|               DRV_INTERNAL_ERROR      - Internal driver error
+|               DRV_SIGFCT_NOTAVAILABLE - no event signaling functionality
+|
++------------------------------------------------------------------------------
+*/
+extern USHORT GSI_SetSignal (UBYTE  DeviceNo,
+                             USHORT SignalType);
+
+/*
++------------------------------------------------------------------------------
+| Function    : GSI_ResetSignal
++------------------------------------------------------------------------------
+| Description : This function disables indication signals from the driver. 
+|
+| Parameters  : DeviceNo   - serial device number
+|               SignalType - Signal type to be reset
+|
+| Return      : DRV_OK                  - Function successful
+|               DRV_INVALID_PARAMS      - parameters out of range
+|               DRV_INTERNAL_ERROR      - Internal driver error
+|               DRV_SIGFCT_NOTAVAILABLE - no event signaling functionality
+|
++------------------------------------------------------------------------------
+*/
+extern USHORT GSI_ResetSignal (UBYTE  DeviceNo,
+                               USHORT SignalType);
+
+/*
++------------------------------------------------------------------------------
+| Function    : GSI_SetConfig
++------------------------------------------------------------------------------
+| Description : This function configures the serial device.
+|
+| Parameters  : DeviceNo - serial device number
+|               DCBPtr   - pointer to the driver control block
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INVALID_PARAMS - parameters out of range
+|               DRV_INTERNAL_ERROR - Internal driver error
+|
++------------------------------------------------------------------------------
+*/
+extern USHORT GSI_SetConfig (UBYTE      DeviceNo,
+                             T_GSI_DCB  *DCBPtr);
+
+/*
++------------------------------------------------------------------------------
+| Function    : GSI_GetConfig
++------------------------------------------------------------------------------
+| Description : This function reads the serial device configuration.
+|
+| Parameters  : DeviceNo - serial device number
+|               DCBPtr   - pointer to the driver control block
+|
+| Return      : DRV_OK             - Function successful
+|               DRV_INTERNAL_ERROR - Internal driver error
+|               DRV_NOTCONFIGURED  - The driver is not yet configured
+|
++------------------------------------------------------------------------------
+*/
+extern USHORT GSI_GetConfig (UBYTE      DeviceNo,
+                             T_GSI_DCB  *DCBPtr);
+
+/*
++------------------------------------------------------------------------------
+| Function    : GSI_Callback
++------------------------------------------------------------------------------
+| Description : This function is needed for cascaded drivers. This function 
+|               must not be confused with the parameter CallbackFunc passed to 
+|               GSI_Init().
+|
+| Parameters  : Signal - pointer to the signal information data
+|
+| Return      : no return value
+|
++------------------------------------------------------------------------------
+*/
+extern void GSI_Callback (T_DRV_SIGNAL  *Signal);
+
+#endif /* _TARGET_ */
+#endif /* !GSI_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/header.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,241 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       header.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Common header types.
++----------------------------------------------------------------------------- 
+*/ 
+
+#include "glob_defs.h"
+
+#ifndef __HEADER_H__
+#define __HEADER_H__
+
+
+/*
+ * T_PRIM_HEADER
+ *
+ * Description :  This type definition defines the custom specific
+ *                part of a primitive. All primitives have the
+ *                general format: header followed by data. The
+ *                header of a primitive is changeable according to
+ *                the requirements of the target system.
+ * Hints:         Only the operation code opc as a USHORT value must
+ *                be present. For multi-instance protocol stacks
+ *                the routing information must be include in the
+ *                header (T_ROUTE route).
+ */
+
+#if !defined (T_SDU_DEFINED)
+
+#define T_SDU_DEFINED
+
+typedef struct
+{
+  USHORT l_buf;
+  USHORT o_buf;
+  UBYTE  buf[1];
+} T_sdu;
+
+#endif /* T_SDU_DEFINED */
+
+/*
+ * list of generic data descriptors
+ */
+
+#ifndef __T_desc_list__
+#define __T_desc_list__
+
+typedef struct
+{
+  U16             list_len;       /*<  0:  2> length in octets of whole data                     */
+  U8              _align0;        /*<  2:  1> alignment                                          */
+  U8              _align1;        /*<  3:  1> alignment                                          */
+  U32             first;          /*<  4:  4> pointer to first generic data descriptor           */
+} T_desc_list;
+#endif
+
+#ifndef __T_desc_list2__
+#define __T_desc_list2__
+
+typedef struct
+{
+  U16             list_len;       /*<  0:  2> length in octets of whole data                     */
+  U8              _align0;        /*<  2:  1> alignment                                          */
+  U8              _align1;        /*<  3:  1> alignment                                          */
+  U32             first;          /*<  4:  4> pointer to first generic data descriptor           */
+} T_desc_list2;
+#endif
+
+#ifndef __T_desc_list3__
+#define __T_desc_list3__
+
+typedef struct
+{
+  U16             list_len;       /*<  0:  2> length in octets of whole data                     */
+  U8              _align0;        /*<  2:  1> alignment                                          */
+  U8              _align1;        /*<  3:  1> alignment                                          */
+  U32             first;          /*<  4:  4> pointer to first generic data descriptor           */
+} T_desc_list3;
+#endif
+
+/*
+ * generic data descriptor
+ */
+#ifndef __T_desc__
+#define __T_desc__                /* to prevent double include in generated files */
+
+typedef struct
+{
+  ULONG           next;           /* next generic data descriptor   */
+  USHORT          len;            /* length of content in octets    */
+  UBYTE           buffer[1];      /* buffer content                 */
+} T_desc;
+#endif /* __T_desc__ */
+
+#ifndef __T_desc2__
+#define __T_desc2__                /* to prevent double include in generated files */
+
+typedef struct
+{
+  U32             next;            /*<  0:  4> next generic data descriptor        */
+  U16             offset;          /*<  4:  2> offset in octets                    */
+  U16             len;             /*<  6:  2> length of content in octets         */
+  U16             size;            /*<  8:  2> size of buffer in octets            */
+  U8              buffer[1];       /*< 10:  1> buffer content                      */
+} T_desc2;
+#endif /* __T_desc2__ */
+
+#ifndef __T_desc3__
+#define __T_desc3__
+
+typedef struct
+{
+  U32             next;            /*<  0:  4> next generic data descriptor        */
+  U16             offset;          /*<  4:  2> offset in octets                    */
+  U16             len;             /*<  6:  2> length of content in octets         */
+  U32             buffer;          /*<  8:  4> pointer to buffer                   */
+} T_desc3;
+#endif
+
+#if !defined (T_FRAME_DESC_DEFINED)
+
+#define T_FRAME_DESC_DEFINED
+
+typedef struct
+{
+  UBYTE  *Adr[2];
+  USHORT  Len[2];
+} T_FRAME_DESC;
+
+#endif /* T_FRAME_DESC_DEFINED */
+
+#ifdef OPTION_MULTI_INSTANCES
+typedef struct
+{
+  USHORT  inst_no;
+  USHORT  chan_no;
+  UBYTE   ts_no;
+} T_ROUTE;
+#endif
+
+typedef struct
+{
+  char entity;
+  char dir;
+  char type;
+  char align1;
+} T_SDU_TRACE;
+
+#if !defined (T_PRIM_HEADER_DEFINED)
+#define T_PRIM_HEADER_DEFINED
+
+/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   In the current implementation it is essential that the
+   T_PRIM_HEADER type has the same size as the T_DP_HEADER
+   type and that the element use_cnt is at the same position
+   in both header types!
+   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+typedef struct
+{
+  ULONG opc;         /* equal to int SignalCode            */
+  ULONG len;         /* primitive length                   */
+  LONG  use_cnt;     /* counter indicates cuurent number of users */
+  T_sdu *sdu;        /* pointer to sdu struct if available */
+  ULONG sh_offset;   /* offset of system header            */
+  ULONG dph_offset;  /* offset of dynamic prim header      */
+} T_PRIM_HEADER;
+
+#endif /* T_PRIM_HEADER_DEFINED */
+
+typedef struct _T_DP_HEADER
+{
+  ULONG magic_nr;       /* magic number is checked at each access */
+  ULONG size;           /* available bytes in dynamic primitive partition */
+  ULONG use_cnt;        /* counter indicates current number of users */
+  ULONG offset;         /* offset from partition begin to next free byte */
+  T_VOID_STRUCT**
+        drp_bound_list; /* pointer to the list of dynamic partitions bound to this partition */  
+  struct _T_DP_HEADER *next;
+} T_DP_HEADER;
+
+typedef struct
+{
+  SHORT ref_cnt;     /* ref_cnt for MALLOC partitions */
+  SHORT desc_type;   /* descriptor type */
+} T_M_HEADER;
+
+/*
+ * flags in the opc
+ */
+#define EXTENDED_OPC          0x80000000
+#define VIRTUAL_OPC           0x40000000
+#define DOWNLINK_OPC          0x00004000
+#define UPLINK_OPC            0x00000000
+#define MEMHANDLE_OPC         0x20000000
+
+#define SAP32_MASK      0x00007fff   /* UL/DL Bit Part of SAP Nr.*/
+#define SAP16_MASK      0x7f00
+#define PRIM32_MASK     0x00ff0000
+#define PRIM16_MASK     0x00ff
+#define OPC32BIT(opc)   (opc&EXTENDED_OPC)
+/* 
+ * for 16bit opcs SAP_NR() returns the same result as (opc & SAP_MASK) in the old style. 
+ * No shift right is done, e.g. 0x4d00 is returned instead of 0x4d.
+ * Also the UL/DL bit is part of the SAP to be downwards compatible with the
+ * existing code in the xxx_pei.c modules.
+ */
+#define SAP_NR(opc)     (USHORT)((opc&0x80000000)?(opc&SAP32_MASK):(opc&SAP16_MASK))
+#define PRIM_NR(opc)    (USHORT)((opc&0x80000000)?((opc&PRIM32_MASK)>>16):(opc&PRIM16_MASK))
+
+#define HANDLE_BIT           ((UBYTE)0x80)
+#define HANDLE_MASK          ((UBYTE)0x7F)
+
+typedef struct
+{
+  ULONG magic_nr;
+  ULONG time;
+  char  snd     [RESOURCE_NAMELEN];
+  char  rcv     [RESOURCE_NAMELEN];
+  char  org_rcv [RESOURCE_NAMELEN];
+} T_S_HEADER;
+
+typedef struct
+{
+  T_PRIM_HEADER p_hdr;
+  T_PRIM_HEADER *prim_ptr;
+} T_PRIM_X;
+
+#endif /* HEADER_H */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/ind2str.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,124 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  STR2IND
+|  Modul   :  ind2str.h
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  This Module defines interface of the ind2str library. The
+|             main purpose of this library is the translation of an trace
+|             index to a complete trace string.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef IND2STR_H
+#define IND2STR_H
+
+
+/*==== CONSTANTS ==================================================*/
+#define IND2STR_OK                      0
+#define IND2STR_FILE_NOT_FOUND         -1
+#define IND2STR_WRONGFILEFORMAT        -2
+#define IND2STR_INDEXOUTOFBOUNDS       -3
+#define IND2STR_PARAMCOUNTOUTOFBOUNDS  -4
+#define IND2STR_NOTINITIALISED         -5
+#define IND2STR_ACCESSVIOLATION        -6
+#define IND2STR_INTERNAL_ERROR         -7
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+/*-----------------------------------------------------------------------------
+|  Function    : ind2str_Init()
++------------------------------------------------------------------------------
+|  Description : Initialises the library: opens the file containing the trace
+|                mapping table, build the internal representation , closes the
+|                the file after reading.
+|
+|  Parameters  : tableFile  - the mapping table file name
+|                 
+|  Return      : success or failure
++------------------------------------------------------------------------------
+*/
+signed char ind2str_Init(char * tableFile);
+
+
+/*-----------------------------------------------------------------------------
+|  Function    : ind2str_Exit()
++------------------------------------------------------------------------------
+|  Description : De-initialises the library: closes the file containing the
+|                trace mapping table, frees allocated memory.
+|
+|  Parameters  : 
+|                 
+|  Return      : 
++------------------------------------------------------------------------------
+*/
+void ind2str_Exit(void);
+
+
+/*-----------------------------------------------------------------------------
+|  Function    : ind2str_Version()
++------------------------------------------------------------------------------
+|  Description : Returns the version (build date) of the table. The table must
+|                be initialized before.
+|
+|  Parameters  : 
+|                 
+|  Return      : The version of the table or 0.
++------------------------------------------------------------------------------
+*/
+unsigned long ind2str_Version(void);
+
+
+/*-----------------------------------------------------------------------------
+|  Function    : ind2str_VersionNoInit()
++------------------------------------------------------------------------------
+|  Description : Returns the version (build date) of the table. The table does
+|                not need to be initialized before.
+|
+|  Parameters  : fileName - the name of the file, that contains a table
+|                 
+|  Return      : The version of the table or 0.
++------------------------------------------------------------------------------
+*/
+unsigned long ind2str_VersionNoInit(char * fileName);
+
+
+/*-----------------------------------------------------------------------------
+|  Function    : ind2str
++------------------------------------------------------------------------------
+|  Description : Transforms a trace index string into a trace string, according
+|                to the trace mapping table.
+|
+|  Parameters  : dst - destination string
+|
+|                src - source string
+|                            
+|
+|  Return      : The number of characters printed to the destination string.
+|                
++------------------------------------------------------------------------------
+*/
+int ind2str(char * dst, char * src);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* IND2STR_H */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/ipcapi.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,192 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project : PCO
+|  Modul   : inc\ipcapi.h
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  API definition for IPC
++----------------------------------------------------------------------------- 
+*/ 
+#ifndef IPCAPI_H
+#define IPCAPI_H
+
+#include "cms.h"
+
+#undef EXPORT
+#include <typedefs.h>
+
+/* define extra function codes for driver ipc */
+#define IPC_SELF        10
+#define IPC_INITCH      11
+#define IPC_EXITCH      12
+#define IPC_OPENCH      13
+#define IPC_CLOSECH     14
+#define IPC_READCH      15
+#define IPC_WRITECH     16
+#define IPC_CREATEMSG   17
+#define IPC_PARSEMSG    18
+#define IPC_ISMYADDR    19
+#define IPC_GETHANDLE   20
+#define IPC_SETTIME     21
+
+
+/**********************************************************************
+ * macros
+ *********************************************************************/
+
+#define MSG_ID( Group, Code )     (((Group) << 8) + ((Code) & 0xFF))
+
+
+/**********************************************************************
+ * defines
+ *********************************************************************/
+
+/* return codes                                                      */
+#define IPC_OK             CMS_OK      
+#define IPC_ERROR          CMS_ERROR   
+#define IPC_EXIST          CMS_EXIST      
+#define IPC_FULL           CMS_FULL          
+#define IPC_BADHANDLE      CMS_BADHANDLE     
+#define IPC_EMPTY          CMS_EMPTY   
+#define IPC_SIZE           CMS_SIZE    
+#define IPC_TIMEOUT        CMS_TIMEOUT
+#define IPC_NOMEM          CMS_NOMEM
+#define IPC_INVALID        (-20)
+#define IPC_MISALIGNED     (-21)
+
+
+
+#define IPC_MAX_PATH_SIZE  120
+
+/* msg IDs: */
+#define IPC_GENERATED      MSG_ID(IPC,1)
+
+#define ALIGNMENT         1
+#define MSG_MAX_SIZE    512
+
+/**********************************************************************
+ * types
+ *********************************************************************/
+
+
+typedef int IPC_HANDLE;
+
+typedef struct
+{
+   char *pcSender;
+   char *pcReceiver;
+   void *pvBuffer;
+   U32   ulTime;
+   U16   uwTenthOfMS;
+   U16   uwSize;
+   U16   uwID;
+} MSG_HEADER;
+
+
+
+#if   ALIGNMENT == 1
+   typedef U8  MSG_BUFFER [MSG_MAX_SIZE];
+#elif ALIGNMENT == 2
+   typedef U16 MSG_BUFFER [(MSG_MAX_SIZE + 1) / 2];
+#elif ALIGNMENT == 4
+   typedef U32 MSG_BUFFER [(MSG_MAX_SIZE + 3) / 4];
+#else
+   #error "invalid alignment"
+#endif
+
+
+/* standard funtions: */
+
+
+/*********************************************************************/
+U16 ipc_createMsg (     /* @func Create a message.                   */
+   void       *pvBuffer,/* @parm Buffer for the message to store.    */
+   U16         uwSize,  /* @parm Size of the buffer.                 */
+   MSG_HEADER  Msg      /* @parm Settings for the message to create. */
+   );                   /* @returnvalue One of the values below.     */
+/*---------------------------------------------------------------------
+ * @description      The function creates a message out of the settings
+ *                   that are stored in the structure. The resulting
+ *                   message will be written to the buffer.
+ *
+ *                   Attention: The address of the buffer MUST be
+ *                              aligned (multiple of ALIGNMENT)
+ *
+ *                   Sender and Receiver will be inserted in normalized
+ *                   form (= absolute address) !
+ *
+ * @tablex           Return values:                                   |
+ *                   Value          Description
+ *                   --------------------------------------------------
+ *                   > 0            Size of the message.
+ *                   = 0            Buffer too small, invalid settings.
+ *
+ * @tablex           Content of pHdr:                                 |
+ *                   Setting        Description
+ *                   -------------- -----------------------------------
+ *                   pcSender       NULL means that the calling process
+ *                                  is the sender. Otherwise the string
+ *                                  will be inserted into the message.
+ *                   pcReceiver     Name of the receiver (string)
+ *                                  or IPC_HANDLE of the receiver.
+ *                   pvBuffer       Pointer to the data to append to
+ *                                  the message.
+ *                   uwSize         Size of the data to append to the
+ *                                  message.
+ *                   uwID           Message group and code. Use the
+ *                                  macro MSG_ID(Group,Code) to set the
+ *                                  value.
+ *                   ulTime         Automatically set.
+ *                   uwTenthOfMS    Automatically set.
+ *********************************************************************/
+
+
+/*********************************************************************/
+S16 ipc_parseMsg (      /* @func Parse a message.                    */
+   MSG_HEADER *pMsg,    /* @parm Structure to store the settings.    */
+   void       *pvBuffer,/* @parm Buffer containing the message.      */
+   U16         uwSize   /* @parm Size of pvBuffer.                   */
+   );                   /* @returnvalue One of the values below.     */
+/*---------------------------------------------------------------------
+ * @description      The function parses a buffer that contains a
+ *                   a message and writes all settings to the
+ *                   structure.
+ *
+ *                   Attention: The address of the buffer MUST be
+ *                              aligned (multiple of ALIGNMENT)
+ *
+ * @tablex           Return values:                                   |
+ *                   Value          Description
+ *                   --------------------------------------------------
+ *                   IPC_INVALID    Invalid arguments or message.
+ *                   IPC_OK         Success.
+ *
+ * @tablex           Content of pHdr:                                 |
+ *                   Setting        Description
+ *                   -------------- -----------------------------------
+ *                   pcSender       Address of the sender.
+ *                   pcReceiver     Address of the receiver (normally
+ *                                  the process receiving the message).
+ *                   pvBuffer       Pointer to the data of the message.
+ *                   uwSize         Size of the data.
+ *                   uwID           Message group and code. Use the
+ *                                  macro MSG_ID(Group,Code) to compare
+ *                                  the value with other IDs.
+ *                   ulTime         Time [ms from 01.01.1970 GMT] of
+ *                                  message's creation.
+ *                   uwTenthOfMS    The tenth of [ms] of the message's
+ *                                  creation.
+ *********************************************************************/
+
+#endif   /* IPCAPI_H */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/arm7/nucleus.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,1120 @@
+/*************************************************************************/
+/*                                                                       */
+/*        Copyright (c) 1993-1994 Accelerated Technology, Inc.           */
+/*                                                                       */
+/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
+/* subject matter of this material.  All manufacturing, reproduction,    */
+/* use, and sales rights pertaining to this subject matter are governed  */
+/* by the license agreement.  The recipient of this software implicitly  */
+/* accepts the terms of the license.                                     */
+/*                                                                       */
+/*************************************************************************/
+
+/*************************************************************************/
+/*                                                                       */
+/* FILE NAME                                            VERSION          */
+/*                                                                       */
+/*      nucleus.h                                   PLUS/THUMB/T 1.0     */
+/*                                                                       */
+/* COMPONENT                                                             */
+/*                                                                       */
+/*      System Constants                                                 */
+/*                                                                       */
+/* DESCRIPTION                                                           */
+/*                                                                       */
+/*      This file contains system constants common to both the           */
+/*      application and the actual Nucleus PLUS components.  This file   */
+/*      also contains data structure definitions that hide internal      */
+/*      information from the application.                                */
+/*                                                                       */
+/* AUTHOR                                                                */
+/*                                                                       */
+/*      Barry Sellew, Accelerated Technology, Inc.                       */
+/*                                                                       */
+/* DATA STRUCTURES                                                       */
+/*                                                                       */
+/*      NU_DRIVER                           I/O Driver control block     */
+/*      NU_EVENT_GROUP                      Event group control block    */
+/*      NU_HISR                             HISR control block           */
+/*      NU_MAILBOX                          Mailbox control block        */
+/*      NU_MEMORY_POOL                      Memory Pool control block    */
+/*      NU_PARTITION_POOL                   Partition Pool control block */
+/*      NU_PIPE                             Pipe control block           */
+/*      NU_QUEUE                            Queue control block          */
+/*      NU_SEMAPHORE                        Semaphore control block      */
+/*      NU_TASK                             Task control block           */
+/*      NU_TIMER                            Timer control block          */
+/*      NU_PROTECT                          Protection structure         */
+/*                                                                       */
+/* FUNCTIONS                                                             */
+/*                                                                       */
+/*      None                                                             */
+/*                                                                       */
+/* DEPENDENCIES                                                          */
+/*                                                                       */
+/*      None                                                             */
+/*                                                                       */
+/* HISTORY                                                               */
+/*                                                                       */
+/*         NAME            DATE                    REMARKS               */
+/*                                                                       */
+/*      W. Lamie        04-19-1994      Created R4xxx version 1.0        */
+/*                                                                       */
+/*************************************************************************/
+
+/* Check to see if this file has been included already.  */
+
+#ifndef         NUCLEUS
+
+#ifdef          __cplusplus
+extern  "C" {                               /* C declarations in C++     */
+#endif
+
+#define         NUCLEUS
+
+/* Define standard data types.  These definitions allow Nucleus PLUS to
+   perform in the same manner on different target platforms.  */
+
+typedef unsigned long           UNSIGNED;
+typedef long                    SIGNED;
+typedef unsigned char           DATA_ELEMENT;
+typedef DATA_ELEMENT            OPTION;
+typedef int                     STATUS;
+typedef unsigned char           UNSIGNED_CHAR;
+typedef char                    CHAR;
+typedef int                     INT;
+typedef void                    VOID;
+typedef unsigned long *         UNSIGNED_PTR;
+typedef unsigned char *         BYTE_PTR;
+
+
+/* Define register defines.  R1, R2, R3, and R4 are used in the Nucleus PLUS
+   source code in front of variables that are referenced often.  In some
+   ports, defining them as "register" will improve performance.  */
+
+#define         R1                              register
+#define         R2                              register
+#define         R3                              register
+#define         R4                              register
+
+
+/* Define the number of accesses required to read or write a pointer data
+   type.  This value is used to make optimizations in some ports of Nucleus
+   PLUS.  */
+   
+#define         NU_POINTER_ACCESS               1
+
+
+/* Define the padding required for usage of the DATA_ELEMENT type within 
+   Nucleus PLUS structures.  These values insure proper alignment for the
+   next structure member.  */
+   
+#define         PAD_1                           3
+#define         PAD_2                           2
+#define         PAD_3                           1
+
+
+
+/* Define constants that are target dependent and/or are used for internal
+   purposes.  */
+
+#define         NU_MIN_STACK_SIZE               240
+#define         NU_MAX_NAME                     8
+#define         NU_MAX_VECTORS                  8
+#define         NU_MAX_LISRS                    8
+
+
+/* Define constants for the number of UNSIGNED words in each of the basic
+   system data structures.  */
+
+#define         NU_TASK_SIZE                    42
+#define         NU_HISR_SIZE                    22
+#define         NU_MAILBOX_SIZE                 13
+#define         NU_QUEUE_SIZE                   18
+#define         NU_PIPE_SIZE                    18
+#define         NU_SEMAPHORE_SIZE               10
+#define         NU_EVENT_GROUP_SIZE             9
+#define         NU_PARTITION_POOL_SIZE          15
+#define         NU_MEMORY_POOL_SIZE             17
+#define         NU_TIMER_SIZE                   17
+#define         NU_PROTECT_SIZE                 2
+#define         NU_DRIVER_SIZE                  3
+
+
+/* Define what an interrupt vector looks like on the target processor.  */
+
+typedef struct NU_VECTOR_STRUCT
+{
+    VOID       *pointer;
+} NU_VECTOR;
+
+
+/* Define constants for use in service parameters.  */
+
+#define         NU_AND                          2
+#define         NU_AND_CONSUME                  3
+#define         NU_DISABLE_TIMER                4
+#define         NU_ENABLE_TIMER                 5
+#define         NU_FALSE                        0
+#define         NU_FIFO                         6
+#define         NU_FIXED_SIZE                   7
+#define         NU_NO_PREEMPT                   8
+#define         NU_NO_START                     9
+#define         NU_NO_SUSPEND                   0
+#define         NU_NULL                         0
+#define         NU_OR                           0
+#define         NU_OR_CONSUME                   1
+#define         NU_PREEMPT                      10
+#define         NU_PRIORITY                     11
+#define         NU_START                        12
+#define         NU_SUSPEND                      0xFFFFFFFFUL
+#define         NU_TRUE                         1
+#define         NU_VARIABLE_SIZE                13
+
+
+/* Define interrupt lockout and enable constants.  */
+
+#define         NU_DISABLE_INTERRUPTS           0xC0
+#define         NU_ENABLE_INTERRUPTS            0x00
+
+
+/* Define task suspension constants.  */
+
+#define         NU_DRIVER_SUSPEND               10
+#define         NU_EVENT_SUSPEND                7
+#define         NU_FINISHED                     11
+#define         NU_MAILBOX_SUSPEND              3
+#define         NU_MEMORY_SUSPEND               9
+#define         NU_PARTITION_SUSPEND            8
+#define         NU_PIPE_SUSPEND                 5
+#define         NU_PURE_SUSPEND                 1
+#define         NU_QUEUE_SUSPEND                4
+#define         NU_READY                        0
+#define         NU_SEMAPHORE_SUSPEND            6
+#define         NU_SLEEP_SUSPEND                2
+#define         NU_TERMINATED                   12
+
+/* Define service completion status constants.  */
+
+#define         NU_SUCCESS                      0
+#define         NU_END_OF_LOG                   -1
+#define         NU_GROUP_DELETED                -2
+#define         NU_INVALID_DELETE               -3
+#define         NU_INVALID_DRIVER               -4
+#define         NU_INVALID_ENABLE               -5
+#define         NU_INVALID_ENTRY                -6
+#define         NU_INVALID_FUNCTION             -7
+#define         NU_INVALID_GROUP                -8
+#define         NU_INVALID_HISR                 -9
+#define         NU_INVALID_MAILBOX              -10
+#define         NU_INVALID_MEMORY               -11
+#define         NU_INVALID_MESSAGE              -12
+#define         NU_INVALID_OPERATION            -13
+#define         NU_INVALID_PIPE                 -14
+#define         NU_INVALID_POINTER              -15
+#define         NU_INVALID_POOL                 -16
+#define         NU_INVALID_PREEMPT              -17
+#define         NU_INVALID_PRIORITY             -18
+#define         NU_INVALID_QUEUE                -19
+#define         NU_INVALID_RESUME               -20
+#define         NU_INVALID_SEMAPHORE            -21
+#define         NU_INVALID_SIZE                 -22
+#define         NU_INVALID_START                -23
+#define         NU_INVALID_SUSPEND              -24
+#define         NU_INVALID_TASK                 -25
+#define         NU_INVALID_TIMER                -26
+#define         NU_INVALID_VECTOR               -27
+#define         NU_MAILBOX_DELETED              -28
+#define         NU_MAILBOX_EMPTY                -29
+#define         NU_MAILBOX_FULL                 -30
+#define         NU_MAILBOX_RESET                -31
+#define         NU_NO_MEMORY                    -32
+#define         NU_NO_MORE_LISRS                -33
+#define         NU_NO_PARTITION                 -34
+#define         NU_NOT_DISABLED                 -35
+#define         NU_NOT_PRESENT                  -36
+#define         NU_NOT_REGISTERED               -37
+#define         NU_NOT_TERMINATED               -38
+#define         NU_PIPE_DELETED                 -39
+#define         NU_PIPE_EMPTY                   -40
+#define         NU_PIPE_FULL                    -41
+#define         NU_PIPE_RESET                   -42
+#define         NU_POOL_DELETED                 -43
+#define         NU_QUEUE_DELETED                -44
+#define         NU_QUEUE_EMPTY                  -45
+#define         NU_QUEUE_FULL                   -46
+#define         NU_QUEUE_RESET                  -47
+#define         NU_SEMAPHORE_DELETED            -48
+#define         NU_SEMAPHORE_RESET              -49
+#define         NU_TIMEOUT                      -50
+#define         NU_UNAVAILABLE                  -51
+
+
+/* Define system errors.  */
+
+#define         NU_ERROR_CREATING_TIMER_HISR    1
+#define         NU_ERROR_CREATING_TIMER_TASK    2
+#define         NU_STACK_OVERFLOW               3
+#define         NU_UNHANDLED_INTERRUPT          4
+
+
+/* Define I/O driver constants.  */
+
+#define         NU_IO_ERROR                     -1
+#define         NU_INITIALIZE                   1
+#define         NU_ASSIGN                       2
+#define         NU_RELEASE                      3
+#define         NU_INPUT                        4
+#define         NU_OUTPUT                       5
+#define         NU_STATUS                       6
+#define         NU_TERMINATE                    7
+
+
+/* Define history entry IDs.  */
+
+#define         NU_USER_ID                      1
+#define         NU_CREATE_TASK_ID               2
+#define         NU_DELETE_TASK_ID               3
+#define         NU_RESET_TASK_ID                4
+#define         NU_TERMINATE_TASK_ID            5
+#define         NU_RESUME_TASK_ID               6
+#define         NU_SUSPEND_TASK_ID              7
+#define         NU_RELINQUISH_ID                8
+#define         NU_SLEEP_ID                     9
+#define         NU_CHANGE_PRIORITY_ID           10
+#define         NU_CHANGE_PREEMPTION_ID         11
+#define         NU_CREATE_MAILBOX_ID            12
+#define         NU_DELETE_MAILBOX_ID            13
+#define         NU_RESET_MAILBOX_ID             14
+#define         NU_SEND_TO_MAILBOX_ID           15
+#define         NU_BROADCAST_TO_MAILBOX_ID      16
+#define         NU_RECEIVE_FROM_MAILBOX_ID      17
+#define         NU_CREATE_QUEUE_ID              18
+#define         NU_DELETE_QUEUE_ID              19
+#define         NU_RESET_QUEUE_ID               20
+#define         NU_SEND_TO_FRONT_OF_QUEUE_ID    21
+#define         NU_SEND_TO_QUEUE_ID             22
+#define         NU_BROADCAST_TO_QUEUE_ID        23
+#define         NU_RECEIVE_FROM_QUEUE_ID        24
+#define         NU_CREATE_PIPE_ID               25 
+#define         NU_DELETE_PIPE_ID               26 
+#define         NU_RESET_PIPE_ID                27
+#define         NU_SEND_TO_FRONT_OF_PIPE_ID     28 
+#define         NU_SEND_TO_PIPE_ID              29 
+#define         NU_BROADCAST_TO_PIPE_ID         30 
+#define         NU_RECEIVE_FROM_PIPE_ID         31 
+#define         NU_CREATE_SEMAPHORE_ID          32
+#define         NU_DELETE_SEMAPHORE_ID          33
+#define         NU_RESET_SEMAPHORE_ID           34
+#define         NU_OBTAIN_SEMAPHORE_ID          35
+#define         NU_RELEASE_SEMAPHORE_ID         36
+#define         NU_CREATE_EVENT_GROUP_ID        37
+#define         NU_DELETE_EVENT_GROUP_ID        38
+#define         NU_SET_EVENTS_ID                39
+#define         NU_RETRIEVE_EVENTS_ID           40
+#define         NU_CREATE_PARTITION_POOL_ID     41
+#define         NU_DELETE_PARTITION_POOL_ID     42
+#define         NU_ALLOCATE_PARTITION_ID        43
+#define         NU_DEALLOCATE_PARTITION_ID      44
+#define         NU_CREATE_MEMORY_POOL_ID        45
+#define         NU_DELETE_MEMORY_POOL_ID        46
+#define         NU_ALLOCATE_MEMORY_ID           47
+#define         NU_DEALLOCATE_MEMORY_ID         48
+#define         NU_CONTROL_SIGNALS_ID           49
+#define         NU_RECEIVE_SIGNALS_ID           50
+#define         NU_REGISTER_SIGNAL_HANDLER_ID   51
+#define         NU_SEND_SIGNALS_ID              52
+#define         NU_REGISTER_LISR_ID             53
+#define         NU_CREATE_HISR_ID               54
+#define         NU_DELETE_HISR_ID               55
+#define         NU_CREATE_TIMER_ID              56
+#define         NU_DELETE_TIMER_ID              57
+#define         NU_CONTROL_TIMER_ID             58
+#define         NU_RESET_TIMER_ID               59
+#define         NU_CREATE_DRIVER_ID             60
+#define         NU_DELETE_DRIVER_ID             61
+#define         NU_REQUEST_DRIVER_ID            62
+#define         NU_RESUME_DRIVER_ID             63
+#define         NU_SUSPEND_DRIVER_ID            64
+#define         NU_CHANGE_TIME_SLICE_ID         65
+
+
+/* Define the basic data structure templates.  If the NU_DEBUG conditional
+   compilation is specified, the actual structure definition is used.  */
+
+#ifdef          NU_DEBUG
+#include        "cs_defs.h"
+#include        "tm_defs.h"
+#include        "tc_defs.h"
+#include        "mb_defs.h"
+#include        "qu_defs.h"
+#include        "pi_defs.h"
+#include        "sm_defs.h"
+#include        "ev_defs.h"
+#include        "pm_defs.h"
+#include        "dm_defs.h"
+#endif
+
+
+#ifndef         NU_DEBUG
+
+/* Define task control data structure with all internal information 
+   hidden.  */
+typedef struct NU_TASK_STRUCT
+{
+    UNSIGNED      words[NU_TASK_SIZE];
+} NU_TASK;
+#else
+
+/* Define task control data structure with the actual internal data 
+   structure.  */
+typedef TC_TCB      NU_TASK;
+#endif
+
+
+#ifndef         NU_DEBUG
+
+/* Define HISR control data structure with all internal information 
+   hidden.  */
+typedef struct NU_HISR_STRUCT
+{
+    UNSIGNED      words[NU_HISR_SIZE];
+} NU_HISR;
+#else
+
+/* Define HISR control data structure with the actual internal data 
+   structure.  */
+typedef TC_HCB      NU_HISR;
+#endif
+
+
+#ifndef         NU_DEBUG
+
+/* Define mailbox control data structure with all internal information
+   hidden.  */ 
+typedef struct NU_MAILBOX_STRUCT
+{
+    UNSIGNED      words[NU_MAILBOX_SIZE];
+} NU_MAILBOX;
+#else
+
+/* Define mailbox control data structure with the actual internal data 
+   structure.  */
+typedef MB_MCB      NU_MAILBOX;
+#endif
+
+ 
+#ifndef         NU_DEBUG
+
+/* Define queue control data structure with all internal information
+   hidden.  */ 
+typedef struct NU_QUEUE_STRUCT
+{
+    UNSIGNED      words[NU_QUEUE_SIZE];
+} NU_QUEUE;
+#else
+
+/* Define queue control data structure with the actual internal data 
+   structure.  */
+typedef QU_QCB      NU_QUEUE;
+#endif
+
+
+#ifndef         NU_DEBUG
+
+/* Define pipe control data structure with all internal information
+   hidden.  */ 
+typedef struct NU_PIPE_STRUCT
+{
+    UNSIGNED      words[NU_PIPE_SIZE];
+} NU_PIPE;
+#else
+
+/* Define pipe control data structure with the actual internal data 
+   structure.  */
+typedef PI_PCB      NU_PIPE;
+#endif
+
+
+#ifndef         NU_DEBUG
+
+/* Define semaphore control data structure with all internal information
+   hidden.  */ 
+typedef struct NU_SEMAPHORE_STRUCT
+{
+    UNSIGNED       words[NU_SEMAPHORE_SIZE];
+} NU_SEMAPHORE;
+#else
+
+/* Define semaphore control data structure with the actual internal data 
+   structure.  */
+typedef SM_SCB      NU_SEMAPHORE;
+#endif
+
+
+#ifndef         NU_DEBUG
+
+/* Define event group control data structure with all internal information
+   hidden.  */ 
+typedef struct NU_EVENT_GROUP_STRUCT
+{
+    UNSIGNED       words[NU_EVENT_GROUP_SIZE];
+} NU_EVENT_GROUP;
+#else
+
+/* Define event group control data structure with the actual internal data 
+   structure.  */
+typedef EV_GCB      NU_EVENT_GROUP;
+#endif
+
+
+#ifndef         NU_DEBUG
+
+/* Define partition pool control data structure with all internal 
+   information hidden.  */ 
+typedef struct NU_PARTITION_POOL_STRUCT
+{
+    UNSIGNED       words[NU_PARTITION_POOL_SIZE];
+} NU_PARTITION_POOL;
+#else
+
+/* Define partition pool control data structure with the actual internal 
+   data structure.  */
+typedef PM_PCB      NU_PARTITION_POOL;
+#endif
+
+
+#ifndef         NU_DEBUG
+
+/* Define memory pool control data structure with all internal information
+   hidden.  */ 
+typedef struct NU_MEMORY_POOL_STRUCT
+{
+    UNSIGNED       words[NU_MEMORY_POOL_SIZE];
+} NU_MEMORY_POOL;
+#else
+
+/* Define memory pool control data structure with the actual internal data 
+   structure.  */
+typedef DM_PCB      NU_MEMORY_POOL;
+#endif
+
+
+#ifndef         NU_DEBUG
+
+/* Define timer control data structure with all internal information
+   hidden.  */ 
+typedef struct NU_TIMER_STRUCT
+{
+    UNSIGNED       words[NU_TIMER_SIZE];
+} NU_TIMER;
+#else
+
+/* Define timer control data structure with the actual internal data 
+   structure.  */
+typedef TM_APP_TCB      NU_TIMER;
+#endif
+
+
+#ifndef         NU_DEBUG
+
+/* Define protect control data structure with all internal information
+   hidden.  */ 
+typedef struct NU_PROTECT_STRUCT
+{
+    UNSIGNED       words[NU_PROTECT_SIZE];
+} NU_PROTECT;
+#else
+
+/* Define protect control data structure with the actual internal data 
+   structure.  */
+typedef TC_PROTECT      NU_PROTECT;
+#endif
+
+
+
+/* Define I/O driver request structures.  */
+
+struct NU_INITIALIZE_STRUCT
+{
+    VOID       *nu_io_address;              /* Base IO address          */
+    UNSIGNED    nu_logical_units;           /* Number of logical units  */
+    VOID       *nu_memory;                  /* Generic memory pointer   */
+    INT         nu_vector;                  /* Interrupt vector number  */
+};
+
+struct NU_ASSIGN_STRUCT
+{
+    UNSIGNED    nu_logical_unit;            /* Logical unit number      */
+    INT         nu_assign_info;             /* Additional assign info   */
+};
+
+struct NU_RELEASE_STRUCT
+{
+    UNSIGNED    nu_logical_unit;            /* Logical unit number      */
+    INT         nu_release_info;            /* Additional release info  */
+};
+
+struct NU_INPUT_STRUCT
+{
+    UNSIGNED    nu_logical_unit;            /* Logical unit number      */
+    UNSIGNED    nu_offset;                  /* Offset of input          */
+    UNSIGNED    nu_request_size;            /* Requested input size     */
+    UNSIGNED    nu_actual_size;             /* Actual input size        */
+    VOID       *nu_buffer_ptr;              /* Input buffer pointer     */
+};
+
+struct NU_OUTPUT_STRUCT
+{
+    UNSIGNED    nu_logical_unit;            /* Logical unit number      */
+    UNSIGNED    nu_offset;                  /* Offset of output         */
+    UNSIGNED    nu_request_size;            /* Requested output size    */
+    UNSIGNED    nu_actual_size;             /* Actual output size       */
+    VOID       *nu_buffer_ptr;              /* Output buffer pointer    */
+};
+
+struct NU_STATUS_STRUCT
+{
+    UNSIGNED    nu_logical_unit;            /* Logical unit number      */
+    VOID       *nu_extra_status;            /* Additional status ptr    */
+};
+
+struct NU_TERMINATE_STRUCT
+{
+    UNSIGNED    nu_logical_unit;            /* Logical unit number      */
+};
+
+
+typedef struct NU_DRIVER_REQUEST_STRUCT
+{
+    INT         nu_function;                /* I/O request function     */
+    UNSIGNED    nu_timeout;                 /* Timeout on request       */
+    STATUS      nu_status;                  /* Status of request        */
+    UNSIGNED    nu_supplemental;            /* Supplemental information */
+    VOID       *nu_supplemental_ptr;        /* Supplemental info pointer*/
+    
+    /* Define a union of all the different types of request structures. */
+    union NU_REQUEST_INFO_UNION
+    {
+        struct NU_INITIALIZE_STRUCT     nu_initialize;
+        struct NU_ASSIGN_STRUCT         nu_assign;
+        struct NU_RELEASE_STRUCT        nu_release;
+        struct NU_INPUT_STRUCT          nu_input;
+        struct NU_OUTPUT_STRUCT         nu_output;
+        struct NU_STATUS_STRUCT         nu_status;
+        struct NU_TERMINATE_STRUCT      nu_terminate;
+    } nu_request_info;
+    
+} NU_DRIVER_REQUEST;
+
+typedef struct NU_DRIVER_STRUCT
+{
+    UNSIGNED       words[NU_DRIVER_SIZE];
+    CHAR           nu_driver_name[NU_MAX_NAME];
+    VOID          *nu_info_ptr;
+    UNSIGNED       nu_driver_id;
+    VOID           (*nu_driver_entry)(struct NU_DRIVER_STRUCT *,
+                                                NU_DRIVER_REQUEST *);
+} NU_DRIVER;
+
+
+
+/* Define Nucleus PLUS system interfaces.  */
+
+VOID            Application_Initialize(VOID *first_available_memory);
+
+
+/* The following area is only applicable to application files and is skipped
+   during compilation of Nucleus PLUS source files.  */
+#ifndef         NU_SOURCE_FILE
+
+/* Re-map task control functions depending on whether or not error checking
+   is specified.  */
+#ifdef          NU_NO_ERROR_CHECKING
+#define         NU_Create_Task                  TCC_Create_Task
+#define         NU_Delete_Task                  TCC_Delete_Task
+#define         NU_Reset_Task                   TCC_Reset_Task
+#define         NU_Terminate_Task               TCC_Terminate_Task
+#define         NU_Resume_Task                  TCC_Resume_Service
+#define         NU_Suspend_Task                 TCC_Suspend_Service
+#define         NU_Relinquish                   TCC_Relinquish
+#define         NU_Sleep                        TCC_Task_Sleep
+#define         NU_Change_Priority              TCS_Change_Priority
+#define         NU_Change_Preemption            TCS_Change_Preemption
+#define         NU_Change_Time_Slice            TCS_Change_Time_Slice
+#define         NU_Check_Stack                  TCT_Check_Stack
+#define         NU_Current_Task_Pointer         TCC_Current_Task_Pointer
+#define         NU_Established_Tasks            TCF_Established_Tasks
+#define         NU_Task_Information             TCF_Task_Information
+#define         NU_Task_Pointers                TCF_Task_Pointers
+#define         NU_Create_Mailbox               MBC_Create_Mailbox
+#define         NU_Delete_Mailbox               MBC_Delete_Mailbox
+#define         NU_Reset_Mailbox                MBS_Reset_Mailbox
+#define         NU_Send_To_Mailbox              MBC_Send_To_Mailbox
+#define         NU_Broadcast_To_Mailbox         MBS_Broadcast_To_Mailbox
+#define         NU_Receive_From_Mailbox         MBC_Receive_From_Mailbox
+#define         NU_Established_Mailboxes        MBF_Established_Mailboxes
+#define         NU_Mailbox_Information          MBF_Mailbox_Information
+#define         NU_Mailbox_Pointers             MBF_Mailbox_Pointers
+#define         NU_Create_Queue                 QUC_Create_Queue
+#define         NU_Delete_Queue                 QUC_Delete_Queue
+#define         NU_Reset_Queue                  QUS_Reset_Queue
+#define         NU_Send_To_Front_Of_Queue       QUS_Send_To_Front_Of_Queue
+#define         NU_Send_To_Queue                QUC_Send_To_Queue
+#define         NU_Broadcast_To_Queue           QUS_Broadcast_To_Queue
+#define         NU_Receive_From_Queue           QUC_Receive_From_Queue
+#define         NU_Established_Queues           QUF_Established_Queues
+#define         NU_Queue_Information            QUF_Queue_Information
+#define         NU_Queue_Pointers               QUF_Queue_Pointers
+#define         NU_Create_Pipe                  PIC_Create_Pipe 
+#define         NU_Delete_Pipe                  PIC_Delete_Pipe 
+#define         NU_Reset_Pipe                   PIS_Reset_Pipe
+#define         NU_Send_To_Front_Of_Pipe        PIS_Send_To_Front_Of_Pipe 
+#define         NU_Send_To_Pipe                 PIC_Send_To_Pipe 
+#define         NU_Broadcast_To_Pipe            PIS_Broadcast_To_Pipe 
+#define         NU_Receive_From_Pipe            PIC_Receive_From_Pipe 
+#define         NU_Established_Pipes            PIF_Established_Pipes   
+#define         NU_Pipe_Information             PIF_Pipe_Information
+#define         NU_Pipe_Pointers                PIF_Pipe_Pointers
+#define         NU_Create_Semaphore             SMC_Create_Semaphore
+#define         NU_Delete_Semaphore             SMC_Delete_Semaphore
+#define         NU_Reset_Semaphore              SMS_Reset_Semaphore
+#define         NU_Obtain_Semaphore             SMC_Obtain_Semaphore
+#define         NU_Release_Semaphore            SMC_Release_Semaphore
+#define         NU_Established_Semaphores       SMF_Established_Semaphores
+#define         NU_Semaphore_Information        SMF_Semaphore_Information
+#define         NU_Semaphore_Pointers           SMF_Semaphore_Pointers
+#define         NU_Create_Event_Group           EVC_Create_Event_Group
+#define         NU_Delete_Event_Group           EVC_Delete_Event_Group
+#define         NU_Set_Events                   EVC_Set_Events
+#define         NU_Retrieve_Events              EVC_Retrieve_Events
+#define         NU_Established_Event_Groups     EVF_Established_Event_Groups
+#define         NU_Event_Group_Information      EVF_Event_Group_Information
+#define         NU_Event_Group_Pointers         EVF_Event_Group_Pointers
+#define         NU_Create_Partition_Pool        PMC_Create_Partition_Pool
+#define         NU_Delete_Partition_Pool        PMC_Delete_Partition_Pool
+#define         NU_Allocate_Partition           PMC_Allocate_Partition
+#define         NU_Deallocate_Partition         PMC_Deallocate_Partition
+#define         NU_Established_Partition_Pools  PMF_Established_Partition_Pools
+#define         NU_Partition_Pool_Information   PMF_Partition_Pool_Information
+#define         NU_Partition_Pool_Pointers      PMF_Partition_Pool_Pointers
+#define         NU_Create_Memory_Pool           DMC_Create_Memory_Pool
+#define         NU_Delete_Memory_Pool           DMC_Delete_Memory_Pool
+#define         NU_Allocate_Memory              DMC_Allocate_Memory
+#define         NU_Deallocate_Memory            DMC_Deallocate_Memory
+#define         NU_Established_Memory_Pools     DMF_Established_Memory_Pools
+#define         NU_Memory_Pool_Information      DMF_Memory_Pool_Information
+#define         NU_Memory_Pool_Pointers         DMF_Memory_Pool_Pointers
+#define         NU_Control_Signals              TCS_Control_Signals
+#define         NU_Receive_Signals              TCS_Receive_Signals
+#define         NU_Register_Signal_Handler      TCS_Register_Signal_Handler
+#define         NU_Send_Signals                 TCS_Send_Signals
+#define         NU_Setup_Vector                 INT_Setup_Vector
+#define         NU_Register_LISR                TCC_Register_LISR
+#define         NU_Activate_HISR                TCT_Activate_HISR
+#define         NU_Create_HISR                  TCC_Create_HISR
+#define         NU_Delete_HISR                  TCC_Delete_HISR
+#define         NU_Current_HISR_Pointer         TCC_Current_HISR_Pointer
+#define         NU_Established_HISRs            TCF_Established_HISRs
+#define         NU_HISR_Pointers                TCF_HISR_Pointers
+#define         NU_HISR_Information             TCF_HISR_Information
+#define         NU_Protect                      TCT_Protect
+#define         NU_Unprotect                    TCT_Unprotect
+#define         NU_Control_Interrupts           TCT_Control_Interrupts
+#define         NU_Local_Control_Interrupts     TCT_Local_Control_Interrupts
+#define         NU_Restore_Interrupts           TCT_Restore_Interrupts
+#define         NU_Set_Clock                    TMT_Set_Clock
+#define         NU_Retrieve_Clock               TMT_Retrieve_Clock
+#define         NU_Create_Timer                 TMS_Create_Timer
+#define         NU_Delete_Timer                 TMS_Delete_Timer
+#define         NU_Control_Timer                TMS_Control_Timer
+#define         NU_Reset_Timer                  TMS_Reset_Timer
+#define         NU_Established_Timers           TMF_Established_Timers
+#define         NU_Timer_Pointers               TMF_Timer_Pointers
+#define         NU_Timer_Information            TMF_Timer_Information
+#define         NU_Release_Information          RLC_Release_Information
+#define         NU_License_Information          LIC_License_Information
+#define         NU_Disable_History_Saving       HIC_Disable_History_Saving
+#define         NU_Enable_History_Saving        HIC_Enable_History_Saving
+#define         NU_Make_History_Entry           HIC_Make_History_Entry_Service
+#define         NU_Retrieve_History_Entry       HIC_Retrieve_History_Entry
+#define         NU_Create_Driver                IOC_Create_Driver
+#define         NU_Delete_Driver                IOC_Delete_Driver
+#define         NU_Request_Driver               IOC_Request_Driver
+#define         NU_Resume_Driver                IOC_Resume_Driver
+#define         NU_Suspend_Driver               IOC_Suspend_Driver
+#define         NU_Established_Drivers          IOF_Established_Drivers
+#define         NU_Driver_Pointers              IOF_Driver_Pointers
+#else
+#define         NU_Create_Task                  TCCE_Create_Task
+#define         NU_Delete_Task                  TCCE_Delete_Task
+#define         NU_Reset_Task                   TCCE_Reset_Task
+#define         NU_Terminate_Task               TCCE_Terminate_Task
+#define         NU_Resume_Task                  TCCE_Resume_Service
+#define         NU_Suspend_Task                 TCCE_Suspend_Service
+#define         NU_Relinquish                   TCCE_Relinquish
+#define         NU_Sleep                        TCCE_Task_Sleep
+#define         NU_Change_Priority              TCSE_Change_Priority
+#define         NU_Change_Preemption            TCSE_Change_Preemption
+#define         NU_Change_Time_Slice            TCSE_Change_Time_Slice
+#define         NU_Check_Stack                  TCT_Check_Stack
+#define         NU_Current_Task_Pointer         TCC_Current_Task_Pointer
+#define         NU_Established_Tasks            TCF_Established_Tasks
+#define         NU_Task_Information             TCF_Task_Information
+#define         NU_Task_Pointers                TCF_Task_Pointers
+#define         NU_Create_Mailbox               MBCE_Create_Mailbox
+#define         NU_Delete_Mailbox               MBCE_Delete_Mailbox
+#define         NU_Reset_Mailbox                MBSE_Reset_Mailbox
+#define         NU_Send_To_Mailbox              MBCE_Send_To_Mailbox
+#define         NU_Broadcast_To_Mailbox         MBSE_Broadcast_To_Mailbox
+#define         NU_Receive_From_Mailbox         MBCE_Receive_From_Mailbox
+#define         NU_Established_Mailboxes        MBF_Established_Mailboxes
+#define         NU_Mailbox_Information          MBF_Mailbox_Information
+#define         NU_Mailbox_Pointers             MBF_Mailbox_Pointers
+#define         NU_Create_Queue                 QUCE_Create_Queue
+#define         NU_Delete_Queue                 QUCE_Delete_Queue
+#define         NU_Reset_Queue                  QUSE_Reset_Queue
+#define         NU_Send_To_Queue                QUCE_Send_To_Queue
+#define         NU_Send_To_Front_Of_Queue       QUSE_Send_To_Front_Of_Queue
+#define         NU_Broadcast_To_Queue           QUSE_Broadcast_To_Queue
+#define         NU_Receive_From_Queue           QUCE_Receive_From_Queue
+#define         NU_Established_Queues           QUF_Established_Queues
+#define         NU_Queue_Information            QUF_Queue_Information
+#define         NU_Queue_Pointers               QUF_Queue_Pointers
+#define         NU_Create_Pipe                  PICE_Create_Pipe 
+#define         NU_Delete_Pipe                  PICE_Delete_Pipe 
+#define         NU_Reset_Pipe                   PISE_Reset_Pipe
+#define         NU_Send_To_Front_Of_Pipe        PISE_Send_To_Front_Of_Pipe 
+#define         NU_Send_To_Pipe                 PICE_Send_To_Pipe 
+#define         NU_Broadcast_To_Pipe            PISE_Broadcast_To_Pipe 
+#define         NU_Receive_From_Pipe            PICE_Receive_From_Pipe 
+#define         NU_Established_Pipes            PIF_Established_Pipes   
+#define         NU_Pipe_Information             PIF_Pipe_Information
+#define         NU_Pipe_Pointers                PIF_Pipe_Pointers
+#define         NU_Create_Semaphore             SMCE_Create_Semaphore
+#define         NU_Delete_Semaphore             SMCE_Delete_Semaphore
+#define         NU_Reset_Semaphore              SMSE_Reset_Semaphore
+#define         NU_Obtain_Semaphore             SMCE_Obtain_Semaphore
+#define         NU_Release_Semaphore            SMCE_Release_Semaphore
+#define         NU_Established_Semaphores       SMF_Established_Semaphores
+#define         NU_Semaphore_Information        SMF_Semaphore_Information
+#define         NU_Semaphore_Pointers           SMF_Semaphore_Pointers
+#define         NU_Create_Event_Group           EVCE_Create_Event_Group
+#define         NU_Delete_Event_Group           EVCE_Delete_Event_Group
+#define         NU_Set_Events                   EVCE_Set_Events
+#define         NU_Retrieve_Events              EVCE_Retrieve_Events
+#define         NU_Established_Event_Groups     EVF_Established_Event_Groups
+#define         NU_Event_Group_Information      EVF_Event_Group_Information
+#define         NU_Event_Group_Pointers         EVF_Event_Group_Pointers
+#define         NU_Create_Partition_Pool        PMCE_Create_Partition_Pool
+#define         NU_Delete_Partition_Pool        PMCE_Delete_Partition_Pool
+#define         NU_Allocate_Partition           PMCE_Allocate_Partition
+#define         NU_Deallocate_Partition         PMCE_Deallocate_Partition
+#define         NU_Established_Partition_Pools  PMF_Established_Partition_Pools
+#define         NU_Partition_Pool_Information   PMF_Partition_Pool_Information
+#define         NU_Partition_Pool_Pointers      PMF_Partition_Pool_Pointers
+#define         NU_Create_Memory_Pool           DMCE_Create_Memory_Pool
+#define         NU_Delete_Memory_Pool           DMCE_Delete_Memory_Pool
+#define         NU_Allocate_Memory              DMCE_Allocate_Memory
+#define         NU_Deallocate_Memory            DMCE_Deallocate_Memory
+#define         NU_Established_Memory_Pools     DMF_Established_Memory_Pools
+#define         NU_Memory_Pool_Information      DMF_Memory_Pool_Information
+#define         NU_Memory_Pool_Pointers         DMF_Memory_Pool_Pointers
+#define         NU_Control_Signals              TCSE_Control_Signals
+#define         NU_Receive_Signals              TCSE_Receive_Signals
+#define         NU_Register_Signal_Handler      TCSE_Register_Signal_Handler
+#define         NU_Send_Signals                 TCSE_Send_Signals
+#define         NU_Setup_Vector                 INT_Setup_Vector
+#define         NU_Register_LISR                TCC_Register_LISR
+#define         NU_Activate_HISR                TCCE_Activate_HISR
+#define         NU_Create_HISR                  TCCE_Create_HISR
+#define         NU_Delete_HISR                  TCCE_Delete_HISR
+#define         NU_Current_HISR_Pointer         TCF_Current_HISR_Pointer
+#define         NU_Established_HISRs            TCF_Established_HISRs
+#define         NU_HISR_Pointers                TCF_HISR_Pointers
+#define         NU_HISR_Information             TCF_HISR_Information
+#define         NU_Protect                      TCT_Protect
+#define         NU_Unprotect                    TCT_Unprotect
+#define         NU_Control_Interrupts           TCT_Control_Interrupts
+#define         NU_Local_Control_Interrupts     TCT_Local_Control_Interrupts
+#define         NU_Restore_Interrupts           TCT_Restore_Interrupts
+#define         NU_Set_Clock                    TMT_Set_Clock
+#define         NU_Retrieve_Clock               TMT_Retrieve_Clock
+#define         NU_Create_Timer                 TMSE_Create_Timer
+#define         NU_Delete_Timer                 TMSE_Delete_Timer
+#define         NU_Control_Timer                TMSE_Control_Timer
+#define         NU_Reset_Timer                  TMSE_Reset_Timer
+#define         NU_Established_Timers           TMF_Established_Timers
+#define         NU_Timer_Pointers               TMF_Timer_Pointers
+#define         NU_Timer_Information            TMF_Timer_Information
+#define         NU_Release_Information          RLC_Release_Information
+#define         NU_License_Information          LIC_License_Information
+#define         NU_Disable_History_Saving       HIC_Disable_History_Saving
+#define         NU_Enable_History_Saving        HIC_Enable_History_Saving
+#define         NU_Make_History_Entry           HIC_Make_History_Entry_Service
+#define         NU_Retrieve_History_Entry       HIC_Retrieve_History_Entry
+#define         NU_Create_Driver                IOCE_Create_Driver
+#define         NU_Delete_Driver                IOCE_Delete_Driver
+#define         NU_Request_Driver               IOCE_Request_Driver
+#define         NU_Resume_Driver                IOCE_Resume_Driver
+#define         NU_Suspend_Driver               IOCE_Suspend_Driver
+#define         NU_Established_Drivers          IOF_Established_Drivers
+#define         NU_Driver_Pointers              IOF_Driver_Pointers
+#endif
+
+
+/* Define task control functions.  */
+
+STATUS          NU_Create_Task(NU_TASK *task, CHAR *name, 
+                        VOID (*task_entry)(UNSIGNED, VOID *), UNSIGNED argc,
+                        VOID *argv, VOID *stack_address, UNSIGNED stack_size,
+                        OPTION priority, UNSIGNED time_slice, 
+                        OPTION preempt, OPTION auto_start);
+STATUS          NU_Delete_Task(NU_TASK *task);
+STATUS          NU_Reset_Task(NU_TASK *task, UNSIGNED argc, VOID *argv);
+STATUS          NU_Terminate_Task(NU_TASK *task);
+STATUS          NU_Resume_Task(NU_TASK *task);
+STATUS          NU_Suspend_Task(NU_TASK *task);
+VOID            NU_Relinquish(VOID);
+VOID            NU_Sleep(UNSIGNED ticks);
+OPTION          NU_Change_Priority(NU_TASK *task, OPTION new_priority);
+OPTION          NU_Change_Preemption(OPTION preempt);
+UNSIGNED        NU_Change_Time_Slice(NU_TASK *task, UNSIGNED time_slice);
+UNSIGNED        NU_Check_Stack(VOID);
+NU_TASK        *NU_Current_Task_Pointer(VOID);
+UNSIGNED        NU_Established_Tasks(VOID);
+STATUS          NU_Task_Information(NU_TASK *task, CHAR *name, 
+                        DATA_ELEMENT *status, UNSIGNED *scheduled_count,
+                        OPTION *priority, OPTION *preempt,
+                        UNSIGNED *time_slice, VOID **stack_base,
+                        UNSIGNED *stack_size, UNSIGNED *minimum_stack);
+UNSIGNED        NU_Task_Pointers(NU_TASK **pointer_list, 
+                                                UNSIGNED maximum_pointers);
+
+/* Define Mailbox management functions.  */
+
+STATUS          NU_Create_Mailbox(NU_MAILBOX *mailbox, CHAR *name, 
+                                                OPTION suspend_type);
+STATUS          NU_Delete_Mailbox(NU_MAILBOX *mailbox);
+STATUS          NU_Reset_Mailbox(NU_MAILBOX *mailbox);
+STATUS          NU_Send_To_Mailbox(NU_MAILBOX *mailbox, VOID *message, 
+                                                        UNSIGNED suspend);
+STATUS          NU_Broadcast_To_Mailbox(NU_MAILBOX *mailbox, VOID *message,
+                                                        UNSIGNED suspend);
+STATUS          NU_Receive_From_Mailbox(NU_MAILBOX *mailbox, VOID *message,
+                                                        UNSIGNED suspend);
+UNSIGNED        NU_Established_Mailboxes(VOID);
+STATUS          NU_Mailbox_Information(NU_MAILBOX *mailbox, CHAR *name, 
+                  OPTION *suspend_type, OPTION *message_present,
+                  UNSIGNED *tasks_waiting, NU_TASK **first_task);
+UNSIGNED        MBC_Mailbox_Pointers(NU_MAILBOX **pointer_list, 
+                                                UNSIGNED maximum_pointers);
+
+/* Define Queue management functions.  */
+
+STATUS          NU_Create_Queue(NU_QUEUE *queue, CHAR *name, 
+                      VOID *start_address, UNSIGNED queue_size, 
+                      OPTION message_type, UNSIGNED message_size,
+                      OPTION suspend_type);
+STATUS          NU_Delete_Queue(NU_QUEUE *queue);
+STATUS          NU_Reset_Queue(NU_QUEUE *queue);
+STATUS          NU_Send_To_Front_Of_Queue(NU_QUEUE *queue, VOID *message, 
+                                        UNSIGNED size, UNSIGNED suspend);
+STATUS          NU_Send_To_Queue(NU_QUEUE *queue, VOID *message, 
+                                        UNSIGNED size, UNSIGNED suspend);
+STATUS          NU_Broadcast_To_Queue(NU_QUEUE *queue, VOID *message, 
+                                        UNSIGNED size, UNSIGNED suspend);
+STATUS          NU_Receive_From_Queue(NU_QUEUE *queue, VOID *message,
+                      UNSIGNED size, UNSIGNED *actual_size, UNSIGNED suspend);
+UNSIGNED        NU_Established_Queues(VOID);
+STATUS          NU_Queue_Information(NU_QUEUE *queue, CHAR *name, 
+                  VOID **start_address, UNSIGNED *queue_size, 
+                  UNSIGNED *available, UNSIGNED *messages, 
+                  OPTION *message_type, UNSIGNED *message_size,
+                  OPTION *suspend_type, UNSIGNED *tasks_waiting,
+                  NU_TASK **first_task);
+UNSIGNED        NU_Queue_Pointers(NU_QUEUE **pointer_list, 
+                                                UNSIGNED maximum_pointers);
+
+/* Define Pipe management functions.  */
+
+STATUS          NU_Create_Pipe(NU_PIPE *pipe, CHAR *name, 
+                      VOID *start_address, UNSIGNED pipe_size, 
+                      OPTION message_type, UNSIGNED message_size,
+                      OPTION suspend_type);
+STATUS          NU_Delete_Pipe(NU_PIPE *pipe);
+STATUS          NU_Reset_Pipe(NU_PIPE *pipe);
+STATUS          NU_Send_To_Front_Of_Pipe(NU_PIPE *pipe, VOID *message, 
+                                        UNSIGNED size, UNSIGNED suspend);
+STATUS          NU_Send_To_Pipe(NU_PIPE *pipe, VOID *message, 
+                                        UNSIGNED size, UNSIGNED suspend);
+STATUS          NU_Broadcast_To_Pipe(NU_PIPE *pipe, VOID *message, 
+                                        UNSIGNED size, UNSIGNED suspend);
+STATUS          NU_Receive_From_Pipe(NU_PIPE *pipe, VOID *message,
+                      UNSIGNED size, UNSIGNED *actual_size, UNSIGNED suspend);
+UNSIGNED        NU_Established_Pipes(VOID);
+STATUS          NU_Pipe_Information(NU_PIPE *pipe, CHAR *name, 
+                  VOID **start_address, UNSIGNED *pipe_size, 
+                  UNSIGNED *available, UNSIGNED *messages, 
+                  OPTION *message_type, UNSIGNED *message_size,
+                  OPTION *suspend_type, UNSIGNED *tasks_waiting,
+                  NU_TASK **first_task);
+UNSIGNED        NU_Pipe_Pointers(NU_PIPE **pointer_list, 
+                                                UNSIGNED maximum_pointers);
+
+/* Define Semaphore management functions.  */
+
+STATUS          NU_Create_Semaphore(NU_SEMAPHORE *semaphore, CHAR *name, 
+                        UNSIGNED initial_count, OPTION suspend_type);
+STATUS          NU_Delete_Semaphore(NU_SEMAPHORE *semaphore);
+STATUS          NU_Reset_Semaphore(NU_SEMAPHORE *semaphore, 
+                                        UNSIGNED initial_count);
+STATUS          NU_Obtain_Semaphore(NU_SEMAPHORE *semaphore, UNSIGNED suspend);
+STATUS          NU_Release_Semaphore(NU_SEMAPHORE *semaphore);
+UNSIGNED        NU_Established_Semaphores(VOID);
+STATUS          NU_Semaphore_Information(NU_SEMAPHORE *semaphore, CHAR *name, 
+                  UNSIGNED *current_count, OPTION *suspend_type, 
+                  UNSIGNED *tasks_waiting, NU_TASK **first_task);
+UNSIGNED        NU_Semaphore_Pointers(NU_SEMAPHORE **pointer_list, 
+                                                UNSIGNED maximum_pointers);
+                                                
+/* Define Event Group management functions.  */
+
+STATUS          NU_Create_Event_Group(NU_EVENT_GROUP *group, CHAR *name);
+STATUS          NU_Delete_Event_Group(NU_EVENT_GROUP *group);
+STATUS          NU_Set_Events(NU_EVENT_GROUP *group, UNSIGNED events, 
+                                                OPTION operation);
+STATUS          NU_Retrieve_Events(NU_EVENT_GROUP *group, 
+                        UNSIGNED requested_flags, OPTION operation, 
+                        UNSIGNED *retrieved_flags, UNSIGNED suspend);
+UNSIGNED        NU_Established_Event_Groups(VOID);
+STATUS          NU_Event_Group_Information(NU_EVENT_GROUP *group, CHAR *name, 
+                  UNSIGNED *event_flags, UNSIGNED *tasks_waiting, 
+                  NU_TASK **first_task);
+UNSIGNED        NU_Event_Group_Pointers(NU_EVENT_GROUP **pointer_list, 
+                                                UNSIGNED maximum_pointers);
+
+/* Define Signal processing functions.  */
+
+UNSIGNED        NU_Control_Signals(UNSIGNED signal_enable_mask);
+UNSIGNED        NU_Receive_Signals(VOID);
+STATUS          NU_Register_Signal_Handler(VOID (*signal_handler)(UNSIGNED));
+STATUS          NU_Send_Signals(NU_TASK *task, UNSIGNED signals);
+
+/* Define Partition memory management functions.  */
+                                                
+STATUS          NU_Create_Partition_Pool(NU_PARTITION_POOL *pool, CHAR *name, 
+                        VOID *start_address, UNSIGNED pool_size,
+                        UNSIGNED partition_size, OPTION suspend_type);
+STATUS          NU_Delete_Partition_Pool(NU_PARTITION_POOL *pool);
+STATUS          NU_Allocate_Partition(NU_PARTITION_POOL *pool, 
+                                VOID **return_pointer, UNSIGNED suspend);
+STATUS          NU_Deallocate_Partition(VOID *partition);
+UNSIGNED        NU_Established_Partition_Pools(VOID);
+STATUS          NU_Partition_Pool_Information(NU_PARTITION_POOL *pool, 
+                        CHAR *name, 
+                  VOID **start_address, UNSIGNED *pool_size,
+                  UNSIGNED *partition_size, UNSIGNED *available,
+                  UNSIGNED *allocated, OPTION *suspend_type, 
+                  UNSIGNED *tasks_waiting, NU_TASK **first_task);
+UNSIGNED        NU_Partition_Pool_Pointers(NU_PARTITION_POOL **pointer_list, 
+                                                UNSIGNED maximum_pointers);
+
+/* Define Dynamic memory management functions.  */
+
+STATUS          NU_Create_Memory_Pool(NU_MEMORY_POOL *pool, CHAR *name, 
+                        VOID *start_address, UNSIGNED pool_size,
+                        UNSIGNED min_allocation, OPTION suspend_type);
+STATUS          NU_Delete_Memory_Pool(NU_MEMORY_POOL *pool);
+STATUS          NU_Allocate_Memory(NU_MEMORY_POOL *pool, VOID **return_pointer,
+                                UNSIGNED size, UNSIGNED suspend);
+STATUS          NU_Deallocate_Memory(VOID *memory);
+UNSIGNED        NU_Established_Memory_Pools(VOID);
+STATUS          NU_Memory_Pool_Information(NU_MEMORY_POOL *pool, CHAR *name, 
+                  VOID **start_address, UNSIGNED *pool_size,
+                  UNSIGNED *min_allocation, UNSIGNED *available,
+                  OPTION *suspend_type, UNSIGNED *tasks_waiting, 
+                  NU_TASK **first_task);
+UNSIGNED        NU_Memory_Pool_Pointers(NU_MEMORY_POOL **pointer_list, 
+                                                UNSIGNED maximum_pointers);
+
+/* Define Interrupt management functions.  */
+
+INT             NU_Control_Interrupts(INT new_level);
+INT             NU_Local_Control_Interrupts(INT new_level);
+VOID            NU_Restore_Interrupts(VOID);
+VOID           *NU_Setup_Vector(INT vector, VOID *new_vector);
+STATUS          NU_Register_LISR(INT vector, 
+                                VOID (*new_lisr)(INT),
+                                        VOID (**old_lisr)(INT));
+STATUS          NU_Activate_HISR(NU_HISR *hisr);
+STATUS          NU_Create_HISR(NU_HISR *hisr, CHAR *name,
+                        VOID (*hisr_entry)(VOID), OPTION priority,
+                        VOID *stack_address, UNSIGNED stack_size);
+STATUS          NU_Delete_HISR(NU_HISR *hisr);
+NU_HISR        *NU_Current_HISR_Pointer(VOID);
+UNSIGNED        NU_Established_HISRs(VOID);
+STATUS          NU_HISR_Information(NU_HISR *hisr, CHAR *name,
+                        UNSIGNED *scheduled_count, DATA_ELEMENT *priority,
+                        VOID **stack_base, UNSIGNED *stack_size,
+                        UNSIGNED *minimum_stack);
+UNSIGNED        NU_HISR_Pointers(NU_HISR **pointer_list,
+                                                UNSIGNED maximum_pointers);
+VOID            NU_Protect(NU_PROTECT *protect_struct);
+VOID            NU_Unprotect(VOID);
+
+/* Timer management functions.  */
+
+STATUS          NU_Create_Timer(NU_TIMER *timer, CHAR *name, 
+                        VOID (*expiration_routine)(UNSIGNED), UNSIGNED id,
+                        UNSIGNED initial_time, UNSIGNED reschedule_time,
+                        OPTION enable);
+STATUS          NU_Delete_Timer(NU_TIMER *timer);
+STATUS          NU_Reset_Timer(NU_TIMER *timer, 
+                        VOID (*expiration_routine)(UNSIGNED), 
+                        UNSIGNED initial_time, UNSIGNED reschedule_timer,
+                        OPTION enable);
+STATUS          NU_Control_Timer(NU_TIMER *timer, OPTION enable);
+UNSIGNED        NU_Established_Timers(VOID);
+STATUS          NU_Timer_Information(NU_TIMER *timer, CHAR *name, 
+                  OPTION *enable, UNSIGNED *expirations, UNSIGNED *id,
+                  UNSIGNED *initial_time, UNSIGNED *reschedule_time);
+UNSIGNED        NU_Timer_Pointers(NU_TIMER **pointer_list, 
+                                                UNSIGNED maximum_pointers);
+VOID            NU_Set_Clock(UNSIGNED new_value);
+UNSIGNED        NU_Retrieve_Clock(VOID);
+
+/* Development support functions.  */
+
+CHAR           *NU_Release_Information(VOID);
+CHAR           *NU_License_Information(VOID);
+VOID            NU_Disable_History_Saving(VOID);
+VOID            NU_Enable_History_Saving(VOID);
+VOID            NU_Make_History_Entry(UNSIGNED param1, UNSIGNED param2,
+                                                UNSIGNED param3);
+STATUS          NU_Retrieve_History_Entry(DATA_ELEMENT *id, 
+                        UNSIGNED *param1, UNSIGNED *param2, UNSIGNED *param3,
+                        UNSIGNED *time, NU_TASK **task, NU_HISR **hisr);
+
+/* Input/Output Driver functions.  */
+
+STATUS          NU_Create_Driver(NU_DRIVER *driver, CHAR *name, 
+                    VOID (*driver_entry)(NU_DRIVER *, NU_DRIVER_REQUEST *));
+STATUS          NU_Delete_Driver(NU_DRIVER *driver);
+STATUS          NU_Request_Driver(NU_DRIVER *driver, 
+                                                NU_DRIVER_REQUEST *request);
+STATUS          NU_Resume_Driver(NU_TASK *task);
+STATUS          NU_Suspend_Driver(VOID (*terminate_routine)(VOID *),
+                                        VOID *information, UNSIGNED timeout);
+UNSIGNED        NU_Established_Drivers(VOID);
+UNSIGNED        NU_Driver_Pointers(NU_DRIVER **pointer_list, 
+                                                UNSIGNED maximum_pointers);
+
+#endif
+
+#ifdef          __cplusplus
+}                                           /* End of C declarations     */
+#endif
+
+#endif  /* !NUCLEUS */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/cs_defs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,87 @@
+/*************************************************************************/
+/*                                                                       */
+/*        Copyright (c) 1993-1996 Accelerated Technology, Inc.           */
+/*                                                                       */
+/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
+/* subject matter of this material.  All manufacturing, reproduction,    */
+/* use, and sales rights pertaining to this subject matter are governed  */
+/* by the license agreement.  The recipient of this software implicitly  */
+/* accepts the terms of the license.                                     */
+/*                                                                       */
+/*************************************************************************/
+
+/*************************************************************************/
+/*                                                                       */
+/* FILE NAME                                            VERSION          */
+/*                                                                       */
+/*      cs_defs.h                                       PLUS  1.2        */
+/*                                                                       */
+/* COMPONENT                                                             */
+/*                                                                       */
+/*      CS -    Common Services                                          */
+/*                                                                       */
+/* DESCRIPTION                                                           */
+/*                                                                       */
+/*      This file contains data structure definitions used in the common */
+/*      service linked list routines.                                    */
+/*                                                                       */
+/* AUTHOR                                                                */
+/*                                                                       */
+/*      William E. Lamie, Accelerated Technology, Inc.                   */
+/*                                                                       */
+/* DATA STRUCTURES                                                       */
+/*                                                                       */
+/*      CS_NODE                             Link node structure          */
+/*                                                                       */
+/* FUNCTIONS                                                             */
+/*                                                                       */
+/*      None                                                             */
+/*                                                                       */
+/* DEPENDENCIES                                                          */
+/*                                                                       */
+/*      nucleus.h                           Nucleus PLUS constants       */
+/*                                                                       */
+/* HISTORY                                                               */
+/*                                                                       */
+/*         NAME            DATE                    REMARKS               */
+/*                                                                       */
+/*      W. Lamie        03-01-1993      Created initial version 1.0      */
+/*      D. Lamie        04-19-1993      Verified version 1.0             */
+/*      W. Lamie        06-01-1993      Added padding conditional into   */
+/*                                        CS_NODE structure, making      */
+/*                                        version 1.0a                   */
+/*      D. Lamie        06-01-1993      Verified version 1.0a            */
+/*      W. Lamie        03-01-1994      Moved include files outside of   */
+/*                                        the file #ifndef to allow the  */
+/*                                        use of actual data structures, */
+/*                                        resulting in version 1.1       */
+/*      R. Pfaff -                                                       */
+/*      D. Lamie        03-18-1994      Verified version 1.1             */
+/*      M.Q. Qian       04-17-1996      updated to version 1.2           */
+/*                                                                       */
+/*************************************************************************/
+
+#include        "nucleus.h"                 /* Include Nucleus constants */
+
+
+/* Check to see if the file has been included already.  */
+#ifndef CS_DEFS
+#define CS_DEFS
+
+
+/* Define a common node data structure that can be included inside of
+   other system data structures.  */
+
+typedef struct  CS_NODE_STRUCT
+{
+    struct CS_NODE_STRUCT  *cs_previous;
+    struct CS_NODE_STRUCT  *cs_next;
+    DATA_ELEMENT            cs_priority;
+
+#if     PAD_1
+    DATA_ELEMENT            cs_padding[PAD_1];
+#endif
+
+}  CS_NODE;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/dm_defs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,141 @@
+/*************************************************************************/
+/*                                                                       */
+/*        Copyright (c) 1993-1996 Accelerated Technology, Inc.           */
+/*                                                                       */
+/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
+/* subject matter of this material.  All manufacturing, reproduction,    */
+/* use, and sales rights pertaining to this subject matter are governed  */
+/* by the license agreement.  The recipient of this software implicitly  */
+/* accepts the terms of the license.                                     */
+/*                                                                       */
+/*************************************************************************/
+
+/*************************************************************************/
+/*                                                                       */
+/* FILE NAME                                            VERSION          */
+/*                                                                       */
+/*      dm_defs.h                                       PLUS  1.2a       */
+/*                                                                       */
+/* COMPONENT                                                             */
+/*                                                                       */
+/*      DM - Dynamic Memory Management                                   */
+/*                                                                       */
+/* DESCRIPTION                                                           */
+/*                                                                       */
+/*      This file contains data structure definitions and constants for  */
+/*      the Dynamic Memory component.                                    */
+/*                                                                       */
+/* AUTHOR                                                                */
+/*                                                                       */
+/*      William E. Lamie, Accelerated Technology, Inc.                   */
+/*                                                                       */
+/* DATA STRUCTURES                                                       */
+/*                                                                       */
+/*      DM_PCB                              Dynamic Pool control block   */
+/*      DM_HEADER                           Header of each memory block  */
+/*      DM_SUSPEND                          Memory suspension block      */
+/*                                                                       */
+/* FUNCTIONS                                                             */
+/*                                                                       */
+/*      None                                                             */
+/*                                                                       */
+/* DEPENDENCIES                                                          */
+/*                                                                       */
+/*      cs_defs.h                           Common service definitions   */
+/*      tc_defs.h                           Thread Control definitions   */
+/*                                                                       */
+/* HISTORY                                                               */
+/*                                                                       */
+/*         NAME            DATE                    REMARKS               */
+/*                                                                       */
+/*      W. Lamie        03-01-1993      Created initial version 1.0      */
+/*      D. Lamie        04-19-1993      Verified version 1.0             */
+/*      W. Lamie        03-01-1994      Moved include files outside of   */
+/*                                        the file #ifndef to allow the  */
+/*                                        use of actual data structures, */
+/*                                        added padding logic,           */
+/*                                        resulting in version 1.1       */
+/*      R. Pfaff -                                                       */
+/*      D. Lamie        03-18-1994      Verified version 1.1             */
+/*      M.Q. Qian       04-17-1996      updated to version 1.2           */
+/*      M. Trippi       01-07-1996      Added missing PAD_1 field to     */
+/*                                        DM_HEADER_STRUCT to be         */
+/*                                        consistent with other PLUS     */
+/*                                        structures creating 1.2a.      */
+/*                                                                       */
+/*************************************************************************/
+
+#include        "cs_defs.h"                 /* Common service constants  */
+#include        "tc_defs.h"                 /* Thread control constants  */
+
+
+/* Check to see if the file has been included already.  */
+
+#ifndef DM_DEFS
+#define DM_DEFS
+
+
+/* Define constants local to this component.  */
+
+#define         DM_DYNAMIC_ID          0x44594e41UL
+#define         DM_OVERHEAD            ((sizeof(DM_HEADER) + sizeof(UNSIGNED) \
+                                        - 1)/sizeof(UNSIGNED)) *    \
+                                        sizeof(UNSIGNED)
+
+
+/* Define the Dynamic Pool Control Block data type.  */
+
+typedef struct DM_PCB_STRUCT 
+{
+    CS_NODE             dm_created;            /* Node for linking to    */
+                                               /* created dynamic pools  */
+    TC_PROTECT          dm_protect;            /* Protection structure   */
+    UNSIGNED            dm_id;                 /* Internal PCB ID        */
+    CHAR                dm_name[NU_MAX_NAME];  /* Dynamic Pool name      */
+    VOID               *dm_start_address;      /* Starting pool address  */
+    UNSIGNED            dm_pool_size;          /* Size of pool           */
+    UNSIGNED            dm_min_allocation;     /* Minimum allocate size  */
+    UNSIGNED            dm_available;          /* Total available bytes  */
+    struct DM_HEADER_STRUCT    
+                       *dm_memory_list;        /* Memory list            */
+    struct DM_HEADER_STRUCT
+                       *dm_search_ptr;         /* Search pointer         */
+    DATA_ELEMENT        dm_fifo_suspend;       /* Suspension type flag   */
+#if     PAD_1
+    DATA_ELEMENT        dm_padding[PAD_1];
+#endif 
+    UNSIGNED            dm_tasks_waiting;      /* Number of waiting tasks*/
+    struct DM_SUSPEND_STRUCT
+                       *dm_suspension_list;    /* Suspension list        */
+} DM_PCB;    
+
+
+/* Define the header structure that is in front of each memory block.  */
+
+typedef struct DM_HEADER_STRUCT
+{
+    struct DM_HEADER_STRUCT
+                       *dm_next_memory,        /* Next memory block      */
+                       *dm_previous_memory;    /* Previous memory block  */
+    DATA_ELEMENT        dm_memory_free;        /* Memory block free flag */
+#if     PAD_1
+    DATA_ELEMENT        dm_padding[PAD_1];
+#endif 
+    DM_PCB             *dm_memory_pool;        /* Dynamic pool pointer   */
+} DM_HEADER;
+
+
+/* Define the dynamic memory suspension structure.  This structure is 
+   allocated off of the caller's stack.  */
+   
+typedef struct DM_SUSPEND_STRUCT
+{
+    CS_NODE             dm_suspend_link;       /* Link to suspend blocks */
+    DM_PCB             *dm_memory_pool;        /* Pointer to pool        */
+    UNSIGNED            dm_request_size;       /* Size of memory request */
+    TC_TCB             *dm_suspended_task;     /* Task suspended         */
+    VOID               *dm_return_pointer;     /* Return memory address  */
+    STATUS              dm_return_status;      /* Return status          */
+} DM_SUSPEND;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/ev_defs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,113 @@
+/*************************************************************************/
+/*                                                                       */
+/*        Copyright (c) 1993-1996 Accelerated Technology, Inc.           */
+/*                                                                       */
+/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
+/* subject matter of this material.  All manufacturing, reproduction,    */
+/* use, and sales rights pertaining to this subject matter are governed  */
+/* by the license agreement.  The recipient of this software implicitly  */
+/* accepts the terms of the license.                                     */
+/*                                                                       */
+/*************************************************************************/
+
+/*************************************************************************/
+/*                                                                       */
+/* FILE NAME                                            VERSION          */
+/*                                                                       */
+/*      ev_defs.h                                       PLUS  1.2        */
+/*                                                                       */
+/* COMPONENT                                                             */
+/*                                                                       */
+/*      EV - Event Group Management                                      */
+/*                                                                       */
+/* DESCRIPTION                                                           */
+/*                                                                       */
+/*      This file contains data structure definitions and constants for  */
+/*      the Event Flag Group component.                                  */
+/*                                                                       */
+/* AUTHOR                                                                */
+/*                                                                       */
+/*      William E. Lamie, Accelerated Technology, Inc.                   */
+/*                                                                       */
+/* DATA STRUCTURES                                                       */
+/*                                                                       */
+/*      EV_GCB                              Event Group control block    */
+/*      EV_SUSPEND                          Event Group suspension block */
+/*                                                                       */
+/* FUNCTIONS                                                             */
+/*                                                                       */
+/*      None                                                             */
+/*                                                                       */
+/* DEPENDENCIES                                                          */
+/*                                                                       */
+/*      cs_defs.h                           Common service definitions   */
+/*      tc_defs.h                           Thread Control definitions   */
+/*                                                                       */
+/* HISTORY                                                               */
+/*                                                                       */
+/*         NAME            DATE                    REMARKS               */
+/*                                                                       */
+/*      W. Lamie        03-01-1993      Created initial version 1.0      */
+/*      D. Lamie        04-19-1993      Verified version 1.0             */
+/*      W. Lamie        03-01-1994      Moved include files outside of   */
+/*                                        the file #ifndef to allow the  */
+/*                                        use of actual data structures, */
+/*                                        removed protect structure,     */
+/*                                        added padding logic,           */
+/*                                        resulting in version 1.1       */
+/*      R. Pfaff -                                                       */
+/*      D. Lamie        03-18-1994      Verified version 1.1             */
+/*      M.Q. Qian       04-17-1996      updated to version 1.2           */
+/*                                                                       */
+/*************************************************************************/
+
+#include        "cs_defs.h"                 /* Common service constants  */
+#include        "tc_defs.h"                 /* Thread control constants  */
+
+
+/* Check to see if the file has been included already.  */
+
+#ifndef EV_DEFS
+#define EV_DEFS
+
+
+/* Define constants local to this component.  */
+
+#define         EV_EVENT_ID         0x45564e54UL
+#define         EV_AND              0x2        
+#define         EV_CONSUME          0x1
+
+
+/* Define the Event Group Control Block data type.  */
+
+typedef struct EV_GCB_STRUCT 
+{
+    CS_NODE             ev_created;            /* Node for linking to    */
+                                               /*   created Events list  */
+    UNSIGNED            ev_id;                 /* Internal EV ID         */
+    CHAR                ev_name[NU_MAX_NAME];  /* Event group name       */
+    UNSIGNED            ev_current_events;     /* Current event flags    */
+    UNSIGNED            ev_tasks_waiting;      /* Number of waiting tasks*/
+    struct EV_SUSPEND_STRUCT
+                       *ev_suspension_list;    /* Suspension list        */
+} EV_GCB;    
+
+
+/* Define the Event Group suspension structure.  This structure is allocated 
+   off of the caller's stack.  */
+   
+typedef struct EV_SUSPEND_STRUCT
+{
+    CS_NODE             ev_suspend_link;       /* Link to suspend blocks */
+    EV_GCB             *ev_event_group;        /* Pointer to Event group */
+    UNSIGNED            ev_requested_events;   /* Requested event flags  */
+    DATA_ELEMENT        ev_operation;          /* Event operation        */
+#if     PAD_1
+    DATA_ELEMENT        ev_padding[PAD_1];
+#endif 
+    TC_TCB             *ev_suspended_task;     /* Task suspended         */
+    STATUS              ev_return_status;      /* Return status          */
+    UNSIGNED            ev_actual_events;      /* Event flags returned   */
+} EV_SUSPEND;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/mb_defs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,114 @@
+/*************************************************************************/
+/*                                                                       */
+/*        Copyright (c) 1993-1996 Accelerated Technology, Inc.           */
+/*                                                                       */
+/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
+/* subject matter of this material.  All manufacturing, reproduction,    */
+/* use, and sales rights pertaining to this subject matter are governed  */
+/* by the license agreement.  The recipient of this software implicitly  */
+/* accepts the terms of the license.                                     */
+/*                                                                       */
+/*************************************************************************/
+
+/*************************************************************************/
+/*                                                                       */
+/* FILE NAME                                            VERSION          */
+/*                                                                       */
+/*      mb_defs.h                                       PLUS  1.2        */
+/*                                                                       */
+/* COMPONENT                                                             */
+/*                                                                       */
+/*      MB - Mailbox Management                                          */
+/*                                                                       */
+/* DESCRIPTION                                                           */
+/*                                                                       */
+/*      This file contains data structure definitions and constants for  */
+/*      the message Mailbox component.                                   */
+/*                                                                       */
+/* AUTHOR                                                                */
+/*                                                                       */
+/*      William E. Lamie, Accelerated Technology, Inc.                   */
+/*                                                                       */
+/* DATA STRUCTURES                                                       */
+/*                                                                       */
+/*      MB_MCB                              Mailbox control block        */
+/*      MB_SUSPEND                          Mailbox suspension block     */
+/*                                                                       */
+/* FUNCTIONS                                                             */
+/*                                                                       */
+/*      None                                                             */
+/*                                                                       */
+/* DEPENDENCIES                                                          */
+/*                                                                       */
+/*      cs_defs.h                           Common service definitions   */
+/*      tc_defs.h                           Thread Control definitions   */
+/*                                                                       */
+/* HISTORY                                                               */
+/*                                                                       */
+/*         NAME            DATE                    REMARKS               */
+/*                                                                       */
+/*      W. Lamie        03-01-1993      Created initial version 1.0      */
+/*      D. Lamie        04-19-1993      Verified version 1.0             */
+/*      W. Lamie        03-01-1994      Moved include files outside of   */
+/*                                        the file #ifndef to allow the  */
+/*                                        use of actual data structures, */
+/*                                        removed protection structure   */
+/*                                        inside of each mailbox, added  */
+/*                                        padding logic, resulting in    */
+/*                                        version 1.1                    */
+/*      R. Pfaff -                                                       */
+/*      D. Lamie        03-18-1994      Verified version 1.1             */
+/*      M.Q. Qian       04-17-1996      updated to version 1.2           */
+/*                                                                       */
+/*************************************************************************/
+
+#include        "cs_defs.h"                 /* Common service constants  */
+#include        "tc_defs.h"                 /* Thread control constants  */
+
+
+/* Check to see if the file has been included already.  */
+
+#ifndef MB_DEFS
+#define MB_DEFS
+
+
+/* Define constants local to this component.  */
+
+#define         MB_MAILBOX_ID           0x4d424f58UL
+#define         MB_MESSAGE_SIZE         4
+
+
+/* Define the Mailbox Control Block data type.  */
+
+typedef struct MB_MCB_STRUCT 
+{
+    CS_NODE             mb_created;            /* Node for linking to    */
+                                               /*   created mailbox list */
+    UNSIGNED            mb_id;                 /* Internal MCB ID        */
+    CHAR                mb_name[NU_MAX_NAME];  /* Mailbox name           */
+    DATA_ELEMENT        mb_message_present;    /* Message present flag   */
+    DATA_ELEMENT        mb_fifo_suspend;       /* Suspension type flag   */
+#if     PAD_2
+    DATA_ELEMENT        mb_padding[PAD_2];
+#endif
+    UNSIGNED            mb_tasks_waiting;      /* Number of waiting tasks*/
+    UNSIGNED                                   /* Message area           */
+                        mb_message_area[MB_MESSAGE_SIZE];
+    struct MB_SUSPEND_STRUCT
+                       *mb_suspension_list;    /* Suspension list        */
+} MB_MCB;    
+
+
+/* Define the mailbox suspension structure.  This structure is allocated off of
+   the caller's stack.  */
+   
+typedef struct MB_SUSPEND_STRUCT
+{
+    CS_NODE             mb_suspend_link;       /* Link to suspend blocks */
+    MB_MCB             *mb_mailbox;            /* Pointer to the mailbox */
+    TC_TCB             *mb_suspended_task;     /* Task suspended         */
+    UNSIGNED           *mb_message_area;       /* Pointer to message area*/
+    STATUS              mb_return_status;      /* Return status          */
+} MB_SUSPEND;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/os_const.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,92 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       os_const.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Constants for the Nucleus OS-Layer
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef OS_CONST_H
+#define OS_CONST_H
+
+/*==== INCLUDES =============================================================*/
+
+
+/*==== CONSTS ===============================================================*/
+
+#define PTR_OVERHEAD       8
+
+#ifdef MEMORY_SUPERVISION
+ #define PPM_CHKOVERHEAD  4
+ #define PPM_OVERHEAD     (4+PPM_CHKOVERHEAD)
+ #define PPM_IDX_OFFSET   0
+#else
+ #define PPM_CHKOVERHEAD  0
+ #define PPM_OVERHEAD     0
+#endif
+
+#ifdef NU_DEBUG
+ #define PT_CHKOVERHEAD   4
+#else
+ #define PT_CHKOVERHEAD   0
+#endif
+
+#define PT_OVERHEAD      (PTR_OVERHEAD+PPM_OVERHEAD)
+#define POOL_OVERHEAD    0
+
+#define PPM_OFFSET       ((PPM_OVERHEAD-PPM_CHKOVERHEAD)/sizeof(ULONG))
+
+#define SUSPEND_ONE_TICK           1
+#define TDMA_FRAME_DURATION    4.615
+#define WIN32_TIMER_TICK          50
+
+#define NO_WAIT_CHECK    0
+#define WAIT_CHECK       1
+
+#define OS_SUSPEND       0xffffffffUL  /*NU_SUSPEND*/
+#define OS_NO_SUSPEND    0             /*NU_NO_SUSPEND*/
+
+#define OS_FOREVER       0xffffffffUL  /*NU_SUSPEND*/
+
+#define TIME_TO_TICK_TDMA_FRAME_MULTIPLIER   14199
+#define TICK_TO_TIME_TDMA_FRAME_MULTIPLIER   302483
+#define TIME_TO_TICK_10MS_MULTIPLIER         6554
+#define TICK_TO_TIME_10MS_MULTIPLIER         655319
+
+#ifdef _TARGET_
+ #define TIME_TO_SYSTEM_TICKS(time)  (((((time)&0xffff)*os_time_to_tick_multiplier+0x8000)>>16)\
+                                      +(((time)>>16)*os_time_to_tick_multiplier))
+ #define SYSTEM_TICKS_TO_TIME(ticks) (((((ticks)&0xfff)*os_tick_to_time_multiplier+0x8000)>>16)\
+                                      +((((ticks)>>12)*os_tick_to_time_multiplier)>>4))
+#else
+ #define TIME_TO_SYSTEM_TICKS(Time)   ((Time)/WIN32_TIMER_TICK)
+ #define SYSTEM_TICKS_TO_TIME(Ticks)  ((Ticks)*WIN32_TIMER_TICK)
+#endif
+
+#define OS_QUEUE_ENTRY_SIZE(E)      (((E)*(sizeof(OS_QDATA)+sizeof(void*)) + (OS_MAX_PRIORITY * (((E)+1)*sizeof(void*)))))
+
+#define POOL_SIZE(n,s)              ((n*(s+PT_CHKOVERHEAD+PT_OVERHEAD)))
+
+/* to avoid changes in all xxxconst.h files even if they do not use events */
+#ifndef MAX_EVENT_GROUPS
+  #define MAX_EVENT_GROUPS  1
+#endif
+
+/*==== TYPES =================================================================*/
+
+
+/*==== EXPORTS ===============================================================*/
+
+
+#endif /* OS_CONST_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/os_glob.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,74 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       os_glob.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Global tabless for the Nucleus OS adaptation layer
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef OS_GLOB_H
+#define OS_GLOB_H
+
+/*==== INCLUDES =============================================================*/
+
+#include "os_types.h"
+
+/*==== CONSTANTS ============================================================*/
+
+/*==== TYPES ================================================================*/
+
+/*==== VARIABLES ============================================================*/
+ 
+#ifndef CONFIG_MODULE
+
+extern USHORT MaxTasks;
+extern USHORT MaxCommunications;
+extern USHORT MaxSimultaneousTimer;
+extern USHORT MaxTimer;
+extern USHORT MaxSemaphores;
+extern USHORT MaxOSISRs;
+extern USHORT MaxEventGroups;
+extern USHORT MaxPoolGroups;
+extern USHORT MaxMemoryPools;
+#else
+
+#ifndef DATA_INT_RAM
+USHORT MaxOSISRs = MAX_OSISRS;
+USHORT MaxTasks = MAX_OS_TASKS;
+USHORT MaxCommunications = MAX_COMMUNICATIONS;
+USHORT MaxSimultaneousTimer = MAX_SIMULTANEOUS_TIMER;
+USHORT MaxSemaphores = MAX_SEMAPHORES;
+USHORT MaxEventGroups = MAX_EVENT_GROUPS;
+USHORT MaxPoolGroups = MAX_POOL_GROUPS;
+USHORT MaxMemoryPools = MAX_MEMORY_POOLS;
+
+GLOBAL T_OS_TASK_TABLE_ENTRY TaskTable    [ MAX_OS_TASKS + 1 ];
+GLOBAL T_OS_COM_TABLE_ENTRY ComTable      [ MAX_COMMUNICATIONS + 1 ];
+GLOBAL T_OS_TIMER_ENTRY TimerTable        [ MAX_SIMULTANEOUS_TIMER + 1 ];
+GLOBAL T_OS_SEM_TABLE_ENTRY SemTable      [ MAX_SEMAPHORES + 1 ];
+GLOBAL T_OS_OSISR_TABLE_ENTRY OSISRTable  [ MAX_OSISRS + 1 ];
+GLOBAL T_OS_PART_GRP_TABLE_ENTRY PartGrpTable  [ MAX_POOL_GROUPS + 1 ];
+GLOBAL T_OS_MEM_POOL_TABLE_ENTRY MemPoolTable  [ MAX_MEMORY_POOLS + 1 ];
+GLOBAL T_OS_EVTGRP_TABLE_ENTRY EvtGrpTable[ MAX_EVENT_GROUPS + 1 ];
+GLOBAL T_OS_TIMER_TABLE_ENTRY *p_list     [ MAX_SIMULTANEOUS_TIMER + 1 ];
+GLOBAL T_OS_POOL_BORDER PoolBorder        [ MAX_POOL_GROUPS+1];
+
+GLOBAL const char *os_dar_filename = "/var/dbg/dar";
+GLOBAL ULONG os_dar_write_buffer_size = 3000;
+#endif /* DATA_INT_RAM */
+
+
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/os_types.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,191 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       os_types.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for the Nucleus OS adaptation layer
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef OS_TYPES_H
+#define OS_TYPES_H
+
+/*==== INCLUDES =============================================================*/
+
+#include "nucleus.h"
+#include "os.h"
+#include "glob_defs.h"
+
+/*==== CONSTANTS ============================================================*/
+
+/*==== TYPES ================================================================*/
+ 
+typedef enum 
+{ 
+  SYSTEM_TICK_TDMA_FRAME = 1,
+  SYSTEM_TICK_10_MS
+} T_OS_SYSTEM_TICK;
+
+/*
+ * Type Definition for Task Management 
+ */
+
+typedef struct
+{
+  NU_TASK       TCB;
+  ULONG         magic_nr;
+  OS_HANDLE     handle;
+} OS_NU_TASK;
+
+typedef struct
+{
+  char          Name[RESOURCE_NAMELEN];  	       /* name of the protocol stack entity */  
+#ifdef _ESF_SUPPORT_
+  ULONG         Value;                           /* additional parameter */
+#endif
+  OS_NU_TASK    TaskCB;                 			   /* control block of the thread */
+  void         	(*TaskEntry)(OS_HANDLE, ULONG);  /* NUCLEUS task entry function */
+  ULONG         *Stack;                          /* start address of stack memory */
+} T_OS_TASK_TABLE_ENTRY;
+
+/*
+ * Type Definition for Queue Management 
+ */
+
+typedef struct _T_QDATA_ELEMENT
+{
+  OS_QDATA Data;
+  struct _T_QDATA_ELEMENT  *pNext;
+} T_QDATA_ELEMENT;
+
+typedef struct
+{
+  OS_QDATA **pWrite;
+  OS_QDATA **pRead;
+  OS_QDATA **pStart;
+} T_QUEUE;
+
+typedef struct
+{
+  ULONG  opc;
+  ULONG  time;
+  void   *ptr;
+  USHORT type;
+} T_QUEUE_MSG;
+
+typedef struct
+{
+  char            Name [ RESOURCE_NAMELEN ]; 		/* name of the queue */  
+  T_QUEUE         Queue [ OS_MAX_PRIORITY ];    /* read/write pointers to ringlist */
+  T_QDATA_ELEMENT *pQueueMemory;                /* pointer to queue memory, used for destroy */
+  T_QDATA_ELEMENT *pFreeElement;                /* pointer to next free element */
+  USHORT          Entries;                      /* queue entries */
+  USHORT          MaxUsed;
+  NU_SEMAPHORE    FreeSemCB;
+  NU_SEMAPHORE    UsedSemCB;
+  T_QUEUE_MSG     current_msg;
+  T_VOID_STRUCT   *QueueData;
+} T_OS_COM_TABLE_ENTRY;
+
+/*
+ * Type Definition for Timer Management 
+ */
+
+#define TMR_FREE   0
+#define TMR_USED   1
+#define TMR_ACTIVE 2
+
+typedef struct _T_OS_TIMER_TABLE_ENTRY
+{
+  OS_HANDLE       t_handle;				          /* timer handle */  
+  OS_HANDLE       task_handle;				      /* task that started the timer */  
+  OS_HANDLE       entity_handle;				    /* entity that started the timer */  
+  void         		(*TimeoutProc)(OS_HANDLE,OS_HANDLE,USHORT);			    /* timeout function */
+  ULONG           r_ticks;                  /* remaining ticks */
+  ULONG			      p_ticks;			            /* periodic expiration ticks */
+  USHORT		      status;					          /* timer status */
+  USHORT		      t_index;				          /* index of the timer */
+  struct _T_OS_TIMER_TABLE_ENTRY *next;
+  struct _T_OS_TIMER_TABLE_ENTRY *prev;
+} T_OS_TIMER_TABLE_ENTRY;
+
+typedef struct
+{
+  OS_HANDLE                next_t_handle;   /* handle of the next free table entry */  
+  T_OS_TIMER_TABLE_ENTRY   entry;           /* pointer to timer table entry */
+} T_OS_TIMER_ENTRY;
+
+/*
+ * Type Definition for Semaphore Management 
+ */
+
+typedef struct
+{
+  char          Name[ RESOURCE_NAMELEN ];    /* name of the semaphore */   
+  NU_SEMAPHORE  SemCB;                 			 /* control block of the semaphore */
+} T_OS_SEM_TABLE_ENTRY;
+
+/*
+ * Type Definition for HISR Management 
+ */
+
+typedef struct
+{
+  char          name[RESOURCE_NAMELEN];  	   /* name of the protocol stack entity */  
+  NU_HISR       hisr_cb;                  	 /* control block of the HISR */
+  ULONG         *stack;                      /* start address of stack memory */
+} T_OS_OSISR_TABLE_ENTRY;
+
+/*
+ * Type Definition for Partition Pool Management 
+ */
+typedef struct _T_OS_PART_POOL
+{
+  struct _T_OS_PART_POOL * next;  
+  unsigned int size;
+  T_VOID_STRUCT * pool_mem;
+  NU_PARTITION_POOL pcb;
+} T_OS_PART_POOL;
+
+typedef struct
+{
+  T_OS_PART_POOL * grp_head;  
+  char name[RESOURCE_NAMELEN];  	     
+} T_OS_PART_GRP_TABLE_ENTRY;
+
+#ifdef NU_DEBUG
+typedef struct
+{
+  char *Start;
+  char *End;
+} T_OS_POOL_BORDER;
+#endif
+
+/*
+ * Type Definition for Dynamic Memory Pool Management 
+ */
+typedef struct 
+{
+  char name[RESOURCE_NAMELEN];  	     
+  NU_MEMORY_POOL * pcb;
+} T_OS_MEM_POOL_TABLE_ENTRY;
+
+
+typedef struct
+{
+  char            Name[ RESOURCE_NAMELEN ]; /* name of the event group */
+  NU_EVENT_GROUP  EvtGrp;                   /* control block of the event group */
+} T_OS_EVTGRP_TABLE_ENTRY;
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/pi_defs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,122 @@
+/*************************************************************************/
+/*                                                                       */
+/*        Copyright (c) 1993-1996 Accelerated Technology, Inc.           */
+/*                                                                       */
+/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
+/* subject matter of this material.  All manufacturing, reproduction,    */
+/* use, and sales rights pertaining to this subject matter are governed  */
+/* by the license agreement.  The recipient of this software implicitly  */
+/* accepts the terms of the license.                                     */
+/*                                                                       */
+/*************************************************************************/
+
+/*************************************************************************/
+/*                                                                       */
+/* FILE NAME                                            VERSION          */
+/*                                                                       */
+/*      pi_defs.h                                       PLUS  1.2        */
+/*                                                                       */
+/* COMPONENT                                                             */
+/*                                                                       */
+/*      PI - Pipe Management                                             */
+/*                                                                       */
+/* DESCRIPTION                                                           */
+/*                                                                       */
+/*      This file contains data structure definitions and constants for  */
+/*      the message Pipe component.                                      */
+/*                                                                       */
+/* AUTHOR                                                                */
+/*                                                                       */
+/*      William E. Lamie, Accelerated Technology, Inc.                   */
+/*                                                                       */
+/* DATA STRUCTURES                                                       */
+/*                                                                       */
+/*      PI_PCB                              Pipe control block           */
+/*      PI_SUSPEND                          Pipe suspension block        */
+/*                                                                       */
+/* FUNCTIONS                                                             */
+/*                                                                       */
+/*      None                                                             */
+/*                                                                       */
+/* DEPENDENCIES                                                          */
+/*                                                                       */
+/*      cs_defs.h                           Common service definitions   */
+/*      tc_defs.h                           Thread Control definitions   */
+/*                                                                       */
+/* HISTORY                                                               */
+/*                                                                       */
+/*         NAME            DATE                    REMARKS               */
+/*                                                                       */
+/*      W. Lamie        03-01-1993      Created initial version 1.0      */
+/*      D. Lamie        04-19-1993      Verified version 1.0             */
+/*      W. Lamie        03-01-1994      Moved include files outside of   */
+/*                                        the file #ifndef to allow the  */
+/*                                        use of actual data structures, */
+/*                                        removed protection structure,  */
+/*                                        put padding into structure,    */
+/*                                        resulting in version 1.1       */
+/*      R. Pfaff -                                                       */
+/*      D. Lamie        03-18-1994      Verified version 1.1             */
+/*      M.Q. Qian       04-17-1996      updated to version 1.2           */
+/*                                                                       */
+/*************************************************************************/
+
+#include        "cs_defs.h"                 /* Common service constants  */
+#include        "tc_defs.h"                 /* Thread control constants  */
+
+
+/* Check to see if the file has been included already.  */
+
+#ifndef PI_DEFS
+#define PI_DEFS
+
+
+/* Define constants local to this component.  */
+
+#define         PI_PIPE_ID              0x50495045UL
+
+
+/* Define the Pipe Control Block data type.  */
+
+typedef struct PI_PCB_STRUCT 
+{
+    CS_NODE             pi_created;            /* Node for linking to    */
+                                               /*   created pipe list    */
+    UNSIGNED            pi_id;                 /* Internal PCB ID        */
+    CHAR                pi_name[NU_MAX_NAME];  /* Pipe name              */
+    DATA_ELEMENT        pi_fixed_size;         /* Fixed-size messages?   */
+    DATA_ELEMENT        pi_fifo_suspend;       /* Suspension type flag   */
+#if     PAD_2
+    DATA_ELEMENT        pi_padding[PAD_2];
+#endif
+    UNSIGNED            pi_pipe_size;          /* Total size of pipe     */
+    UNSIGNED            pi_messages;           /* Messages in pipe       */
+    UNSIGNED            pi_message_size;       /* Size of each message   */
+    UNSIGNED            pi_available;          /* Available bytes        */
+    BYTE_PTR            pi_start;              /* Start of pipe area     */
+    BYTE_PTR            pi_end;                /* End of pipe area + 1   */
+    BYTE_PTR            pi_read;               /* Read pointer           */
+    BYTE_PTR            pi_write;              /* Write pointer          */
+    UNSIGNED            pi_tasks_waiting;      /* Number of waiting tasks*/
+    struct PI_SUSPEND_STRUCT
+                       *pi_urgent_list;        /* Urgent message suspend */
+    struct PI_SUSPEND_STRUCT
+                       *pi_suspension_list;    /* Suspension list        */
+} PI_PCB;    
+
+
+/* Define the Pipe suspension structure.  This structure is allocated off of
+   the caller's stack.  */
+   
+typedef struct PI_SUSPEND_STRUCT
+{
+    CS_NODE             pi_suspend_link;       /* Link to suspend blocks */
+    PI_PCB             *pi_pipe;               /* Pointer to the pipe    */
+    TC_TCB             *pi_suspended_task;     /* Task suspended         */
+    BYTE_PTR            pi_message_area;       /* Pointer to message area*/
+    UNSIGNED            pi_message_size;       /* Message size requested */
+    UNSIGNED            pi_actual_size;        /* Actual size of message */
+    STATUS              pi_return_status;      /* Return status          */
+} PI_SUSPEND;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/pm_defs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,131 @@
+/*************************************************************************/
+/*                                                                       */
+/*        Copyright (c) 1993-1996 Accelerated Technology, Inc.           */
+/*                                                                       */
+/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
+/* subject matter of this material.  All manufacturing, reproduction,    */
+/* use, and sales rights pertaining to this subject matter are governed  */
+/* by the license agreement.  The recipient of this software implicitly  */
+/* accepts the terms of the license.                                     */
+/*                                                                       */
+/*************************************************************************/
+
+/*************************************************************************/
+/*                                                                       */
+/* FILE NAME                                            VERSION          */
+/*                                                                       */
+/*      pm_defs.h                                       PLUS  1.2        */
+/*                                                                       */
+/* COMPONENT                                                             */
+/*                                                                       */
+/*      PM - Partition Memory Management                                 */
+/*                                                                       */
+/* DESCRIPTION                                                           */
+/*                                                                       */
+/*      This file contains data structure definitions and constants for  */
+/*      the Partition Memory component.                                  */
+/*                                                                       */
+/* AUTHOR                                                                */
+/*                                                                       */
+/*      William E. Lamie, Accelerated Technology, Inc.                   */
+/*                                                                       */
+/* DATA STRUCTURES                                                       */
+/*                                                                       */
+/*      PM_PCB                              Partition Pool control block */
+/*      PM_HEADER                           Header of each partition     */
+/*      PM_SUSPEND                          Partition suspension block   */
+/*                                                                       */
+/* FUNCTIONS                                                             */
+/*                                                                       */
+/*      None                                                             */
+/*                                                                       */
+/* DEPENDENCIES                                                          */
+/*                                                                       */
+/*      cs_defs.h                           Common service definitions   */
+/*      tc_defs.h                           Thread Control definitions   */
+/*                                                                       */
+/* HISTORY                                                               */
+/*                                                                       */
+/*         NAME            DATE                    REMARKS               */
+/*                                                                       */
+/*      W. Lamie        03-01-1993      Created initial version 1.0      */
+/*      D. Lamie        04-19-1993      Verified version 1.0             */
+/*      W. Lamie        03-01-1994      Moved include files outside of   */
+/*                                        the file #ifndef to allow the  */
+/*                                        use of actual data structures, */
+/*                                        removed protect structure,     */
+/*                                        added padding logic,           */
+/*                                        resulting in version 1.1       */
+/*      R. Pfaff -                                                       */
+/*      D. Lamie        03-18-1994      Verified version 1.1             */
+/*      M.Q. Qian       04-17-1996      updated to version 1.2           */
+/*                                                                       */
+/*************************************************************************/
+
+#include        "cs_defs.h"                 /* Common service constants  */
+#include        "tc_defs.h"                 /* Thread control constants  */
+
+
+/* Check to see if the file has been included already.  */
+
+#ifndef PM_DEFS
+#define PM_DEFS
+
+
+/* Define constants local to this component.  */
+
+#define         PM_PARTITION_ID         0x50415254UL
+#define         PM_OVERHEAD            ((sizeof(PM_HEADER) + sizeof(UNSIGNED) \
+                                        - 1)/sizeof(UNSIGNED)) *    \
+                                        sizeof(UNSIGNED)
+
+
+/* Define the Partition Pool Control Block data type.  */
+
+typedef struct PM_PCB_STRUCT 
+{
+    CS_NODE             pm_created;            /* Node for linking to    */
+                                               /* created partition list */
+    UNSIGNED            pm_id;                 /* Internal PCB ID        */
+    CHAR                pm_name[NU_MAX_NAME];  /* Partition Pool name    */
+    VOID               *pm_start_address;      /* Starting pool address  */
+    UNSIGNED            pm_pool_size;          /* Size of pool           */
+    UNSIGNED            pm_partition_size;     /* Size of each partition */
+    UNSIGNED            pm_available;          /* Available partitions   */
+    UNSIGNED            pm_allocated;          /* Allocated partitions   */
+    struct PM_HEADER_STRUCT    
+                       *pm_available_list;     /* Available list         */
+    DATA_ELEMENT        pm_fifo_suspend;       /* Suspension type flag   */
+#if     PAD_1
+    DATA_ELEMENT        pm_padding[PAD_1];
+#endif 
+    UNSIGNED            pm_tasks_waiting;      /* Number of waiting tasks*/
+    struct PM_SUSPEND_STRUCT
+                       *pm_suspension_list;    /* Suspension list        */
+} PM_PCB;    
+
+
+/* Define the header structure that is in front of each memory partition.  */
+
+typedef struct PM_HEADER_STRUCT
+{
+    struct PM_HEADER_STRUCT
+                       *pm_next_available;     /* Next available memory  */
+                                               /*   partition            */
+    PM_PCB             *pm_partition_pool;     /* Partition pool pointer */
+} PM_HEADER;
+
+
+/* Define the partition suspension structure.  This structure is allocated 
+   off of the caller's stack.  */
+   
+typedef struct PM_SUSPEND_STRUCT
+{
+    CS_NODE             pm_suspend_link;       /* Link to suspend blocks */
+    PM_PCB             *pm_partition_pool;     /* Pointer to pool        */
+    TC_TCB             *pm_suspended_task;     /* Task suspended         */
+    VOID               *pm_return_pointer;     /* Return memory address  */
+    STATUS              pm_return_status;      /* Return status          */
+} PM_SUSPEND;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/qu_defs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,122 @@
+/*************************************************************************/
+/*                                                                       */
+/*        Copyright (c) 1993-1996 Accelerated Technology, Inc.           */
+/*                                                                       */
+/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
+/* subject matter of this material.  All manufacturing, reproduction,    */
+/* use, and sales rights pertaining to this subject matter are governed  */
+/* by the license agreement.  The recipient of this software implicitly  */
+/* accepts the terms of the license.                                     */
+/*                                                                       */
+/*************************************************************************/
+
+/*************************************************************************/
+/*                                                                       */
+/* FILE NAME                                            VERSION          */
+/*                                                                       */
+/*      qu_defs.h                                       PLUS  1.2        */
+/*                                                                       */
+/* COMPONENT                                                             */
+/*                                                                       */
+/*      QU - Queue Management                                            */
+/*                                                                       */
+/* DESCRIPTION                                                           */
+/*                                                                       */
+/*      This file contains data structure definitions and constants for  */
+/*      the message Queue component.                                     */
+/*                                                                       */
+/* AUTHOR                                                                */
+/*                                                                       */
+/*      William E. Lamie, Accelerated Technology, Inc.                   */
+/*                                                                       */
+/* DATA STRUCTURES                                                       */
+/*                                                                       */
+/*      QU_QCB                              Queue control block          */
+/*      QU_SUSPEND                          Queue suspension block       */
+/*                                                                       */
+/* FUNCTIONS                                                             */
+/*                                                                       */
+/*      None                                                             */
+/*                                                                       */
+/* DEPENDENCIES                                                          */
+/*                                                                       */
+/*      cs_defs.h                           Common service definitions   */
+/*      tc_defs.h                           Thread Control definitions   */
+/*                                                                       */
+/* HISTORY                                                               */
+/*                                                                       */
+/*         NAME            DATE                    REMARKS               */
+/*                                                                       */
+/*      W. Lamie        03-01-1993      Created initial version 1.0      */
+/*      D. Lamie        04-19-1993      Verified version 1.0             */
+/*      W. Lamie        03-01-1994      Moved include files outside of   */
+/*                                        the file #ifndef to allow the  */
+/*                                        use of actual data structures, */
+/*                                        removed protection structure,  */
+/*                                        put padding into structure,    */
+/*                                        resulting in version 1.1       */
+/*      R. Pfaff -                                                       */
+/*      D. Lamie        03-18-1994      Verified version 1.1             */
+/*      M.Q. Qian       04-17-1996      updated to version 1.2           */
+/*                                                                       */
+/*************************************************************************/
+
+#include        "cs_defs.h"                 /* Common service constants  */
+#include        "tc_defs.h"                 /* Thread control constants  */
+
+
+/* Check to see if the file has been included already.  */
+
+#ifndef QU_DEFS
+#define QU_DEFS
+
+
+/* Define constants local to this component.  */
+
+#define         QU_QUEUE_ID             0x51554555UL
+
+
+/* Define the Queue Control Block data type.  */
+
+typedef struct QU_QCB_STRUCT 
+{
+    CS_NODE             qu_created;            /* Node for linking to    */
+                                               /*   created queue list   */
+    UNSIGNED            qu_id;                 /* Internal QCB ID        */
+    CHAR                qu_name[NU_MAX_NAME];  /* Queue name             */
+    DATA_ELEMENT        qu_fixed_size;         /* Fixed-size messages?   */
+    DATA_ELEMENT        qu_fifo_suspend;       /* Suspension type flag   */
+#if     PAD_2
+    DATA_ELEMENT        qu_padding[PAD_2];
+#endif
+    UNSIGNED            qu_queue_size;         /* Total size of queue    */
+    UNSIGNED            qu_messages;           /* Messages in queue      */
+    UNSIGNED            qu_message_size;       /* Size of each message   */
+    UNSIGNED            qu_available;          /* Available words        */
+    UNSIGNED_PTR        qu_start;              /* Start of queue area    */
+    UNSIGNED_PTR        qu_end;                /* End of queue area + 1  */
+    UNSIGNED_PTR        qu_read;               /* Read pointer           */
+    UNSIGNED_PTR        qu_write;              /* Write pointer          */
+    UNSIGNED            qu_tasks_waiting;      /* Number of waiting tasks*/
+    struct QU_SUSPEND_STRUCT
+                       *qu_urgent_list;        /* Urgent message suspend */
+    struct QU_SUSPEND_STRUCT
+                       *qu_suspension_list;    /* Suspension list        */
+} QU_QCB;    
+
+
+/* Define the queue suspension structure.  This structure is allocated off of
+   the caller's stack.  */
+   
+typedef struct QU_SUSPEND_STRUCT
+{
+    CS_NODE             qu_suspend_link;       /* Link to suspend blocks */
+    QU_QCB             *qu_queue;              /* Pointer to the queue   */
+    TC_TCB             *qu_suspended_task;     /* Task suspended         */
+    UNSIGNED_PTR        qu_message_area;       /* Pointer to message area*/
+    UNSIGNED            qu_message_size;       /* Message size requested */
+    UNSIGNED            qu_actual_size;        /* Actual size of message */
+    STATUS              qu_return_status;      /* Return status          */
+} QU_SUSPEND;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/sm_defs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,109 @@
+/*************************************************************************/
+/*                                                                       */
+/*        Copyright (c) 1993-1996 Accelerated Technology, Inc.           */
+/*                                                                       */
+/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
+/* subject matter of this material.  All manufacturing, reproduction,    */
+/* use, and sales rights pertaining to this subject matter are governed  */
+/* by the license agreement.  The recipient of this software implicitly  */
+/* accepts the terms of the license.                                     */
+/*                                                                       */
+/*************************************************************************/
+
+/*************************************************************************/
+/*                                                                       */
+/* FILE NAME                                            VERSION          */
+/*                                                                       */
+/*      sm_defs.h                                       PLUS  1.2        */
+/*                                                                       */
+/* COMPONENT                                                             */
+/*                                                                       */
+/*      SM - Semaphore Management                                        */
+/*                                                                       */
+/* DESCRIPTION                                                           */
+/*                                                                       */
+/*      This file contains data structure definitions and constants for  */
+/*      the Semaphore component.                                         */
+/*                                                                       */
+/* AUTHOR                                                                */
+/*                                                                       */
+/*      William E. Lamie, Accelerated Technology, Inc.                   */
+/*                                                                       */
+/* DATA STRUCTURES                                                       */
+/*                                                                       */
+/*      SM_SCB                              Semaphore control block      */
+/*      SM_SUSPEND                          Semaphore suspension block   */
+/*                                                                       */
+/* FUNCTIONS                                                             */
+/*                                                                       */
+/*      None                                                             */
+/*                                                                       */
+/* DEPENDENCIES                                                          */
+/*                                                                       */
+/*      cs_defs.h                           Common service definitions   */
+/*      tc_defs.h                           Thread Control definitions   */
+/*                                                                       */
+/* HISTORY                                                               */
+/*                                                                       */
+/*         NAME            DATE                    REMARKS               */
+/*                                                                       */
+/*      W. Lamie        03-01-1993      Created initial version 1.0      */
+/*      D. Lamie        04-19-1993      Verified version 1.0             */
+/*      W. Lamie        03-01-1994      Moved include files outside of   */
+/*                                        the file #ifndef to allow the  */
+/*                                        use of actual data structures, */
+/*                                        removed protection structure,  */
+/*                                        put padding into structure,    */
+/*                                        resulting in version 1.1       */
+/*      R. Pfaff -                                                       */
+/*      D. Lamie        03-18-1994      Verified version 1.1             */
+/*      M.Q. Qian       04-17-1996      updated to version 1.2           */
+/*                                                                       */
+/*************************************************************************/
+
+#include        "cs_defs.h"                 /* Common service constants  */
+#include        "tc_defs.h"                 /* Thread control constants  */
+
+
+/* Check to see if the file has been included already.  */
+
+#ifndef SM_DEFS
+#define SM_DEFS
+
+
+/* Define constants local to this component.  */
+
+#define         SM_SEMAPHORE_ID         0x53454d41UL
+
+
+/* Define the Semaphore Control Block data type.  */
+
+typedef struct SM_SCB_STRUCT 
+{
+    CS_NODE             sm_created;            /* Node for linking to    */
+                                               /* created semaphore list */
+    UNSIGNED            sm_id;                 /* Internal SCB ID        */
+    CHAR                sm_name[NU_MAX_NAME];  /* Semaphore name         */
+    UNSIGNED            sm_semaphore_count;    /* Counting semaphore     */
+    DATA_ELEMENT        sm_fifo_suspend;       /* Suspension type flag   */
+#if     PAD_1
+    DATA_ELEMENT        sm_padding[PAD_1];
+#endif
+    UNSIGNED            sm_tasks_waiting;      /* Number of waiting tasks*/
+    struct SM_SUSPEND_STRUCT
+                       *sm_suspension_list;    /* Suspension list        */
+} SM_SCB;    
+
+
+/* Define the semaphore suspension structure.  This structure is allocated 
+   off of the caller's stack.  */
+   
+typedef struct SM_SUSPEND_STRUCT
+{
+    CS_NODE             sm_suspend_link;       /* Link to suspend blocks */
+    SM_SCB             *sm_semaphore;          /* Pointer to semaphore   */
+    TC_TCB             *sm_suspended_task;     /* Task suspended         */
+    STATUS              sm_return_status;      /* Return status          */
+} SM_SUSPEND;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/tc_defs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,234 @@
+/*************************************************************************/
+/*                                                                       */
+/*        Copyright (c) 1993-1996 Accelerated Technology, Inc.           */
+/*                                                                       */
+/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
+/* subject matter of this material.  All manufacturing, reproduction,    */
+/* use, and sales rights pertaining to this subject matter are governed  */
+/* by the license agreement.  The recipient of this software implicitly  */
+/* accepts the terms of the license.                                     */
+/*                                                                       */
+/*************************************************************************/
+
+/*************************************************************************/
+/*                                                                       */
+/* FILE NAME                                            VERSION          */
+/*                                                                       */
+/*      tc_defs.h                                       PLUS/MNT         */
+/*                                                      VERSION 1.1      */
+/* COMPONENT                                                             */
+/*                                                                       */
+/*      TC - Thread Control                                              */
+/*                                                                       */
+/* DESCRIPTION                                                           */
+/*                                                                       */
+/*      This file contains data structure definitions and constants for  */
+/*      the component that controls the various threads of execution in  */
+/*      system.  Threads include tasks, HISRs, signal handlers, etc.     */
+/*                                                                       */
+/* AUTHOR                                                                */
+/*                                                                       */
+/*      William E. Lamie, Accelerated Technology, Inc.                   */
+/*                                                                       */
+/* DATA STRUCTURES                                                       */
+/*                                                                       */
+/*      TC_TCB                              Task Control Block           */
+/*      TC_HCB                              HISR Control Block           */
+/*      TC_PROTECT                          Task/HISR protection struct  */
+/*                                                                       */
+/* FUNCTIONS                                                             */
+/*                                                                       */
+/*      None                                                             */
+/*                                                                       */
+/* DEPENDENCIES                                                          */
+/*                                                                       */
+/*      cs_defs.h                           Common service definitions   */
+/*      tm_defs.h                           Timer control definitions    */
+/*                                                                       */
+/* HISTORY                                                               */
+/*                                                                       */
+/*         NAME            DATE                    REMARKS               */
+/*                                                                       */
+/*      W. Lamie        03-01-1993      Created initial version 1.0      */
+/*      D. Lamie        04-19-1993      Verified version 1.0             */
+/*      W. Lamie        06-01-1993      Added padding conditional into   */
+/*                                        TC_TCB structure, making       */
+/*                                        version 1.0a                   */
+/*      D. Lamie        06-01-1993      Verified version 1.0a            */
+/*      W. Lamie        03-01-1994      Moved include files outside of   */
+/*                                        the file #ifndef to allow the  */
+/*                                        use of actual data structures, */
+/*                                        added four reserved words in   */
+/*                                        both the task and HISR blocks, */
+/*                                        resulting in version 1.1       */
+/*      R. Pfaff -                                                       */
+/*      D. Lamie        03-18-1994      Verified version 1.1             */
+/*      M.Q. Qian       04-17-1996      updated to version 1.2           */
+/*      B. Haggerty     03-12-1997      Released MNT Version 1.0         */
+/*      B. Haggerty     08-11-1997      Released MNT Version 1.1         */
+/*                                                                       */
+/*************************************************************************/
+
+#include        "cs_defs.h"                 /* Common service constants  */
+#include        "tm_defs.h"                 /* Timer control structures  */
+
+
+/* Check to see if the file has been included already.  */
+
+#ifndef TC_DEFS
+#define TC_DEFS
+
+
+/* Define constants local to this component.  */
+
+#define         TC_TASK_ID              0x5441534bUL
+#define         TC_HISR_ID              0x48495352UL
+#define         TC_PRIORITIES           256
+#define         TC_HISR_PRIORITIES      3
+#define         TC_MAX_GROUPS           TC_PRIORITIES/8
+#define         TC_HIGHEST_MASK         0x000000FFUL
+#define         TC_NEXT_HIGHEST_MASK    0x0000FF00UL
+#define         TC_NEXT_LOWEST_MASK     0x00FF0000UL
+#define         TC_LOWEST_MASK          0xFF000000UL
+
+/* Define the Task Control Block data type.  */
+
+typedef struct TC_TCB_STRUCT 
+{
+    /* Standard thread information first.  This information is used by
+       the target dependent portion of this component.  Changes made
+       to this area of the structure can have undesirable side effects.  */
+       
+    CS_NODE             tc_created;            /* Node for linking to    */
+					       /*   created task list    */
+    UNSIGNED            tc_id;                 /* Internal TCB ID        */
+    CHAR                tc_name[NU_MAX_NAME];  /* Task name              */
+    DATA_ELEMENT        tc_status;             /* Task status            */
+    DATA_ELEMENT        tc_delayed_suspend;    /* Delayed task suspension*/
+    DATA_ELEMENT        tc_priority;           /* Task priority          */
+    DATA_ELEMENT        tc_preemption;         /* Task preemption enable */
+    UNSIGNED            tc_scheduled;          /* Task scheduled count   */
+    UNSIGNED            tc_cur_time_slice;     /* Current time slice     */
+    VOID               *tc_stack_start;        /* Stack starting address */
+    VOID               *tc_stack_end;          /* Stack ending address   */
+    VOID               *tc_stack_pointer;      /* Task stack pointer     */
+    UNSIGNED            tc_stack_size;         /* Task stack's size      */
+    UNSIGNED            tc_stack_minimum;      /* Minimum stack size     */
+    struct TC_PROTECT_STRUCT
+		       *tc_current_protect;    /* Current protection     */
+    VOID               *tc_saved_stack_ptr;    /* Previous stack pointer */
+    UNSIGNED            tc_time_slice;         /* Task time slice value  */
+
+    
+    /* Information after this point is not used in the target dependent
+       portion of this component.  Hence, changes in the following section
+       should not impact assembly language routines.  */
+    struct TC_TCB_STRUCT
+		       *tc_ready_previous,     /* Previously ready TCB   */
+		       *tc_ready_next;         /* next and previous ptrs */
+			
+    /* Task control information follows.  */
+
+    UNSIGNED            tc_priority_group;     /* Priority group mask bit*/
+    struct TC_TCB_STRUCT
+		      **tc_priority_head;      /* Pointer to list head   */
+    DATA_ELEMENT       *tc_sub_priority_ptr;   /* Pointer to sub-group   */
+    DATA_ELEMENT        tc_sub_priority;       /* Mask of sub-group bit  */
+    DATA_ELEMENT        tc_saved_status;       /* Previous task status   */
+    DATA_ELEMENT        tc_signal_active;      /* Signal active flag     */
+    
+#if     PAD_3
+    DATA_ELEMENT        tc_padding[PAD_3];
+#endif
+
+					       /* Task entry function    */
+    VOID                (*tc_entry)(UNSIGNED, VOID *);
+    UNSIGNED            tc_argc;               /* Optional task argument */
+    VOID               *tc_argv;               /* Optional task argument */
+    VOID                (*tc_cleanup) (VOID *);/* Clean-up routine       */
+    VOID               *tc_cleanup_info;       /* Clean-up information   */
+    struct TC_PROTECT_STRUCT
+		       *tc_suspend_protect;    /* Protection at time of  */
+					       /*   task suspension      */
+
+    /* Task timer information.  */
+    INT                 tc_timer_active;       /* Active timer flag      */
+    TM_TCB              tc_timer_control;      /* Timer control block    */
+
+    /* Task signal control information.  */
+    
+    UNSIGNED            tc_signals;            /* Current signals        */
+    UNSIGNED            tc_enabled_signals;    /* Enabled signals        */
+    
+    /* tc_saved_status and tc_signal_active are now defined above in an
+       attempt to keep DATA_ELEMENT types together.  */
+    
+    /* Signal handling routine.  */
+    VOID                (*tc_signal_handler) (UNSIGNED);
+
+    /* Reserved words for the system and a single reserved word for the
+       application.  */
+    UNSIGNED            tc_system_reserved_1;  /* System reserved word   */
+    UNSIGNED            tc_system_reserved_2;  /* System reserved word   */
+    UNSIGNED            tc_system_reserved_3;  /* System reserved word   */
+    UNSIGNED            tc_app_reserved_1;     /* Application reserved   */
+
+} TC_TCB;    
+
+
+/* Define the High-Level Interrupt Service Routine Control Block data type.  */
+
+typedef struct TC_HCB_STRUCT 
+{
+    /* Standard thread information first.  This information is used by
+       the target dependent portion of this component.  Changes made
+       to this area of the structure can have undesirable side effects.  */
+       
+    CS_NODE             tc_created;            /* Node for linking to    */
+					       /*   created task list    */
+    UNSIGNED            tc_id;                 /* Internal TCB ID        */
+    CHAR                tc_name[NU_MAX_NAME];  /* HISR name              */
+    DATA_ELEMENT        tc_not_used_1;         /* Not used field         */
+    DATA_ELEMENT        tc_not_used_2;         /* Not used field         */
+    DATA_ELEMENT        tc_priority;           /* HISR priority          */
+    DATA_ELEMENT        tc_not_used_3;         /* Not used field         */
+    UNSIGNED            tc_scheduled;          /* HISR scheduled count   */
+    UNSIGNED            tc_cur_time_slice;     /* Not used in HISR       */
+    VOID               *tc_stack_start;        /* Stack starting address */
+    VOID               *tc_stack_end;          /* Stack ending address   */
+    VOID               *tc_stack_pointer;      /* HISR stack pointer     */
+    UNSIGNED            tc_stack_size;         /* HISR stack's size      */
+    UNSIGNED            tc_stack_minimum;      /* Minimum stack size     */
+    struct TC_PROTECT_STRUCT
+		       *tc_current_protect;    /* Current protection     */
+    struct TC_HCB_STRUCT
+		       *tc_active_next;        /* Next activated HISR    */
+    
+    /* Information after this point is not used in the target dependent
+       portion of this component.  Hence, changes in the following section
+       should not impact assembly language routines.  */
+    UNSIGNED            tc_activation_count;   /* Activation counter     */
+    VOID                (*tc_entry)(VOID);     /* HISR entry function    */
+/*#ifdef        SUN             */
+	VOID                            (*tc_actual_entry)();   /* HISR entry function  MNT 1.2 */
+/*#endif                        */
+
+    /* Reserved words for the system and a single reserved word for the
+       application.  */
+    UNSIGNED            tc_system_reserved_1;  /* System reserved word   */
+    UNSIGNED            tc_system_reserved_2;  /* System reserved word   */
+    UNSIGNED            tc_system_reserved_3;  /* System reserved word   */
+    UNSIGNED            tc_app_reserved_1;     /* Application reserved   */
+
+} TC_HCB;    
+
+
+/* Define the Task/HISR protection structure type.  */
+
+typedef struct TC_PROTECT_STRUCT
+{
+    TC_TCB             *tc_tcb_pointer;        /* Owner of the protection */
+    UNSIGNED            tc_thread_waiting;     /* Waiting thread flag     */
+} TC_PROTECT;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/nuc/tm_defs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,117 @@
+/*************************************************************************/
+/*                                                                       */
+/*        Copyright (c) 1993-1996 Accelerated Technology, Inc.           */
+/*                                                                       */
+/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
+/* subject matter of this material.  All manufacturing, reproduction,    */
+/* use, and sales rights pertaining to this subject matter are governed  */
+/* by the license agreement.  The recipient of this software implicitly  */
+/* accepts the terms of the license.                                     */
+/*                                                                       */
+/*************************************************************************/
+
+/*************************************************************************/
+/*                                                                       */
+/* FILE NAME                                            VERSION          */
+/*                                                                       */
+/*      tm_defs.h                                       PLUS  1.2        */
+/*                                                                       */
+/* COMPONENT                                                             */
+/*                                                                       */
+/*      TM - Timer Management                                            */
+/*                                                                       */
+/* DESCRIPTION                                                           */
+/*                                                                       */
+/*      This file contains data structure definitions and constants for  */
+/*      the Timer Management component.                                  */
+/*                                                                       */
+/* AUTHOR                                                                */
+/*                                                                       */
+/*      William E. Lamie, Accelerated Technology, Inc.                   */
+/*                                                                       */
+/* DATA STRUCTURES                                                       */
+/*                                                                       */
+/*      TM_TCB                              Timer control block          */
+/*      TM_APP_TCB                          Application timer control    */
+/*                                            block                      */   
+/*                                                                       */
+/* FUNCTIONS                                                             */
+/*                                                                       */
+/*      None                                                             */
+/*                                                                       */
+/* DEPENDENCIES                                                          */
+/*                                                                       */
+/*      cs_defs.h                           Common service definitions   */
+/*      tc_defs.h                           Thread control definitions   */
+/*                                                                       */
+/* HISTORY                                                               */
+/*                                                                       */
+/*         NAME            DATE                    REMARKS               */
+/*                                                                       */
+/*      W. Lamie        03-01-1993      Created initial version 1.0      */
+/*      D. Lamie        04-19-1993      Verified version 1.0             */
+/*      W. Lamie        03-01-1994      Moved include files outside of   */
+/*                                        the file #ifndef to allow the  */
+/*                                        use of actual data structures, */
+/*                                        resulting in version 1.1       */
+/*      R. Pfaff -                                                       */
+/*      D. Lamie        03-18-1994      Verified version 1.1             */
+/*      M.Q. Qian       04-17-1996      updated to version 1.2           */
+/*                                                                       */
+/*************************************************************************/
+
+#include        "cs_defs.h"                 /* Common service constants  */
+
+
+/* Check to see if the file has been included already.  */
+
+#ifndef TM_DEFS
+#define TM_DEFS
+
+
+/* Define constants local to this component.  */
+
+#define         TM_TIMER_ID             0x54494d45UL
+#define         TM_ACTIVE               0
+#define         TM_NOT_ACTIVE           1
+#define         TM_EXPIRED              2
+#define         TM_TASK_TIMER           0
+#define         TM_APPL_TIMER           1
+
+/* Define the Timer Control Block data type.  */
+
+typedef struct TM_TCB_STRUCT 
+{
+    INT                 tm_timer_type;         /* Application/Task      */
+    UNSIGNED            tm_remaining_time;     /* Remaining time        */
+    VOID               *tm_information;        /* Information pointer   */
+    struct TM_TCB_STRUCT
+                       *tm_next_timer,         /* Next timer in list    */
+                       *tm_previous_timer;     /* Previous timer in list*/
+} TM_TCB;    
+
+
+/* Define Application's Timer Control Block data type.  */
+
+typedef struct TM_APP_TCB_STRUCT
+{
+    CS_NODE             tm_created;            /* Node for linking to   */
+                                               /*   created timer list  */
+    UNSIGNED            tm_id;                 /* Internal TCB ID       */
+    CHAR                tm_name[NU_MAX_NAME];  /* Timer name            */
+    VOID  (*tm_expiration_routine)(UNSIGNED);  /* Expiration function   */
+    UNSIGNED            tm_expiration_id;      /* Expiration ID         */
+    INT                 tm_enabled;            /* Timer enabled flag    */
+    UNSIGNED            tm_expirations;        /* Number of expirations */
+    UNSIGNED            tm_initial_time;       /* Initial time          */
+    UNSIGNED            tm_reschedule_time;    /* Reschedule time       */
+    TM_TCB              tm_actual_timer;       /* Actual timer internals*/
+} TM_APP_TCB;
+
+
+/* Include this file here, since it contains references to the timer definition
+   structure that is defined by this file.  */
+   
+#include        "tc_defs.h"
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/os.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,284 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       os.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for the OS adaptation layer.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef __OS_H__
+#define __OS_H__
+
+#include "os_const.h"
+
+/*==== CONSTANTS ===================================================*/
+typedef int                             OS_HANDLE;
+typedef BOOL                         OS_INT_STATE;
+typedef ULONG                             OS_TIME;
+typedef ULONG                             OS_TICK;
+
+#define OS_NOTASK                             0
+                                              
+#define FIRST_ENTRY                           0xff
+#define NEXT_ENTRY                            0xfe
+
+#define OS_EVENT                              0x1
+#define OS_NO_EVENT                           0x0
+/*
+ * pattern to initialize task/osisr stacks 
+ */
+#define INITIAL_STACK_VALUE                   0xfe
+
+/*
+ * constants to access the object information functions 
+ */
+#define OS_OBJSYS                               0
+#define OS_OBJTASK                              1
+#define OS_OBJQUEUE                             2
+#define OS_OBJPARTITIONGROUP                    3
+#define OS_OBJMEMORYPOOL                        4
+#define OS_OBJTIMER                             5
+#define OS_OBJSEMAPHORE                         6	
+
+/*
+ * return values
+ */
+#define OS_OK                                   0
+#define OS_WAITED                               1
+#define OS_NEW_PROCESS                          2
+#define OS_PARTITION_FREE                       3
+#define OS_ALLOCATED_BIGGER                     4
+#define OS_ERROR                              (-1)
+#define OS_TIMEOUT                            (-2)
+#define OS_PARTITION_GUARD_PATTERN_DESTROYED  (-3)
+#define OS_INVALID_QUEUE                      (-4)
+
+/*
+ * message priorities
+ */
+#define OS_NORMAL                               1
+#define OS_URGENT                               2
+#define OS_MIN_PRIORITY                 OS_NORMAL
+#define OS_MAX_PRIORITY                 OS_URGENT
+
+/*
+ * OS ISR priority range
+ */
+#define OS_ISR_MIN_PRIO                         0
+#define OS_ISR_MAX_PRIO                         2
+
+/*
+ * flags
+ */
+#define OS_QFPARTITION                       0x01
+
+/*
+ * error codes
+ */
+#define OS_SYST_ERR                        0x8000
+#define OS_SYST_ERR_QUEUE_CREATE           0x8001
+#define OS_SYST_ERR_MAX_TIMER              0x8002
+#define OS_SYST_ERR_MAX_TASK               0x8003 
+#define OS_SYST_ERR_STACK_OVERFLOW         0x8004
+#define OS_SYST_ERR_PCB_PATTERN            0x8005
+#define OS_SYST_ERR_NO_PARTITION           0x8006
+#define OS_SYST_ERR_STR_TOO_LONG           0x8007
+#define OS_SYST_ERR_OVERSIZE               0x8008 
+#define OS_SYST_ERR_TASK_TIMER             0x8009
+#define OS_SYST_ERR_SIMUL_TIMER            0x800A
+#define OS_SYST_ERR_QUEUE_FULL             0x800B
+#define OS_SYST_ERR_MAX_SEMA               0x800C 
+#define OS_SYST_ERR_NO_MEMORY              0x800D
+#define OS_SYST_ERR_BIG_PARTITION          0x800E
+                                            
+/*
+ * warning codes
+ */                                   
+#define OS_SYST_WRN                        0x0000
+#define OS_SYST_WRN_WAIT_PARTITION         0x0001
+#define OS_SYST_WRN_WAIT_QUEUE             0x0002
+#define OS_SYST_WRN_BIG_PARTITION          0x0003
+#define OS_SYST_WRN_MULTIPLE_FREE          0x0004
+#define OS_SYST_WRN_REQ_TRUNCATED          0x0004
+#define OS_SYST_WRN_FREE_FAILED            0x0005
+
+/*==== TYPES =======================================================*/
+
+typedef struct 
+{
+  USHORT            flags;
+  USHORT            data16;
+  ULONG             data32;
+#ifdef _TOOLS_
+  ULONG             len;
+#endif
+  ULONG             time;
+  LONG              e_id;
+  T_VOID_STRUCT *   ptr;
+} OS_QDATA;
+
+/*==== PROTOTYPES ==================================================*/
+
+/* Task API */
+GLOBAL LONG os_CreateTask             (OS_HANDLE Caller, char *Name, void (*TaskEntry)(OS_HANDLE, ULONG), ULONG StackSize, 
+                                       USHORT Priority, OS_HANDLE *TaskHandle, OS_HANDLE MemPoolHandle);
+GLOBAL LONG os_DestroyTask            (OS_HANDLE Caller, OS_HANDLE TaskHandle);
+GLOBAL LONG os_StartTask              (OS_HANDLE Caller, OS_HANDLE TaskHandle, ULONG Value);
+GLOBAL LONG os_StopTask               (OS_HANDLE Caller, OS_HANDLE TaskHandle);
+GLOBAL LONG os_SuspendTask            (OS_HANDLE Caller, ULONG Time);
+GLOBAL LONG os_DeferTask              (OS_HANDLE task_handle, OS_TIME time);
+GLOBAL LONG os_ResumeTask             (OS_HANDLE task_handle);
+GLOBAL LONG os_Relinquish             (void);
+GLOBAL LONG os_GetTaskName            (OS_HANDLE Caller, OS_HANDLE TaskHandle, char * Name);
+GLOBAL LONG os_GetTaskHandle          (OS_HANDLE Caller, char * Name, OS_HANDLE *TaskHandle);
+GLOBAL LONG os_TaskInformation        (USHORT Handle, char *Buffer);
+GLOBAL LONG os_ProInit                (void);
+GLOBAL LONG os_ChangePreemption       (char preempt);
+GLOBAL OS_HANDLE os_MyHandle          (void);
+#ifdef _NUCLEUS_
+GLOBAL LONG os_CheckTaskStack         (OS_HANDLE Handle);
+/* Task internal */
+GLOBAL LONG os_GetTaskData            (OS_HANDLE Handle, unsigned int **tcb, unsigned char **stackbegin, unsigned char **stackend );
+GLOBAL unsigned char os_GetTaskState  (OS_HANDLE Caller, OS_HANDLE Handle);
+#endif
+
+/* Queue API */
+GLOBAL LONG os_CreateQueue            (OS_HANDLE Caller, OS_HANDLE ComHandle, char *Name, USHORT Entries,
+                                       OS_HANDLE *ActHandle, OS_HANDLE MemPoolHandle );
+GLOBAL LONG os_DestroyQueue           (OS_HANDLE Caller, OS_HANDLE ComHandle );
+GLOBAL LONG os_OpenQueue              (OS_HANDLE Caller, char *Name, OS_HANDLE *ComHandle);
+GLOBAL LONG os_CloseQueue             (OS_HANDLE Caller, OS_HANDLE ComHandle);
+GLOBAL LONG os_SendToQueue            (OS_HANDLE Caller, OS_HANDLE ComHandle, USHORT Priority, 
+                                       ULONG Suspend, OS_QDATA *Msg );
+GLOBAL LONG os_ReceiveFromQueue       (OS_HANDLE Caller, OS_HANDLE ComHandle, OS_QDATA *msg, ULONG Timeout );
+GLOBAL LONG os_GetQueueName           (OS_HANDLE Caller, OS_HANDLE ComHandle, char * Name);
+GLOBAL LONG os_GetQueueHandle         (OS_HANDLE Caller, char *Name, OS_HANDLE *ComHandle);
+GLOBAL LONG os_QueueInformation       (USHORT Handle, char *Buffer);
+GLOBAL LONG os_ComInit                (void);
+/* Queue internal */
+#ifdef _NUCLEUS_
+GLOBAL LONG os_GetQueueState          (OS_HANDLE Caller, OS_HANDLE Handle, ULONG *Used, ULONG *Free);
+GLOBAL unsigned char *os_FindSuspendingQueue (unsigned int *tcb);
+GLOBAL LONG os_GetQueueData           (OS_HANDLE Caller, OS_HANDLE Handle, USHORT Index, 
+                                       USHORT *Type, ULONG *opc, ULONG *ptr, ULONG *time );
+#endif
+#ifdef _TOOLS_
+extern LONG os_create_extq            (const char* name, OS_HANDLE* comhandle);
+extern LONG os_destroy_extq           (const char* name);
+#endif /* _TOOLS_ */
+
+/* Memory API */
+GLOBAL LONG os_CreatePartitionPool    (OS_HANDLE Caller, char *GroupName, void *Addr, USHORT Num, ULONG Size, 
+                                       OS_HANDLE *GroupHandle);
+GLOBAL LONG os_CreatePartitionPool_fixed_pool_size  (OS_HANDLE TaskHandle, char *GroupName, void *Addr, USHORT PoolSize, 
+                                       ULONG PartitionSize, OS_HANDLE *GroupHandle, ULONG *NumCreated);
+GLOBAL LONG os_AllocatePartition      (OS_HANDLE Caller, T_VOID_STRUCT **Buffer, ULONG Size, 
+                                       ULONG Suspend, OS_HANDLE GroupHandle);
+GLOBAL LONG os_DeallocatePartition    (OS_HANDLE Caller, T_VOID_STRUCT *Buffer);
+GLOBAL LONG os_CreateMemoryPool       (OS_HANDLE Caller, char *Name, void *Addr, ULONG PoolSize, 
+                                       OS_HANDLE *PoolHandle);
+GLOBAL LONG os_AllocateMemory         (OS_HANDLE Caller, T_VOID_STRUCT **Buffer, ULONG Size, 
+                                       ULONG Suspend, OS_HANDLE PoolHandle);
+GLOBAL LONG os_DeallocateMemory       (OS_HANDLE Caller, T_VOID_STRUCT *Buffer);
+GLOBAL LONG os_PartitionInformation   (USHORT Handle, char *Buffer);
+GLOBAL LONG os_MemoryInformation      (USHORT Handle, char *Buffer);
+GLOBAL LONG os_MemInit                (void);
+GLOBAL LONG os_SetPoolHandles         (OS_HANDLE ext_pool_handle, OS_HANDLE int_pool_handle);
+GLOBAL LONG os_GetPartitionGroupHandle(OS_HANDLE Caller, char *Name, OS_HANDLE *GroupHandle);
+
+GLOBAL LONG os_GetPartitionPoolStatus (ULONG size, OS_HANDLE gr_hndl, USHORT *free, USHORT *alloc);
+/* Memory internal */
+GLOBAL LONG os_is_valid_partition     (T_VOID_STRUCT *Buffer);
+#ifdef _NUCLEUS_
+GLOBAL LONG os_PartitionCheck         (ULONG *ptr);
+GLOBAL const ULONG *os_GetPrimpoolCB  (int grp,int id);
+#endif
+
+/* Timer API */
+GLOBAL LONG os_CreateTimer            (OS_HANDLE TaskHandle, void(*TimeoutProc)(OS_HANDLE,OS_HANDLE,USHORT), 
+                                       OS_HANDLE *TimerHandle, OS_HANDLE MemPoolHandle);
+GLOBAL LONG os_DestroyTimer           (OS_HANDLE TaskHandle, OS_HANDLE TimerHandle);
+GLOBAL LONG os_StartTimer             (OS_HANDLE TaskHandle, OS_HANDLE TimerHandle, USHORT Index,
+                                       OS_TIME InitialTime, OS_TIME RescheduleTime );
+GLOBAL LONG os_StopTimer              (OS_HANDLE TaskHandle, OS_HANDLE TimerHandle);
+GLOBAL LONG os_QueryTimer             (OS_HANDLE TaskHandle, OS_HANDLE TimerHandle, OS_TIME *RemainingTime);
+GLOBAL LONG os_TimerInformation       (USHORT Handle, char *Buffer);
+GLOBAL LONG os_TimInit                (void);
+GLOBAL LONG os_set_tick               (int os_system_tick);
+GLOBAL LONG os_InactivityTicks        (int *next_event, OS_TICK *next_event_ticks);
+GLOBAL LONG os_IncrementTick          (OS_TICK ticks);
+GLOBAL LONG os_GetScheduleCount       (OS_HANDLE task_handle, int * schedule_count);
+GLOBAL LONG os_RecoverTick            (OS_TICK ticks);
+
+/* Semaphore API */
+GLOBAL LONG os_CreateSemaphore        (OS_HANDLE TaskHandle, char *Name, USHORT Count, 
+                                       OS_HANDLE *Semhandle, OS_HANDLE MemPoolHandle);
+GLOBAL LONG os_DestroySemaphore       (OS_HANDLE TaskHandle, OS_HANDLE SemHandle);
+GLOBAL LONG os_ResetSemaphore         (OS_HANDLE TaskHandle, OS_HANDLE SemHandle, USHORT Count);
+GLOBAL LONG os_OpenSemaphore          (OS_HANDLE TaskHandle, char *Name, OS_HANDLE *SemHandle);
+GLOBAL LONG os_CloseSemaphore         (OS_HANDLE TaskHandle, OS_HANDLE SemHandle);
+GLOBAL LONG os_ObtainSemaphore        (OS_HANDLE TaskHandle, OS_HANDLE SemHandle, ULONG Timeout);
+GLOBAL LONG os_ReleaseSemaphore       (OS_HANDLE TaskHandle, OS_HANDLE SemHandle);
+GLOBAL LONG os_QuerySemaphore         (OS_HANDLE TaskHandle, OS_HANDLE SemHandle, USHORT *Count);
+GLOBAL LONG os_SemaphoreInformation   (USHORT Handle, char *Buffer);
+GLOBAL LONG os_SemInit                (void);
+/* Semaphore internal */
+#ifdef _NUCLEUS_
+GLOBAL unsigned char *os_FindSuspendingSema (unsigned int *tcb);
+#endif
+
+/* Interrupt API */
+GLOBAL LONG  os_CreateOSISR           (char *name, void (*OSISR_entry)(void), int stacksize, int priority, 
+                                       int flags, OS_HANDLE *osisr_handle );
+GLOBAL LONG os_DeleteOSISR            (OS_HANDLE osisr_handle);
+GLOBAL LONG os_ActivateOSISR          (OS_HANDLE osisr_handle); 
+GLOBAL LONG os_SetInterruptState      (OS_INT_STATE new_state, OS_INT_STATE *old_state); 
+GLOBAL LONG os_EnableInterrupts       (OS_INT_STATE *old_state); 
+GLOBAL LONG os_DisableInterrupts      (OS_INT_STATE *old_state); 
+GLOBAL LONG os_isr_init               (void);
+
+/* Event group API */
+GLOBAL LONG os_CreateEventGroup       (char *evt_grp_name, OS_HANDLE *evt_grp_handle);
+GLOBAL LONG os_DeleteEventGroup       (OS_HANDLE evt_grp_handle);
+GLOBAL LONG os_EventGroupInformation  (OS_HANDLE evt_grp_handle, char *Name, unsigned* mask_evt, unsigned* tasks_waiting, OS_HANDLE* first_task);
+GLOBAL LONG os_SetEvents              (OS_HANDLE evt_grp_handle, unsigned event_flags);
+GLOBAL LONG os_ClearEvents            (OS_HANDLE evt_grp_handle, unsigned event_flags);
+GLOBAL LONG os_RetrieveEvents         (OS_HANDLE evt_grp_handle, unsigned event_flags, char option, unsigned* retrieved_events, unsigned suspend);
+GLOBAL LONG os_EvGrpInit              (void);
+GLOBAL LONG os_GetEventGroupHandle    (char *evt_grp_name, OS_HANDLE *evt_grp_handle);
+
+/* Miscellaneous */
+GLOBAL LONG os_GetTime                (OS_HANDLE TaskHandle, OS_TIME *Time);
+GLOBAL LONG os_Initialize             (void);
+GLOBAL LONG os_ObjectInformation      (OS_HANDLE Caller, USHORT Id, USHORT Handle, USHORT len, void *Buffer);
+void os_SystemError                   (OS_HANDLE Caller, USHORT cause, char *buffer );
+LONG os_dar_register                  (const void *dar_properties);
+#ifdef _NUCLEUS_
+LONG os_dar_set_filter                (void);
+LONG os_read_dar_ffs_data             (USHORT entry, char *buffer, USHORT len);
+#endif
+#if defined (_NUCLEUS_) && defined (_TARGET_)
+#include "gdi.h"
+GLOBAL LONG                            os_CreateCallback (void);
+GLOBAL LONG os_ExecuteCallback        (OS_HANDLE Caller, void (*Callback)(T_DRV_SIGNAL*), T_DRV_SIGNAL *Signal); 
+#endif
+#ifdef CTB
+GLOBAL void os_Tick                   (void);
+GLOBAL void os_StartTicking           (void);
+GLOBAL void os_StopTicking            (void);
+GLOBAL ULONG os_GetProcessId          (void);
+#endif 
+
+/*==== END OF OS.H =================================================*/
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/p_frame.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,145 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       frm_primitives.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for frame primitives.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef FRM_PRIMITIVES_H
+#define FRM_PRIMITIVES_H
+
+#define FRM_ERROR_IND     0xC000001E  /* SAP NR: 30 (0x1e), PRIM NR 0 */
+#define FRM_WARNING_IND   0xC001001E  /* SAP NR: 30 (0x1e), PRIM NR 1 */
+
+/* maximum length of a string in frame primitives */
+#define FRM_PRIM_STR_SIZE   100
+
+/* spontaneuous frame output */
+typedef struct
+{
+  U32   error_code;
+  char  error_string [ FRM_PRIM_STR_SIZE ];
+} T_FRM_ERROR_IND;
+
+typedef struct
+{
+  U32   warning_code;
+  char  warning_string [ FRM_PRIM_STR_SIZE ];
+} T_FRM_WARNING_IND;
+
+#if 0
+/* frame status requests and confirmations */
+
+/* register destination for error/warning indications */
+
+typedef struct
+{
+  char  name [ RESOURCE_NAMELEN ];
+} T_FRM_REGISTER_REQ;
+
+typedef struct
+{
+  char  name [ RESOURCE_NAMELEN ];
+} T_FRM_REGISTER_CNF;
+
+/* task status */
+
+typedef struct
+{
+  U32   task_id;
+} T_FRM_TASK_STATUS_REQ;
+
+typedef struct
+{
+  char  name [ RESOURCE_NAMELEN ];
+  U32   priority;
+  U32   stacksize;
+  U32   unused_stack;
+} T_FRM_TASK_DATA;
+
+typedef struct
+{
+  T_FRM_TASK_DATA   task [ MAX_OS_TASKS ];;
+} T_FRM_TASK_STATUS_CNF;
+
+/* partition status */
+
+typedef struct
+{
+  U32   partition_group_id;
+} T_FRM_PARTITION_STATUS_REQ;
+
+typedef struct
+{
+  T_FRM_PARTITION_DATA p_pool [ MAX_POOL_GROUPS*MAX_POOLS_PER_GROUP ];
+} T_FRM_PARTITION_STATUS_CNF;
+
+typedef struct
+{
+  U32   partition_pool_id;
+  U32   partition_size
+  U32   available;
+  U32   allocated;
+} T_FRM_PARTITION_DATA;
+
+/* memory status */
+typedef struct
+{
+  U32   memory_pool_id;
+} T_FRM_MEMORY_STATUS_REQ;
+
+typedef struct
+{
+  U32   memory_pool_id;
+  U32   pool_size
+  U32   available;
+  U32   allocated;
+} T_FRM_MEMORY_DATA;
+
+typedef struct
+{
+  T_FRM_MEMORY_DATA m_pool [ MAX_MEMORY_POOLS };
+} T_FRM_MEMORY_STATUS_CNF;
+
+/* timer status */
+
+typedef struct
+{
+  U32   timer_id;
+} T_FRM_TIMER_STATUS_REQ;
+
+typedef struct
+{
+  U32   max_timer;
+  U32   max_simul_available_timer;
+  U32   max_simul_running_timer;
+} T_FRM_TIMER_STATUS_CNF;
+
+/* semaphore status */
+
+typedef struct
+{
+  U32   semaphore_id;
+} T_FRM_SEMAPHORE_STATUS_REQ;
+
+typedef struct
+{
+} T_FRM_SEMAPHORE_STATUS_CNF;
+#endif
+
+#endif /* FRM_PRIMITIVES_H */
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/p_mem.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,321 @@
+/*
++------------------------------------------------------------------------------
+|  File:       mem.h
++------------------------------------------------------------------------------
+|                 Copyright Condat AG 1999-2000, Berlin
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Condat AG.
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Condat AG.
++------------------------------------------------------------------------------
+| Purpose:     Definitions for the entity MEM.
+| $Identity:$
++------------------------------------------------------------------------------
+*/
+
+#ifndef MEM_H
+#define MEM_H
+
+/*==== INCLUDES ==============================================================*/
+
+#include "typedefs.h"
+#include "vsi.h"
+#include "pei.h"
+#include "tools.h"
+
+/*==== GENERATED CONTENT ======================================================*/
+
+/*
++--------------------------------------------------------------------------+
+| PROJECT : PROTOCOL STACK                                                 |
+| FILE    : p_8010_112_mem_sap.val                                         |
+| SOURCE  : "s:\g23m\condat\ms\DFILE\PRIM\8010_112_mem_sap.pdf"            |
+| LastModified : "12 February, 2003 by Gert Z. Srensen (GSO)"              |
+| IdAndVersion : "8010.112.02.002"                                         |
+| SrcFileTime  : "Wed Nov 26 14:28:02 2003"                                |
+| Generated by CCDGEN_2.4.11 on Tue Sep 21 10:40:12 2004                   |
+|           !!DO NOT MODIFY!!DO NOT MODIFY!!DO NOT MODIFY!!                |
++--------------------------------------------------------------------------+
+*/
+
+/* PRAGMAS
+ * PREFIX                 : MEM
+ * COMPATIBILITY_DEFINES  : NO
+ * ALWAYS_ENUM_IN_VAL_FILE: YES
+ * ENABLE_GROUP: NO
+ * CAPITALIZE_TYPENAME: NO
+ */
+
+
+#ifndef P_8010_112_MEM_SAP_VAL
+#define P_8010_112_MEM_SAP_VAL
+
+
+#define CDG_ENTER__P_8010_112_MEM_SAP_VAL
+
+#define CDG_ENTER__FILENAME _P_8010_112_MEM_SAP_VAL
+#define CDG_ENTER__P_8010_112_MEM_SAP_VAL__FILE_TYPE CDGINC
+#define CDG_ENTER__P_8010_112_MEM_SAP_VAL__LAST_MODIFIED _12_February_2003_by_Gert_Z_Srensen_GSO
+#define CDG_ENTER__P_8010_112_MEM_SAP_VAL__ID_AND_VERSION _8010_112_02_002
+
+#define CDG_ENTER__P_8010_112_MEM_SAP_VAL__SRC_FILE_TIME _Wed_Nov_26_14_28_02_2003
+
+#include "CDG_ENTER.h"
+
+#undef CDG_ENTER__P_8010_112_MEM_SAP_VAL
+
+#undef CDG_ENTER__FILENAME
+
+
+/*
+ * user defined constants
+ */
+#define MEM_MAX_NUMBER_OF_BUFFERS      (0x40)     
+#define MEM_MAX_NUMBER_OF_USERS        (0x40)     
+#define MEM_UNORDERED_BUFFER           (0x0)      
+#define MEM_FIFO_BUFFER                (0x1)      
+#define MEM_MAX_RAB_ID                 (0x10)     
+#define MEM_MAX_MEMORY_POOL_SIZE       (0xffffff) 
+#define MEM_INVALID_USER_HANDLE        (0x0)      
+#define MEM_INVALID_BUFFER_HANDLE      (0x0)      
+#define MEM_RLC_UL_AM_MODE             (0x0)      
+#define MEM_RLC_UL_UM_MODE             (0x1)      
+#define MEM_RLC_UL_TM_MODE             (0x2)      
+#define MEM_INVALID_MEMORY_HANDLE      (0x0)      
+
+#include "CDG_LEAVE.h"
+
+#endif
+
+
+/*
++--------------------------------------------------------------------------+
+| PROJECT : PROTOCOL STACK                                                 |
+| FILE    : p_8010_112_mem_sap.h                                           |
+| SOURCE  : "s:\g23m\condat\ms\DFILE\PRIM\8010_112_mem_sap.pdf"            |
+| LastModified : "12 February, 2003 by Gert Z. Srensen (GSO)"              |
+| IdAndVersion : "8010.112.02.002"                                         |
+| SrcFileTime  : "Wed Nov 26 14:28:02 2003"                                |
+| Generated by CCDGEN_2.4.11 on Tue Sep 21 10:40:12 2004                   |
+|           !!DO NOT MODIFY!!DO NOT MODIFY!!DO NOT MODIFY!!                |
++--------------------------------------------------------------------------+
+*/
+
+/* PRAGMAS
+ * PREFIX                 : MEM
+ * COMPATIBILITY_DEFINES  : NO
+ * ALWAYS_ENUM_IN_VAL_FILE: YES
+ * ENABLE_GROUP: NO
+ * CAPITALIZE_TYPENAME: NO
+ */
+
+
+#ifndef P_8010_112_MEM_SAP_H
+#define P_8010_112_MEM_SAP_H
+
+
+#define CDG_ENTER__P_8010_112_MEM_SAP_H
+
+#define CDG_ENTER__FILENAME _P_8010_112_MEM_SAP_H
+#define CDG_ENTER__P_8010_112_MEM_SAP_H__FILE_TYPE CDGINC
+#define CDG_ENTER__P_8010_112_MEM_SAP_H__LAST_MODIFIED _12_February_2003_by_Gert_Z_Srensen_GSO
+#define CDG_ENTER__P_8010_112_MEM_SAP_H__ID_AND_VERSION _8010_112_02_002
+
+#define CDG_ENTER__P_8010_112_MEM_SAP_H__SRC_FILE_TIME _Wed_Nov_26_14_28_02_2003
+
+#include "CDG_ENTER.h"
+
+#undef CDG_ENTER__P_8010_112_MEM_SAP_H
+
+#undef CDG_ENTER__FILENAME
+
+
+#ifndef __T_MEM_no_parms__
+#define __T_MEM_no_parms__
+/*
+ * No parameters.
+ * CCDGEN:WriteStruct_Count==14836
+ */
+typedef struct
+{
+  U8                        none;                     /*<  0:  1> No parameters                                      */
+  U8                        zzz_align0;               /*<  1:  1> alignment                                          */
+  U8                        zzz_align1;               /*<  2:  1> alignment                                          */
+  U8                        zzz_align2;               /*<  3:  1> alignment                                          */
+} T_MEM_no_parms;
+#endif
+
+#ifndef __T_MEM_uplink_buffer_users_info__
+#define __T_MEM_uplink_buffer_users_info__
+/*
+ * No parameters.
+ * CCDGEN:WriteStruct_Count==14839
+ */
+typedef struct
+{
+  U8                        rab_id;                   /*<  0:  1> Radio access identifier                            */
+  U8                        rlc_mode;                 /*<  1:  1> RLC Mode                                           */
+  U8                        zzz_align0;               /*<  2:  1> alignment                                          */
+  U8                        zzz_align1;               /*<  3:  1> alignment                                          */
+  U32                       bits_per_tti;             /*<  4:  4> Bits per TTI                                       */
+  U16                       rlc_tx_window_size;       /*<  8:  2> RLC window size                                    */
+  U8                        zzz_align2;               /*< 10:  1> alignment                                          */
+  U8                        zzz_align3;               /*< 11:  1> alignment                                          */
+} T_MEM_uplink_buffer_users_info;
+#endif
+
+
+/*
+ * End of substructure section, begin of primitive definition section
+ */
+
+#ifndef __T_MEM_READY_IND__
+#define __T_MEM_READY_IND__
+/*
+ * 
+ * CCDGEN:WriteStruct_Count==14842
+ */
+typedef struct
+{
+  U8                        user_handle;              /*<  0:  1> User Handle                                        */
+  U8                        user_parameter;           /*<  1:  1> User parameter                                     */
+  U8                        zzz_align0;               /*<  2:  1> alignment                                          */
+  U8                        zzz_align1;               /*<  3:  1> alignment                                          */
+} T_MEM_READY_IND;
+#endif
+
+#ifndef __T_MEM_BUFFER__
+#define __T_MEM_BUFFER__
+/*
+ * 
+ * CCDGEN:WriteStruct_Count==14845
+ */
+typedef struct
+{
+  U32                       memory_pool_size;         /*<  0:  4> Memory pool size                                   */
+  U32                       allocated;                /*<  4:  4> Parameter                                          */
+  U8                        ordering;                 /*<  8:  1> Ordering                                           */
+  U8                        delete_pending;           /*<  9:  1> Parameter                                          */
+  U8                        zzz_align0;               /*< 10:  1> alignment                                          */
+  U8                        zzz_align1;               /*< 11:  1> alignment                                          */
+  U32                       max_allocated;            /*< 12:  4> Parameter                                          */
+  U32                       fifo_read_index;          /*< 16:  4> Parameter                                          */
+  U32                       fifo_write_index;         /*< 20:  4> Parameter                                          */
+} T_MEM_BUFFER;
+#endif
+
+
+#include "CDG_LEAVE.h"
+
+
+#endif
+
+
+/*==== CONSTS ================================================================*/
+
+#define MEM_READY_IND                  (0x8000408b)
+#define MEM_BUFFER                     (0x8001408b)
+
+
+#ifdef ENTITY_MEM
+
+#define VSI_CALLER        mem_handle,
+#define VSI_CALLER_SINGLE mem_handle
+
+#endif
+
+#define MEM_STATISTICS
+
+#define MAX_UPLINK_USERS 11		/* Maximum number of uplink buffer users. Corresponds  */
+								/* maxim number of available rab identifiers	 	   */	
+#define MAX_RAB_ID 16	        /* Maximum  RAB identifier. Used in array declarations. 15+1  */
+#define RAB_TRANSMIT_BUFFER_SIZE_BYTES 500000 /* Uplink buffer size */								
+#define MAX_SDU_SIZE 1520
+
+
+/*==== TYPES =================================================================*/
+
+typedef struct
+{
+  T_HANDLE  comm_handle;     /* Communication handle to user                  */
+  U8        user_parameter;  /* User defined parameter                        */
+  U8        buffer_id;       /* Id of buffer used by this user                */
+
+  U32       low;             /* Flow control low                              */
+  U32       high;            /* Flow control high                             */
+  U32       max;             /* Flow control max                              */
+  U32       allocated;       /* Allocated number of octets                    */
+
+#ifdef MEM_STATISTICS
+  U32       max_allocated;   /* Max number of octets allocated by user        */
+#endif /* STATISTICS */
+
+  U16       space_before;		/* Extra space to allocate before user data      */
+  U8        space_after;		/* Extra space to allocate after user data       */
+  U8        ready;				/* TRUE if ready to receive data from this user  */
+  U8        delete_pending;		/* TRUE if user is to be deleted when all freed  */
+
+} T_MEM_USER;
+
+
+typedef struct
+{
+  U8*  (*get_user_data) (U32 memory_handle, U16 *ptr_length);
+  U8   (*create_user)   (U8 buffer_handle, U8 user_parameter,  char *task_name);
+  U8   (*create_buffer) (U8 ordering, U32 memory_pool_size);
+  U8*  (*alloc)         (U8 user_handle, U16 length, U32 *ptr_handle);
+  void (*dealloc)       (U32 memory_handle);
+  void (*delete_user)   (U8 user_handle);
+  void (*delete_buffer) (U8 buffer_handle);
+} T_MEM_PROPERTIES;
+
+/*==== EXPORTS ===============================================================*/
+
+#ifdef MEM_PEI_C
+
+/* Task handle for MEM */
+T_HANDLE      mem_handle;
+
+/* Semaphore used to guarantee exclusive access at critical points */
+T_HANDLE     mem_semaphore_handle;
+
+/*T_MEM_BUFFER *mem_buffer[MEM_MAX_NUMBER_OF_BUFFERS];*/
+T_MEM_USER   *mem_user[MEM_MAX_NUMBER_OF_USERS];
+
+#else /* MEM_PEI_C */
+
+extern T_HANDLE      mem_handle;
+extern T_HANDLE      mem_semaphore_handle;
+extern T_MEM_BUFFER *mem_buffer[MEM_MAX_NUMBER_OF_BUFFERS];
+extern T_MEM_USER   *mem_user[MEM_MAX_NUMBER_OF_USERS];
+
+#endif /* MEM_PEI_C */
+
+extern U8 mem_create_buffer(U8 ordering, U32 memory_pool_size);
+extern void mem_delete_buffer(U8 buffer_handle);
+extern U8 mem_create_user(U8 buffer_handle, U8 user_parameter,  char *task_name);
+extern void mem_init(void);
+extern void mem_delete_user(U8  user_handle);
+extern U8 mem_create_uplink_user(char* task_name, U8 mem_rab_id);
+extern void  mem_delete_uplink_user(U8 user_handle);
+extern void mem_adjust_uplink_users_flow_control(T_MEM_uplink_buffer_users_info *users_info[MEM_MAX_RAB_ID]);
+extern void mem_configure_flow_control(U8 user_handle, U32 low, U32 high, U32 max);
+extern void mem_configure_extra_space(U8 user_handle, U16  space_before, U8 space_after);
+extern BOOL mem_ready(U8 user_handle);
+extern U8 *mem_alloc(U8 user_handle, U16 length, U32 *ptr_handle);
+extern void mem_dealloc(U32 memory_handle);
+extern void mem_realloc(U32 memory_handle, U16 length);
+extern U8 *mem_get_user_data(U32 memory_handle, U16 *ptr_length);
+extern U16 mem_get_space_before(U32 memory_handle);
+extern U8 mem_get_space_after(U32 memory_handle);
+extern U8 *mem_decrease_space_before(U32 memory_handle, U16 delta_space_before, U16 *ptr_length);
+extern void mem_increase_space_before(U32 memory_handle, U16 delta_space_before);
+extern void mem_decrease_space_after(U32 memory_handle, U8 delta_space_after);
+extern void mem_increase_space_after(U32 memory_handle, U8 delta_space_after);
+extern void mem_send_ready_ind(T_HANDLE com_handle, U8 user_handle, U8 user_paramaeter);
+
+#endif /* MEM_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/pco_const.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,540 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  PCO2
+|  Modul   :  inc\pco_const.h
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  This header provides defines for all the messages send
+|             between pco components
++----------------------------------------------------------------------------- 
+*/ 
+
+
+#ifndef _PCO_CONST_H_
+#define _PCO_CONST_H_
+
+/*==== INCLUDES ==================================================*/
+#include "ipcapi.h"
+
+/*==== GENERAL CONSTANTS ==================================================*/
+enum T_PCOSTATUS {PCO_RUNNING,PCO_STOPPED,PCO_LOGFILE};
+
+#define PCO_SEND_TIMEOUT    10000
+
+#define PCO_TTYPE_UNKNOWN   0
+#define PCO_TTYPE_MS        1 // milliseconds since reset
+#define PCO_TTYPE_HMSM      2 // current time of day in ms
+#define PCO_TTYPE_FRAME     3 // frame number since reset
+
+#define CTRL_MSG_MAX_SIZE   MSG_MAX_SIZE /* from ipc */
+#define CTRL_DATA_MAX_SIZE  CTRL_MSG_MAX_SIZE-sizeof(MSG_HEADER)
+
+#define DATA_MSG_MAX_SIZE   65535
+#define DATA_MSG_DEF_SIZE   2300
+
+#define MAX_QNAME_LEN     50
+#define MAX_PATH_LEN      2300
+#define MAX_ENTITY_NLEN   5
+
+#define MAX_PRIM_NAME     30
+
+#define PCO_DEF_SRV_NAME  "PCOS"
+
+#ifdef _DEBUG
+#define PCO_CFG_PATH "../../cfg/"
+#else
+#define PCO_CFG_PATH "../cfg/"
+#endif
+
+#ifdef _WIN32
+#define DEF_CCDDATA_PATH  "ccddata_dll.dll"
+#endif
+
+
+#define PCO_MAX_TRACECLASS  32
+const char PCO_TC_NAME[PCO_MAX_TRACECLASS][MAX_PRIM_NAME]=
+{
+  "FUNCTION TRACE",
+  "EVENT TRACE",
+  "PRIMITIVE TRACE",
+  "STATE TRACE",
+  "SYSTEM TRACE",
+  "INTERRUPT-SIGNAL TRACE",
+  "ERROR TRACE",
+  "CCD TRACE",
+  "TIMER TRACE",
+  "PROFILER TRACE",
+  
+  "<TRACE>",
+  "<TRACE>",
+  "<TRACE>",
+  "<TRACE>",
+
+  "USER1 TRACE",
+  "USER2 TRACE",
+  "USER3 TRACE",
+  "USER4 TRACE",
+  "USER5 TRACE",
+  "USER6 TRACE",
+  "USER7 TRACE",
+  "USER8 TRACE",
+
+  "<TRACE>",
+  "<TRACE>",
+  "<TRACE>",
+  "<TRACE>",
+  "<TRACE>",
+  "<TRACE>",
+  "<TRACE>",
+  "<TRACE>",
+  "<TRACE>",
+  "<TRACE>"
+};
+
+/*==== PCO CONTROL MESSAGES ==================================================*/
+#define MSG_ID( Group, Code )     (((Group) << 8) + ((Code) & 0xFF))
+
+#define PCO_SRV_GROUP   0x1E
+#define PCO_VIEW_GROUP  0x1F
+
+
+
+#define PCO_CONNECT      		MSG_ID(PCO_SRV_GROUP,0x01) /* L3SRV_CONNECT */
+/*
+data:
+char[]		name of CMS-queue in which the viewer wants to receive traces/primitives
+          (zero terminated)
+
+purpose:
+sent from viewer to server to establish connection, server adds client to its list
+*/
+
+#define PCO_DISCONNECT     	MSG_ID(PCO_SRV_GROUP,0x02) /* L3SRV_DISCONNECT */
+/*
+data:
+
+purpose:
+sent from viewer to server to disconnect, server removes client from its list
+*/
+
+#define PCO_SUBSCRIBE     	MSG_ID(PCO_SRV_GROUP,0x03) /* L3SRV_SUBSCRIBE */
+/*
+data:
+char[]		mobile ID (may be empty) (zero terminated)
+
+purpose:
+sent from viewer to server to receive live data of a dedicated mobile
+*/
+
+
+#define PCO_UNSUBSCRIBE     	MSG_ID(PCO_SRV_GROUP,0x04) /* L3SRV_UNSUBSCRIBE */
+/*
+data:
+
+purpose:
+sent from viewer to server to stop receiving of live data
+*/
+
+
+/* MSG_ID(PCO_SRV_GROUP,0x05) L3SRV_ENABLE_LOGGING */
+
+
+
+#define PCO_OPEN_LOGFILE     MSG_ID(PCO_SRV_GROUP,0x06) /* L3SRV_LOAD_LOG_FILE */
+/*
+data:
+char[]		name of sessionfile with full path or just a session name (zero terminated)
+LONG		  first entry to be sent
+LONG		  last entry to be sent
+
+purpose:
+sent from viewer to server to receive logged data of a specified session
+sent from controller to open a session logfile -> new state of server: PCO_LOGFILE. 
+*/
+
+
+#define PCO_COPY_LOGFILE     MSG_ID(PCO_SRV_GROUP,0x07) /* L3SRV_COPY_LOG_FILE */
+/*
+data:
+char[]		name of source sessionfile with full path (zero terminated)
+char[]		name of destination sessionfile with full path (zero terminated)
+LONG		  first entry to be copied
+LONG		  last entry to be copied
+
+purpose:
+sent from viewer to server to make it copy a specified session into another
+sessionsfile while applying the filter currently set
+*/
+
+
+#define PCO_SET_FILTER MSG_ID(PCO_SRV_GROUP,0x08)  /* L3SRV_SET_SERVER_FILTER */
+/*
+data:
+char[] list   ... zero separated entity names ("\0\0"==end)
+                  e.g.: "MM\0RR\0SS\0\0" or "+"MM\0RR\0\0"
+                  - first entity=="+" -> only this entities will be forwarded
+                  - default: specified entities will not be forwarded
+prim_trace    ... optional parameter to disable/enable general forwarding of
+                  primitives/traces:
+                  0 .. fowarding of everything (default)
+                  1 .. no primitives
+                  2 .. no traces
+
+purpose:
+sent from viewer to server to set the entity filter for this viewer
+*/
+
+
+/* MSG_ID(PCO_SRV_GROUP,0x09) L3SRV_SET_MOBILE_FILTER */
+
+/* MSG_ID(PCO_SRV_GROUP,0x0A) L3SRV_GET_MOBILE_FILTER */
+
+
+#define PCO_EXIT		MSG_ID(PCO_SRV_GROUP,0x0B) /* L3SRV_EXIT */
+/*
+data:
+
+purpose:
+sent to server to make it exit, server will send this message 
+to all connected viewers before exiting
+*/
+
+
+/* MSG_ID(PCO_SRV_GROUP,0x0C) L3SRV_LOG_FILE */
+
+
+
+#define PCO_DATA		MSG_ID(PCO_SRV_GROUP,0x0D) /* L3SRV_DATA */
+/*
+data:
+  rawdata ... depends on server type
+
+purpose:   
+sent from some servers to viewers (others send data without header)
+contains rawdata which has to be interpreted depending on server type
+*/
+
+
+/* MSG_ID(PCO_SRV_GROUP,0x0E) L3SRV_FILTER */
+
+
+#define PCO_CONNECTED		MSG_ID(PCO_SRV_GROUP,0x0F) /* L3SRV_CONNECTED */
+/*
+data:
+  byte ... server type id (see server types)
+
+purpose:   
+sent from server to viewer to inform about an established connection and 
+to tell its type
+*/
+
+
+#define PCO_OK		MSG_ID(PCO_SRV_GROUP,0x10) /* L3SRV_OK */
+/*
+data:
+U16 	ID of message which will be confirmed by this PCO_OK
+
+purpose:
+sent by a receiver to the sender to confirm receiving and correct interpretation of a control message
+*/
+
+
+#define PCO_ERROR	MSG_ID(PCO_SRV_GROUP,0x11) /* L3SRV_ERROR */
+/*
+data:
+U16  	ID of message which has produced the error
+byte  error code (see error codes)
+
+purpose:
+sent by a receiver to the sender to inform about an error a received control message has raised
+*/
+
+
+
+#define PCO_STOP_TESTSESSION 	MSG_ID(PCO_SRV_GROUP,0x12)
+/*
+data:
+
+purpose:   
+sent to the server to stop a running testsession
+*/
+
+#define PCO_START_TESTSESSION   MSG_ID(PCO_SRV_GROUP,0x13)
+/*
+data:
+Char[]	session name (zero terminated)
+USHORT  (optional)
+        0 .. don't create dbg-files
+        1 .. create dbg-files
+
+purpose:
+sent to the server to start a new testsession
+*/
+
+#define PCO_CLOSE_LOGFILE		MSG_ID(PCO_SRV_GROUP,0x14)
+/*
+data:
+
+purpose:
+sent to server to disable logfile-mode -> new state PCO_STOPPED. 
+*/
+
+#define PCO_GET_LOGFILE_DATA	MSG_ID(PCO_SRV_GROUP,0x15)
+/*
+data:
+ULONG	  start index
+ULONG 	end index
+
+purpose:
+sent to server (which has to be in PCO_LOGFILE state) to make 
+him forwarding all logged data from the current session 
+file (which matches the index constraints) to the sender 
+(has to be a connected viewer). 
+*/
+
+#define PCO_SEND_PRIM		    MSG_ID(PCO_SRV_GROUP,0x16)
+/*
+data:
+char[] 	receiver (zero terminated)
+char[]	text (zero terminated)
+
+purpose:
+to request server to send a CONFIG-primitive to TST, not supported by all servers (knowledge of FRAME is necessary)
+*/
+
+
+#define PCO_STATUS		MSG_ID(PCO_SRV_GROUP,0x17)
+/*
+data:
+<none>         .. if sent from controller to server
+
+T_PCOSTATUS	.. current status of server (see T_PCOSTATUS)
+Char[]	.. name of testsession (can be empty, zero terminated)
+
+purpose:
+sent from controller to server to request its current status,
+sent from server to controller to publish its current status
+*/
+
+#define PCO_GET_TESTSESSIONS MSG_ID(PCO_SRV_GROUP,0x18)
+/*
+data:
+
+purpose:
+sent from controller to server to acquire a list of available session names (which are stored in current server testsession directory)
+*/
+
+#define PCO_TESTSESSIONS MSG_ID(PCO_SRV_GROUP,0x19)
+/*
+data:
+char[] 	.. zero separated testsession names ("\0\0"==end)
+USHORT  .. 1 - more messages will follow
+           0 - last messages with testsessions
+
+purpose:
+reply to PCO_GET_TESTSESSIONS
+*/
+
+
+#define PCO_SET_SESSIONPATH MSG_ID(PCO_SRV_GROUP,0x1A)
+/*
+data:
+char[]  .. zero terminated path-string
+USHORT  .. 1 - store new path in ini-file
+           0 - don't store new path
+           (optional, default is 0)
+
+purpose:
+sent to server to set new session path
+*/
+
+#define PCO_DISTRIB_LOGFILE MSG_ID(PCO_SRV_GROUP,0x1B)
+/*
+data:
+LONG		  first entry to be sent
+LONG		  last entry to be sent
+
+purpose:
+sent to server (in logfile mode) to make him send logged data to all clients
+*/
+
+#define PCO_GET_SESSIONPATH MSG_ID(PCO_SRV_GROUP,0x1C)
+/*
+data:
+
+purpose:
+sent to server to get its current session path
+*/
+
+#define PCO_SESSIONPATH MSG_ID(PCO_SRV_GROUP,0x1D)
+/*
+data:
+char[]  .. zero terminated path-string
+
+purpose:
+sent from server as reply to PCO_GET_SESSIONPATH
+*/
+
+#define PCO_SET_TIME_STAMP_PERIOD MSG_ID(PCO_SRV_GROUP,0x1E)
+/*
+data:
+UINT  .. new value for time stamp period
+                       0 ... no time stamps
+                       >0 .. period in minutes
+
+purpose:
+sent to server to set new time stamp period value
+*/
+
+#define PCO_RENAME_LOGFILE MSG_ID(PCO_SRV_GROUP,0x1F)
+/*
+data:
+char[]		original name of sessionfile (evtl. with full path, zero terminated)
+char[]		new name of sessionfile (evtl. with full path, zero terminated)
+
+purpose:
+sent to server to make it rename a session logfile
+*/
+
+#define PCO_GET_LOGFILE_INFO  MSG_ID(PCO_SRV_GROUP,0x20) 
+/*
+data:
+Char[]	name of sessionfile with full path or just a session name (zero terminated)
+
+purpose:
+sent to server to request info's (e.g. count of entries) about the specified logfile 
+*/
+
+#define PCO_LOGFILE_INFO  MSG_ID(PCO_SRV_GROUP,0x21) 
+/*
+data:
+LONG		  count of entries in logfile specified in last PCO_GET_LOGFILE_INFO
+Char[]	  optional name of ccddata-file used during logging (zero terminated)
+ULONG     optional str2ind version
+Char[]	  optional name of str2ind-table-file used during logging (zero terminated)
+
+purpose:
+sent from server to a sender of PCO_GET_LOGFILE_INFO 
+*/
+
+
+#define PCO_TO_FRONT MSG_ID(PCO_VIEW_GROUP,0x01) /* L3VWR_TO_FRONT */
+/*
+data:
+
+purpose:
+sent from GUI-controller to server to indicate activation of ctrl window
+sent from server to all viewers to indicate activation of ctrl window
+sent from server back to controller to indicate activation of viewers
+*/
+
+#define PCO_SYNCHRONIZE MSG_ID(PCO_VIEW_GROUP,0x05) 
+/*
+data:
+ULONG	  time in ms
+
+purpose:
+sent from a viewer A to server to indicate change in the view to a new time stamp
+sent from server to all viewers except A to synchronize them with A
+*/
+
+#define PCO_LOGFILE_COMPLETE MSG_ID(PCO_VIEW_GROUP,0x06) 
+/*
+data:
+
+purpose:
+sent from server to a viewers after complete forwarding of a requested logfile
+*/
+
+#define PCO_INIFILE_CHANGED MSG_ID(PCO_VIEW_GROUP,0x07) 
+/*
+data:
+
+purpose:
+sent from viewer to server and then to all other viewers after an ini-file change
+which should be handled immediatly by all viewers
+*/
+
+#define PCO_CLEAN MSG_ID(PCO_VIEW_GROUP,0x08) 
+/*
+data:
+
+purpose:
+sent from viewer to server and then to all other viewers to inform them that the user
+has cleaned the viewer content
+*/
+
+#define PCO_STOP_LOGFILE 	MSG_ID(PCO_SRV_GROUP,0x22)
+/*
+data:
+Char[]	queue name (zero terminated)
+
+purpose:   
+sent to the server to stop logging into the logfile connected with given queue 
+*/
+
+#define PCO_START_LOGFILE   MSG_ID(PCO_SRV_GROUP,0x23)
+/*
+data:
+Char[]	logfile name (zero terminated)
+Char[]	queue name (zero terminated)
+
+purpose:
+sent to the server to start logging all data which will be received in the given queue
+(the queue will be created by the server)
+*/
+
+#define PCO_LOAD_CCDDATA  MSG_ID(PCO_SRV_GROUP,0x24) 
+/*
+data:
+Char[]	name of ccddata-file to be loaded (zero terminated)
+
+purpose:
+sent to server to command it to load the specified ccddata-DLL
+*/
+
+
+/*==== PCO ERROR CODES ==================================================*/
+
+#define PCO_ERR_NONE                  0x00
+
+#define PCO_ERR_TOO_MANY_VIEWERS      0x01
+#define PCO_ERR_ALREADY_CONNECTED     0x02
+#define PCO_ERR_ALREADY_SUBSCRIBED    0x03
+#define PCO_ERR_NOT_CONNECTED         0x04
+#define PCO_ERR_NOT_SUBSCRIBED        0x05
+#define PCO_ERR_FILE_OPEN_ERROR       0x06
+//0x07: log file not for this viewer
+#define PCO_ERR_FILE_READ_ERROR       0x08
+#define PCO_ERR_FILE_WRITE_ERROR      0x09
+
+#define PCO_ERR_TSESSION_NOT_RUNNING  0x10
+#define PCO_ERR_TSESSION_RUNNING      0x11
+#define PCO_ERR_TSFILE_OPEN           0x12
+#define PCO_ERR_TSFILE_NOT_OPEN       0x14
+#define PCO_ERR_WRONG_FILE_TYPE       0x15
+#define PCO_ERR_TSFILE_TOO_NEW        0x16
+#define PCO_ERR_TOO_MANY_LOGGERS      0x17
+#define PCO_ERR_QUEUE_OPEN_ERROR      0x18
+#define PCO_ERR_LOGGER_NOT_FOUND      0x19
+
+#define PCO_ERR_TST_NOT_AVAILABLE     0x20
+
+/*==== PCO SERVER TYPES ==================================================*/
+
+#define PCO_STYPE_NONE      0x00
+#define PCO_STYPE_PCOS      0x23
+#define PCO_STYPE_L3SRV     0x1E
+
+
+#endif /*_PCO_CONST_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/pco_inifile.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,152 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  PCO2
+|  Modul   :  inc\pco_inifile.h
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Contains declarations of the class IniFile. (Based on 
+|             File from Adam Clauss)
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef _PCO_INIFILE_H_
+#define _PCO_INIFILE_H_
+
+/*==== INCLUDES ===================================================*/
+
+#pragma warning (disable: 4786) /* ignore warning about to long template names */
+
+#include <iostream>
+#include <string>
+#include <vector>
+#include "cms.h"
+
+using namespace std;
+
+/*==== PROTOTYPES ==================================================*/
+
+//all Keys are of this type
+struct Key
+{
+	//list of values in key
+	vector<string> values; 
+
+	//corresponding list of value names
+	vector<string> names;
+
+  //corresponding list of modified state
+  vector<bool> modified; 
+};
+
+class IniFile  
+{
+	//all private variables
+private:
+
+	//stores pathname of ini file to read/write
+	string path;
+	
+	//list of Keys in ini
+	vector<Key> keys; 
+
+	//corresponding list of Keynames
+	vector<string> names; 
+
+  // semaphore to protect file reading/writing
+  CMS_HANDLE m_file_sema;
+	
+	//all private functions
+private:
+	//overloaded to take string
+	istream & getline( istream & is, string & str );
+
+	//returns index of specified value, in the specified Key, or -1 if not found
+	int FindValue(int Keynum, string valuename) const;
+
+	//returns index of specified Key, or -1 if not found
+	int FindKey(string Keyname) const;
+
+
+	//public variables
+public:
+
+	//will contain error info if one occurs
+	//ended up not using much, just in ReadFile and GetValue
+	mutable string error;
+  
+	//will contain warning info if one occurs
+	//ended up not using much, just in ReadFile 
+  mutable string warning;
+
+	//public functions
+public:
+	//default constructor
+	IniFile();
+
+	//constructor, can specify pathname here instead of using SetPath later
+	IniFile(string inipath);
+
+	//default destructor
+	virtual ~IniFile();
+
+	//sets path of ini file to read and write from
+	void SetPath(string newpath);
+
+	//returns path of currently selected ini file
+  const char* GetPath() const { return path.c_str();}
+
+	//reads ini file specified using IniFile::SetPath()
+	//returns true if successful, false otherwise
+  //may contain warnings in warning-variable
+	bool ReadFile(bool refresh=false);
+
+	//writes data stored in class to ini file
+	bool WriteFile(bool refresh_first=true); 
+
+	//deletes all stored ini data
+	void Reset();
+
+	//returns number of Keys currently in the ini
+	int GetNumKeys() const;
+
+	//returns number of values stored for specified Key
+	int GetNumValues(string Keyname) const;
+
+	//gets value of [Keyname] valuename = 
+	//overloaded to return string, int, and double,
+	//returns "", or 0 if Key/value not found.  Sets error member to show problem
+	string GetValue(string Keyname, string valuename) const; 
+	int GetValueI(string Keyname, string valuename) const; 
+	double GetValueF(string Keyname, string valuename) const;
+
+	//sets value of [Keyname] valuename =.
+	//specify the optional paramter as false (0) if you do not want it to create
+	//the Key if it doesn't exist. Returns true if data entered, false otherwise
+	//overloaded to accept string, int, and double
+	bool SetValue(string Key, string valuename, string value, bool create = 1);
+	bool SetValueI(string Key, string valuename, int value, bool create = 1);
+	bool SetValueF(string Key, string valuename, double value, bool create = 1);
+
+  bool modified(string keyname, string valuename);
+  bool set_modified(string keyname, string valuename, bool modified=true);
+
+	//deletes specified value
+	//returns true if value existed and deleted, false otherwise
+	bool DeleteValue(string Keyname, string valuename);
+
+	//deletes specified Key and all values contained within
+	//returns true if Key existed and deleted, false otherwise
+	bool DeleteKey(string Keyname);
+};
+
+#endif /* _PCO_INIFILE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/pco_pdi.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,58 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  PCO2
+|  Modul   :  PCO_PDI
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  This header provides functions to read and store data for
+|             usage with the pdi-module (Primitive Decoding Information).
+|             Furthermore filter functions are included. (filtering by opc,
+|             up/downlink and air message id)
++----------------------------------------------------------------------------- 
+*/ 
+
+
+#ifndef _PCO_PDI_H_
+#define _PCO_PDI_H_
+
+/*==== INCLUDES ==================================================*/
+#include "ccdapi.h"
+extern "C" {
+#include "pdi.h"
+}
+
+/*==== GLOABAL FUNCTION DECLARATIONS =============================*/
+
+/*
++---------------------------------------------------------------------+
+| PROJECT : PCO2                       MODULE  : PCO_PDI              |
+| STATE   : code                       ROUTINE : pco_pdi_init         |
++---------------------------------------------------------------------+
+
+  PURPOSE : initalized pdi data for pco
+
+  PARAMS:   fname .. name of file with pdi data
+
+  RETURNS:   0 .. sucess
+            -1 .. otherwise
+
+*/
+int pco_pdi_init(const char* fname);
+
+int pco_pdi_exit();
+
+
+T_PDI_CONTEXT* pco_pdi_context();
+
+
+#endif /*_PCO_PDI_H_*/
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/pco_util.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,195 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  PCO2
+|  Modul   :  PCO_UTIL
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  This Modul provides utillity functions for pco
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef _PCO_UTIL_H_
+#define _PCO_UTIL_H_
+
+/*==== INCLUDES ===================================================*/
+#include <stdio.h>
+#include "ipcapi.h"
+#undef EXPORT
+#include "typedefs.h"
+
+/*==== TYPES ======================================================*/
+
+/*==== CONSTANTS ==================================================*/
+#define ZERO_COMPRESS_MIN 8
+
+/*==== EXTERNALS ==================================================*/
+
+/*==== VARIABLES ==================================================*/
+
+/*==== PROTOTYPES =================================================*/
+
+/*
++--------------------------------------------------------------------+
+| PROJECT : PCO2                       MODULE  : PCO_UTIL            |
+| STATE   : code                       ROUTINE : get_path            |
++--------------------------------------------------------------------+
+
+  PURPOSE : Retrieves the pathname from a path/filename(path\filenames)-string.
+
+  PARAMS: fname ... path/filename
+          path  ... retrieved path string 
+          slash ... 1 -> '/'s are used as separators.
+                    0 -> '\'s are used as separators
+*/
+void  get_path(const char* fname, char* path, int slash=1);
+
+
+/*
++------------------------------------------------------+
+| PROJECT : PCO2                MODULE  : PCO_UTIL     |
+| STATE   : code                ROUTINE : read_string  |
++------------------------------------------------------+
+
+  PURPOSE : Reads one line from a text file.
+
+  PARAMS:   stream  ... stream to read from
+            buf     ... buffer to read into
+            max_len ... maximum length of line to read into buf
+
+  RETURNS:   0 ... no error
+            -1 ... buffer to small
+
+*/
+int read_string (FILE * stream, char * buf, int max_len);
+
+
+/*
++-------------------------------------------------------------------------------+
+| PROJECT : PCO2                       MODULE  : PCO_UTIL                       |
+| STATE   : code                       ROUTINE : send_ipcmsg                    |
++-------------------------------------------------------------------------------+
+
+  PURPOSE : tries to send a message with ipc header to a receiver
+
+  PARAMS:   buf     ... pointer to buffer
+            size     .. size of buffer
+            id      ... message id
+            sender   .. queuename of sender
+            receiver .. queuename of receiver
+
+  RETURNS:  0 .. sucess
+            -1 .. receiver not found
+            -2 .. error while contacting receiver 
+          
+*/
+int send_ipcmsg(void* buf, U16 size, U16 id, const char* sender, 
+                const char* receiver);
+
+
+/*
++-------------------------------------------------------------------------------+
+| PROJECT : PCO2                       MODULE  : PCO_UTIL                       |
+| STATE   : code                       ROUTINE : send_ipcmsg                    |
++-------------------------------------------------------------------------------+
+
+  PURPOSE : tries to send a message with ipc header to a receiver
+
+  PARAMS:   buf     ... pointer to buffer
+            size     .. size of buffer
+            id      ... message id
+            sender   .. queuename of sender
+            receiver .. queuename of receiver
+            rqueue  ... handle of receiver queue
+
+  RETURNS:  0 .. sucess
+            -1 .. error while contacting receiver 
+          
+*/
+int send_ipcmsg(void* buf, U16 size, U16 id, const char* sender, 
+                const char* receiver, CMS_HANDLE rqueue);
+
+/*
++-------------------------------------------------------------------------------+
+| PROJECT : PCO2                       MODULE  : PCO_VIEW_STD                   |
+| STATE   : code                       ROUTINE : create_hexdump                 |
++-------------------------------------------------------------------------------+
+
+  PURPOSE : creates hexdump string of given data
+
+  PARAMS:   data   .. the data
+            dsize  .. size of data
+            dump   .. buffer to receive hexdump
+            size   .. size of dump
+            reverse.. if !=0 the hexdump will represent the reverse data buffer
+            zero_compress_min .. count of zeros from which on compression will be applied
+
+  RETURNS:  0 .. success
+           -1 .. dump buffer to small
+
+*/
+int create_hexdump(const void *data, unsigned dsize, char *dump, unsigned size,
+                   int reverse=0, int zero_compress_min=ZERO_COMPRESS_MIN);
+
+/*
++-------------------------------------------------------------------------------+
+| PROJECT : PCO2                       MODULE  : PCO_UTIL                       |
+| STATE   : code                       ROUTINE : interprete_hexdump             |
++-------------------------------------------------------------------------------+
+
+  PURPOSE : tries to interprete a given string hexdump-like 
+            Example: 00 44 (23*00) 47 11
+
+  PARAMS:   dump   .. string containing hexdump
+            buffer .. buffer to receive interpreted data
+            bsize  .. size of buffer
+            count  .. count of bytes writen to buffer
+
+  RETURNS:  0 .. success
+           -1 .. buffer to small
+           -2 .. invalid hexdump
+
+*/
+int interprete_hexdump(const char *dump, void* buffer, unsigned bsize, unsigned& count);
+
+
+/*
++-------------------------------------------------------------------------------+
+| PROJECT : PCO2                       MODULE  : PCO_UTIL                       |
+| STATE   : code                       ROUTINE : get_time_hmsm                  |
++-------------------------------------------------------------------------------+
+
+  PURPOSE : calculates the current time in ms 
+            (hour, minute, second and ms are taken into account)
+
+  RETURNS:  current time in milliseconds
+
+*/
+ULONG get_time_hmsm();
+
+/*
++-------------------------------------------------------------------------------+
+| PROJECT : PCO2                       MODULE  : PCO_UTIL                       |
+| STATE   : code                       ROUTINE : get_dll_size                   |
++-------------------------------------------------------------------------------+
+
+  PURPOSE : calculates the actual count of bytes used in a given DLL-file
+
+  PARAMS:   dll_fname .. name of dll-file
+
+  RETURNS:  count of bytes used, 0 if file is no WIN32-DLL
+
+*/
+ULONG get_dll_size(const char* dll_fname);
+
+
+#endif /* _PCO_UTIL_H_ */
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/pco_view_core.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,225 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  PCO2
+|  Modul   :  PCO_VIEW_CORE
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  This Modul contains the core viewer class
+|             with basic functions and handlers for several PCO control 
+|             messages.
+|             It is intended to be specialized and extended, e.g. in 
+|             GUI-server-applications.
+|             Some member functions are totally virtual without any 
+|             standard body and have to be provided by the child class !
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef _PCO_VIEW_CORE_H_
+#define _PCO_VIEW_CORE_H_
+
+/*==== INCLUDES ===================================================*/
+#ifndef PCO_VIEW_CORE_CPP
+#include "pco_view_templ.h"
+#else
+#include "view/pco_view_templ.h"
+#endif
+#include "pco_inifile.h"
+
+/*==== DEFINES =====================================================*/
+
+/*==== PROTOTYPES ==================================================*/
+
+/*==== CLASSES =====================================================*/
+class PCOView_core : public PCOView_templ
+{
+public:
+  PCOView_core(const char* ini_file, int& err,
+      const char* primq_name="", const char* ctrlq_name="");
+  virtual ~PCOView_core();
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_CTRL_CORE                  |
+  | STATE   : code                       ROUTINE : PCOView_core::dispatch_message           |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : parses a PCO control message
+    PARAMS:   buf   ... the data
+              size   .. size of buf
+              id    ... id of the message
+              sender .. queue name of sender
+
+    RETURNS:   0 .. if message has been handled
+              -1 .. otherwise
+
+  */
+  virtual int dispatch_message(void* buf, U16 size, U16 id, const char* sender);
+
+  
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_CTRL_CORE                  |
+  | STATE   : code                       ROUTINE : PCOView_core::interpret_message|
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : here interpretation of received raw data takes place
+              (has to be implemented by derived classes !)
+
+    PARAMS:   buffer  .. raw data to be interpretated
+              bufsize .. size of buffer
+              data    .. actual data
+              size    .. size of data
+              id      .. id of data message
+              index   .. index of data message (e.g. in logfile) ... 0 means no index!!
+              ttype   .. type of time stamp - see PCO_TTYPE_XXX constants
+              time    .. time stamp 
+              sender  .. name of sender
+              receiver.. name of original receiver
+
+    RETURNS:   0 .. success
+              -1 .. interpretation was not possible
+
+  */
+  virtual int interpret_message(void* buffer, U16 bufsize, 
+    void* &data, U16 &size, ULONG &id, ULONG& index, ULONG& ttype, U32 &time, 
+    char* &sender, char* &receiver) {return -1;}
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_CORE                  |
+  | STATE   : code                       ROUTINE : PCOView_core::on_data          |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : here reaction to received data takes place
+              (has to be implemented by derived classes !)
+
+    PARAMS:   data   .. the data
+              size   .. size of data
+              id     .. id of data message
+              index  .. index of data message (e.g. in logfile) ... 0 means no index!!
+              ttype  .. type of time stamp - see PCO_TTYPE_XXX constants
+              time   .. time stamp 
+              sender .. name of sender
+              receiver.. name of original receiver
+
+  */
+  virtual void on_data(void* data, U16 size, ULONG id, ULONG index,
+    ULONG ttype, U32 time, const char* sender, char* receiver) {}
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_CORE                  |
+  | STATE   : code                       ROUTINE : PCOView_core::on_raw_data      |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : here reaction to the raw data just as received from server takes place
+              (may be implemented by derived classes)
+              if interpretation succeeded it will be called AFTER on_data(), otherwise
+              only on_raw_data() is called
+
+    PARAMS:   rawdata  .. the data
+              rawsize  .. size of data
+
+  */
+  virtual void on_raw_data(void* rawdata, U16 rawsize) {}
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_CORE                  |
+  | STATE   : code                       ROUTINE : PCOView_core::on_corrupt_data  |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : this function is called if corrupt data has been received
+              deriving viewers may, e.g., release semaphores
+
+    PARAMS:   
+  */
+  virtual void on_corrupt_data() {}
+
+  /*
+  +----------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_CORE                     |
+  | STATE   : code                       ROUTINE : PCOView_core::propagate_inichange |
+  +----------------------------------------------------------------------------------+
+
+    PURPOSE : saves ini-file and sends an information about important ini-file changes
+              to the server, which will propagate it to all connected viewers
+
+    PARAMS:   
+
+    RETURNS:  0 .. sucess
+              -1 .. Server not found
+              -2 .. error while contacting Server 
+  */
+  int propagate_inichange();
+
+  /*
+  +--------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_CORE                   |
+  | STATE   : code                       ROUTINE : PCOView_core::self_trace        |
+  +--------------------------------------------------------------------------------+
+
+    PURPOSE : adds a new trace string to the queue of this viewer
+              (has to be implemented by derived classes !)
+
+    PARAMS:   
+
+  */
+  virtual void self_trace(const char* trace)=0;
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_CORE                  |
+  | STATE   : code                       ROUTINE : PCOView_core::on_inichange     |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : reloads important changes from ini-file
+
+    PARAMS:   
+
+  */
+  virtual void on_inichange();
+
+  bool  running() const {return m_running;}
+
+  int dsize() const { return m_dsize;}
+  int qsize() const { return m_qsize;}
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_CORE                  |
+  | STATE   : code                       ROUTINE : PCOView_core::shutdown         |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : exits the viewer threads
+
+    PARAMS:   
+
+  */
+  void shutdown();
+
+  virtual IniFile&	inifile() { return m_inifile;}
+  virtual const IniFile&	inifile() const { return m_inifile;}
+
+protected:
+  CMS_HANDLE	m_prim_handle,m_ctrl_handle;
+  bool  m_running;
+
+  IniFile         m_inifile;
+  int             m_qsize, m_dsize;
+
+  static  void cms_prim_proc(long view);
+  static  void cms_ctrl_proc(long view);
+};
+
+#endif /* _PCO_VIEW_CORE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/pco_view_framesupp.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,426 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  PCO2
+|  Modul   :  PCO_VIEW_FRAMESUPP
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  This Modul contains a viewer class derived directly from the
+|             core.
+|             It supports decoding of frame SYST_MESSAGEs and of LTS-Header/
+|             TIF-ASCII-DATA-messages.
+|             It is still intended to be specialized and extended, e.g. in 
+|             GUI-server-applications.
+|             Some member functions are totally virtual without any 
+|             standard body and have to be provided by the child class !
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef _PCO_VIEW_FRAMESUPP_H_
+#define _PCO_VIEW_FRAMESUPP_H_
+
+/*==== INCLUDES ===================================================*/
+#ifndef PCO_VIEW_FRAMESUPP_CPP_CCD
+#include "pco_view_core.h"
+#else
+#include "view/pco_view_core.h"
+#endif
+
+#ifdef USE_CCD
+extern "C" 
+{
+#include "ccdtable.h"
+#include "ccddata.h"
+}
+#include "ccdedit.h"
+#include "view/pco_pdi.h"
+#endif /* USE_CCD */
+
+#include <time.h>
+
+/*==== DEFINES =====================================================*/
+#define PCO_STR2IND_NOT_LOADED  0
+#define PCO_STR2IND_AUTO_LOADED 1
+#define PCO_STR2IND_MAN_LOADED  2
+#define PCO_STR2IND_SEARCHING   3
+
+/*==== PROTOTYPES ==================================================*/
+
+/*==== CLASSES =====================================================*/
+class PCOView_frameSupp : public PCOView_core
+{
+public:
+  PCOView_frameSupp(const char* ini_file, int& err,
+                    const char* primq_name="", 
+                    const char* ctrlq_name="");
+  virtual ~PCOView_frameSupp();
+
+  /*
+  +-------------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP                   |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::interpret_message |
+  +-------------------------------------------------------------------------------------+
+
+    PURPOSE : here interpretation of received raw data takes place
+              (has to be implemented by derived classes !)
+
+    PARAMS:   buffer  .. raw data to be interpretated
+              bufsize .. size of buffer
+              data    .. actual data
+              size    .. size of data
+              id      .. id of data message
+              index   .. index of data message (e.g. in logfile) ... 0 means no index!!
+              ttype   .. type of time stamp - see PCO_TTYPE_XXX constants
+              time    .. time stamp 
+              sender  .. name of sender
+              receiver.. name of original receiver
+
+    RETURNS:   0 .. success
+              -1 .. interpretation was not possible
+
+  */
+  virtual int interpret_message(void* buffer, U16 bufsize, 
+    void* &data, U16 &size, ULONG &id, ULONG& index, ULONG& ttype, U32 &time, 
+    char* &sender, char* &receiver);
+
+  /*
+  +--------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP              |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::on_connected |
+  +--------------------------------------------------------------------------------+
+
+    PURPOSE : reaction to PCO_CONNECTED from server
+
+    PARAMS:   buf   .. data containing server type
+              sender .. server queue name
+
+    RETURNS:   0 .. server type supported
+              -1 .. server type not supported
+            
+  */
+  virtual int on_connected(const void *buf,const char* sender);
+
+  /*
+  +--------------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP                    |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::decode_tracestring |
+  +--------------------------------------------------------------------------------------+
+
+    PURPOSE : tries to decode an OPC in the tracestring (e.g. $<OPC>)
+
+    PARAMS:   instr  .. original tracestring
+              size   .. max size for outstr
+
+    RETURNS:   0 .. success (outstr contains new tracestring)
+              -1 .. no success while decoding
+              -2 .. no decoding necessary
+
+              lastOPC .. in case of success contains last opc found in instr
+            
+  */
+  int decode_tracestring(const char* instr, char* outstr, U16 size, ULONG &lastOPC);
+
+  /*
+  +-----------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_CTRL_FRAMESUPP                 |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::check_version   |
+  +-----------------------------------------------------------------------------------+
+
+    PURPOSE : tries to request the version of a running stack via the server
+              -> will result in a SYST-trace starting with '&'
+
+    PARAMS:   
+
+    RETURNS:  0 .. sucess
+              -1 .. Server not found
+              -2 .. error while contacting Server 
+          
+  */
+  int check_version();
+
+  /*
+  +--------------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_CTRL_FRAMESUPP                    |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::check_communication|
+  +--------------------------------------------------------------------------------------+
+
+    PURPOSE : tries to send a system primitive to the running stack via the server
+              -> will result in SYST-traces if communication is ok
+
+    PARAMS:   
+
+    RETURNS:  0 .. sucess
+              -1 .. Server not found
+              -2 .. error while contacting Server 
+          
+  */
+  int check_communication();
+
+  /*
+  +--------------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP                    |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::decode_ccd_msg     |
+  +--------------------------------------------------------------------------------------+
+
+    PURPOSE : tries to decode a given encoded air message
+
+    PARAMS:   decinfo     ... T_PDI_CCDMSG stuct (see pdi.h),
+                              contains the coded sdu and info about, e.g., msg-type
+              decoded_msg ... buffer which will receive the decoded struct
+
+    RETURNS:  ccdOK, ccdWarning .. sucess
+              ccdError          .. error while decoding
+        
+  */
+  int decode_ccd_msg(const void* decinfo, UBYTE **decoded_msg);
+
+  /*
+  +------------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP                  |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::free_ccd_msg     |
+  +------------------------------------------------------------------------------------+
+
+    PURPOSE : frees a msg structure previously allocated using decode_ccd_msg
+    
+    PARAMS:   decoded_msg ... buffer with decoded air message structure
+
+    RETURNS:  
+
+  */
+  void free_ccd_msg(void * decoded_msg);
+
+  /*
+  +--------------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP                    |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::load_str2ind_table |
+  +--------------------------------------------------------------------------------------+
+
+    PURPOSE : tries to explicitely load a str2ind-table
+
+    PARAMS:   tname ... name of .tab-file
+
+    RETURNS:  0  .. sucess
+              -1 .. error while loading
+        
+  */
+  int load_str2ind_table(const char* tname);
+
+  /*
+  +--------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP              |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::on_inichange |
+  +--------------------------------------------------------------------------------+
+
+    PURPOSE : reloads important changes from ini-file
+
+    PARAMS:   
+
+  */
+  virtual void on_inichange();
+
+  /*
+  +--------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP              |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::self_trace   |
+  +--------------------------------------------------------------------------------+
+
+    PURPOSE : adds a new trace string to the queue of this viewer
+
+    PARAMS:   
+
+  */
+  virtual void self_trace(const char* trace);
+
+  /*
+  +--------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP              |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::send_syscmd  |
+  +--------------------------------------------------------------------------------+
+
+    PURPOSE : tries to send a FRAME system command to the server 
+              who will forward it to a connected protocol stack
+    
+    PARAMS:   receiver ... receiver of the command
+              cmd      ... the actual command (e.g. "TRACECLASS FF") 
+
+    RETURNS:  0 .. sucess
+              -1 .. Server not found
+              -2 .. error while contacting Server 
+
+  */
+  int send_syscmd(const char* receiver, const char* cmd);
+
+  /*
+  +--------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP              |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::init_ccddata |
+  +--------------------------------------------------------------------------------+
+
+    PURPOSE : initialize ccddata from the given path
+
+    PARAMS:   ccddata_path ... path of the ccddata library
+                               (if NULL path will be loaded from ini-file)
+              force        ... 0..keep ccddata-lib loaded if there is one
+                               1..exchange evtl. existing ccddata-lib 
+              write        ... 1..write new path to ini file if force is 1
+                               0..dont write new path to ini file 
+
+    RETURNS:  0 .. success
+             -1 .. error
+
+  */
+  int init_ccddata(const char* ccddata_path=NULL, 
+                   int force=0, int write=1);
+
+  /*
+  +--------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP              |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::exit_ccddata |
+  +--------------------------------------------------------------------------------+
+
+    PURPOSE : deinitializied ccddata 
+
+    PARAMS:   
+
+    RETURNS:  0 .. success
+             -1 .. error
+
+  */
+  int exit_ccddata();
+
+  /*
+  +------------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP                  |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::collect_pdi_data |
+  +------------------------------------------------------------------------------------+
+
+    PURPOSE : run through primitive top-level elements and call pdi_getDecodeInfo to 
+              collect all potential infos for decoding an evtl. contained aim
+
+    PARAMS:   prim_data        ... data of primitive
+              filterinfo_data  ... data that holds filter info for the primitive
+              handle           ... open handle for parsing the primitive
+
+    RETURNS:  
+
+  */
+  void collect_pdi_data(const char* prim_data, const char* filterinfo_data, T_CCDE_HANDLE handle);
+
+  /*
+  +--------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP              |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::elem_present |
+  +--------------------------------------------------------------------------------+
+
+    PURPOSE : check if element is present in specified primtive
+
+    PARAMS:   filterinfo_data  ... data that holds filter info for the primitive
+              filterinfo_value ... buffer to receive filter info data for current element
+              handle           ... open handle for parsing the primitive
+              desc             ... current descriptor for parsing the primitive
+
+    RETURNS:  1  ... present
+              0  ... not present
+              -1 ... error while calling read_elem
+
+  */
+  int elem_present(const char* filterinfo_data, char* filterinfo_value, T_CCDE_HANDLE handle, T_CCDE_ELEM_DESCR desc);
+
+  /*
+  +------------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP                  |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::decode_pcon_prim |
+  +------------------------------------------------------------------------------------+
+
+    PURPOSE : if necessary tries to decode the given primitive using PCON
+    
+    PARAMS:   opc          ... primitive opc
+              coded_prim   ... data of original prim
+              decoded_prim ... buffer which will point to the decoded prim
+              decoded_len  ... length of decoded_prim buffer (without evtl. pointed to data areas)
+              filterinfo_prim
+                           ... buffer which will be evtl. filled with a filterinfo shadow prim
+                               containing only 0x00-s or 0xff-s per element
+                               (in default case a NULL pointer is returned)
+              errstr       ... will be filled with an error string in case of PCON error 
+                               (if NULL, no string will be written, 
+                                otherwise a buffer with min 500 bytes has to be provided!)
+
+    RETURNS:  PCON_OK       .. PCON sucessfully applied
+              PCON_NOT_PRES .. PCON was not necessary
+              PCON_XXX      .. error occured during PCON operation (see constants in pcon.h) 
+
+  */
+  int decode_pcon_prim(ULONG opc, void * coded_prim, void ** decoded_prim, ULONG * decoded_len,
+                       void ** filterinfo_prim, char* errstr=NULL);
+
+  /*
+  +------------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_FRAMESUPP                  |
+  | STATE   : code                       ROUTINE : PCOView_frameSupp::free_pcon_prim   |
+  +------------------------------------------------------------------------------------+
+
+    PURPOSE : frees a primitive previously allocated using decode_pcon_prim
+    
+    PARAMS:   decoded_prim ... buffer with decoded prim
+
+    RETURNS:  
+
+  */
+  void free_pcon_prim(void * decoded_prim);
+
+  int pcon() const { return m_pcon;}
+  int set_pcon(int pcon);
+
+  bool ccddata_loaded(const char* ccddata_path=NULL); 
+  const char* ccddata_path() const;
+
+  const char* ind2str_dir() const { return m_ind2str_dir;}
+  void set_ind2str_dir(const char* dir);
+
+  int ind2str_loaded() const { return m_ind2str_loaded;}
+  int unload_str2ind_table();
+  void cancel_str2ind_search() { m_str2ind_continue_search=false;}
+
+  long ind2str_version() const { return m_ind2str_version;}
+  const char* ind2str_file() const { return m_ind2str_file;}
+
+  static long read_elem_save (T_CCDE_HANDLE     * handle,
+                              void              * cstruct,
+                              T_CCDE_ELEM_DESCR * edescr,
+                              UBYTE             * value);
+
+  static USHORT prim_first_save (T_CCDE_HANDLE      * phandle,
+                                 ULONG                primcode,
+                                 char               * name);
+
+  static USHORT prim_next_save (T_CCDE_HANDLE      *phandle,
+                                UBYTE               descent,
+                                T_CCDE_ELEM_DESCR  *pdescr);
+
+protected:
+	time_t  m_str2ind_time;
+  bool    m_show_str2ind_errors;
+	char    m_ind2str_dir[MAX_PATH+1];
+  int     m_ind2str_loaded;
+  char    m_ind2str_file[MAX_PATH+1];
+  long    m_ind2str_version;
+  bool    m_ccddata_attached;
+  char    m_tracestr_buf[DATA_MSG_MAX_SIZE+1];
+  bool    m_str2ind_continue_search;
+  int     m_pcon;
+
+  void  (*m_ccddata_init_notify)(void); 
+  void  (*m_ccddata_exit_notify)(void); 
+};
+
+#endif /* _PCO_VIEW_FRAMESUPP_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/pco_view_templ.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,341 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  PCO2
+|  Modul   :  PCO_VIEW_TEMPLATE
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  This Modul contains a template of a PCO viewer class
+|             with basic functions for several PCO control messages.
+|             It can either be used just to connect to a PCO server or
+|             can be specialized and extended like in PCOView_templ.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef _PCO_VIEW_TEMPL_H_
+#define _PCO_VIEW_TEMPL_H_
+
+/*==== INCLUDES ===================================================*/
+#include "pco_const.h"
+
+/*==== DEFINES =====================================================*/
+
+/*==== PROTOTYPES ==================================================*/
+
+/*==== CLASSES =====================================================*/
+class PCOView_templ 
+{
+public:
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::PCOView_templ   |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : initilizes viewer process
+
+    PARAMS:   primq .. name of primitive queue
+              ctrlq .. name of control queue
+
+    RETURNS:  
+            
+  */
+  PCOView_templ(const char* primq_name="", const char* ctrlq_name="");
+  virtual ~PCOView_templ();
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::connect                    |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : tries to connect with server
+
+    PARAMS:   
+
+    RETURNS:  0 .. sucess
+              -1 .. Server not found
+              -2 .. error while contacting Server 
+            
+  */
+  int connect(void);
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::subscribe       |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : tries to subscribe for live data from server
+
+    PARAMS:   mobileId .. name of mobile to receive live data from (may be empty)
+
+    RETURNS:  0 .. sucess
+              -1 .. Server not found
+              -2 .. error while contacting Server 
+            
+  */
+  int subscribe(const char* mobileId);
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::send2srv        |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : tries to send a data buffer to the server
+
+    PARAMS:   buf ... pointer to buffer
+              size .. size of buffer
+              id  ... message id
+
+    RETURNS:  0 .. sucess
+              -1 .. Server not found
+              -2 .. error while contacting Server 
+            
+  */
+  int send2srv(void* buf, U16 size, U16 id);
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::disconnect                 |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : tries to disconnect from server
+
+    PARAMS:   
+
+    RETURNS:  0 .. sucess
+              -1 .. Server not found
+              -2 .. error while contacting Server 
+            
+  */
+  int disconnect(void);
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::unsubscribe     |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : tries to unsubscribe from livedata stream from server
+
+    PARAMS:   
+
+    RETURNS:  0 .. sucess
+              -1 .. Server not found
+              -2 .. error while contacting Server 
+            
+  */
+  int unsubscribe(void);
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::on_connected    |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : reaction to PCO_CONNECTED from server
+
+    PARAMS:   buf   .. data containing server type
+              sender .. server queue name
+
+    RETURNS:   0 .. server type supported
+              -1 .. server type not supported
+            
+  */
+  virtual int on_connected(const void *buf,const char* sender);
+
+  /*
+  +---------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                   |
+  | STATE   : code                       ROUTINE : PCOView_templ::req_logfile_info  |
+  +---------------------------------------------------------------------------------+
+
+    PURPOSE : contacts server to request info about a specified logfile
+
+    PARAMS:   fname .. name of logfile (can be full path)
+
+    RETURNS:  0 .. sucess
+              -1 .. Server not found
+              -2 .. error while contacting Server 
+            
+  */
+  int req_logfile_info(const char* fname);
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::get_logdata     |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : contacts server to request logged data
+
+    PARAMS:   begin, end .. index area requested 
+
+    RETURNS:  0 .. sucess
+              -1 .. Server not found
+              -2 .. error while contacting Server 
+            
+  */
+  int get_logdata(ULONG begin, ULONG end);
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::open_logfile    |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : contacts server to request logged data from a specified logfile
+
+    PARAMS:   fname .. name of logfile (full path)
+              begin, end .. index area requested 
+
+    RETURNS:  0 .. sucess
+              -1 .. Server not found
+              -2 .. error while contacting Server 
+            
+  */
+  int open_logfile(const char* fname, ULONG begin=0, ULONG end=0);
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::set_filter      |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : contacts server to change filter settings
+
+    PARAMS:   list ..     '\0'-separated list of names of entitities 
+                          (terminated by "\0\0")
+                          primitives/traces from entities in -list- 
+                            should not be forwarded
+
+              prim_trace  
+                      .. parameter to disable/enable general forwarding of
+                          primitives/traces:
+                         0 .. fowarding of everything (default)
+                         1 .. no primitives
+                         2 .. no traces
+              positiv_list 
+                      .. if true, only primitives/traces from entities in -list- 
+                         will be forwarded
+
+    RETURNS:  0 .. sucess
+              -1 .. Server not found
+              -2 .. error while contacting Server 
+          
+  */
+  int set_filter(const char* list, char prim_trace=0, bool positiv_list=false);
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::self_send       |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : tries to send a data buffer to the control queue of this viewer
+
+    PARAMS:   buf ... pointer to buffer
+              size .. size of buffer
+              id  ... message id
+
+    RETURNS:  0  .. sucess
+              -1 .. receiver not found
+              -2 .. error while contacting receiver 
+            
+  */
+  int self_send(void* buf, U16 size, U16 id);
+
+  const char *primq_name() { return m_primq_name;}
+  const char *ctrlq_name() { return m_ctrlq_name;}
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::start_logfile   |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : contacts server to start logging data received in the given queue
+              into the given logfile
+
+    PARAMS:   logfile   .. name of the logfile 
+                           (if no path is given the current server-path is used)
+              queue     .. name of the queue the server shall receive data
+                           (it will be created by the server)
+                           (if no queue is given, m_ctrlq_name+"_LF" is used)
+
+    RETURNS:  0  .. sucess
+              -1 .. receiver not found
+              -2 .. error while contacting receiver 
+  */
+  int start_logfile(const char* logfile, const char* queue=NULL);
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::stop_logfile    |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : contacts server to stop logging data received in the given queue
+
+    PARAMS:   queue     .. name of the queue the server received data
+                           (if no queue is given, m_ctrlq_name+"_LF" is used)
+
+    RETURNS:  0  .. sucess
+              -1 .. receiver not found
+              -2 .. error while contacting receiver 
+  */
+  int stop_logfile(const char* queue=NULL);
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::send_raw_data   |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : sends raw data to the given queue
+
+    PARAMS:   rawdata   .. the data
+              rawsize   .. size of rawdata
+              queue     .. name of the queue the data will be sent to
+                           (if no queue is given, m_ctrlq_name+"_LF" is used)
+
+    RETURNS:  0  .. sucess
+              -1 .. receiver not found
+              -2 .. error while contacting receiver 
+  */
+  int send_raw_data(const void* rawdata, U16 rawsize, const char* queue=NULL);
+
+  /*
+  +-------------------------------------------------------------------------------+
+  | PROJECT : PCO2                       MODULE  : PCO_VIEW_TEMPL                 |
+  | STATE   : code                       ROUTINE : PCOView_templ::set_srv_name    |
+  +-------------------------------------------------------------------------------+
+
+    PURPOSE : change the name of the server queue
+
+    PARAMS:   sname ... new name of server queue
+            
+  */
+  void set_srv_name(const char* sname);
+
+  U8    srv_type() const { return m_srv_type;}
+
+protected:
+  char  m_primq_name[MAX_QNAME_LEN+1],m_ctrlq_name[MAX_QNAME_LEN+1];
+  char  m_srvq_name[MAX_QNAME_LEN+1];
+  U8    m_srv_type;
+};
+
+#endif /* _PCO_VIEW_TEMPL_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/pcon.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,145 @@
+/*
++-----------------------------------------------------------------------------
+|  Project :
+|  Modul   : pcon.h
++-----------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose :  Condat Coder Decoder For Primitives
+|             Global function prototypes
++-----------------------------------------------------------------------------
+*/
+
+
+#ifndef PCON_H
+#define PCON_H
+
+#define PCON_LITTLE            1
+#define PCON_BIG               2
+
+#define PCON_OK              0
+#define PCON_INVALID_OPC     1      /* operation code of primitive not defined */
+#define PCON_INVALID_CNT     2      /* wrong number of entries of an variable long array */
+#define PCON_INVALID_OFFS    3      /* wrong sum of l_buf and o_buf of an sdu */
+#define PCON_INVALID_TYPE    4      /* wrong entry in pvar table */
+#define PCON_INVALID_INIT    5      /* wrong initialization */
+#define PCON_INVALID_UTAG    6      /* union controller too large */
+#define PCON_NO_MEM          7      /* out of memory */
+#define PCON_CCDDATA_ERROR   8      /* wrong ccddata format */
+#define PCON_INVALID_PTR     9      /* user supplied null pointer for a
+                                       mandatory element */
+#define PCON_INVALID_VALFLAG 10     /* user supplied valid flag that is neither
+                                       1 nor 0 */
+#define PCON_INVALID_VALUE   11     /* user supplied value for basetype not
+                                       defined in specification */
+#define PCON_INVALID_PATH    12     /* component path for prim not found */
+
+#define PCON_CONFIG_PRIM     23     /* primitive was for internal use of PCON,
+                                     * not to be relayed to stack
+                                     */
+#ifdef _TOOLS_
+#define PCON_DLLFUNC_ERROR   24      /* could not find a function in pcon.dll */
+#define PCON_STRING_END      25      /* command string end reached */
+#endif /* _TOOLS_ */
+
+#define PCON_NOT_PRES        0xFFFF
+#define PCON_NOT_INCL        0xFFFE
+
+#if !defined (CCDDATA_PREF)
+#if defined (_TOOLS_) && defined (CCDDATA_LOAD)
+#define CCDDATA_PREF(pcon_fun) cddl_##pcon_fun
+#else
+#define CCDDATA_PREF(pcon_fun) pcon_fun
+#endif /* _TOOLS_ && CCDDATA_LOAD */
+#endif /* !CCDDATA_PREF */
+
+typedef struct
+{
+#ifdef _TOOLS_
+  ULONG (*init_prim_coding) (T_HANDLE, UBYTE);
+  ULONG (*decode_prim)      (ULONG, void **, void *, ULONG *, ULONG);
+  ULONG (*code_prim)        (ULONG, void *, void **, ULONG *, ULONG, char*);
+  ULONG (*make_filter)      (char *, void **);
+#else
+  ULONG (*init_prim_coding) (T_HANDLE, UBYTE);
+  ULONG (*decode_prim)      (ULONG, void **, void *, ULONG *, ULONG);
+  ULONG (*code_prim)        (ULONG, void *, void **, ULONG *, ULONG, char*);
+  ULONG (*pcheck)           (ULONG, void *);
+#endif
+  int stack_offset;
+} T_PCON_PROPERTIES;
+
+typedef struct
+{
+  USHORT struct_level;  /* the substructure level within the structure, where
+                         * the counting started from */
+  USHORT cnt_sub_elems; /* the counter of structure subelements */
+  BOOL   count_subs ;   /* flag whether sub elements should be counted */
+} T_SUB_ELEM_COUNT;
+
+#define PCON_STACK_OFFSET   3072
+
+
+#ifndef PCON_C
+/*
+ * function prototypes
+ */
+extern ULONG CCDDATA_PREF(pcon_init_prim_coding)(T_HANDLE caller, UBYTE format);
+
+extern ULONG CCDDATA_PREF(pcon_decodePrim) (ULONG opc,
+                                            void ** decoded_prim,
+                                            void * coded_prim,
+                                            ULONG * length,
+                                            ULONG woff);
+
+extern ULONG CCDDATA_PREF(pcon_codePrim)  (ULONG opc,
+                                           void * decoded_prim,
+                                           void ** coded_prim,
+                                           ULONG * length,
+                                           ULONG woff,
+                                           char* receiver);
+
+#ifdef _TOOLS_
+extern ULONG CCDDATA_PREF(pcon_init_ccddata)(void);
+/*
+ * The format for the command string in pcon_make_filter is:
+ * [<receiver> [<opc>|<primname> [+|-<elem_pathnames>]]]
+ * With <elem_pathnames>: <elem_pathname>[,<elem_pathnames]
+ * and <elem_pathname> is the unique path of and element in a
+ * primitive, with the structure member names separated by '.'.
+ * Examples:
+ * "TAP ENT_FOO_IND +struct_3.elem_2,struct_1.substruct_0.elem_1" - Set filter
+ *   if primitive ENT_FOO_IND if sent to TAP for the two elements elem_2 in
+ *   struct_3 and elem_1 in substruct_0 in struct_1.
+ * "TAP 800000AF1 +struct_3.elem_2,struct_1.substruct_0.elem_1" - same for given
+ *   opc instead of prim name.
+ * "TAP ENT_FOO_IND -struct_3.elem_2,struct_1.substruct_0.elem_1" - Set filter
+ *   for all other elements than two given here
+ * "TAP ENT_FOO_IND" - Delete filter setting for primitive ENT_FOO_IND
+ *   sent to TAP
+ * "TAP" - Delete all filter settings for any primitive sent to TAP
+ * "" - Delete all filter settings
+ */
+extern ULONG CCDDATA_PREF(pcon_make_filter)(char* string, void** prim);
+extern ULONG CCDDATA_PREF(pcon_filter_decode_prim) (ULONG opc,
+                                                    void** decoded_prim,
+                                                    void* coded_prim,
+                                                    ULONG* length,
+                                                    ULONG woff,
+                                                    void** shadow_prim);
+#else
+extern ULONG pcon_pcheck  (ULONG opc, void * decoded_prim);
+#endif /* _TOOLS_ */
+
+#endif /* !PCON_C */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/pdi.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,158 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   :  pdi.h
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef __PDI_H__
+#define __PDI_H__
+
+/*==== INCLUDES =============================================================*/
+#include "typedefs.h"
+#include "ccdapi.h"
+
+/*==== CONSTANTS =============================================================*/
+#define PD_XX                     1
+#define PD_CC                     3
+#define PD_MM                     5
+#define PD_RR                     6
+#define PD_GMM                    8
+#define PD_SMS                    9
+#define PD_SS                     11
+#define PD_SM                     10
+#define PD_TST                    15
+
+#define PDI_MAXDECODEINFOATTRIB  128
+#define PDI_MAXDECODEINFOPRIM    128
+#define PDI_MAXDECODEINFOENTITY  128
+#define PDI_MAXPMEMFORMTYPE       23
+
+#define PDI_DECODETYPE_L3PDU              0
+#define PDI_DECODETYPE_L3PDU_N            1
+#define PDI_DECODETYPE_SAPI               2
+#define PDI_DECODETYPE_NOPD               3
+#define PDI_DECODETYPE_NOPD_NOTYPE        4
+#define PDI_DECODETYPE_NOPD_N             5
+#define PDI_DECODETYPE_NOPD_NOTYPE_N      6
+#define PDI_DECODETYPE_RR_SHORT           7
+#define PDI_DECODETYPE_MAC_H              8
+#define PDI_DECODETYPE_MAC_H_N            9
+#define PDI_DECODETYPE_MAC_H_CHECK       10
+#define PDI_DECODETYPE_MAC_H_N_CHECK     11
+#define PDI_DECODETYPE_AIM               12
+#define PDI_DECODETYPE_AIM_N             13
+#define PDI_DECODETYPE_AIM_CHECK         14
+#define PDI_DECODETYPE_AIM_N_CHECK       15
+
+#define PDI_DLL_ERROR             -2
+
+/* returned decoding info */
+typedef struct
+{
+  UBYTE         entity;
+  UBYTE         dir;
+  unsigned char pd;
+  unsigned char ti;
+  T_MSGBUF      *mbuf;
+  UBYTE         msg_type;
+} T_PDI_CCDMSG;
+
+typedef int (*T_pdi_prepare_ccdmsg)(T_PDI_CCDMSG* ccdmsg, ULONG values[], int len);
+
+typedef struct
+{
+  char  type;
+  char  attrib[PDI_MAXDECODEINFOATTRIB];
+  char  prim[PDI_MAXDECODEINFOPRIM];
+  char  entity[PDI_MAXDECODEINFOENTITY];
+  UBYTE msg_type;
+  T_pdi_prepare_ccdmsg pdi_prepare_ccdmsg;
+  char** primmbr;
+} T_PDI_DECODEINFO;
+
+
+/*
+ *   internal context data
+ */
+typedef short T_PDI_PdEntityTable[16];
+typedef struct
+{
+  T_PDI_PdEntityTable PdEntityTable;
+  T_PDI_DECODEINFO***  PrimDecodeInfo;
+
+  T_PDI_DECODEINFO *dinfo;
+  USHORT sap;
+  USHORT opc;
+  UBYTE  dir;
+  USHORT pmtx;
+
+  unsigned char sapi;
+  ULONG mtypeval[PDI_MAXPMEMFORMTYPE];
+  int   mtypenum;
+  UBYTE* mi_length;
+} T_PDI_CONTEXT;
+
+typedef struct
+{
+  enum {PDI_NONE, PDI_CCDMSG} decodetype;
+  union _pdi
+  {
+    T_PDI_CCDMSG  ccdmsg;
+  } pdi;
+} T_PDI;
+
+
+#if !defined (CCDDATA_PREF)
+#if defined (_WIN32_) && defined (CCDDATA_LOAD)
+#define CCDDATA_PREF(pdi_fun) cddl_##pdi_fun
+#else
+#define CCDDATA_PREF(pdi_fun) pdi_fun
+#endif /* _WIN32_ && CCDDATA_LOAD */
+#endif /* !CCDDATA_PREF */
+
+/*
+ *   create new default context
+ */
+T_PDI_CONTEXT* CCDDATA_PREF(pdi_createDefContext)();
+
+/*
+ *   create new context
+ */
+T_PDI_CONTEXT* CCDDATA_PREF(pdi_createContext)(const T_PDI_DECODEINFO *dinfop, unsigned int dicount);
+
+/*
+ *   destroy context
+ */
+void CCDDATA_PREF(pdi_destroyContext)(T_PDI_CONTEXT *context);
+
+/*
+ *   mark the begin of a new primitive
+ */
+void CCDDATA_PREF(pdi_startPrim)(T_PDI_CONTEXT *context, ULONG opc);
+
+/*
+ *   returns extended decode information for a given
+ *   ccdedit element descriptor
+ */
+void CCDDATA_PREF(pdi_getDecodeInfo)(T_PDI_CONTEXT *context, const char *ename,
+                       char *evalue, int evlen, T_PDI *decinfo);
+
+short CCDDATA_PREF(pdi_getEntityByPD)(const T_PDI_CONTEXT *context, unsigned char pd);
+
+const char* CCDDATA_PREF(pdi_pd2name)(unsigned char pd);
+
+#endif // __PDI_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/pei.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,85 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       pei.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Protocol Entity Interface exported definitions.
++----------------------------------------------------------------------------- 
+*/ 
+
+
+#ifndef __PEI_H__
+#define __PEI_H__
+
+/*==== INCLUDES ============================================================*/
+
+#include <stddef.h>
+
+/*==== CONSTANTS ===========================================================*/
+
+#define PEI_OK         0
+#define PEI_ERROR   (-1)
+
+/*==== TYPES ===============================================================*/
+
+typedef int    T_PEI_RETURN;
+typedef char * T_PEI_CONFIG;
+typedef void   T_PEI_MONITOR;
+
+/*
+ * types and macros for pei-jumptable processing
+ */
+
+#define PALLOC_TRANSITION  /* to reinsert the sdu pointer in pei_primitive */
+#define NO_COPY_ROUTING    /* has to be set for frame version > 2.5.0 */
+
+  /*
+   * for definitions of jumptables
+   */
+typedef void   (*T_VOID_FUNC)();
+typedef short  (*T_SHORT_FUNC)();
+
+typedef struct { T_VOID_FUNC func; size_t size; size_t soff; ULONG opc; } T_FUNC;
+#define MAK_FUNC_S(FUNC,OPC) { (T_VOID_FUNC)FUNC, sizeof(T_##OPC), offsetof(T_##OPC,sdu), OPC }
+#define MAK_FUNC_0(FUNC,OPC) { (T_VOID_FUNC)FUNC, sizeof(T_##OPC), 0                    , OPC }
+#define MAK_FUNC_N(FUNC,OPC) { (T_VOID_FUNC)FUNC, 0              , 0                    , 0   }
+
+#define TAB_SIZE(T) (sizeof T / sizeof *T)
+
+typedef struct
+{
+  SHORT (*pei_init)(T_HANDLE);
+  SHORT (*pei_exit)(void);
+  SHORT (*pei_primitive)(void*);
+  SHORT (*pei_timeout)(USHORT);
+  SHORT (*pei_signal)(ULONG,void*);
+  SHORT (*pei_run)(T_HANDLE,T_HANDLE);
+  SHORT (*pei_config)(char*);
+  SHORT (*pei_monitor)(void**);
+} T_PEI_FUNC;
+
+
+typedef struct                                         
+{
+  char const *Name;
+  T_PEI_FUNC PeiTable;
+  ULONG      StackSize;
+  USHORT     QueueEntries;
+  USHORT     Priority;
+  USHORT   	 NumOfTimers;
+  U32        Flags;
+} T_PEI_INFO;
+
+
+#endif /* __PEI_H__ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/prf_func.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,53 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       prf_func.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Profiler API and types.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef __PRF_FUNC_H__
+#define __PRF_FUNC_H__
+
+/*==== CONSTANTS ==================================================*/
+
+#define PRF_INITIALIZED   0xAFFEDEAD
+
+/*==== TYPES ======================================================*/
+
+typedef struct
+{
+  unsigned int magic_nr;
+  void (*log_entity_create)(void * entity,const char * name);      
+  void (*log_entity_delete)(void * entity);      
+  void (*log_entity_activate)(void * entity);    
+  void (*log_function_entry)(void * function);     
+  void (*log_function_exit)(void * function);      
+  void (*log_point_of_interest)(const char * poi); 
+} T_PROFILER_FUNC;
+
+/*==== PROTOTYPES =================================================*/
+
+void prf_init ( void );
+void prf_register ( T_PROFILER_FUNC * func );
+void prf_log_entity_create ( void * entity, const char * name );
+void prf_log_entity_delete ( void * entity );
+void prf_log_entity_activate ( void * entity );
+void prf_log_function_entry ( void * function );
+void prf_log_function_exit ( void * function );
+void prf_log_point_of_interest ( const char * poi );
+
+
+#endif /* __PRF_FUNC_H__ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/printtofile.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,40 @@
+/*
++------------------------------------------------------------------------------
+|  File:       printtofile.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++------------------------------------------------------------------------------
+| Purpose:    Definitions for the TST internal header 
++------------------------------------------------------------------------------
+*/
+
+#ifndef PRINTTOFILE_H
+#define PRINTTOFILE_H
+
+/*==== INCLUDES =============================================================*/
+
+
+/*==== CONSTS ===============================================================*/
+
+
+/*==== TYPES =================================================================*/
+
+
+
+/*==== EXPORTS ===============================================================*/
+
+void initPrintToFile();
+int PrintToFile( const char *format, ... );
+
+
+
+#endif /* !PRINTTOFILE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/pub_L1_misc_enter.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,111 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       pub_L1_misc_enter.h
++------------------------------------------------------------------------------
+|  Copyright 2004 Texas Instruments Deutschland GmbH
+|                 All rights reserved.
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Deutschland GmbH.
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Deutschland GmbH.
++------------------------------------------------------------------------------
+| Purpose:    Check the SrcFileTime of the ccdgen generated header files at link time.
+|
+|             The macros in this file help to detect version mismatch between 
+|             header files included for build of different libraries. 
+|             Example of a linker error: 
+|             xx_tdc_3_constraints.obj : error LNK2001: 
+|             unresolved external symbol 
+|             "char  BadLibVersionCheck____P_XX_TDC_3_VAL_H____Thu_Dec_12_17_49_56_2002" 
+|             (?BadLibVersionCheck____P_XX_TDC_3_VAL_H____Thu_Dec_12_17_49_56_2002@@3DA)
+|             \gpf\util\teststack\bin\test_xx_tdc\xx_tdc.dll : 
+|                                  fatal error LNK1120: 1 unresolved externals
+|             Error executing link.exe.
+| 
+|             The first group of macros (protected by PUB_L1_MISC_ENTER) are necessary 
+|             to build the strings of type "BadLibVersionCheck__xxx".
+|  
+|             They need in turn other macros which are set in the *.h files of 
+|             cdginc, tdcinc or message_san.h directory.
+|             (e.g. PUB_L1_MISC_ENTER__M_XX_VAL_H__FILE_TYPE) 
+|
+|             The check is done only for the header files where 
+|             ENABLE__PUB_L1_MISC_ENTER__SANITY_CHECK is switched on.
+|
++------------------------------------------------------------------------------
+*/
+
+#ifndef PUB_L1_MISC_ENTER
+#define PUB_L1_MISC_ENTER
+
+
+/* we need a 2 stage approach to expand A and B before concatting them */
+#define PUB_L1_MISC_ENTER_CONCATx(A,B) A##B
+#define PUB_L1_MISC_ENTER_CONCAT(A,B) PUB_L1_MISC_ENTER_CONCATx(A,B)
+#define PUB_L1_MISC_ENTER_CONCAT3x(A,B,C) A##B##C
+#define PUB_L1_MISC_ENTER_CONCAT3(A,B,C) PUB_L1_MISC_ENTER_CONCAT3x(A,B,C)
+#define PUB_L1_MISC_ENTER_CONCAT4x(A,B,C,D) A##B##C##D
+#define PUB_L1_MISC_ENTER_CONCAT4(A,B,C,D) PUB_L1_MISC_ENTER_CONCAT4x(A,B,C,D)
+
+/* we need a 2 stage approach to expand A before stringifying it */
+#define PUB_L1_MISC_ENTER_STRINGx(A) #A
+#define PUB_L1_MISC_ENTER_STRING(A) PUB_L1_MISC_ENTER_STRINGx(A)
+
+#define PUB_L1_MISC_ENTER_GET_PRAGMA(PRAGMA) PUB_L1_MISC_ENTER_CONCAT3(PUB_L1_MISC_ENTER_,PUB_L1_MISC_ENTER__FILENAME,__##PRAGMA)
+
+
+#define PUB_L1_MISC_ENTER_GET_FILE_TYPE PUB_L1_MISC_ENTER_CONCAT(PUB_L1_MISC_ENTER_FILE_TYPE__,PUB_L1_MISC_ENTER_GET_PRAGMA(FILE_TYPE))
+
+#define PUB_L1_MISC_ENTER_SANITY_NAME PUB_L1_MISC_ENTER_CONCAT4(BadLibVersionCheck___,PUB_L1_MISC_ENTER__FILENAME,___,PUB_L1_MISC_ENTER_GET_PRAGMA(SRC_FILE_TIME))
+
+
+/* create an enumerate sequence of the known file types so we can test which one we have with a '#if A == B' line */
+#define PUB_L1_MISC_ENTER_FILE_TYPE__CDGINC 1
+#define PUB_L1_MISC_ENTER_FILE_TYPE__TDCINC 2
+#define PUB_L1_MISC_ENTER_FILE_TYPE__TDCINC_DSC 3
+#define PUB_L1_MISC_ENTER_FILE_TYPE__TDCINC_MAIN 4
+#endif 
+
+/*
+ * The check will be done only for files where 
+ * ENABLE__PUB_L1_MISC_ENTER__SANITY_CHECK is switched on.
+ */
+#if (PUB_L1_MISC_ENTER_GET_FILE_TYPE == PUB_L1_MISC_ENTER_FILE_TYPE__TDCINC) 
+#define ENABLE__PUB_L1_MISC_ENTER__SANITY_CHECK 
+#endif
+
+#ifdef PUB_L1_MISC_ENTER_DEBUG
+#pragma message (PUB_L1_MISC_ENTER_STRING(PUB_L1_MISC_ENTER__FILENAME))
+#pragma message (PUB_L1_MISC_ENTER_STRING(PUB_L1_MISC_ENTER_SANITY_NAME))
+#pragma message (PUB_L1_MISC_ENTER_STRING(PUB_L1_MISC_ENTER_GET_FILE_TYPE))
+#endif
+
+#ifdef ENABLE__PUB_L1_MISC_ENTER__SANITY_CHECK 
+  #ifdef PUB_L1_MISC_ENTER_DEFINE_SANITY
+
+  char PUB_L1_MISC_ENTER_SANITY_NAME;
+  #else
+    #ifdef PUB_L1_MISC_ENTER_DEBUG
+    #pragma message (PUB_L1_MISC_ENTER_STRING(PUB_L1_MISC_ENTER_CONCAT(BadLibVersionCheck___,PUB_L1_MISC_ENTER__FILENAME)))
+    #endif
+  /* This part goes into 
+    every stack file using the ccdgen generated files (one for each used file)
+
+    expands to e.g. 
+      extern char BadLibVersionCheck____P_XX_TDC_3_VAL_H____Thu_Dec_12_17_49_56_2002
+  */
+  extern char PUB_L1_MISC_ENTER_SANITY_NAME;
+  /* Originally it was this but since no one actually uses this stuff (we only have 
+    it for the linker to check that versions match) we can save memory by only 
+    storing the 8 lower bits.
+
+    expands to e.g. 
+      static char BadLibVersionCheck____P_XX_TDC_3_VAL_H = (char)(&BadLibVersionCheck____P_XX_TDC_3_VAL_H____Thu_Dec_12_17_49_56_2002);
+  */
+  static char PUB_L1_MISC_ENTER_CONCAT(BadLibVersionCheck___,PUB_L1_MISC_ENTER__FILENAME) = (char)(&PUB_L1_MISC_ENTER_SANITY_NAME);
+  #endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/pub_L1_misc_leave.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,24 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       pub_L1_misc_leave.h
++------------------------------------------------------------------------------
+|  Copyright 2004 Texas Instruments Deutschland GmbH
+|                 All rights reserved.
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Deutschland GmbH.
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Deutschland GmbH.
++------------------------------------------------------------------------------
+| Purpose:    Epilog file for autogenerated files
+|
++------------------------------------------------------------------------------
+*/
+
+
+#ifdef PUB_L1_MISC_ENTER__WARNING_OFF
+  #error this stuff has been removed from \gpf\inc\pub_L1_misc_enter.h
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/remu.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,105 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       rivbridge_api.h
++------------------------------------------------------------------------------
+|  Copyright 2003 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for the rivbridge api.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef REMU_H
+#define REMU_H
+
+/*==== CONSTANTS ============================================================*/
+
+#define RIV_MEMORY_POOL 1
+
+#define rvf_add_to_timer_list  gsp_add_to_timer_list  
+#define rvf_change_callback_func gsp_change_callback_func 
+#define rvf_count_buf gsp_count_buf 
+#define rvf_create_legacy_task  gsp_create_legacy_task  
+#define rvf_create_mb gsp_create_mb 
+#define rvf_create_task  gsp_create_task  
+#define rvf_delay gsp_delay 
+#define rvf_delete_mb gsp_delete_mb 
+#define rvf_delete_mutex gsp_delete_mutex 
+#define rvf_dequeue   gsp_dequeue   
+#define rvf_dump_mem gsp_dump_mem 
+#define rvf_dump_pool gsp_dump_pool 
+#define rvf_dump_tasks gsp_dump_tasks 
+#define rvf_enqueue  gsp_enqueue  
+#define rvf_enqueue_head  gsp_enqueue_head  
+#define rvf_evt_wait gsp_evt_wait 
+#define rvf_exit_task gsp_exit_task 
+#define rvf_free_buf gsp_free_buf 
+#define rvf_free_msg    gsp_free_msg    
+#define rvf_free_timer_msg   gsp_free_timer_msg   
+#define rvf_get_buf gsp_get_buf 
+#define rvf_get_buf_size  gsp_get_buf_size  
+#define rvf_get_context gsp_get_context 
+#define rvf_get_expired_entry  gsp_get_expired_entry  
+#define rvf_get_mb_id gsp_get_mb_id 
+#define rvf_get_mb_param gsp_get_mb_param 
+#define rvf_get_mb_status gsp_get_mb_status 
+#define rvf_get_mb_unused_mem gsp_get_mb_unused_mem 
+#define rvf_get_msg_buf    gsp_get_msg_buf    
+#define rvf_get_protected_buf gsp_get_protected_buf 
+#define rvf_get_taskid gsp_get_taskid 
+#define rvf_get_taskname gsp_get_taskname 
+#define rvf_get_tick_count gsp_get_tick_count 
+#define rvf_get_time_stamp gsp_get_time_stamp 
+#define rvf_init gsp_init 
+#define rvf_init_timer_list  gsp_init_timer_list  
+#define rvf_init_timer_list_entry  gsp_init_timer_list_entry  
+#define rvf_initialize_mutex gsp_initialize_mutex 
+#define rvf_lock_mutex gsp_lock_mutex 
+#define rvf_mb_is_used gsp_mb_is_used 
+#define rvf_read_addr_mbox  gsp_read_addr_mbox  
+#define rvf_read_mbox   gsp_read_mbox   
+#define rvf_remove_from_queue  gsp_remove_from_queue  
+#define rvf_remove_from_timer_list  gsp_remove_from_timer_list  
+#define rvf_resume_task gsp_resume_task 
+#define rvf_scan_next  gsp_scan_next  
+#define rvf_send_event  gsp_send_event  
+#define rvf_send_msg    gsp_send_msg    
+#define rvf_send_trace1 gsp_send_trace1
+#define rvf_set_callback_func gsp_set_callback_func 
+#define rvf_set_mb_param gsp_set_mb_param 
+#define rvf_start_timer gsp_start_timer 
+#define rvf_stop_timer  gsp_stop_timer  
+#define rvf_suspend_task gsp_suspend_task 
+#define rvf_unlock_mutex gsp_unlock_mutex 
+#define rvf_update_timer_list  gsp_update_timer_list  
+#define rvf_wait gsp_wait 
+#define rvf_wait_for_specific_msg gsp_wait_for_specific_msg 
+
+/* not really a riviera frame function, but seems to be needed */
+#define rvt_set_trace_level gsp_set_trace_level
+
+/*==== INCLUDES =============================================================*/
+
+#include "rvf_original_api.h"
+
+/*==== TYPES ================================================================*/
+
+typedef UINT8 * T_RVT_BUFFER;
+
+/*==== PROTOTYPES ===========================================================*/
+
+extern UINT8 gsp_trace_level;
+extern UINT32 gsp_layer_mask;
+
+/*==== MACROS ===============================================================*/
+
+
+#endif /* remu_H */        
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/stddefs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,176 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       stddefs.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Old frame standard definitions.
++----------------------------------------------------------------------------- 
+*/ 
+
+
+#ifndef __STDDEFS_H__
+#define __STDDEFS_H__
+
+#ifndef OLD_FRAME
+ #ifndef NEW_FRAME
+  #define NEW_FRAME
+ #endif
+#endif
+
+/*==== CONSTANTS ==================================================*/
+
+#define FALSE  0
+#define TRUE   1
+
+#define BIT123  0x07
+#define BIT4    0x08
+#define BIT78   0xC0
+
+#if defined (USE_DLL)
+  #ifdef WIN32
+    #define EXPORT __declspec (dllexport)
+    #define IMPORT __declspec (dllimport)
+  #endif
+#else
+  #define EXPORT GLOBAL
+  #define IMPORT EXTERN
+#endif
+
+#ifndef __cplusplus
+  #define EXTERN extern 
+#else 
+  #define EXTERN extern "C"
+#endif
+
+/* Horrible handling of GLOBAL and MAINFILE macros
+   Documented in BugTrak#DNCL-3PWCL3 */
+#ifdef L1_LIB
+  #ifdef L1_COM_C
+    #define GLOBAL 
+    #define MAINFILE 1
+  #else
+    #ifndef __cplusplus   
+      #define GLOBAL extern 
+    #else 
+      #define GLOBAL extern "C"
+    #endif
+  #endif
+#else
+  #define GLOBAL
+#endif
+
+#define LOCAL   static
+
+#define AND &&
+#define OR  ||
+#define XOR(A,B) ((!(A) AND (B)) OR ((A) AND !(B)))
+
+#define EQ  ==
+#define NEQ !=
+
+#ifndef NULL
+#define NULL    0
+#endif
+/*==== TYPES ======================================================*/
+#ifndef WIN32
+  typedef char           BYTE;
+#else
+  typedef unsigned char  BYTE;
+#endif
+
+#if !defined (NUCLEUS)
+typedef char           CHAR;
+#endif
+
+
+
+typedef long           LONG;
+typedef unsigned char  UBYTE;
+typedef unsigned char  UCHAR;
+typedef unsigned short USHORT;
+typedef unsigned long  ULONG;
+typedef unsigned short UINT16;
+typedef unsigned long  UINT32;
+typedef unsigned short UNSIGNED16;
+
+typedef unsigned long T_VOID_STRUCT;
+
+#ifndef L1_LIB
+typedef short          SHORT;
+#ifdef WIN32
+  typedef int            BOOL;
+#else
+  typedef UBYTE          BOOL;
+#endif
+#endif
+
+#if !defined (T_SDU_DEFINED)
+
+#define T_SDU_DEFINED
+
+typedef struct
+{
+  USHORT l_buf;
+  USHORT o_buf;
+  UBYTE  buf[1];
+} T_sdu;
+
+#endif /* T_SDU_DEFINED */
+
+
+#if !defined (T_FRAME_DESC_DEFINED)
+
+#define T_FRAME_DESC_DEFINED
+
+typedef struct 
+{
+  UBYTE  *Adr[2];
+  USHORT  Len[2];
+} T_FRAME_DESC;
+
+#endif /* T_FRAME_DESC_DEFINED */
+
+
+/*
+ * for definitions of jumptables
+ */
+#ifndef NEW_ENTITY
+ typedef void   (*T_VOID_FUNC)();
+ typedef short  (*T_SHORT_FUNC)();
+#endif
+typedef USHORT (*T_USHORT_FUNC)();
+
+/* SDU_TRAIL denotes the memory size starting at 'buf' to the end of T_sdu */
+
+#define  SDU_TRAIL  ((char*)(((T_sdu*)0)+1)-(char*)(((T_sdu*)0)->buf))
+
+/*==== EXPORT =====================================================*/
+#define MAXIMUM(A,B) (((A)>(B))?(A):(B))
+
+#define MINIMUM(A,B) (((A)<(B))?(A):(B))
+
+#define _STR(x)  __STR(x)
+#define __STR(x) #x
+
+#define ALERT(CONDITION,TEXT) \
+        {														   \
+		   if (!(CONDITION))									   \
+		      ext_abort (#TEXT "\n" __FILE__ ", line " _STR(__LINE__)); \
+		}
+
+
+/*==== MISC =======================================================*/
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/tap.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,45 @@
+/*
++-----------------------------------------------------------------------------
+|  Project :
+|  Modul   : tap.h
++-----------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose : Headerfile containing exit codes of Tap.
++-----------------------------------------------------------------------------
+*/
+
+#ifndef TAP_H
+#define TAP_H
+
+/*==== INCLUDES =============================================================*/
+/*==== CONSTS ===============================================================*/
+
+#define TAP_PASSED        0
+#define TAP_CMD_LINE      1
+#define TAP_TC_NOT_FOUND  2
+#define TAP_TC_NO_INIT    3
+#define TAP_TC_VERSION    4
+#define TAP_SUI_CHECK     5
+#define TAP_FAILED        6
+#define TAP_EXCLUDED      7
+#define TAP_STACKSYNC     8
+#define TAP_TDC_SYNTAX    9
+#define TAP_TDC_INTERNAL 10
+#define TAP_CCDDATA_DLL  11
+#define TAP_STACK_ERR    12
+#define TAP_STACK_WARN   13
+#define TAP_TC_CRASH     14
+#define TAP_UNKNOWN       99
+/*==== TYPES ================================================================*/
+/*==== EXPORTS ==============================================================*/
+#endif /* !TAP_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/tdc.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,39 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   : TDC
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  
++----------------------------------------------------------------------------- 
+*/ 
+#ifdef TDC_H
+#error "TDC.H already included, TDC.H must come after all primitives and messages"
+#endif
+
+#include <setjmp.h>
+
+//namespace tdc {
+#include "tdc_prim.h"
+
+#ifndef TDC_H
+#define TDC_H
+
+#ifndef TDC_DESCRIPTOR
+static int tdc_initialized_primitive = T_PRIMITIVE_UNION::call_tdc_initialize_primitive();
+static int tdc_initialized_message = T_MESSAGE_UNION::call_tdc_initialize_message();
+#endif //TDC_DESCRIPTOR
+
+#endif //TDC_H
+//}//namespace tdc
+//using namespace tdc;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/tdc_base.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,4827 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   : TDC
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  
++----------------------------------------------------------------------------- 
+*/ 
+
+#if defined TDC_PRECOMPILE && !defined TDC_BASE_TDC_H
+#pragma message("TDC_BASE.H ENTERING PRECOMPILE MODE")
+/*
+  This code is added to make a prettier and easier to navigate .i-file
+  Purpose:
+    A)  maintain info of which macro codes come from
+    B)  maintain line breaks from inside macros
+
+ 	The process include the following steps:
+
+  1:
+    Command:
+      perl tdc_h.pl ..\..\..\..\INC\tdc_base.h >tdc_base.tdc_h
+      (add TDC_BEGIN_MACRO TDC_NL TDC_MACRO_END TDC_NL macros)
+
+    Example transformation:
+      Input: (tdc_base.h) 
+*/
+        #define MULTI_LINE_MACRO(A) ... \
+          ... \
+          ...
+        #define SINGLE_LINE_MACRO(A) ...
+/*
+      Output: (tdc_base.tdc_h)
+        #define MULTI_LINE_MACRO(A) TDC_BEGIN_MACRO(MULTI_LINE_MACRO(A)) ... TDC_NL\
+          ... TDC_NL\
+          ... TDC_MACRO_END()
+        #define SINGLE_LINE_MACRO(A) TDC_MACRO(SINGLE_LINE_MACRO(A)) ...
+  2:
+    Command:
+      EDI preprocess .cpp-file with TDC and TDC_PRECOMPILE defined
+      (as a consequence tdc_base.tdc_h is used instead of tdc_base.h)
+
+    Example transformation:
+      Input: (use_some_macro.cpp)
+        MULTI_LINE_MACRO(B)
+      Output: (use_some_macro.i)
+        TDC_BEGIN_MACRO("MULTI_LINE_MACRO(B)") ... TDC_NL ... TDC_NL ... TDC_MACRO_END()
+
+  3:
+    Command:
+      perl tdc_i.pl .\tdc.i >tdc.tdc_i
+      (replace TDC_NL with real newline, make pretty indention
+
+    Example transformation:
+      Input: (use_some_macro.i)
+        TDC_BEGIN_MACRO("MULTI_LINE_MACRO(B)") ... TDC_NL ... TDC_NL ... TDC_MACRO_END
+    Output: (use_some_macro.tdc_i)
+      TDC_BEGIN_MACRO("MULTI_LINE_MACRO(B)") ... 
+        ... 
+        ... TDC_MACRO_END()
+
+ */
+#define TDC_BASE_TDC_H
+#include "tdc_base.tdc_h"
+#endif //defined TDC_PRECOMPILE && !defined TDC_BASE_TDC_H
+
+#ifndef TDC_BASE_H // stadard h-file guard
+#define TDC_BASE_H
+
+//============================================================================
+/// \defgroup Configuration
+//\{
+
+///memory leak detection
+#define noTDC_USE_ALLOC_DEBUG_COUNTER 
+
+#define TDC_DEBUG
+
+#define TDC_NO_PROFILING
+
+///include T_PORT
+#define TDC_PORT
+
+#define noM_TDC_MESSAGE_DEMO
+
+///typeinfo not needed, everything we need is in cccdgen tables
+#define noTDC_TYPEINFO 
+
+///never defined
+#define noDOT_COMPLETE 
+
+//\}
+
+//============================================================================
+// include files
+//============================================================================
+
+//tdc_test_header_begin
+//extern int dummy_to_make_namespace_non_empty;
+//} //temporare leave namespace tdc 
+#ifndef TDC_TEST_I_CPP
+#include <setjmp.h>
+#include <stddef.h>
+#include <typeinfo.h>
+#include <malloc.h>
+#include <string.h>
+#endif
+//namespace tdc { // reenter namespace tdc 
+
+//============================================================================
+// controling warning levels from compilers
+//============================================================================
+
+#pragma warning(disable:4786)
+//tdc_test_header_end
+
+/*
+  general info members are constructed etc by generic functions so these are normal ok when
+  arriving inside M_TDC_... :
+    Warning 1539: member 'T_raw::handle' (line 3242, file M:\gpf\inc\tdc_base.h, module M:\gpf\util\tap\tdc\src\tdc_lib_main.cpp) not assigned by assignment operator
+    Warning 1401: member 'T_raw::handle' (line 3242, file M:\gpf\inc\tdc_base.h, module M:\gpf\util\tap\tdc\src\tdc_lib_main.cpp) not initialized by constructor
+ */
+
+/*lint -e1717*/ //Info 1717: empty prototype for function declaration, assumed '(void)'
+/*lint -e1505*/ //TODO: add access specifier for all base classes
+/*lint -DLINT*/
+/*lint -esym(18,BUF_*)*/ //CCDGEN generates surplus typedefs for _dsc.h-files
+/*#lint -libdir(M:\gpf\util\teststack\inc\tdcinc)*/
+/*#lint -libh(M:\gpf\util\teststack\inc\tdcinc\p_xx_tdc_1.h)*/
+
+/// this lint option is used inside a macro, VA can not handle comments in macros correctly
+#define TDC_LINT_UNUSED_MEMBER /*lint -e{754}*/
+#define TDC_LINT_UNASSIGNED_MEMBER /*lint -e{1539}*/
+#define TDC_LINT_UNCOPIED_BASE /*lint -e{1538}*/
+#define TDC_LINT_NO_SELFASSIGN_TEST /*lint -e{1529}*/
+#define TDC_LINT_UNINITIALIZED_MEMBER /*lint -e{1401}*/
+#define TDC_LINT_POSSIBLE_UNHANDLE_POINTER_MEMBER /*lint -e{1740}*/
+
+//============================================================================
+/// \defgroup Constants
+//============================================================================
+//\{
+
+#define FALSE 0
+#define TRUE  1
+
+/// TDSConstant comming from macros.h -> used in cc.doc
+#define NOT_PRESENT_8BIT 0xff
+
+/// TDSConstant comming from macros.h -> used in cc.doc
+#define NOT_PRESENT_16BIT 0xffff
+
+/// TDSConstant comming from macros.h -> used in cc.doc
+#define NOT_PRESENT_32BIT 0xffffffffL
+
+//\}
+
+//============================================================================
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_0
+{
+  int i0;
+};
+
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1
+{
+  int i;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_0 operator->(){}
+};
+
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1A()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s.
+    i;
+  s-> 
+    i0;
+}
+#else
+#endif
+
+//============================================================================
+// partial compiling tdcinc\*.cpp 
+//============================================================================
+
+/** VC6 can not handle more than 30000 types per compilation unit, but this 
+    has not so much to do with this, here we are trying to minimize the overall
+    memory usage during compilation, this is a problem for the umts asn1 file
+    the big isue is that determin this number is not an excat sicense since
+    VC give NO hint on whic entry is coursing this problem if it ocour during
+    pass2 of the compilation 
+
+    to overcome this problem CCDGEN generate additional gaurds in tdcinc\*.cpp files
+
+    enum form
+
+      #if TDC_ENUM_PART
+      #ifndef TDC_SKIP_FORWARD_MENUM_prefix_enumtypename
+      M_TDC_POST_MENUM (prefix_enumtypename)
+      #endif
+      #endif // TDC_ENUM_PART
+
+    other form (example is for MSG but PRIM, STRUCT, UNION etc. use the same layout)
+
+      #if N / TDC_SIZE == TDC_PART
+      #ifndef TDC_SKIP_FORWARD_msgname
+      M_TDC_POST_MSG (msgname)
+      #endif
+      #endif // N / TDC_SIZE == TDC_PART 
+
+    where N is a sequence number running from 0 and onwards, incremented by 1 for
+    each struct in the file
+
+    by defining TDC_SIZE and TDC_PART the source files can be partial compiled
+    the default behaviour is to compile the hole file at once
+
+*/
+
+#ifndef TDC_PART
+#define TDC_SIZE 99999L // number of structs per compilation 
+#define TDC_PART 0L // which struct part to compile in this session
+#define TDC_ENUM_PART 1 // if enum part is to be compiled in this session
+#elif TDC_PART == -1
+#define TDC_ENUM_PART 1 // if enum part is to be compiled in this session
+#else
+#define TDC_ENUM_PART 0 // if enum part is to be compiled in this session
+#endif
+
+//============================================================================
+// configuration side effects
+//============================================================================
+
+#ifndef TDC_DESCRIPTOR
+
+#define NO_TDC_DESCRIPTOR
+
+#else //TDC_DESCRIPTOR
+
+#define __T_TDC_INTERFACE_MESSAGE__
+#define __T_TDC_INTERFACE_PRIMITIVE__
+
+#endif //TDC_DESCRIPTOR
+
+//============================================================================
+/// \defgroup dot_complete helper macros
+//============================================================================
+//\{
+
+#if DOT_COMPLETE
+#define TDC_DOT_COMPLETE_HIDE(code) \
+  /* nothing */
+struct T_TDC_EMPTY {};
+#else//DOT_COMPLETE
+#define TDC_DOT_COMPLETE_HIDE(code) \
+  code
+#endif//DOT_COMPLETE
+
+//\}
+
+//============================================================================
+// 
+//============================================================================
+
+///tdc_test_header_begin
+#ifndef M_TDC_DOC
+#if DOT_COMPLETE
+
+	void TDC_NOTHING() {} // generate code for breakpoint 
+	size_t TDC_LENGTHOF(array) {}
+  void TDC_DYNAMIC_DEAD_CODE() {} // program execution is not suposed to reach this point
+
+#else //DOT_COMPLETE
+  
+  void tdc_nothing();
+  /** generate code for breakpoint */
+  #define TDC_NOTHING() \
+    tdc_nothing()
+
+  #define TDC_DYNAMIC_DEAD_CODE() tdc_dynamic_dead_code() // program execution is not suposed to reach this point
+
+
+  #define TDC_LENGTHOF(array) (size_t(sizeof array / sizeof *array))
+
+  #define M_TDC_STRING1(text) #text 
+  /** expand macros before stringify */
+  #define M_TDC_STRING(text) M_TDC_STRING1(text) 
+
+#endif //DOT_COMPLETE
+#endif //M_TDC_DOC
+
+// macro to show pragma message with file name and line number when compiling (see M_TDC_MESSAGE_DEMO below)
+//#define M_TDC_MESSAGE(text) message(__FILE__ "(" M_TDC_STRING(__LINE__) ") : message: \'" text "\'") 
+#define M_TDC_MESSAGE(text) message(__FILE__ "(" M_TDC_STRING(__LINE__) ") : message: \'" M_TDC_STRING(text) "\'") 
+#ifdef M_TDC_MESSAGE_DEMO
+// e.g. show how a macro is expanded
+#define MY(X) MY_##X
+#pragma M_TDC_MESSAGE(M_TDC_STRING(MY(Y))) 
+// compiler output: \gpf\inc\tdc_base.h(130) : message: 'MY_Y'
+#endif
+  
+/// \defgroup IN_CLASS values for IN_CLASS macro argument
+//\{
+#define M_TDC_IN_CLASS(code) code
+#define M_TDC_NOT_IN_CLASS(code) 
+#define M_TDC_NOT_M_TDC_IN_CLASS(code) 
+#define M_TDC_NOT_M_TDC_NOT_IN_CLASS(code) code
+//\}
+
+/// \defgroup WITH_BODY values for WITH_BODY macro argument 
+//\{
+#define M_TDC_WITH_BODY(code) code
+#define M_TDC_WITHOUT_BODY(code) ;
+//\}
+
+/// temporary removed multiline comments in multiline macros 
+/// <pre>(some compilers have problems with constructions like:
+///   #define MY_MACRO() /* \\
+///     my comment */ my_code
+/// )</pre>
+#define M_TDC_COMMENT(code) ;
+
+  
+/// \defgroup MacroTesting
+/** for testing macros
+ *  these macros is only used when tdc.dsw has the active project set to "tdc_lib - Win32 Precompile"
+ */
+//\{
+#define TDC_MACRO_BEGIN_(name,line)
+#define TDC_MACRO_(name,line) 
+#define TDC_MACRO_END_()
+//\}
+
+// /tdc_test_header_end
+
+#ifndef USE_TDC_TEST_I_II// during testing we see this part in the preprocessed file tdc_test_i.ii
+
+struct T_TDC_BASE_DOT_COMPLETE_TEST
+{
+	int i; //HINT
+};
+
+#define TDC_TBD() tdc_tbd(__FILE__, __LINE__)
+
+#define TDC_ASSERT(condition) tdc_assert(condition,#condition,__FILE__,__LINE__)
+
+#ifndef TDC_DEBUG
+	#define IF_TDC_DEBUG(code)
+#else
+	#define IF_TDC_DEBUG(code) code
+#endif
+
+#ifndef TDC_TEST_PROFILE
+
+	#define TDC_PURE_BODY(code)\
+		= 0;
+
+#else
+
+	#define TDC_PURE_BODY(code)\
+		{\
+			tdc_pure_body();\
+			code\
+		}\
+
+#endif
+
+#if TDC_DEBUG_DOT_COMPLETE
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1C()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s.
+    i;
+}
+#else
+#endif
+
+void tdc_cursor_trace (char* file, int line, char* format, ...);
+void tdc_trace (char* format, ...);
+void __declspec(noreturn) tdc_trace_fail (char* format, ...); /*lint -sem(tdc_trace_fail,r_no)*/
+extern "C" void tdc_usi_trace (char* format, ...);
+void __declspec(noreturn) tdc_internal_error (char* format, ...); /*lint -sem(tdc_internal_error,r_no)*/
+void __declspec(noreturn) tdc_user_error (char* format, ...); /*lint -sem(tdc_user_error,r_no)*/
+void tdc_check_array_assignment(const void* that, const void* address);
+
+// some error reporting functions, which have no argument becourse they have to be called from a lot of places
+void __declspec(noreturn) tdc_tbd(char* file, int line); /*lint -sem(tdc_tbd,r_no)*/// this facility is yet to be defined i.e. implemented
+void __declspec(noreturn) tdc_tbd(char* message); /*lint -sem(tdc_tbd,r_no)*/// this facility is yet to be defined i.e. implemented
+
+void __declspec(noreturn) tdc_tbd_pointer_assignment_error();
+void __declspec(noreturn) tdc_tbd_array_assignment_error();
+void __declspec(noreturn) tdc_tbd_array_assignment_error_T_ARRAY();
+void __declspec(noreturn) tdc_tbd_xxx_constructor_call(char* message);
+void __declspec(noreturn) tdc_tbd_constructor_call(char* message);
+void __declspec(noreturn) tdc_tbd_primitive_union_constructor_call();
+void __declspec(noreturn) tdc_tbd_message_union_constructor_call();
+
+void tdc_pure_body();
+void tdc_dynamic_dead_code(); // program execution is not suposed to reach this point
+void tdc_missing_h_file(); // use of AIM/SAP not included
+void tdc_assert(int condition, char* message, char* file, int line);
+
+//============================================================================
+
+#if TDC_DEBUG_DOT_COMPLETE
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1D()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s.
+    i;
+}
+#else
+#endif
+
+//----------------------------------------------------------------------------
+
+//tdc_test_header_begin
+
+//----------------------------------------------------------------------------
+// 
+//----------------------------------------------------------------------------
+#ifdef M_TDC_DOC
+/*
+  The definitions in this sections is only present to be able to generate call graphs to be used 
+  in documentation (call graphs are generated with SourceInsight 3.5)
+*/
+/// \defgroup NamingScheme Naming convention template tree 
+//\{
+/// \callgraph
+#define BASE() MAIN() PART() 
+#define MAIN() all_unions() PRIM_and_MSG() XXX()
+#define all_unions() PRMITIVE_UNION() MESSAGE_UNION() 
+#define XXX() XXX_PRMITIVE_UNION() XXX_MESSAGE_UNION()
+#define PRIM_and_MSG() PRIM() MSG()
+#define PART() COMP() VAR()
+#define COMP() STRUCT() UNION()
+#define VAR() INT() ENUM()
+#define ENUM() PENUM() MENM()
+#define PRMITIVE_UNION() 
+#define MESSAGE_UNION()
+#define XXX_PRMITIVE_UNION() 
+#define XXX_MESSAGE_UNION()
+#define PRIM() 
+#define MSG() 
+#define STRUCT() PSTRUCT() MSTRUCT() 
+#define UNION() PUNION() PUNION()
+#define PSTRUCT() 
+#define MSTRUCT() 
+#define PUNION()
+#define PUNION()
+#define PENUM() 
+#define MENM()
+#define INT()
+//\}
+// base entries
+/*
+#define M_TDC_BASE\
+  M_TDC_FORWARD_BASE(SHORT_NAME, T_HANDLE)\
+  M_TDC_INSTANCE_ADDITIONAL_BASE(IN_CLASS, WITH_BODY, T_INTERFACE_, T_INSTANCE, T_HANDLE_)\
+  M_TDC_INTERFACE_ADDITIONAL_BASE(IN_CLASS, WITH_BODY, T_INTERFACE, T_INSTANCE_, T_HANDLE)\
+  M_TDC_DESCRIPTOR_ADDITIONAL_BASE(SHORT_NAME)\
+  M_TDC_FORWARD_BASE(SHORT_NAME, T_HANDLE)\
+ //*/
+//TDC keywords
+void TDC_keywords() 
+{
+  FAIL();
+  PASS();
+  SEND(primitive);
+  AWAIT(primitive);
+  START_TIMEOUT(timeout);
+  WAIT_TIMEOUT();
+  MUTE(timeout);
+  COMMAND(command);
+  TIMEOUT(timeout);
+  PARKING(enable);
+  ALT() //dummy "()"to force call graph 
+  {
+    ON(await);
+    OTHERWISE();
+  }
+  TRAP() //dummy "()"to force call graph
+  {
+  }
+  ONFAIL() //dummy "()"to force call graph
+  {
+  }
+}
+#endif
+//----------------------------------------------------------------------------
+
+#if DOT_COMPLETE_DEFINES
+
+#define CCC(COMMENT)
+
+//----------------------------------------------------------------------------
+// macros to generate dummy functions body
+//----------------------------------------------------------------------------
+
+#define M_TDC_TYPE_NAME\
+	//for(;;); /* no error for missing return */
+
+#define T_TDC_TYPE_NAME
+
+//----------------------------------------------------------------------------
+// macros to repeat stuff that is similar in many descriptor classes
+//----------------------------------------------------------------------------
+
+#define M_TDC_FORWARD_PRIM(SAP,SHORT_NAME)
+#define M_TDC_FORWARD_PSTRUCT(SHORT_NAME)
+#define M_TDC_FORWARD_PUNION(SHORT_NAME)
+#define M_TDC_FORWARD_SDU(SHORT_NAME)
+#define M_TDC_FORWARD_PENUM(SHORT_NAME)
+//-----
+#define M_TDC_FORWARD_MSG(SHORT_NAME)
+#define M_TDC_FORWARD_MSTRUCT(SHORT_NAME)
+#define M_TDC_FORWARD_MUNION(SHORT_NAME)
+#define M_TDC_FORWARD_MENUM(SHORT_NAME)
+//-----
+#define M_TDC_FORWARD_INT(SHORT_NAME)
+#define M_TDC_FORWARD_XXX_PRIMITIVE_UNION(SAP)
+#define M_TDC_FORWARD_XXX_MESSAGE_UNION(MSG)
+#define M_TDC_FORWARD_PRIMITIVE()
+#define M_TDC_FORWARD_MESSAGE()
+
+//----------------------------------------------------------------------------
+// macros to repeat stuff that is similar in many descriptor classes
+//----------------------------------------------------------------------------
+
+#define M_TDC_DESCRIPTOR_PRIM_ADDITIONAL(SHORT_NAME)
+#define M_TDC_DESCRIPTOR_PSTRUCT_ADDITIONAL(SHORT_NAME)
+#define M_TDC_DESCRIPTOR_PUNION_ADDITIONAL(SHORT_NAME)
+#define M_TDC_DESCRIPTOR_SDU_ADDITIONAL(SHORT_NAME)
+#define M_TDC_DESCRIPTOR_PENUM_ADDITIONAL(SHORT_NAME)
+//-----
+#define M_TDC_DESCRIPTOR_MSG_ADDITIONAL(SHORT_NAME)
+#define M_TDC_DESCRIPTOR_MSTRUCT_ADDITIONAL(SHORT_NAME)
+#define M_TDC_DESCRIPTOR_MUNION_ADDITIONAL(SHORT_NAME)
+#define M_TDC_DESCRIPTOR_MENUM_ADDITIONAL(SHORT_NAME)
+//-----
+#define M_TDC_DESCRIPTOR_INT_ADDITIONAL(SHORT_NAME)
+#define M_TDC_DESCRIPTOR_XXX_PRIMITIVE_UNION_ADDITIONAL(SAP)
+#define M_TDC_DESCRIPTOR_XXX_MESSAGE_UNION_ADDITIONAL(MSG)
+#define M_TDC_CREATE_DEFAULT_PRIMITIVE_DESCRIPTOR_CLASS(SAP)
+#define M_TDC_DESCRIPTOR_PRIMITIVE_ADDITIONAL()
+#define M_TDC_CREATE_DEFAULT_MESSAGE_DESCRIPTOR_CLASS(MSG)
+#define M_TDC_DESCRIPTOR_MESSAGE_ADDITIONAL()
+
+//----------------------------------------------------------------------------
+// macros to repeat stuff that is similar in many interface classes 
+//----------------------------------------------------------------------------
+
+#ifndef TDC_T_TDC_INTERFACE_DOT_COMPLETE_TEST 
+#define TDC_T_TDC_INTERFACE_DOT_COMPLETE_TEST
+struct T_TDC_INTERFACE_DOT_COMPLETE_TEST
+{
+	typedef char T_HANDLE; 
+};
+#endif //TDC_T_TDC_INTERFACE_DOT_COMPLETE_TEST 
+
+//-----
+#define M_TDC_INTERFACE_PRIM_ADDITIONAL(SHORT_NAME) /*nothing*/
+#define M_TDC_INTERFACE_PSTRUCT_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+#define M_TDC_INTERFACE_PUNION_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+#define M_TDC_INTERFACE_SDU_ADDITIONAL(SHORT_NAME) /*nothing*/
+#define M_TDC_INTERFACE_PENUM_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+//-----
+#define M_TDC_INTERFACE_MSG_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+#define M_TDC_INTERFACE_MSTRUCT_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+#define M_TDC_INTERFACE_MUNION_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+#define M_TDC_INTERFACE_MENUM_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+//-----
+#define M_TDC_INTERFACE_INT_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+#define M_TDC_INTERFACE_XXX_PRIMITIVE_UNION_ADDITIONAL(SAP,PREFIXED_SAP) /*nothing*/
+#define M_TDC_INTERFACE_XXX_MESSAGE_UNION_ADDITIONAL(MSG,PREFIXED_MSG) /*nothing*/
+#define M_TDC_CREATE_DEFAULT_PRIMITIVE_INTERFACE_CLASS(SAP) /*nothing*/
+#define M_TDC_INTERFACE_PRIMITIVE_ADDITIONAL() /*nothing*/
+#define M_TDC_CREATE_DEFAULT_MESSAGE_INTERFACE_CLASS(MSG) /*nothing*/
+#define M_TDC_INTERFACE_MESSAGE_ADDITIONAL() /*nothing*/
+
+//----------------------------------------------------------------------------
+// macros to repeat stuff that is similar in many instance classes 
+//----------------------------------------------------------------------------
+
+#define M_TDC_INSTANCE_PRIM_ADDITIONAL(SAP,SHORT_NAME) /*nothing*/
+#define M_TDC_INSTANCE_PSTRUCT_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+#define M_TDC_INSTANCE_PUNION_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+#define M_TDC_INSTANCE_SDU_ADDITIONAL(SHORT_NAME) /*nothing*/
+#define M_TDC_INSTANCE_PENUM_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+//-----
+#define M_TDC_INSTANCE_MSG_ADDITIONAL(MSG,SHORT_NAME) /*nothing*/
+#define M_TDC_INSTANCE_MSTRUCT_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+#define M_TDC_INSTANCE_MUNION_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+#define M_TDC_INSTANCE_MENUM_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME) /*nothing*/
+//-----
+#define M_TDC_INSTANCE_INT_ADDITIONAL(SHORT_NAME) /*nothing*/
+#define M_TDC_INSTANCE_XXX_PRIMITIVE_ADDITIONAL(SAP) /*nothing*/
+#define M_TDC_INSTANCE_XXX_MESSAGE_ADDITIONAL(MSG) /*nothing*/
+#define M_TDC_INSTANCE_PRIMITIVE_ADDITIONAL() /*nothing*/
+#define M_TDC_INSTANCE_MESSAGE_ADDITIONAL() /*nothing*/
+
+#else
+#endif
+
+//tdc_test_header_end
+
+#if DOT_COMPLETE_DEFINES
+#else //DOT_COMPLETE_DEFINES
+
+#ifndef TDC_KEEP_CCC
+#define CCC(COMMENT)
+#endif //TDC_KEEP_CCC
+
+//----------------------------------------------------------------------------
+// macros to control namespace
+//----------------------------------------------------------------------------
+
+#define M_TDC_ENTER() //TODO namespace TDC {
+#define M_TDC_LEAVE() //TODO }
+
+//----------------------------------------------------------------------------
+// macros to generate dummy functions body
+//----------------------------------------------------------------------------
+
+#define M_TDC_TYPE_NAME\
+	return T_TDC_TYPE_NAME();
+
+//#define T_TDC_TYPE_NAME M_TDC_HIDE(T_TDC_TYPE_NAME)
+
+//----------------------------------------------------------------------------
+// macros to hide templates from dot-completion 
+//----------------------------------------------------------------------------
+
+typedef char T_TDC_LEVEL;
+extern T_TDC_LEVEL tdc_level;
+
+//----------------------------------------------------------------------------
+// macros to repeat stuff that is similar in many descriptor classes
+//----------------------------------------------------------------------------
+
+#ifndef TDC_DESCRIPTOR
+
+
+#define M_TDC_FORWARD_BASE(SHORT_NAME,T_HANDLE)\
+  struct T_TDC_INTERFACE_##SHORT_NAME;\
+  T_TDC_INTERFACE_BASE* new_T_TDC_INTERFACE_##SHORT_NAME();\
+  struct T_HANDLE;\
+  T_TDC_HANDLE_BASE* new_##T_HANDLE();\
+
+#define M_TDC_FORWARD_COMP(SHORT_NAME,TDC_IS)\
+	M_TDC_FORWARD_BASE(SHORT_NAME, T_TDC_HANDLE_##SHORT_NAME)\
+
+#define M_TDC_FORWARD_VAR(SHORT_NAME)\
+	M_TDC_FORWARD_BASE(SHORT_NAME, T_TDC_DESCRIPTOR_##SHORT_NAME)\
+
+
+#define M_TDC_POST_BASE(SHORT_NAME,T_HANDLE)\
+  M_TDC_INTERFACE_ADDITIONAL_BASE (M_TDC_NOT_IN_CLASS, M_TDC_WITH_BODY, T_TDC_INTERFACE_##SHORT_NAME, T_##SHORT_NAME, T_HANDLE)\
+  M_TDC_INSTANCE_ADDITIONAL_BASE (M_TDC_NOT_IN_CLASS, M_TDC_WITH_BODY, T_TDC_INTERFACE_##SHORT_NAME, T_##SHORT_NAME, T_HANDLE)\
+
+#define M_TDC_POST_XXX(SHORT_NAME,TDC_IS)\
+  M_TDC_POST_BASE(SHORT_NAME, T_TDC_HANDLE_##SHORT_NAME)\
+
+#define M_TDC_POST_COMP(SHORT_NAME,TDC_IS)\
+  M_TDC_POST_BASE(SHORT_NAME, T_TDC_HANDLE_##SHORT_NAME)\
+
+#define M_TDC_POST_VAR(SHORT_NAME)\
+  M_TDC_POST_BASE(SHORT_NAME, T_TDC_DESCRIPTOR_##SHORT_NAME)\
+
+
+#else //TDC_DESCRIPTOR
+
+
+#define M_TDC_FORWARD_BASE(SHORT_NAME,T_HANDLE)\
+
+#define M_TDC_FORWARD_COMP(SHORT_NAME,TDC_IS)\
+  M_TDC_FORWARD_DESCRIPTOR_COMP(SHORT_NAME,TDC_IS)\
+
+// TODO:eliminate forwards: T_##SHORT_NAME and T_TDC_INTERFACE_##SHORT_NAME
+#define M_TDC_FORWARD_VAR(SHORT_NAME)\
+  M_TDC_FORWARD_BASE(SHORT_NAME,T_TDC_HANDLE_##SHORT_NAME)\
+  struct T_TDC_DESCRIPTOR_##SHORT_NAME;\
+  struct T_##SHORT_NAME;\
+  struct T_TDC_INTERFACE_##SHORT_NAME;\
+  typedef T_TDC_DESCRIPTOR_##SHORT_NAME T_TDC_HANDLE_##SHORT_NAME;\
+  T_TDC_HANDLE_BASE* new_T_TDC_DESCRIPTOR_##SHORT_NAME();\
+
+#define M_TDC_POST_DESCRIPTOR_BASE(SHORT_NAME,T_HANDLE)\
+  T_TDC_HANDLE_BASE* new_##T_HANDLE()\
+  {\
+    return new T_HANDLE;\
+  }\
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_6
+{
+  int i6;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+
+inline void dot_complete_test(){
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_6 tdc_debug_dot_complete__tdc_h;
+  tdc_debug_dot_complete__tdc_h. i6;
+  tdc_debug_dot_complete__tdc_h-> i;
+}
+#else
+#endif
+
+#define M_TDC_POST_XXX(SHORT_NAME,TDC_IS)\
+  M_TDC_POST_DESCRIPTOR_BASE(SHORT_NAME,T_TDC_HANDLE_##SHORT_NAME)\
+  T_TDC_DESCRIPTOR_BASE* new_T_TDC_DESCRIPTOR_##SHORT_NAME ()\
+  {\
+    return new T_TDC_DESCRIPTOR_##SHORT_NAME;\
+  }\
+
+#define M_TDC_POST_COMP(SHORT_NAME, TDC_IS)\
+  M_TDC_POST_DESCRIPTOR_COMP(SHORT_NAME, TDC_IS)\
+
+#define M_TDC_POST_VAR(SHORT_NAME)\
+  M_TDC_POST_DESCRIPTOR_BASE(SHORT_NAME, T_TDC_DESCRIPTOR_##SHORT_NAME)\
+  
+  
+#endif //TDC_DESCRIPTOR
+
+
+#define M_TDC_FORWARD_DESCRIPTOR_COMP(SHORT_NAME,TDC_IS)\
+  M_TDC_HANDLE(M_TDC_IN_CLASS,M_TDC_WITHOUT_BODY,SHORT_NAME,TDC_IS)\
+  
+#define M_TDC_POST_DESCRIPTOR_COMP(SHORT_NAME, TDC_IS)\
+  M_TDC_POST_DESCRIPTOR_BASE(SHORT_NAME,T_TDC_HANDLE_##SHORT_NAME)\
+  T_TDC_DESCRIPTOR_BASE* T_TDC_HANDLE_##SHORT_NAME::implement_new_descriptor () const\
+  {\
+    return new T_TDC_DESCRIPTOR_##SHORT_NAME;\
+  }\
+  M_TDC_HANDLE_ADDITIONAL(M_TDC_NOT_IN_CLASS,M_TDC_WITH_BODY,T_TDC_HANDLE_##SHORT_NAME,SHORT_NAME,TDC_IS)\
+
+  
+/*lint -emacro(1706,M_TDC_HANDLE_ADDITIONAL)*/ //we don't want M_TDC_NOT(IN_CLASS(...)) for all the scope operators
+#define M_TDC_HANDLE_ADDITIONAL(IN_CLASS,WITH_BODY,T_HANDLE_,SHORT_NAME,TDC_IS)\
+    IN_CLASS(virtual) char* T_HANDLE_::get_name () const\
+    WITH_BODY({\
+      return #SHORT_NAME;\
+    })\
+    IN_CLASS(virtual) long T_HANDLE_::get_sizeof ()\
+    WITH_BODY({\
+      return sizeof *this;\
+    })\
+    IN_CLASS(virtual) T_TDC_IS_ENUM T_HANDLE_::is ()\
+    WITH_BODY({\
+      return T_TDC_IS_ENUM (TDC_IS_COMP | TDC_IS);\
+    })\
+    IN_CLASS(static) T_TDC_HANDLE_BASE* T_HANDLE_::implement_new_handle ()\
+    WITH_BODY({\
+      return new T_HANDLE_();\
+    })\
+
+#define M_TDC_HANDLE(IN_CLASS,WITH_BODY,SHORT_NAME,TDC_IS)\
+  struct T_TDC_DESCRIPTOR_##SHORT_NAME;\
+  struct T_TDC_HANDLE_##SHORT_NAME:T_TDC_HANDLE_BASE\
+  {\
+    typedef T_TDC_DESCRIPTOR_##SHORT_NAME T_DESCRIPTOR;\
+    M_TDC_HANDLE_ADDITIONAL(IN_CLASS,WITH_BODY,T_TDC_HANDLE_##SHORT_NAME,SHORT_NAME,TDC_IS)\
+    M_TDC_DESCRIPTOR_HANDLE_ADDITIONAL_PART (T_TDC_DESCRIPTOR_##SHORT_NAME)\
+  protected:\
+    virtual T_TDC_DESCRIPTOR_BASE* implement_new_descriptor () const;\
+  };\
+
+#if TDC_DEBUG_DOT_COMPLETE
+inline void dot_complete_test(){
+T_TDC_DEBUG_DOT_COMPLETE__TDC_H_6 tdc_debug_dot_complete__tdc_h;
+tdc_debug_dot_complete__tdc_h. i6;
+tdc_debug_dot_complete__tdc_h-> i;
+}
+#else
+#endif
+
+//------
+
+#define M_TDC_FORWARD_PRIM(SHORT_NAME)\
+	M_TDC_FORWARD_COMP (SHORT_NAME,TDC_IS_PRIM)
+
+#define M_TDC_FORWARD_PSTRUCT(SHORT_NAME)\
+	M_TDC_FORWARD_COMP (SHORT_NAME,TDC_IS_STRUCT)
+
+#define M_TDC_FORWARD_PUNION(SHORT_NAME)\
+	M_TDC_FORWARD_COMP (SHORT_NAME,TDC_IS_UNION)
+
+#define M_TDC_FORWARD_SDU(SHORT_NAME)\
+	M_TDC_FORWARD_COMP (SHORT_NAME,TDC_IS_SDU)
+
+#define M_TDC_FORWARD_TYPEDEF_SDU(BUF)\
+	typedef T_TDC_HANDLE_SDU T_TDC_HANDLE_##BUF;\
+	typedef T_TDC_DESCRIPTOR_SDU T_TDC_DESCRIPTOR_##BUF;\
+
+/**TODO: eliminate this macro*/
+#define M_FORWARD_TYPEDEF_SDU(BUF)\
+	M_TDC_FORWARD_TYPEDEF_SDU(BUF)\
+
+#define M_TDC_FORWARD_TYPEDEF(BASE,SHORT_NAME)\
+	typedef T_TDC_HANDLE_##BASE T_TDC_HANDLE_##SHORT_NAME;\
+	typedef T_TDC_DESCRIPTOR_##BASE T_TDC_DESCRIPTOR_##SHORT_NAME;\
+
+#define M_TDC_FORWARD_PENUM(SHORT_NAME)\
+	M_TDC_FORWARD_VAR (SHORT_NAME)
+
+#if TDC_DEBUG_DOT_COMPLETE
+inline void dot_complete_test(){
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_6 tdc_debug_dot_complete__tdc_h;
+  tdc_debug_dot_complete__tdc_h. i6;
+  tdc_debug_dot_complete__tdc_h-> i;
+}
+#else
+#endif
+
+//------
+
+#define M_TDC_FORWARD_MSG(SHORT_NAME)\
+	M_TDC_FORWARD_COMP (SHORT_NAME,TDC_IS_MSG)
+
+#define M_TDC_FORWARD_MSTRUCT(SHORT_NAME)\
+	M_TDC_FORWARD_COMP (SHORT_NAME,TDC_IS_STRUCT)
+
+#define M_TDC_FORWARD_MUNION(SHORT_NAME)\
+	M_TDC_FORWARD_COMP (SHORT_NAME,TDC_IS_UNION)
+
+#define M_TDC_FORWARD_MENUM(SHORT_NAME)\
+	M_TDC_FORWARD_VAR (SHORT_NAME)
+
+//------
+
+#define M_TDC_FORWARD_INT(SHORT_NAME)\
+	M_TDC_FORWARD_BASE(SHORT_NAME, T_TDC_DESCRIPTOR_##SHORT_NAME)\
+  struct T_TDC_DESCRIPTOR_##SHORT_NAME;\
+	typedef T_TDC_DESCRIPTOR_##SHORT_NAME T_TDC_HANDLE_##SHORT_NAME;\
+	typedef T_TDC_INT_##SHORT_NAME SHORT_NAME;\
+	T_TDC_HANDLE_BASE* new_T_TDC_DESCRIPTOR_##SHORT_NAME();\
+
+#if TDC_DEBUG_DOT_COMPLETE
+inline void dot_complete_test(){
+T_TDC_DEBUG_DOT_COMPLETE__TDC_H_6 tdc_debug_dot_complete__tdc_h;
+tdc_debug_dot_complete__tdc_h. i6;
+tdc_debug_dot_complete__tdc_h-> i;
+}
+#else
+#endif
+
+#define M_TDC_FORWARD_XXX_PRIMITIVE_UNION(SAP)\
+	M_TDC_FORWARD_BASE (SAP, T_TDC_HANDLE_##SAP)\
+
+#define M_TDC_FORWARD_XXX_MESSAGE_UNION(MSG)\
+	M_TDC_FORWARD_BASE (MSG,T_TDC_HANDLE_##MSG)\
+
+#if TDC_DEBUG_DOT_COMPLETE
+inline void dot_complete_test(){
+T_TDC_DEBUG_DOT_COMPLETE__TDC_H_6 tdc_debug_dot_complete__tdc_h;
+tdc_debug_dot_complete__tdc_h. i6;
+tdc_debug_dot_complete__tdc_h-> i;
+}
+#else
+#endif
+
+//----------------------------------------------------------------------------
+// macros to repeat stuff that is similar in many descriptor classes
+//----------------------------------------------------------------------------
+
+#define M_TDC_POST_PRIM(SHORT_NAME)\
+	M_TDC_POST_COMP (SHORT_NAME, TDC_IS_PRIM)
+
+#define M_TDC_POST_PSTRUCT(SHORT_NAME)\
+	M_TDC_POST_COMP (SHORT_NAME, TDC_IS_STRUCT)
+
+#define M_TDC_POST_PUNION(SHORT_NAME)\
+	M_TDC_POST_COMP (SHORT_NAME, TDC_IS_UNION)
+
+#define M_TDC_POST_SDU(SHORT_NAME)
+
+#define M_TDC_POST_PENUM(SHORT_NAME)\
+	M_TDC_POST_VAR (SHORT_NAME)
+
+#define M_TDC_POST_MSG(SHORT_NAME)\
+	M_TDC_POST_COMP (SHORT_NAME, TDC_IS_MSG)
+
+#define M_TDC_POST_MSTRUCT(SHORT_NAME)\
+	M_TDC_POST_COMP (SHORT_NAME, TDC_IS_STRUCT)
+
+#define M_TDC_POST_MUNION(SHORT_NAME)\
+	M_TDC_POST_COMP (SHORT_NAME, TDC_IS_UNION)
+
+#define M_TDC_POST_MENUM(SHORT_NAME)\
+	M_TDC_POST_VAR (SHORT_NAME)
+
+#define M_TDC_POST_INT(SHORT_NAME)
+
+#define M_TDC_POST_XXX_PRIMITIVE_UNION(SAP)\
+	M_TDC_POST_XXX(SAP,TDC_IS_XXX_PRIMITIE_UNION)
+
+#define M_TDC_POST_XXX_MESSAGE_UNION(MSG)\
+	M_TDC_POST_XXX(MSG,TDC_IS_XXX_MESSAGE_UNION)
+
+#define M_TDC_POST_PRIMITIVE()
+
+#define M_TDC_POST_MESSAGE()
+
+#if TDC_DEBUG_DOT_COMPLETE
+inline void dot_complete_test(){
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_6 tdc_debug_dot_complete__tdc_h;
+  tdc_debug_dot_complete__tdc_h. i6;
+  tdc_debug_dot_complete__tdc_h-> i;
+}
+
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_5
+{
+  int i5;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+
+inline void dot_complete_test(){
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_5 tdc_debug_dot_complete__tdc_h;
+  tdc_debug_dot_complete__tdc_h. i4;
+  tdc_debug_dot_complete__tdc_h-> i;
+}
+#else
+#endif
+
+//============================================================================
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1F
+{
+  int i1F;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1F()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s.
+    i;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1F s1F;
+  s1F->
+    i0;
+}
+#else
+#endif
+
+//----------------------------------------------------------------------------
+/// \defgroup M_TDC_DESCRIPTOR M_TDC_DESCRIPTOR
+/// macros to repeat stuff that is similar in many descriptor classes
+//----------------------------------------------------------------------------
+//\{
+
+/** declare action and description elements that are accessed through typecast to stencil */
+#define M_TDC_DESCRIPTOR_HANDLE_ADDITIONAL_PART(T_DESCRIPTOR)\
+	  T_TDC_ACTION_ENUM action TDC_LINT_UNUSED_MEMBER;\
+	  T_DESCRIPTOR* descriptor TDC_LINT_UNUSED_MEMBER;\
+
+#define	M_TDC_DESCRIPTOR_ADDITIONAL_BASE(SHORT_NAME)\
+	private:\
+		virtual long get_sizeof ()\
+		{\
+			return sizeof *this;\
+		}\
+
+#define	M_TDC_DESCRIPTOR_ADDITIONAL_MAIN_BASE(SHORT_NAME)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_BASE(SHORT_NAME)\
+	public:\
+		int ctrl;\
+		virtual int read_ctrl () const\
+		{\
+			return ctrl;\
+		}\
+		T_TDC_HANDLE_BASE* get_element (unsigned index)\
+		{\
+			return implement_get_union_element (index, ctrl);\
+		}\
+		virtual char* get_name () const\
+		{\
+			return #SHORT_NAME;\
+		}\
+		T_TDC_DESCRIPTOR_##SHORT_NAME ():\
+			ctrl (0)\
+		{\
+		}\
+
+
+#define	M_TDC_DESCRIPTOR_ADDITIONAL_STRUCT_BASE(SHORT_NAME)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_BASE(SHORT_NAME)\
+	public:\
+		typedef  T_TDC_HANDLE_##SHORT_NAME T_HANDLE;\
+		virtual char* get_name () const\
+		{\
+      extern char* TDC_NAME_##SHORT_NAME;\
+			return TDC_NAME_##SHORT_NAME;\
+		}\
+		friend T_TDC_DESCRIPTOR_BASE* new_T_TDC_DESCRIPTOR_##SHORT_NAME ()\
+		{\
+			return new T_TDC_DESCRIPTOR_##SHORT_NAME;\
+		}\
+		T_TDC_DESCRIPTOR_##SHORT_NAME ()\
+		{\
+		}\
+
+#define	M_TDC_DESCRIPTOR_ADDITIONAL_UNION_BASE(SHORT_NAME,TABLE_KIND)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_BASE(SHORT_NAME)\
+	public:\
+		typedef  T_TDC_HANDLE_##SHORT_NAME T_HANDLE;\
+		int ctrl;\
+		virtual int read_ctrl () const\
+		{\
+			return ctrl;\
+		}\
+		T_TDC_HANDLE_BASE* get_element (unsigned index)\
+		{\
+			return implement_get_union_element (index, ctrl);\
+		}\
+		virtual char* get_name () const\
+		{\
+      extern char* TDC_NAME_##SHORT_NAME;\
+			return TDC_NAME_##SHORT_NAME;\
+		}\
+		T_TDC_DESCRIPTOR_##SHORT_NAME ():\
+			ctrl (0)\
+		{\
+		}\
+
+/**
+ * \todo move get_tap_handle() to var base class 
+ */
+#define M_TDC_DESCRIPTOR_ADDITIONAL_VAR(T_DESCRIPTOR, T_VAR, SHORT_NAME)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_BASE(SHORT_NAME)\
+	public:\
+	typedef T_DESCRIPTOR T_HANDLE;\
+	T_TDC_ACTION_ENUM action;\
+	union \
+	{\
+		T_VAR value;\
+		T_TDC_BASIC_TYPES value_as_basic_types;\
+	};\
+	virtual char* get_name () const\
+	{\
+    extern char* TDC_NAME_##SHORT_NAME;\
+    return TDC_NAME_##SHORT_NAME;\
+	}\
+	T_DESCRIPTOR ():\
+		action (TDC_ACTION_DEFAULT)\
+	{\
+	}\
+	virtual unsigned get_sizeof_target ()\
+	{\
+		return sizeof T_VAR;\
+	}\
+	static T_TDC_HANDLE_BASE* implement_new_handle ()\
+	{\
+		return  new_##T_DESCRIPTOR();\
+	}\
+
+//-----
+
+#define M_TDC_DESCRIPTOR_INT_ADDITIONAL(SHORT_NAME)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_VAR (T_TDC_DESCRIPTOR_##SHORT_NAME, T_TDC_INT_##SHORT_NAME,SHORT_NAME)\
+	virtual T_TDC_IS_ENUM is ()\
+	{\
+		return TDC_IS_VAR;\
+	}\
+
+//-----
+
+#define M_TDC_DESCRIPTOR_PRIM_ADDITIONAL(SHORT_NAME)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_STRUCT_BASE (SHORT_NAME)\
+		virtual int get_id () const\
+		{\
+			return SHORT_NAME;\
+		}\
+
+#define M_TDC_DESCRIPTOR_PSTRUCT_ADDITIONAL(SHORT_NAME)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_STRUCT_BASE (SHORT_NAME)\
+
+#define M_TDC_DESCRIPTOR_PUNION_ADDITIONAL(SHORT_NAME)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_UNION_BASE (SHORT_NAME,TDC_TABLE_KIND_PRIM)\
+
+#define M_TDC_DESCRIPTOR_SDU_ADDITIONAL(SHORT_NAME)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_UNION_BASE (SHORT_NAME,TDC_TABLE_KIND_PRIM)\
+
+#define M_TDC_DESCRIPTOR_PENUM_ADDITIONAL(SHORT_NAME)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_VAR (T_TDC_DESCRIPTOR_##SHORT_NAME, T_TDC_ENUM_##SHORT_NAME,SHORT_NAME)\
+	friend T_TDC_HANDLE_BASE* new_T_TDC_DESCRIPTOR_##SHORT_NAME ();\
+
+//-----
+
+#define M_TDC_DESCRIPTOR_MSG_ADDITIONAL(SHORT_NAME)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_STRUCT_BASE (SHORT_NAME)\
+		virtual int get_id () const\
+		{\
+			return SHORT_NAME;\
+		}\
+
+#define M_TDC_DESCRIPTOR_MSTRUCT_ADDITIONAL(SHORT_NAME)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_STRUCT_BASE (SHORT_NAME)\
+
+#define M_TDC_DESCRIPTOR_MUNION_ADDITIONAL(SHORT_NAME)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_UNION_BASE (SHORT_NAME,TDC_TABLE_KIND_MSG)\
+
+#define M_TDC_DESCRIPTOR_MENUM_ADDITIONAL(SHORT_NAME)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_VAR (T_TDC_DESCRIPTOR_##SHORT_NAME, T_TDC_ENUM_##SHORT_NAME,SHORT_NAME)\
+	friend T_TDC_HANDLE_BASE* new_T_TDC_DESCRIPTOR_##SHORT_NAME ();\
+
+//-----
+
+#define M_TDC_DESCRIPTOR_XXX_PRIMITIVE_UNION_ADDITIONAL(SAP)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_MAIN_BASE (SAP)\
+
+#define M_TDC_DESCRIPTOR_XXX_MESSAGE_UNION_ADDITIONAL(MSG)\
+	M_TDC_DESCRIPTOR_ADDITIONAL_MAIN_BASE (MSG)\
+		virtual int get_id () const\
+		{\
+			return CCDENT_##MSG;\
+		}\
+
+#ifdef TDC_LIB_MAIN_DSC
+#define IF_TDC_LIB_MAIN_DSC(code) code
+#else
+#define IF_TDC_LIB_MAIN_DSC(code) 
+#endif
+
+#define M_TDC_CREATE_DEFAULT_DESCRIPTOR_CLASS(SHORT_NAME, TDC_IS)\
+  struct T_TDC_DESCRIPTOR_##SHORT_NAME;\
+  struct T_TDC_HANDLE_##SHORT_NAME:T_TDC_HANDLE_BASE\
+  {\
+    typedef T_TDC_DESCRIPTOR_##SHORT_NAME T_DESCRIPTOR;\
+    M_TDC_HANDLE_ADDITIONAL(M_TDC_IN_CLASS,M_TDC_WITH_BODY,T_TDC_HANDLE_##SHORT_NAME,SHORT_NAME,TDC_IS)\
+    M_TDC_DESCRIPTOR_HANDLE_ADDITIONAL_PART (T_TDC_DESCRIPTOR_##SHORT_NAME)\
+  protected:\
+    static T_TDC_NEW_DESCRIPTOR new_descriptor;\
+    virtual T_TDC_DESCRIPTOR_BASE* implement_new_descriptor () const\
+    {\
+      return call_implement_new_descriptor(new_descriptor);\
+    }\
+    friend char set_new_descriptor_T_TDC_HANDLE_##SHORT_NAME()\
+    {\
+      extern T_TDC_DESCRIPTOR_BASE* new_T_TDC_DESCRIPTOR_##SHORT_NAME ();\
+      new_descriptor = new_T_TDC_DESCRIPTOR_##SHORT_NAME;\
+      return 1;\
+    }\
+  };\
+	T_TDC_HANDLE_BASE* new_T_TDC_HANDLE_##SHORT_NAME();\
+  M_TDC_XXX_PRIMITIVE_UNION_ADDITIONAL_INLINE_1(SHORT_NAME,SHORT_NAME)\
+  IF_TDC_LIB_MAIN_DSC(T_TDC_NEW_DESCRIPTOR T_TDC_HANDLE_##SHORT_NAME::new_descriptor;)\
+
+#define M_TDC_CREATE_DEFAULT_PRIMITIVE_DESCRIPTOR_CLASS(SAP)\
+	M_TDC_CREATE_DEFAULT_DESCRIPTOR_CLASS(SAP##_PRIMITIVE_UNION,TDC_IS_XXX_PRIMITIVE_UNION)\
+
+#define M_TDC_CREATE_DEFAULT__T_TDC_HANDLE_XXX_PRIMITIVE_UNION(SAP,CCDSAP)\
+  M_TDC_CREATE_DEFAULT_DESCRIPTOR_CLASS(SAP##_PRIMITIVE_UNION,TDC_IS_XXX_PRIMITIVE_UNION)\
+
+#define M_TDC_DESCRIPTOR_PRIMITIVE_ADDITIONAL()\
+	M_TDC_DESCRIPTOR_ADDITIONAL_MAIN_BASE (PRIMITIVE_UNION)\
+
+#define M_TDC_CREATE_DEFAULT_MESSAGE_DESCRIPTOR_CLASS(MSG)\
+	M_TDC_CREATE_DEFAULT_DESCRIPTOR_CLASS(MSG##_MESSAGE_UNION,TDC_IS_XXX_MESSAGE_UNION)\
+	enum { CCDENT_##MSG##_MESSAGE_UNION	= CCDENT_##MSG };\
+
+#define M_TDC_CREATE_DEFAULT__T_TDC_HANDLE_XXX_MESSAGE_UNION(MSG,CCDENT)\
+  M_TDC_CREATE_DEFAULT_MESSAGE_DESCRIPTOR_CLASS(MSG)
+
+#define M_TDC_DESCRIPTOR_MESSAGE_ADDITIONAL()\
+	M_TDC_DESCRIPTOR_ADDITIONAL_MAIN_BASE (MESSAGE_UNION)\
+
+//\}
+//============================================================================
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1H
+{
+  int i1H;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1H()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s.
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1H s1H;
+  s1H->
+    i0;
+}
+#else
+#endif
+
+//----------------------------------------------------------------------------
+/// \defgroup M_TDC_INTERFACE
+// macros to repeat stuff that is similar in many inteface classes 
+//----------------------------------------------------------------------------
+//\{
+
+/**
+ * should these functions return T_RETURN / *this instead?	
+ */
+#define M_TDC_ADDITIONAL_CALL_FUNCTION_BASE(IN_CLASS, WITH_BODY, T_SCOPE,T_RETURN,T_ARG)\
+    void T_SCOPE::operator = (T_ARG (*f) ())\
+		WITH_BODY({\
+			T_ARG value_ = f ();\
+			set_value (value_);\
+      TDC_LINT_UNASSIGNED_MEMBER\
+		})\
+    void T_SCOPE::operator = (void (*f) (T_ARG))\
+		WITH_BODY({\
+			T_ARG value_;\
+			f (value_);\
+			set_value (value_);\
+      TDC_LINT_UNASSIGNED_MEMBER\
+		})\
+
+#define M_TDC_INTERFACE_ADDITIONAL_BASE(IN_CLASS, WITH_BODY, T_INTERFACE, T_INSTANCE_, T_HANDLE)\
+		IN_CLASS(typedef T_INSTANCE_ T_INSTANCE;)\
+		IN_CLASS(friend struct T_INSTANCE_;)\
+	IN_CLASS(private:)\
+		void T_INTERFACE::set_value (const T_INSTANCE_& value_)\
+		WITH_BODY({\
+			copy_instance ((const T_TDC_INSTANCE_BASE*)&value_);\
+		})\
+	IN_CLASS(explicit) T_INTERFACE::T_INTERFACE (const T_INTERFACE& value_)\
+		WITH_BODY({\
+			copy_interface (&value_);\
+      TDC_LINT_UNCOPIED_BASE\
+		})\
+	IN_CLASS(public:)\
+    void T_INTERFACE::operator = (const T_TDC_ACTION& action_)\
+		WITH_BODY({\
+			set_action (action_);\
+      TDC_LINT_UNASSIGNED_MEMBER\
+		})\
+		void T_INTERFACE::operator = (const T_INTERFACE& value_)\
+		WITH_BODY({\
+			copy_interface (&value_);\
+      TDC_LINT_NO_SELFASSIGN_TEST\
+      TDC_LINT_UNASSIGNED_MEMBER\
+		})\
+		T_INSTANCE_ T_INTERFACE::operator = (const T_INSTANCE_& value_)\
+		WITH_BODY({\
+			copy_instance (&value_);\
+			return value_;\
+      TDC_LINT_UNASSIGNED_MEMBER\
+		})\
+		IN_CLASS(static) T_TDC_HANDLE_BASE* T_INTERFACE::implement_new_handle ()\
+		WITH_BODY({\
+			return  new_##T_HANDLE();\
+		})\
+	  IN_CLASS(friend) T_TDC_INTERFACE_BASE* new_##T_INTERFACE()\
+	  WITH_BODY({\
+		  return new T_INTERFACE;\
+	  })\
+		M_TDC_ADDITIONAL_CALL_FUNCTION_BASE(IN_CLASS, WITH_BODY, T_INTERFACE,T_INSTANCE,T_INSTANCE)\
+
+#define M_TDC_INTERFACE_ADDITIONAL_MAIN(IN_CLASS, WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME, BASE)\
+  public:\
+    void operator = (const T_TDC_INTERFACE_##BASE##_BASE& value_)\
+    {\
+      set_main_value (&value_);\
+    }\
+    void operator = (const T_TDC_INSTANCE_##BASE##_BASE& value_)\
+    {\
+      set_main_value (&value_);\
+    }\
+    T_TDC_INTERFACE_##PREFIXED_SHORT_NAME ()\
+    {\
+      tdc_level--;\
+    }\
+    M_TDC_INTERFACE_ADDITIONAL_BASE (IN_CLASS, WITH_BODY, T_TDC_INTERFACE_##PREFIXED_SHORT_NAME, T_##SHORT_NAME, T_TDC_HANDLE_##PREFIXED_SHORT_NAME)
+
+#define M_TDC_INTERFACE_ADDITIONAL_COMP(IN_CLASS, WITH_BODY, SHORT_NAME, PREFIXED_SHORT_NAME)\
+  public:\
+    T_TDC_INTERFACE_##PREFIXED_SHORT_NAME ()\
+    {\
+      tdc_level--;\
+    }\
+    M_TDC_INTERFACE_ADDITIONAL_BASE (IN_CLASS, WITH_BODY, T_TDC_INTERFACE_##PREFIXED_SHORT_NAME, T_##SHORT_NAME, T_TDC_HANDLE_##PREFIXED_SHORT_NAME)
+
+#define M_TDC_INTERFACE_ADDITIONAL_VAR(IN_CLASS, WITH_BODY, SHORT_NAME, PREFIXED_SHORT_NAME)\
+  public:\
+    T_TDC_INTERFACE_##PREFIXED_SHORT_NAME ()\
+    {\
+    }\
+    M_TDC_INTERFACE_ADDITIONAL_BASE (IN_CLASS, WITH_BODY, T_TDC_INTERFACE_##PREFIXED_SHORT_NAME, T_##SHORT_NAME, T_TDC_HANDLE_##PREFIXED_SHORT_NAME)
+
+#define M_TDC_INTERFACE_INT_ADDITIONAL(SHORT_NAME)\
+  public:\
+    void operator = (int value_)\
+    {\
+      set_descriptor_value (value_);\
+    }\
+    M_TDC_INTERFACE_ADDITIONAL_VAR (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME, SHORT_NAME)\
+
+#define M_TDC_INTERFACE_ADDITIONAL_ENUM(IN_CLASS, WITH_BODY, SHORT_NAME, PREFIXED_SHORT_NAME)\
+  public:\
+    void set_value (int value_)\
+    {\
+      set_descriptor_value (value_);\
+    }\
+    void operator = (int value_)\
+    {\
+      set_descriptor_value (value_);\
+    }\
+    void set_value (const T_TDC_INSTANCE_INT_BASE &value_)\
+    {\
+      copy_instance (&value_);\
+    }\
+    void operator = (const T_TDC_INSTANCE_INT_BASE &value_)\
+    {\
+      copy_instance (&value_);\
+    }\
+    M_TDC_INTERFACE_ADDITIONAL_VAR (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME, PREFIXED_SHORT_NAME)\
+
+#define M_TDC_INTERFACE_ADDITIONAL_MAIN_CALL(IN_CLASS, WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME,T_ARG)\
+	T_##SHORT_NAME operator = (const T_ARG& value_)\
+  {\
+		set_value (value_);\
+		return value_;\
+    TDC_LINT_UNASSIGNED_MEMBER\
+	}\
+
+//-----
+
+#define M_TDC_INTERFACE_PRIM_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INTERFACE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME, PRIMITIVE)\
+  M_TDC_INTERFACE_ADDITIONAL_MAIN_CALL (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME, T_PRIMITIVE_UNION)\
+
+#define M_TDC_INTERFACE_PSTRUCT_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INTERFACE_ADDITIONAL_COMP (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INTERFACE_PUNION_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INTERFACE_ADDITIONAL_COMP (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INTERFACE_PENUM_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INTERFACE_ADDITIONAL_ENUM (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+//-----
+
+#define M_TDC_INTERFACE_MSG_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INTERFACE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME, MESSAGE)\
+  M_TDC_INTERFACE_ADDITIONAL_MAIN_CALL (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME, T_MESSAGE_UNION)\
+
+#define M_TDC_INTERFACE_MSTRUCT_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INTERFACE_ADDITIONAL_COMP (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INTERFACE_MUNION_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INTERFACE_ADDITIONAL_COMP (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INTERFACE_MENUM_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INTERFACE_ADDITIONAL_ENUM (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+//-----
+
+#define M_TDC_INTERFACE_PRIM_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME, PRIMITIVE)\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN_CALL (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME, T_PRIMITIVE_UNION)\
+
+#define M_TDC_INTERFACE_PSTRUCT_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+	M_TDC_INTERFACE_ADDITIONAL_COMP (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INTERFACE_PUNION_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+	M_TDC_INTERFACE_ADDITIONAL_COMP (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INTERFACE_SDU_ADDITIONAL_INLINE(SHORT_NAME)\
+	M_TDC_INTERFACE_ADDITIONAL_COMP (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,SHORT_NAME)
+
+#define M_TDC_INTERFACE_PENUM_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+	M_TDC_INTERFACE_ADDITIONAL_ENUM (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+//-----
+
+#define M_TDC_INTERFACE_MSG_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME, MESSAGE)\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN_CALL (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME, T_MESSAGE_UNION)\
+
+#define M_TDC_INTERFACE_MSTRUCT_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+	M_TDC_INTERFACE_ADDITIONAL_COMP (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INTERFACE_MUNION_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+	M_TDC_INTERFACE_ADDITIONAL_COMP (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INTERFACE_MENUM_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+	M_TDC_INTERFACE_ADDITIONAL_ENUM (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+//-----
+
+#define M_TDC_INTERFACE_ADDITIONAL_MAIN_XXX(M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY,XXX,PREFIXED_XXX)\
+  private:\
+		T_TDC_INTERFACE_##XXX (const T_TDC_INTERFACE_PRIMITIVE_BASE& primitive)\
+    {\
+    tdc_tbd_xxx_constructor_call(#XXX);\
+    }\
+
+#define M_TDC_INTERFACE_XXX_PRIMITIVE_UNION_ADDITIONAL(SAP,PREFIXED_SAP)\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SAP,PREFIXED_SAP, PRIMITIVE)\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN_CALL (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SAP,PREFIXED_SAP, T_PRIMITIVE_UNION)\
+  M_TDC_INTERFACE_ADDITIONAL_MAIN_XXX (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SAP,PREFIXED_SAP)\
+	public:\
+
+#define M_TDC_INTERFACE_XXX_PRIMITIVE_UNION_ADDITIONAL_INLINE(SAP,PREFIXED_SAP)\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SAP,PREFIXED_SAP, PRIMITIVE)\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN_CALL (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SAP,PREFIXED_SAP, T_PRIMITIVE_UNION)\
+  M_TDC_INTERFACE_ADDITIONAL_MAIN_XXX (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SAP,PREFIXED_SAP)\
+	public:\
+
+#define M_TDC_INTERFACE_XXX_MESSAGE_UNION_ADDITIONAL(MSG,PREFIXED_MSG)\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, MSG, PREFIXED_MSG, MESSAGE)\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN_CALL (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, MSG, PREFIXED_MSG, T_MESSAGE_UNION)\
+  M_TDC_INTERFACE_ADDITIONAL_MAIN_XXX (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, MSG,PREFIXED_MSG)\
+	public:\
+
+#define M_TDC_INTERFACE_XXX_MESSAGE_UNION_ADDITIONAL_INLINE(MSG,PREFIXED_MSG)\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITH_BODY, MSG, PREFIXED_MSG, MESSAGE)\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN_CALL (M_TDC_IN_CLASS, M_TDC_WITH_BODY, MSG, PREFIXED_MSG, T_MESSAGE_UNION)\
+  M_TDC_INTERFACE_ADDITIONAL_MAIN_XXX (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, MSG,PREFIXED_MSG)\
+	public:\
+
+#define M_TDC_CREATE_DEFAULT_INTERFACE_CLASS(SHORT_NAME)\
+	struct T_TDC_INTERFACE_##SHORT_NAME;\
+	struct T_TDC_HANDLE_##SHORT_NAME;\
+
+#define M_TDC_CREATE_DEFAULT_PRIMITIVE_INTERFACE_CLASS(SAP)\
+  M_TDC_CREATE_DEFAULT_INTERFACE_CLASS(SAP##_PRIMITIVE_UNION)\
+
+#define M_TDC_CREATE_DEFAULT__T_TDC_INTERFACE_XXX_PRIMITIVE_UNION(SAP,CCDSAP)\
+  enum { CCDSAP_##SAP = CCDSAP };\
+  M_TDC_CREATE_DEFAULT_INTERFACE_CLASS(SAP##_PRIMITIVE_UNION)\
+
+#define M_TDC_INTERFACE_PRIMITIVE_ADDITIONAL()\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, PRIMITIVE_UNION, PRIMITIVE_UNION, PRIMITIVE)\
+	private:\
+		T_TDC_INTERFACE_PRIMITIVE_UNION (const T_TDC_INTERFACE_PRIMITIVE_BASE& primitive)\
+		{\
+			tdc_tbd_primitive_union_constructor_call();\
+		}\
+	public:\
+
+#define M_TDC_INTERFACE_PRIMITIVE_ELEMENT_ADDITIONAL(SAP)\
+	/*nothing*/
+
+#define M_TDC_CREATE_DEFAULT_MESSAGE_INTERFACE_CLASS(MSG)\
+  M_TDC_CREATE_DEFAULT_INTERFACE_CLASS(MSG##_MESSAGE_UNION)\
+
+#define M_TDC_CREATE_DEFAULT__T_TDC_INTERFACE_XXX_MESSAGE_UNION(MSG,CCDENT)\
+  enum { CCDENT_##MSG = CCDENT };\
+  M_TDC_CREATE_DEFAULT_MESSAGE_INTERFACE_CLASS(MSG)
+
+#define M_TDC_INTERFACE_MESSAGE_ADDITIONAL()\
+	M_TDC_INTERFACE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, MESSAGE_UNION,MESSAGE_UNION, MESSAGE)\
+	private:\
+		T_TDC_INTERFACE_MESSAGE_UNION (const T_TDC_INTERFACE_MESSAGE_BASE& primitive)\
+		{\
+			tdc_tbd_message_union_constructor_call();\
+		}\
+	public:\
+
+#define M_TDC_INTERFACE_MESSAGE_ELEMENT_ADDITIONAL(MSG)\
+	/*nothing*/
+
+//\}
+
+//============================================================================
+
+#if TDC_DEBUG_DOT_COMPLETE
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1I()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s.
+    i;
+  s->
+    i0;
+}
+#else
+#endif
+
+//----------------------------------------------------------------------------
+/// \defgroup M_TDC_INSTANCE M_TDC_INSTANCE
+/// macros to repeat stuff that is similar in many instance classes
+//----------------------------------------------------------------------------
+//\{
+
+/*lint -emacro(1706,M_TDC_INSTANCE_ADDITIONAL_BASE)*/ //we don't want M_TDC_NOT(IN_CLASS(...)) for all the scope operators
+#define M_TDC_INSTANCE_ADDITIONAL_BASE(IN_CLASS, WITH_BODY, T_INTERFACE_, T_INSTANCE, T_HANDLE_)\
+    IN_CLASS(typedef T_INTERFACE_ T_INTERFACE;)\
+    IN_CLASS(typedef T_HANDLE_ T_HANDLE;)\
+    IN_CLASS(T_HANDLE* handle;)\
+    IN_CLASS(static) T_TDC_HANDLE_BASE* T_INSTANCE::implement_new_handle ()\
+    WITH_BODY({\
+      return new_##T_HANDLE_();\
+    })\
+    IN_CLASS(virtual) T_TDC_INTERFACE_BASE* T_INSTANCE::new_interface() const\
+    WITH_BODY({\
+      return new_##T_INTERFACE_();\
+    })\
+    void T_INSTANCE::construct()\
+    WITH_BODY({\
+      construct_handle(new_##T_HANDLE_);\
+    })\
+    T_INSTANCE::T_INSTANCE ()\
+    WITH_BODY({\
+      construct();\
+      TDC_LINT_UNINITIALIZED_MEMBER\
+    })\
+    T_INSTANCE::~T_INSTANCE ()\
+    WITH_BODY({\
+      destroy_handle ();\
+      TDC_LINT_POSSIBLE_UNHANDLE_POINTER_MEMBER\
+    })\
+    T_INSTANCE::T_INSTANCE (const T_INTERFACE_& value_)\
+    WITH_BODY({\
+      construct_from_interface ((T_TDC_INTERFACE_BASE*)&value_, new_##T_HANDLE_); M_TDC_COMMENT(T_INTERFACE not defined yet; means need cast here to the base type pointer)\
+      TDC_LINT_UNINITIALIZED_MEMBER\
+    })\
+    IN_CLASS(explicit) T_INSTANCE::T_INSTANCE (const T_TDC_HANDLE_BASE* value_)\
+    WITH_BODY({\
+      tdc_tbd_constructor_call(#T_INSTANCE);\
+      TDC_LINT_UNINITIALIZED_MEMBER\
+    })\
+    void T_INSTANCE::operator = (const T_INSTANCE& value_)\
+    WITH_BODY({\
+      set_value (value_);\
+      TDC_LINT_UNASSIGNED_MEMBER\
+      TDC_LINT_NO_SELFASSIGN_TEST\
+    })\
+    M_TDC_NOT_##IN_CLASS(T_INTERFACE_* T_INSTANCE::operator -> ()\
+    {\
+      return (T_INTERFACE*)get_navigation();\
+    })\
+    T_INSTANCE::T_INSTANCE (const T_INSTANCE& value_)\
+    WITH_BODY({\
+      construct_from_instance (value_, new_##T_HANDLE_);\
+      TDC_LINT_UNCOPIED_BASE\
+      TDC_LINT_UNINITIALIZED_MEMBER\
+    })\
+    T_INSTANCE::T_INSTANCE (T_INSTANCE (*f) ())\
+    WITH_BODY({\
+      T_INSTANCE value_ = f ();\
+      construct_from_instance (value_, new_##T_HANDLE_);\
+      TDC_LINT_UNINITIALIZED_MEMBER\
+    })\
+    M_TDC_ADDITIONAL_CALL_FUNCTION_BASE(IN_CLASS, WITH_BODY, T_INSTANCE, T_INSTANCE, T_INSTANCE)
+
+#define M_TDC_INSTANCE_ADDITIONAL_MAIN(IN_CLASS, WITH_BODY, SHORT_NAME, PREFIXED_SHORT_NAME, BASE)\
+  public:\
+    void operator = (const T_TDC_INTERFACE_##BASE##_BASE& value_)\
+    {\
+      set_main_value (&value_);\
+    }\
+    void operator = (const T_TDC_INSTANCE_##BASE##_BASE& value_)\
+    {\
+      set_main_value (&value_);\
+    }\
+    T_##SHORT_NAME (const T_TDC_INTERFACE_##BASE##_BASE& value_)\
+    {\
+      construct_main_value (&value_, new_T_TDC_HANDLE_##PREFIXED_SHORT_NAME);\
+    }\
+    T_##SHORT_NAME (const T_TDC_INSTANCE_##BASE##_BASE& value_)\
+    {\
+      construct_main_value (&value_, new_T_TDC_HANDLE_##PREFIXED_SHORT_NAME);\
+    }\
+  M_TDC_INSTANCE_ADDITIONAL_BASE (IN_CLASS, WITH_BODY, T_TDC_INTERFACE_##PREFIXED_SHORT_NAME, T_##SHORT_NAME, T_TDC_HANDLE_##PREFIXED_SHORT_NAME)
+
+#define M_TDC_INSTANCE_PART_ADDITIONAL(IN_CLASS, WITH_BODY, T_INTERFACE, T_INSTANCE, T_DESCRIPTOR, T_HANDLE)\
+  public:\
+    T_INSTANCE (const T_TDC_ACTION& action_)\
+    {\
+      construct_from_action (action_, new_##T_HANDLE);\
+    }\
+    T_TDC_ACTION operator = (const T_TDC_ACTION& action_)\
+    {\
+      set_action (action_);\
+      return action_;\
+    }\
+  M_TDC_INSTANCE_ADDITIONAL_BASE(IN_CLASS, WITH_BODY, T_INTERFACE, T_INSTANCE, T_HANDLE)
+
+#define M_TDC_INSTANCE_COMP_ADDITIONAL(IN_CLASS, WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_PART_ADDITIONAL (IN_CLASS, WITH_BODY, T_TDC_INTERFACE_##PREFIXED_SHORT_NAME, T_##SHORT_NAME, T_TDC_DESCRIPTOR_##PREFIXED_SHORT_NAME, T_TDC_HANDLE_##PREFIXED_SHORT_NAME)
+
+#define M_TDC_INSTANCE_ENUM_ADDITIONAL(IN_CLASS, WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)\
+    T_##SHORT_NAME (int value_)\
+    {\
+      construct_from_number (value_, new_T_TDC_DESCRIPTOR_##PREFIXED_SHORT_NAME);\
+    }\
+    void operator = (int value_)\
+    {\
+      set_descriptor_value (value_);\
+    }\
+    bool operator == (T_TDC_ENUM_##PREFIXED_SHORT_NAME value_)\
+    {\
+      return cmp_descriptor_value (value_);\
+    }\
+    operator T_TDC_ENUM_##PREFIXED_SHORT_NAME ()\
+    {\
+      return (T_TDC_ENUM_##PREFIXED_SHORT_NAME) get_descriptor_value ();\
+    }\
+  M_TDC_INSTANCE_PART_ADDITIONAL (IN_CLASS, WITH_BODY, T_TDC_INTERFACE_##PREFIXED_SHORT_NAME, T_##SHORT_NAME, T_TDC_DESCRIPTOR_##PREFIXED_SHORT_NAME, T_TDC_DESCRIPTOR_##PREFIXED_SHORT_NAME)
+
+#define M_TDC_INSTANCE_INT_ADDITIONAL(SHORT_NAME)\
+    T_##SHORT_NAME (int value_)\
+    {\
+      construct_from_number (value_, new_T_TDC_DESCRIPTOR_##SHORT_NAME);\
+    }\
+    void operator = (int value_)\
+    {\
+      set_descriptor_value (value_);\
+    }\
+  M_TDC_INSTANCE_PART_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, T_TDC_INTERFACE_##SHORT_NAME, T_##SHORT_NAME, T_TDC_DESCRIPTOR_##SHORT_NAME, T_TDC_DESCRIPTOR_##SHORT_NAME)
+
+//-----
+
+#define M_TDC_INSTANCE_PRIM_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME, PRIMITIVE)
+
+#define M_TDC_INSTANCE_PSTRUCT_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_COMP_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INSTANCE_PUNION_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_COMP_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INSTANCE_SDU_ADDITIONAL(SHORT_NAME)\
+  M_TDC_INSTANCE_COMP_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,SHORT_NAME)
+
+#define M_TDC_INSTANCE_PENUM_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_ENUM_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+//-----
+
+#define M_TDC_INSTANCE_MSG_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME, MESSAGE)
+
+#define M_TDC_INSTANCE_MSTRUCT_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_COMP_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INSTANCE_MUNION_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_COMP_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INSTANCE_MENUM_ADDITIONAL(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_ENUM_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+//-----
+
+#define M_TDC_INSTANCE_XXX_PRIMITIVE_UNION_ADDITIONAL(SAP,PREFIXED_SAP)\
+  M_TDC_INSTANCE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, SAP,PREFIXED_SAP, PRIMITIVE)
+
+#define M_TDC_INSTANCE_XXX_MESSAGE_UNION_ADDITIONAL(MSG,PREFIXED_MSG)\
+  M_TDC_INSTANCE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, MSG,PREFIXED_MSG, MESSAGE)
+
+#define M_TDC_INSTANCE_PRIMITIVE_ADDITIONAL()\
+  M_TDC_INSTANCE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, PRIMITIVE_UNION,PRIMITIVE_UNION, PRIMITIVE)\
+  static int call_tdc_initialize_primitive ();\
+
+#define M_TDC_INSTANCE_MESSAGE_ADDITIONAL()\
+  M_TDC_INSTANCE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITHOUT_BODY, MESSAGE_UNION,MESSAGE_UNION, MESSAGE)\
+  static int call_tdc_initialize_message ();\
+
+//-----
+
+#define M_TDC_INSTANCE_PRIM_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME, PRIMITIVE)
+
+#define M_TDC_INSTANCE_PSTRUCT_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_COMP_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INSTANCE_PUNION_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_COMP_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INSTANCE_PENUM_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_ENUM_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+//-----
+
+#define M_TDC_INSTANCE_MSG_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME, MESSAGE)
+
+#define M_TDC_INSTANCE_MSTRUCT_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_COMP_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INSTANCE_MUNION_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_COMP_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+#define M_TDC_INSTANCE_MENUM_ADDITIONAL_INLINE(SHORT_NAME,PREFIXED_SHORT_NAME)\
+  M_TDC_INSTANCE_ENUM_ADDITIONAL (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SHORT_NAME,PREFIXED_SHORT_NAME)
+
+//-----
+
+template<class T_INSTANCE,class T_HANDLE>class T_TDC_FORCE_LINK_INSTANCE_WORKER
+{
+  T_TDC_FORCE_LINK_INSTANCE_WORKER(){
+    T_HANDLE::new_descriptor = T_INSTANCE::get_new_descriptor();
+  }
+};
+
+template<class T_INSTANCE,class T_HANDLE>class T_TDC_FORCE_LINK_INSTANCE
+{
+  static T_TDC_FORCE_LINK_INSTANCE_WORKER<T_INSTANCE,T_HANDLE> worker; 
+};
+template<class T_INSTANCE,class T_HANDLE>T_TDC_FORCE_LINK_INSTANCE_WORKER<T_INSTANCE,T_HANDLE> T_TDC_FORCE_LINK_INSTANCE<T_INSTANCE,T_HANDLE>::worker;
+ 
+#define M_TDC_XXX_PRIMITIVE_UNION_ADDITIONAL_INLINE_1(SAP,PREFIXED_SAP)\
+  extern char set_new_descriptor_T_TDC_HANDLE_##SAP();\
+  static char init_new_descriptor_T_TDC_HANDLE_##SAP = set_new_descriptor_T_TDC_HANDLE_##SAP();\
+
+#define M_TDC_XXX_PRIMITIVE_UNION_ADDITIONAL_INLINE(SAP,PREFIXED_SAP)\
+
+#define M_TDC_XXX_MESSAGE_UNION_ADDITIONAL_INLINE(SAP,PREFIXED_SAP)\
+
+/*
+#define M_TDC_XXX_PRIMITIVE_UNION_ADDITIONAL_INLINE(SAP,PREFIXED_SAP)\
+  extern char set_new_descriptor_T_TDC_HANDLE_##SAP();\
+  static char init_new_descriptor_T_TDC_HANDLE_##SAP = set_new_descriptor_T_TDC_HANDLE_##SAP();\
+  
+#define M_TDC_XXX_MESSAGE_UNION_ADDITIONAL_INLINE(SAP,PREFIXED_SAP)\
+  extern char set_new_descriptor_T_TDC_HANDLE_##SAP();\
+  static char init_new_descriptor_T_TDC_HANDLE_##SAP = set_new_descriptor_T_TDC_HANDLE_##SAP();\
+*/
+  
+#define M_TDC_INSTANCE_XXX_PRIMITIVE_UNION_ADDITIONAL_INLINE(SAP,PREFIXED_SAP)\
+  M_TDC_INSTANCE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITH_BODY, SAP,PREFIXED_SAP, PRIMITIVE)\
+  T_TDC_NEW_DESCRIPTOR get_new_descriptor()\
+  {\
+    extern T_TDC_DESCRIPTOR_BASE* new_T_TDC_DESCRIPTOR_##SAP();\
+    return new_T_TDC_DESCRIPTOR_##SAP;\
+  }\
+
+#define M_TDC_INSTANCE_XXX_MESSAGE_UNION_ADDITIONAL_INLINE(MSG,PREFIXED_MSG)\
+  M_TDC_INSTANCE_ADDITIONAL_MAIN (M_TDC_IN_CLASS, M_TDC_WITH_BODY, MSG,PREFIXED_MSG, MESSAGE)\
+  T_TDC_NEW_DESCRIPTOR get_new_descriptor()\
+  {\
+    extern T_TDC_DESCRIPTOR_BASE* new_T_TDC_DESCRIPTOR_##MSG();\
+    return new_T_TDC_DESCRIPTOR_##MSG;\
+  }\
+
+//\}
+
+//-----
+
+#ifdef TDC_TYPE_NAME_COMPLETE
+#define M_TDC_TYPE_NAME_COMPLETE TDC_DOT_COMPLETE_HIDE({ T_TDC_TYPE_NAME type_name = {0}; return type_name; })
+#else 
+#define M_TDC_TYPE_NAME_COMPLETE ;
+#endif  
+
+#endif //DOT_COMPLETE_DEFINES
+
+//============================================================================
+
+#if TDC_DEBUG_DOT_COMPLETE
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1J()
+  {
+    T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+    s.
+      i;
+    s->
+      i0;
+}
+#else
+#endif
+
+//============================================================================
+// implementation classes
+//============================================================================
+
+typedef bool T_TDC_TABLE_KIND; 
+
+enum T_TDC_ACTION_ENUM
+{
+  TDC_ACTION_UNKNOWN,
+                              //  MANDATORY-SEND    OPTIONAL-SEND   MANDATORY-WAIT    OPTIONAL-WAIT
+  TDC_ACTION_SKIP,            //  ERROR             ABSENT          SKIPED            SKIPED
+  TDC_ACTION_SHOW,            //  ERROR             ABSENT          SKIPED            SKIPED
+  TDC_ACTION_FORBID,          //  ERROR             ABSENT          ERROR             CHECKED
+  TDC_ACTION_REQUIRE,         //  ERROR             ERROR           ERROR             CHECKED PRESENT
+  TDC_ACTION_MESSAGE,
+  TDC_ACTION_DESTROYED,
+  TDC_ACTION_SKIP_TO_END,
+  TDC_ACTION_SET = 0x10,      //  PRESENT           PRESENT         CHECKED           CHECKED VALUE
+  TDC_ACTION_HAS_VALUE = 0x20,
+  TDC_ACTION_HAS_REF = 0x40,
+  TDC_ACTION_IS_IMPLICIT = 0x80,
+  TDC_ACTION_SET_VALUE = TDC_ACTION_SET + TDC_ACTION_HAS_VALUE,
+  TDC_ACTION_SET_REF = TDC_ACTION_SET + TDC_ACTION_HAS_REF,   
+  TDC_ACTION_CHILD_TOUCHED = TDC_ACTION_SET + TDC_ACTION_HAS_REF + TDC_ACTION_IS_IMPLICIT,    
+  TDC_ACTION_DEFAULT = TDC_ACTION_UNKNOWN
+};
+
+/** allow one optional extra set of () on action member functions, first set is suplyed by macro
+ *  second set might be suplyed by the user, this will have no effect on behaviour of code 
+ */
+struct T_TDC_ASSIGN_ACTION
+{
+  void operator ()();
+};
+
+extern T_TDC_ASSIGN_ACTION tdc_assign_action;
+
+struct T_TDC_ACTION
+{
+  //create a waper class for T_TDC_ACTION_ENUM so that the action constants can not be converted to integers
+  T_TDC_ACTION_ENUM action;
+  T_TDC_ACTION (T_TDC_ACTION_ENUM action_):
+      action (action_)
+  {
+    //nothing
+  }
+  T_TDC_ACTION ();
+};
+
+struct T_TDC_CREATE_ACTION:T_TDC_ACTION
+{
+  /* This type is returned by constant action function, this allow the user to optional
+  omit the "()" after the action name
+    Src code   After macro expantion   Function returns            After implicit type convting
+    ========   ====================    ========================    =====================
+    _skip      tdc_skip()              SKIP::T_TDC_CREATE_ACTION   SKIP::T_TDC_ACTION
+    _skip()    tdc_skip()()            SKIP::T_TDC_ACTION          SKIP::T_TDC_ACTION
+    _skip()()  tdc_skip()()()          <error T_TDC_ACTION have no operator ()>
+  */
+  T_TDC_CREATE_ACTION ();
+  T_TDC_ACTION operator()();
+};
+
+extern T_TDC_CREATE_ACTION SKIP;
+extern T_TDC_CREATE_ACTION SHOW;
+extern T_TDC_CREATE_ACTION FORBID;
+extern T_TDC_CREATE_ACTION REQUIRE;
+extern T_TDC_CREATE_ACTION SKIP_TO_END;
+
+extern T_TDC_CREATE_ACTION tdc_skip(); 
+extern T_TDC_CREATE_ACTION tdc_show();
+extern T_TDC_CREATE_ACTION tdc_forbid(); 
+extern T_TDC_CREATE_ACTION tdc_require();
+extern T_TDC_CREATE_ACTION tdc_skip_to_end();
+
+//----------------------------------------------------------------------------
+
+enum T_TDC_EVENT_ENUM
+{
+	TDC_EVENT_SEND,
+	TDC_EVENT_AWAIT
+};
+
+enum T_TDC_IS_ENUM
+{
+	TDC_IS_UNKNOWN = 0,
+	TDC_IS_VAR = 0x001,
+	TDC_IS_STRUCT = 0x002,
+	TDC_IS_SDU = 0x004,
+	TDC_IS_P = 0x008,
+	TDC_IS_M = 0x010,
+	TDC_IS_COMP = 0x20,
+	TDC_IS_ARRAY = 0x40,
+	TDC_IS_UNION = 0x80,
+	TDC_IS_MESSAGE_UNION = 0x100,
+	TDC_IS_PRIMITIVE_UNION = 0x200,
+	TDC_IS_MSG = 0x400,
+	TDC_IS_PRIM = 0x800,
+	TDC_IS_XXX_MESSAGE_UNION = 0x1000,
+	TDC_IS_XXX_PRIMITIVE_UNION = 0x2000,
+	TDC_IS_POINTER = 0x4000,
+	TDC_IS_PVAR = TDC_IS_VAR | TDC_IS_P,
+	TDC_IS_MVAR = TDC_IS_VAR | TDC_IS_M
+};
+
+//----------------------------------------------------------------------------
+
+struct T_TDC_HANDLE_BASE;
+struct T_TDC_DESCRIPTOR_BASE;
+struct T_TDC_INSTANCE_MAIN_BASE;
+struct T_TDC_INTERFACE_BASE;
+struct T_TDC_INSTANCE_BASE;
+struct T_TDC_PATH;
+struct T_TDC_PATH_TEXT;
+
+typedef T_TDC_INTERFACE_BASE* (*T_TDC_NEW_INTERFACE)();
+typedef T_TDC_HANDLE_BASE* (*T_TDC_NEW_HANDLE)();
+typedef T_TDC_DESCRIPTOR_BASE* (*T_TDC_NEW_DESCRIPTOR)();
+
+struct T_PRIMITIVE_UNION;
+struct T_TDC_INTERFACE_PRIMITIVE_UNION;
+struct T_TDC_DESCRIPTOR_PRIMITIVE_UNION;
+
+struct T_MESSAGE_UNION;
+struct T_TDC_INTERFACE_MESSAGE_UNION;
+struct T_TDC_DESCRIPTOR_MESSAGE_UNION;
+
+typedef signed long T_TDC_INT_S32;
+typedef signed short T_TDC_INT_S16;
+typedef signed char T_TDC_INT_S8;
+typedef unsigned long T_TDC_INT_U32;
+typedef unsigned short T_TDC_INT_U16;
+typedef unsigned char T_TDC_INT_U8;
+typedef char CHAR;
+
+//----------------------------------------------------------------------------
+inline unsigned long num_elements(const unsigned char* array)
+{
+  return strlen((const char*)array);
+}
+
+inline unsigned long num_elements(const signed char* array)
+{
+  return strlen((const char*)array);
+}
+
+
+//----------------------------------------------------------------------------
+
+enum T_TDC_RW_MODE
+{
+	TDC_RW_MODE_READ,
+	TDC_RW_MODE_WRITE
+};
+
+struct T_TDC_HANDLE_BASE
+{
+  friend struct T_TDC_COPY;
+protected:
+  T_TDC_ACTION_ENUM implement_get_action () const;
+  void implement_set_action (T_TDC_ACTION_ENUM action_);
+  T_TDC_DESCRIPTOR_BASE* implement_get_descriptor () const;
+  void implement_set_descriptor (T_TDC_DESCRIPTOR_BASE* descriptor_);
+  long implement_get_value () const;
+  void implement_set_value (long value_);
+  friend void add_name_info (T_TDC_HANDLE_BASE* descriptor_ref, int level, int parent, int index);
+  T_TDC_PATH_TEXT path_text();
+  virtual T_TDC_DESCRIPTOR_BASE* implement_new_descriptor () const;
+  static T_TDC_DESCRIPTOR_BASE* call_implement_new_descriptor(T_TDC_NEW_DESCRIPTOR new_descriptor);  
+public:
+  T_TDC_DESCRIPTOR_BASE* make_descriptor ();
+  T_TDC_DESCRIPTOR_BASE* make_array_descriptor (T_TDC_NEW_HANDLE new_element_handle);
+  virtual char* get_name () const
+  TDC_PURE_BODY({
+    //TDC_ERROR();
+    return 0;
+  })
+  virtual long get_sizeof () = 0
+  {
+    return sizeof *this;
+  }
+  T_TDC_HANDLE_BASE ();
+  ~T_TDC_HANDLE_BASE ();
+  T_TDC_HANDLE_BASE* get_element (int index)const;
+  T_TDC_HANDLE_BASE* get_union_element ();
+  void destroy ();
+  T_TDC_DESCRIPTOR_BASE* get_descriptor()const;
+  T_TDC_ACTION_ENUM get_action()const;
+  long get_value()const;
+  int get_ctrl()const;
+  void clear();
+  void set_descriptor_value(long value_);
+  virtual unsigned get_sizeof_target ();
+  virtual T_TDC_IS_ENUM is ();
+};
+
+#ifdef TDC_USE_ALLOC_DEBUG_COUNTER
+struct T_TDC_ALLOC_DEBUG_COUNTER 
+{
+	int count;
+	int max_count;
+	int alloc_count;
+	int free_count;
+	bool alloc[1000];
+	T_TDC_ALLOC_DEBUG_COUNTER ()
+	{
+    /* nothing here should allways be static allocated and there for cleared, 
+      futher more it is used before construction so intializing here will be fatal */
+	}
+	~T_TDC_ALLOC_DEBUG_COUNTER ()
+	{
+		for (int first_not_freed = 0; !alloc[first_not_freed]; first_not_freed++)
+			TDC_ASSERT (first_not_freed < sizeof alloc);
+		TDC_ASSERT (count==0); // some where we have a leak
+	}
+};
+
+template<class T>
+struct T_TDC_ALLOC_DEBUG 
+{
+	static T_TDC_ALLOC_DEBUG_COUNTER counter;
+	int alloc_count;
+	T_TDC_ALLOC_DEBUG_COUNTER& counter_;
+	T_TDC_ALLOC_DEBUG ():
+		counter_ (counter)
+	{
+	  counter.count++;
+	  alloc_count = counter.alloc_count++;
+    if (alloc_count < sizeof counter.alloc)
+	    counter.alloc[alloc_count]=true;
+	  if (counter.max_count < counter.count)
+		  counter.max_count = counter.count;
+	}
+	~T_TDC_ALLOC_DEBUG ()
+	{
+    if (alloc_count < sizeof counter.alloc)
+		  counter.alloc[alloc_count]=false;
+		TDC_ASSERT (counter.count > 0); // deallocating more than ever allocated
+		counter.free_count++;
+		counter.count--;
+	}
+};
+
+template<class T>T_TDC_ALLOC_DEBUG_COUNTER T_TDC_ALLOC_DEBUG<T>::counter;
+#endif
+
+enum { 
+	TDC_CTRL_DEFAULT = 0,
+	TDC_CTRL_NO_DESCRIPTOR = -1,
+	TDC_CTRL_NOT_AN_UNION = -2,
+	TDC_REF_COUNT_ELEMENTS_DESTROYED = -2,
+	TDC_DESCRIPTOR_DESTROYED_VALUE = -4,
+	TDC_DUMMY_TAP_HANDLE = -16
+};
+
+#define TDC_DESCRIPTOR_DESTROYED ((T_TDC_DESCRIPTOR_BASE*)TDC_DESCRIPTOR_DESTROYED_VALUE)
+
+struct T_TDC_DESCRIPTOR_BASE
+#ifdef TDC_USE_ALLOC_DEBUG_COUNTER
+	:T_TDC_ALLOC_DEBUG<T_TDC_DESCRIPTOR_BASE>
+#endif
+{
+private:
+  friend struct T_TDC_COPY;
+	friend void unsubscribe (T_TDC_DESCRIPTOR_BASE* descriptor);
+	int ref_count;
+	virtual long get_sizeof () 
+	TDC_PURE_BODY(
+		return 0;
+	)
+
+	void destroy_elements ();
+protected:
+	T_TDC_HANDLE_BASE* implement_get_element (unsigned index, char *first_element);
+	T_TDC_HANDLE_BASE* implement_get_union_element (unsigned index, int& ctrl);
+public:
+	void *operator new (size_t size);//TODO: operator new (size_t size); + eliminate T_TDC_HANDLE_BASE::T_TDC_HANDLE_BASE i.e. todo T_TDC_HANDLE_BASE::operator new (size_t size);
+	T_TDC_PATH_TEXT path_text();
+	virtual int read_ctrl () const
+	{
+		return TDC_CTRL_NOT_AN_UNION;
+	}
+  void set_skip_to_end_from_action (T_TDC_ACTION_ENUM action);
+	virtual void set_skip_to_end (bool skip_to_end);
+	virtual bool get_skip_to_end () const;
+  virtual T_TDC_HANDLE_BASE* make_element (unsigned index);
+	virtual T_TDC_HANDLE_BASE* get_element (unsigned index);
+	virtual int get_tap_handle ();
+	T_TDC_DESCRIPTOR_BASE ();
+	virtual ~T_TDC_DESCRIPTOR_BASE ();
+	virtual char* get_name () const
+	TDC_PURE_BODY(
+		return 0;
+	)
+	virtual T_TDC_IS_ENUM is ()
+	{
+		//TODO: TDC_ERROR() here and mov is function to distinct base classes;
+		return TDC_IS_UNKNOWN;
+	}
+};
+
+union T_TDC_BASIC_TYPES 
+{
+	unsigned long u32;
+	signed long s32;
+	signed int s16;
+	signed char s8;
+	char c[4];
+};
+
+//----------------------------------------------------------------------------
+
+struct T_TDC_INTERFACE_BASE
+{
+private:
+	void* operator &(); /* this member function is only here to prevent the user from taking the address of 
+					an interface, which make no sence to the user as it gives the address of
+					some internal tdc navigation data */
+#ifdef LINT	//TODO: introduce for VC too
+  const  void* operator &() const; /* but we don't want ripling errors from LINT
+          the ripling errors comes from the fact that LINT seems to have a more correct
+          interpretion of where to use the overloaded function and where to truely take
+          the address*/
+#endif
+protected:
+	T_TDC_LEVEL level[1];
+	T_TDC_ASSIGN_ACTION set_action (const T_TDC_ACTION& action_);
+	T_TDC_INTERFACE_BASE ()
+	{
+		//nothing
+	}
+public:
+	T_TDC_PATH* implement_make_descriptor_ref (T_TDC_RW_MODE rw_mode);
+	T_TDC_PATH* make_descriptor_ref (T_TDC_RW_MODE rw_mode);
+	const T_TDC_PATH* make_descriptor_ref (T_TDC_RW_MODE rw_mode) const;
+	void set_descriptor_value (long value_); 
+	//bool cmp_descriptor_value (long value_); 
+	void copy_instance (const T_TDC_INSTANCE_BASE * value_);
+	void copy_interface (const T_TDC_INTERFACE_BASE * value_);
+};
+
+struct T_TDC_INTERFACE_MAIN_BASE
+#if DOT_COMPLETE_MEMBERS
+#else
+	TDC_DOT_COMPLETE_HIDE(:T_TDC_INTERFACE_BASE)
+#endif
+{
+#if DOT_COMPLETE_MEMBERS
+#else
+protected:
+	void set_main_value (const T_TDC_INTERFACE_MAIN_BASE* value_);
+	void set_main_value (const T_TDC_INSTANCE_MAIN_BASE* value_);
+	T_TDC_INTERFACE_BASE* get_element_navigation(T_TDC_NEW_INTERFACE new_element_interface);
+	/*T_TDC_INTERFACE_MAIN_BASE ()
+	{
+		tdc_level++;
+	}*/
+#endif
+};
+
+struct T_TDC_INTERFACE_REF_BASE
+#if DOT_COMPLETE_MEMBERS
+#else
+	TDC_DOT_COMPLETE_HIDE(:T_TDC_INTERFACE_BASE)
+#endif
+{
+#if DOT_COMPLETE_MEMBERS
+	T_TDC_ASSIGN_ACTION _skip () {} /* you can use '= SKIP' as well */
+	T_TDC_ASSIGN_ACTION _show () {} /* you can use '= SHOW' as well */
+	T_TDC_ASSIGN_ACTION _forbid () {} /* you can use '= FORBID' as well */
+	T_TDC_ASSIGN_ACTION _require () {} /* you can use '= REQUIRE' as well */
+#else//DOT_COMPLETE_MEMBERS
+	T_TDC_INTERFACE_REF_BASE ()
+	{
+		level[0] = 'A'+tdc_level;
+	}
+	TDC_DOT_COMPLETE_HIDE(T_TDC_ASSIGN_ACTION tdc_skip ();) /* you can use '= SKIP' as well */
+	TDC_DOT_COMPLETE_HIDE(T_TDC_ASSIGN_ACTION tdc_show ();) /* you can use '= SHOW' as well */
+	TDC_DOT_COMPLETE_HIDE(T_TDC_ASSIGN_ACTION tdc_forbid ();) /* you can use '= FORBID' as well */
+	TDC_DOT_COMPLETE_HIDE(T_TDC_ASSIGN_ACTION tdc_require ();) /* you can use '= REQUIRE' as well */
+#endif//DOT_COMPLETE_MEMBERS
+};
+
+struct T_TDC_INTERFACE_VAR_BASE
+#if DOT_COMPLETE_MEMBERS
+#else
+	TDC_DOT_COMPLETE_HIDE(:T_TDC_INTERFACE_BASE)
+#endif
+{
+#if DOT_COMPLETE_MEMBERS
+	T_TDC_ASSIGN_ACTION _skip () {} /* you can use '= SKIP' as well */
+	T_TDC_ASSIGN_ACTION _show () {} /* you can use '= SHOW' as well */
+	T_TDC_ASSIGN_ACTION _forbid () {} /* you can use '= FORBID' as well */
+	T_TDC_ASSIGN_ACTION _require () {} /* you can use '= REQUIRE' as well */
+#else//DOT_COMPLETE_MEMBERS
+	T_TDC_INTERFACE_VAR_BASE ()
+	{
+		level[0] = 'A'+tdc_level;
+	}
+	TDC_DOT_COMPLETE_HIDE(T_TDC_ASSIGN_ACTION tdc_skip ();) /* you can use '= SKIP' as well */
+	TDC_DOT_COMPLETE_HIDE(T_TDC_ASSIGN_ACTION tdc_show ();) /* you can use '= SHOW' as well */
+	TDC_DOT_COMPLETE_HIDE(T_TDC_ASSIGN_ACTION tdc_forbid ();) /* you can use '= FORBID' as well */
+	TDC_DOT_COMPLETE_HIDE(T_TDC_ASSIGN_ACTION tdc_require ();) /* you can use '= REQUIRE' as well */
+#endif//DOT_COMPLETE_MEMBERS
+};
+
+//----------------------------------------------------------------------------
+
+#if TDC_DEBUG_DOT_COMPLETE
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1K()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s.
+    i;
+  s->
+    i0;
+}
+#else
+#endif
+
+//----------------------------------------------------------------------------
+/** \defgroup PATH PATH
+ *  A set of classes and functions that is used for generating the path of 
+ *  an element when generating warning or error messages.
+ *  TODO: need more work
+ */
+//\{
+
+struct T_TDC_PATH
+#ifdef TDC_USE_ALLOC_DEBUG_COUNTER
+	:T_TDC_ALLOC_DEBUG<T_TDC_PATH>
+#endif
+{
+	T_TDC_HANDLE_BASE* handle;
+	T_TDC_DESCRIPTOR_BASE* cahed_descriptor;
+	int indexes_count;
+  union{
+    int *indexes;
+    struct T_WATCH_INDEXES{
+      int i0,i1,i2,i3,i4,i5,i6,i7,i8,i9;
+    }*watch_indexes;
+  };
+	T_TDC_INTERFACE_BASE* pattern;
+	T_TDC_PATH* next;
+	T_TDC_PATH (T_TDC_HANDLE_BASE* handle_);
+	~T_TDC_PATH ();
+	void add_index(T_TDC_DESCRIPTOR_BASE* descriptor, int index);
+	void add_to_cashed_path_list ();
+	T_TDC_HANDLE_BASE* get_leaf();
+	T_TDC_PATH_TEXT get_path_text ();
+	T_TDC_PATH* duplicate()const;
+};
+
+//----------------------------------------------------------------------------
+
+#if TDC_DEBUG_DOT_COMPLETE
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1L()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s.
+    i;
+  s->
+    i0;
+
+}
+#else
+#endif
+
+//----------------------------------------------------------------------------
+
+struct const_T_TDC_COPY
+{
+	T_TDC_HANDLE_BASE* descriptor_ref;
+	const T_TDC_PATH* path;
+	const_T_TDC_COPY (const T_TDC_PATH* path_):
+		descriptor_ref (const_cast<T_TDC_PATH*>(path_)->get_leaf()),
+		path (path_)
+	{
+	}
+	const_T_TDC_COPY (const T_TDC_HANDLE_BASE* descriptor_ref_):
+		descriptor_ref (const_cast<T_TDC_HANDLE_BASE*>(descriptor_ref_)),
+		path (0)
+	{
+	}
+	const_T_TDC_COPY (const const_T_TDC_COPY& src):
+		descriptor_ref (src.descriptor_ref),
+		path (0)
+	{
+		if (src.path)
+			path = src.path->duplicate();
+	}
+	void operator = (const const_T_TDC_COPY& src)
+	{
+		descriptor_ref = src.descriptor_ref;
+		if (path)
+			delete path;
+		if (src.path)
+			path = src.path->duplicate();
+		else
+			path = 0;
+	}
+	const T_TDC_HANDLE_BASE* operator->()
+	{
+		return descriptor_ref;
+	}
+	operator const T_TDC_HANDLE_BASE*()const
+	{
+		return descriptor_ref;
+	}
+	~const_T_TDC_COPY ()
+	{
+		if (path)
+			delete path;
+	}
+	T_TDC_PATH_TEXT path_text ();
+	T_TDC_ACTION_ENUM get_action () const
+	{
+		return descriptor_ref->get_action();
+	}
+	bool has_value () const
+	{
+		return (descriptor_ref->get_action() & TDC_ACTION_HAS_VALUE) != 0;
+	}
+	int get_value () const
+	{
+		return descriptor_ref->get_value();
+	}
+};
+
+struct T_TDC_COPY:const_T_TDC_COPY
+{
+  friend struct T_TDC_COPY;
+  T_TDC_COPY (T_TDC_PATH* path_):
+    const_T_TDC_COPY (path_)
+  {
+  }
+  T_TDC_COPY (T_TDC_HANDLE_BASE* descriptor_ref_):
+    const_T_TDC_COPY (descriptor_ref_)
+  {
+  }
+  T_TDC_HANDLE_BASE* operator->()
+  {
+    return descriptor_ref;
+  }
+  operator T_TDC_HANDLE_BASE*()const
+  {
+    return descriptor_ref;
+  }
+  void copy_descriptor_ref (const const_T_TDC_COPY& value_);
+  void copy_number (long value_);
+  T_TDC_ASSIGN_ACTION copy_action (T_TDC_ACTION_ENUM action_);
+private:
+  void set_action_and_value (T_TDC_ACTION_ENUM action_, long value_=0xFCFCFCFC);
+};
+
+//----------------------------------------------------------------------------
+
+/** \struct T_TDC_PATH_TEXT 
+    T_TDC_PATH_TEXT is used to return a string on the heap that will auto dealloc
+    <pre>
+		e.g.
+		
+		T_TDC_PATH_TEXT f()
+		{
+			return strdup ("...");
+		}
+
+		void g()
+		{
+			printf ("%s", f()); // free of string allocated in f() will happen automatic
+								// when ~T_TDC_PATH_TEXT is called at the end of sentence (at ';')
+		}
+    </pre>
+*/
+struct T_TDC_PATH_TEXT
+{
+	char* str;
+	T_TDC_PATH_TEXT(char* str_);
+	~T_TDC_PATH_TEXT();
+};
+
+//\}
+
+//----------------------------------------------------------------------------
+
+#if TDC_DEBUG_DOT_COMPLETE
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1N()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s.
+    i;
+  s->
+    i0;
+
+}
+#else
+#endif
+
+//============================================================================
+/// \defgroup T_TDC_INTERFACE
+//\{
+
+struct T_TDC_INTERFACE_REF:T_TDC_INTERFACE_REF_BASE
+{
+#if DOT_COMPLETE_MEMBERS
+#else
+	T_TDC_INTERFACE_REF ()
+	{
+		tdc_level++;
+	}
+#endif
+};
+
+struct T_TDC_INTERFACE_VAR:T_TDC_INTERFACE_VAR_BASE
+{
+#if DOT_COMPLETE_MEMBERS
+#else
+	T_TDC_INTERFACE_VAR ()
+	{
+		//nothing
+	}
+#endif
+};
+
+//============================================================================
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1O
+{
+  int i1O;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1O()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s.
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1O s10;
+  s10->
+    i0;
+}
+#else
+#endif
+
+//----------------------------------------------------------------------------
+
+#if DOT_COMPLETE
+#define TDC_HIDDEN_LEVEL_DEF
+#define TDC_HIDDEN_LEVEL(T_BASE)
+#define TDC_HIDDEN_LEVEL_MAIN_DEF
+#define TDC_HIDDEN_LEVEL_MAIN(T_BASE)
+struct T_TDC_INTERFACE_POINTER_MAIN_BASE:T_TDC_INTERFACE_REF_BASE
+{
+};
+#else
+#define TDC_HIDDEN_LEVEL_DEF 
+#define TDC_HIDDEN_LEVEL 
+#define TDC_HIDDEN_LEVEL_MAIN_DEF , class T_TDC_INTERFACE_POINTER_MAIN_BASE = T_TDC_INTERFACE_POINTER_MAIN_BASE_DEFAULT
+#define TDC_HIDDEN_LEVEL_MAIN(T_BASE) , T_BASE
+#endif
+
+struct T_TDC_INTERFACE_PRIMITIVE_BASE:T_TDC_INTERFACE_MAIN_BASE
+{
+};
+
+struct T_TDC_INTERFACE_MESSAGE_BASE:T_TDC_INTERFACE_MAIN_BASE
+{
+};
+
+//template<class T TDC_HIDDEN_LEVEL_MAIN_DEF > struct T_TDC_INTERFACE_POINTER_MAIN:T_TDC_INTERFACE_POINTER_BASE
+template<class T TDC_HIDDEN_LEVEL_MAIN_DEF > struct T_TDC_INTERFACE_POINTER_MAIN:T_TDC_INTERFACE_POINTER_MAIN_BASE
+{
+	T_TDC_INTERFACE_POINTER_MAIN ()
+	{
+		level[0] = 'A'+tdc_level;
+	}
+#if  DOT_COMPLETE_MEMBERS
+#else //DOT_COMPLETE_MEMBERS
+	operator = (const T& t) 
+	{
+		tdc_tbd_pointer_assignment_error();
+		//get_navigation()->_set(t);
+		return 0;
+	}
+#endif //DOT_COMPLETE_MEMBERS
+	/*operator = (const T_TDC_INSTANCE& t) 
+	{
+		get_navigation()->_set(t);
+	}*/
+	T* operator-> (){
+		return (T*)get_element_navigation(new_element_interface);		
+	}
+	/*operator const T&()
+	{
+		return *get_navigation();
+	}*/
+private:
+#if  DOT_COMPLETE_MEMBERS
+#else //DOT_COMPLETE_MEMBERS
+	static T_TDC_INTERFACE_BASE* new_element_interface()
+	{
+		return new T;
+	}
+#endif //DOT_COMPLETE_MEMBERS
+};	
+
+template<class T> struct T_ARRAY;
+
+struct T_TDC_INTERFACE_ARRAY_BASE
+  :T_TDC_INTERFACE_REF_BASE
+{
+#if DOT_COMPLETE
+#else
+protected:
+	T_TDC_INTERFACE_BASE* get_element_navigation(int index, T_TDC_NEW_INTERFACE new_element_interface, T_TDC_NEW_HANDLE new_handle);
+	void copy_basic_array (const T_TDC_INT_U8* array, unsigned size, void *address);
+	void copy_basic_array (const T_TDC_INT_S8* array, unsigned size, void *address);
+	void copy_basic_array (const T_TDC_INT_U16* array, unsigned size, void *address);
+	void copy_basic_array (const T_TDC_INT_S16* array, unsigned size, void *address);
+	void copy_basic_array (const T_TDC_INT_U32* array, unsigned size, void *address);
+	void copy_basic_array (const T_TDC_INT_S32* array, unsigned size, void *address);
+#endif
+};
+
+/*
+**	TODO: Function header (this is a comment for an bug fix)		
+**
+**	I would expect dropdown to work for this
+**		template<class T, int MAX_INDEX   > struct T_TDC_INTERFACE_ARRAY:T_TDC_INTERFACE_POINTER_BASE_DEFAULT
+**										^^
+**	and to fail for this
+**		template<class T, int MAX_INDEX, int DUMMY=0 > struct T_TDC_INTERFACE_ARRAY:T_TDC_INTERFACE_POINTER_BASE_DEFAULT
+**										^^^^^^^^^^^^^
+**										
+**	but it seams to be the otherway around (see more info in tcd_test.cpp::test_1000())
+*/
+
+#if DOT_COMPLETE
+template<class T /*T_INTERFACE*/, int MAX_INDEX = 1, int DUMMY=0> struct T_TDC_INTERFACE_ARRAY
+#else
+template<class T /*T_INTERFACE*/, int MAX_INDEX = 1> struct T_TDC_INTERFACE_ARRAY
+//template<class T /*T_INTERFACE*/> struct T_TDC_INTERFACE_ARRAY
+#endif
+	:T_TDC_INTERFACE_ARRAY_BASE
+{
+public:
+	T& operator [] (int index)//HINT: blah
+  {
+		return *(T*)get_element_navigation (index, new_element_interface, T::implement_new_handle);		
+	}
+	T* operator-> ()//HINT: blah
+  {
+		return (T*)get_element_navigation (0, new_element_interface, T::implement_new_handle);		
+	}
+#if  DOT_COMPLETE_MEMBERS
+#else//DOT_COMPLETE_MEMBERS
+	T_TDC_INTERFACE_ARRAY ()
+	{
+		//nothing
+	}
+	void assign (const T_TDC_INT_U8* array, unsigned size, void *address)
+	{
+		copy_basic_array (array, size, address);
+	}
+	void assign (const T_TDC_INT_S8* array, unsigned size, void *address)
+	{
+		copy_basic_array (array, size, address);
+	}
+	void assign (const T_TDC_INT_U16* array, unsigned size, void *address)
+	{
+		copy_basic_array (array, size, address);
+	}
+	void assign (const T_TDC_INT_S16* array, unsigned size, void *address)
+	{
+		copy_basic_array (array, size, address);
+	}
+	void assign (const T_TDC_INT_U32* array, unsigned size, void *address)
+	{
+		copy_basic_array (array, size, address);
+	}
+	void assign (const T_TDC_INT_S32* array, unsigned size, void *address)
+	{
+		copy_basic_array (array, size, address);
+	}
+	void assign (const T_TDC_ACTION& action_, unsigned size, void *address)
+	{
+    set_action(action_);
+	}
+	/*template <class U>
+	void assign (const U* u, unsigned size)
+	{
+		//TDC_TBD();
+	}*/
+	template <class U>
+	void assign (const T_ARRAY<U>& src, unsigned size, void *address)
+	{
+		T_TDC_COPY handle = make_descriptor_ref (TDC_RW_MODE_WRITE);
+		handle.copy_descriptor_ref (src.handle);
+	}
+	void assign (const T* t, unsigned size, void *address)
+	{
+		//tdc_check_array_assignment(array, address);
+		tdc_tbd_array_assignment_error();
+	}
+	void assign (const T::T_INSTANCE* array, unsigned size, void *address)
+	{
+		tdc_check_array_assignment(array, address);
+		//copy_instance_array (array, size);
+		T_TDC_COPY handle = make_descriptor_ref (TDC_RW_MODE_WRITE);
+		T_TDC_HANDLE_BASE* descriptor_ref = handle.descriptor_ref;
+		T_TDC_DESCRIPTOR_BASE* descriptor = descriptor_ref->make_descriptor ();
+		T_TDC_HANDLE_BASE** elements = ((T_TDC_DESCRIPTOR_ARRAY_BASE*)descriptor)->get_elements();
+		if (!*elements)
+			*elements = T::implement_new_handle ();
+		int count = size / sizeof *array;
+
+		for (int i = 0; i < count; i++)
+		{
+			T_TDC_COPY dst_element = descriptor->make_element(i);
+			const_T_TDC_COPY src_element = (T_TDC_HANDLE_BASE*) array[i].handle;
+			dst_element.copy_descriptor_ref (src_element);
+		}
+	}
+	template <class U>
+	T_TDC_INTERFACE_ARRAY& operator = (const U& array) 
+	{
+		int size = sizeof array;			/* if you have error "illegal indirection" here the right hand operator can not be  converted to an array
+											see next error message for the bad assignment */
+		assign (array, size, (void*)&array);
+		return *this;
+	}
+private:
+	static T_TDC_INTERFACE_BASE* new_element_interface()
+	{
+		return new T;
+	}
+#endif//DOT_COMPLETE_MEMBERS
+};	
+
+/*
+**	TODO: Function header (this is a comment for an bug fix)		
+**
+**	When we change T_TDC_INTERFACE_ARRAY  we have to change T_TDC_INTERFACE_POINTER too
+**		template<class T TDC_HIDDEN_LEVEL_DEF > struct T_TDC_INTERFACE_POINTER:T_TDC_INTERFACE_ARRAY<T, 1 TDC_HIDDEN_LEVEL> 
+*/
+
+struct T_TDC_INTERFACE_POINTER_BASE:T_TDC_INTERFACE_REF_BASE
+{
+protected:
+	T_TDC_INTERFACE_BASE* get_navigation(T_TDC_NEW_INTERFACE new_element_interface, T_TDC_NEW_HANDLE new_handle);
+  T_TDC_INTERFACE_BASE* get_navigation(T_TDC_NEW_INTERFACE new_element_interface, T_TDC_NEW_HANDLE new_handle, int index);
+};
+
+template<class T_INTERFACE> struct T_TDC_INTERFACE_POINTER
+#if DOT_COMPLETE
+#else
+	:T_TDC_INTERFACE_POINTER_BASE
+#endif
+{
+	T_INTERFACE* operator-> ()
+  {
+		return (T_INTERFACE*)get_navigation (new_element_interface, T_INTERFACE::implement_new_handle);		
+	}
+#if  DOT_COMPLETE_MEMBERS
+#else//DOT_COMPLETE_MEMBERS
+	T_INTERFACE& operator [] (int index)
+  {
+		return *(T_INTERFACE*)get_navigation (new_element_interface, T_INTERFACE::implement_new_handle, index);		
+	}
+	static T_TDC_INTERFACE_BASE* new_element_interface()
+	{
+		return new T_INTERFACE;
+	}
+	/*T_TDC_INTERFACE_POINTER ()
+	{
+		//nothing
+	}*/
+#endif//DOT_COMPLETE_MEMBERS
+};
+
+//============================================================================
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1P
+{
+  int i1P;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1P()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s.
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1P s1P;
+  s1P->
+    i0;
+  T_TDC_INTERFACE_ARRAY<int> i;
+i.assign(0,0);
+  T_ARRAY<int> array;
+  array.
+
+}
+#else
+#endif
+
+//----------------------------------------------------------------------------
+// T_TDC_INTERFACE
+//----------------------------------------------------------------------------
+
+struct T_TDC_INTERFACE_PRIM_BASE:T_TDC_INTERFACE_PRIMITIVE_BASE
+{
+	T_TDC_INTERFACE_PRIM_BASE ()
+	{
+		level[0] = 'A'+tdc_level;
+		tdc_level++;
+	}
+#if DOT_COMPLETE_MEMBERS//{{
+	T_TDC_ASSIGN_ACTION _require () {} // you can use '= REQUIRE' as well
+#else//}DOT_COMPLETE_MEMBERS{
+	T_TDC_ASSIGN_ACTION tdc_require() // you can use '= REQUIRE' as well
+	{
+		return set_action (REQUIRE);
+	}
+#endif//}}DOT_COMPLETE_MEMBERS
+};
+
+struct T_TDC_INTERFACE_PSTRUCT_BASE:T_TDC_INTERFACE_REF
+{
+};
+
+struct T_TDC_INTERFACE_PUNION_BASE:T_TDC_INTERFACE_REF
+{
+};
+
+struct T_TDC_INTERFACE_SDU_BASE:T_TDC_INTERFACE_REF
+{
+};
+
+struct T_TDC_INTERFACE_PENUM_BASE:T_TDC_INTERFACE_VAR
+{
+};
+
+struct T_TDC_INTERFACE_MSG_BASE:T_TDC_INTERFACE_MESSAGE_BASE
+{
+	T_TDC_INTERFACE_MSG_BASE ()
+	{
+		level[0] = 'A'+tdc_level;
+		tdc_level++;
+	}
+#if DOT_COMPLETE_MEMBERS
+	T_TDC_ASSIGN_ACTION _require () {} // you can use '= REQUIRE' as well
+#else//DOT_COMPLETE_MEMBERS
+	T_TDC_ASSIGN_ACTION tdc_require() // you can use '= REQUIRE' as well
+	{
+		return set_action (REQUIRE);
+	}
+#endif//DOT_COMPLETE_MEMBERS
+};
+
+struct T_TDC_INTERFACE_MSTRUCT_BASE:T_TDC_INTERFACE_REF
+{
+};
+
+struct T_TDC_INTERFACE_MUNION_BASE:T_TDC_INTERFACE_REF
+{
+};
+
+struct T_TDC_INTERFACE_MENUM_BASE:T_TDC_INTERFACE_VAR
+{
+};
+
+struct T_TDC_INTERFACE_INT_BASE:T_TDC_INTERFACE_VAR
+{
+};
+
+struct T_TDC_INTERFACE_XXX_PRIMITIVE_UNION_BASE:T_TDC_INTERFACE_PRIMITIVE_BASE
+{
+	T_TDC_INTERFACE_XXX_PRIMITIVE_UNION_BASE ()
+	{
+		level[0] = 'A'+tdc_level;
+		tdc_level++;
+	}
+};
+
+struct T_TDC_INTERFACE_XXX_MESSAGE_UNION_BASE:T_TDC_INTERFACE_MESSAGE_BASE
+{
+	T_TDC_INTERFACE_XXX_MESSAGE_UNION_BASE ()
+	{
+		level[0] = 'A'+tdc_level;
+		tdc_level++;
+	}
+};
+
+struct T_TDC_INTERFACE_PRIMITIVE_UNION_BASE:T_TDC_INTERFACE_PRIMITIVE_BASE
+{
+	T_TDC_INTERFACE_PRIMITIVE_UNION_BASE ()
+	{
+		level[0] = 'A'+tdc_level;
+		tdc_level++;
+	}
+};
+
+struct T_TDC_INTERFACE_MESSAGE_UNION_BASE:T_TDC_INTERFACE_MESSAGE_BASE
+{
+	T_TDC_INTERFACE_MESSAGE_UNION_BASE ()
+	{
+		level[0] = 'A'+tdc_level;
+		tdc_level++;
+	}
+};
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1Q
+{
+  int i1Q;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1Q()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s. 
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1Q s1Q;
+  s1Q->
+    i;
+}
+#else
+#endif
+
+template<class T> struct T_TDC_INTERFACE_XXX_PRIMITIVE:T_TDC_INTERFACE_POINTER_MAIN<T TDC_HIDDEN_LEVEL_MAIN(T_TDC_INTERFACE_PRIMITIVE_BASE) >
+{
+};
+
+template<class T> struct T_TDC_INTERFACE_XXX_MESSAGE:T_TDC_INTERFACE_POINTER_MAIN<T TDC_HIDDEN_LEVEL_MAIN(T_TDC_INTERFACE_MESSAGE_BASE) >
+{
+};
+
+template<class T> struct T_TDC_INTERFACE_PRIMITIVE:T_TDC_INTERFACE_POINTER_MAIN<T TDC_HIDDEN_LEVEL_MAIN(T_TDC_INTERFACE_PRIMITIVE_BASE) >
+{
+};
+
+template<class T> struct T_TDC_INTERFACE_PRIMITIVE_UNION_POINTER:T_TDC_INTERFACE_POINTER_MAIN<T TDC_HIDDEN_LEVEL_MAIN(T_TDC_INTERFACE_PRIMITIVE_BASE) >
+{
+};
+
+template<class T> struct T_TDC_INTERFACE_MESSAGE:T_TDC_INTERFACE_POINTER_MAIN<T TDC_HIDDEN_LEVEL_MAIN(T_TDC_INTERFACE_MESSAGE_BASE) >
+{
+};
+
+template<class T> struct T_TDC_INTERFACE_MESSAGE_UNION_POINTER:T_TDC_INTERFACE_POINTER_MAIN<T TDC_HIDDEN_LEVEL_MAIN(T_TDC_INTERFACE_MESSAGE_BASE) >
+{
+};
+
+//\}
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1Q1
+{
+  int i1Q1;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1Q1u
+{
+  int i1Q1u;
+};
+template<class T>
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1Q1t1
+{
+  int i1Q1t;
+  //T* operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1Q1()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1Q1 s1Q1;
+  s1Q1->
+    i;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1Q1t1<T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1Q1u> s1Q1t1u;
+  s1Q1t1u.
+    i1Q1t;
+  s1Q1t1u->
+    i1Q1u;
+  /*T_TDC_INTERFACE_PRIMITIVE_UNION_POINTER z1Q1_;
+  z1Q1_->
+    i;*/
+  T_TDC_INTERFACE_PRIMITIVE_UNION_POINTER<T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1Q1> z1Q1;
+  z1Q1.
+    x;
+  z1Q1->
+    i;
+}
+#else
+#endif
+
+//============================================================================
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1R
+{
+  int i1R;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1R()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s. 
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1R s1R;
+  s1R->
+    i0;
+}
+#else
+#endif
+
+//----------------------------------------------------------------------------
+/// \defgroup T_TDC_DESCRIPTOR T_TDC_DESCRIPTOR
+/// base classes to repeat stuff that is similar in many descriptor classes
+//----------------------------------------------------------------------------
+//\{
+
+struct T_TDC_DESCRIPTOR_ARRAY_BASE:T_TDC_DESCRIPTOR_BASE
+{
+	int tap_handle;
+	int implement_get_tap_array_handle (unsigned c_elements, T_TDC_DESCRIPTOR_BASE* sdu_handle);
+	int get_tap_array_handle (unsigned c_elements);
+	bool skip_to_end;
+	virtual T_TDC_IS_ENUM is ();
+	virtual void set_skip_to_end (bool skip_to_end_);
+	virtual bool get_skip_to_end ();
+	T_TDC_DESCRIPTOR_ARRAY_BASE ();
+	virtual char* get_name () const;
+	~T_TDC_DESCRIPTOR_ARRAY_BASE ();
+	T_TDC_HANDLE_BASE** get_elements();
+  unsigned get_c_elements();
+  void set_c_elements(unsigned c_elements);
+	T_TDC_HANDLE_BASE* make_element (unsigned index);
+	T_TDC_HANDLE_BASE* get_element (unsigned index);
+};
+
+template<class T, int MAX_INDEX = 1> 
+struct T_TDC_DESCRIPTOR_ARRAY:T_TDC_DESCRIPTOR_ARRAY_BASE
+{
+	typedef T_TDC_DESCRIPTOR_ARRAY<T, MAX_INDEX> T_DESCRIPTOR_ARRAY;
+	friend T_TDC_DESCRIPTOR_BASE * new_T_DESCRIPTOR_ARRAY(void)
+	{
+		return new T_TDC_DESCRIPTOR_ARRAY<T, MAX_INDEX>;
+	}
+	unsigned c_elements;
+	typedef T T_ELEMENT;
+  T_ELEMENT* elements;
+	T_TDC_DESCRIPTOR_ARRAY()
+	{
+		c_elements = 0;
+		elements = 0;
+	}
+	virtual int get_tap_handle ()
+	{
+		return get_tap_array_handle (c_elements);
+	}
+	#ifndef TDC_TEST_PROFILE 
+	virtual long get_sizeof ()
+	{
+		/* this function should never be called but the base version have no chance of returning a proper value so we keep it just in case */
+		TDC_DYNAMIC_DEAD_CODE();
+		return sizeof *this;
+	}
+	#endif
+};
+
+struct T_TDC_HANDLE_ARRAY_BASE:T_TDC_HANDLE_BASE
+{
+	virtual char* get_name () const;
+	virtual T_TDC_IS_ENUM is ()
+	{
+		return TDC_IS_ARRAY;
+	}
+};
+
+template<class T, int MAX_INDEX = 1> 
+struct T_TDC_HANDLE_ARRAY:T_TDC_HANDLE_ARRAY_BASE
+{
+	typedef T_TDC_DESCRIPTOR_ARRAY<T, MAX_INDEX> T_DESCRIPTOR_ARRAY;
+	virtual long get_sizeof ()
+	{
+		return sizeof *this;
+	}
+  M_TDC_DESCRIPTOR_HANDLE_ADDITIONAL_PART (T_DESCRIPTOR_ARRAY)
+protected:
+  virtual T_TDC_DESCRIPTOR_BASE* implement_new_descriptor () const;
+};
+
+#if DOT_COMPLETE 
+#else
+// the dot complete compiler can not handle this code
+template<class T, int MAX_INDEX> 
+T_TDC_DESCRIPTOR_BASE* T_TDC_HANDLE_ARRAY<T, MAX_INDEX>::implement_new_descriptor(void) const
+{
+	//return new T_DESCRIPTOR_ARRAY;
+	/*TODO: We don't allways need the element array and the code was once remove 
+    but it seems like there are still problems with code like:
+      T_ARRAY<T_S8> parray_ps8c;
+      parray_ps8c[0]. _require;
+  */
+  T_DESCRIPTOR_ARRAY *descriptor = new T_DESCRIPTOR_ARRAY;
+	/*T_TDC_HANDLE_BASE** elements = ((T_TDC_DESCRIPTOR_ARRAY_BASE*)descriptor)->get_elements();
+	if (!*elements)
+    //*elements = new_handle ();
+		*elements = T::implement_new_handle();*/  
+  return descriptor;
+}
+#endif
+
+#ifdef TDC_SIMULATE_POINTER
+#define T_TDC_DESCRIPTOR_POINTER T_TDC_DESCRIPTOR_ARRAY
+#define T_TDC_HANDLE_POINTER T_TDC_HANDLE_ARRAY
+#else
+
+struct T_TDC_DESCRIPTOR_POINTER_BASE:T_TDC_DESCRIPTOR_BASE
+{
+	virtual T_TDC_IS_ENUM is ();
+	virtual char* get_name () const;
+	T_TDC_HANDLE_BASE** get_elements();
+	virtual T_TDC_HANDLE_BASE* get_element (unsigned index);
+	virtual int get_tap_handle ();
+ 	//virtual int read_ctrl () const;
+};
+
+template<class T /*T_HANDLE*/> struct T_TDC_DESCRIPTOR_POINTER:T_TDC_DESCRIPTOR_POINTER_BASE
+{
+	typedef T_TDC_DESCRIPTOR_POINTER<T> T_DESCRIPTOR_POINTER;
+	friend T_TDC_DESCRIPTOR_BASE * new_T_DESCRIPTOR_POINTER(void)
+	{
+		return new T_TDC_DESCRIPTOR_POINTER<T, MAX_INDEX>;
+	}
+	//T::T_DESCRIPTOR element;
+	T* element;
+	//T element;
+	#ifndef TDC_TEST_PROFILE 
+	virtual long get_sizeof ()
+	{
+		/* this function should never be called but the base version have no chance of returning a proper value so we keep it just in case */
+		TDC_DYNAMIC_DEAD_CODE();
+		return sizeof *this;
+	}
+	#endif
+};
+
+struct T_TDC_HANDLE_POINTER_BASE:T_TDC_HANDLE_BASE
+{
+	virtual char* get_name () const;
+	virtual T_TDC_IS_ENUM is ()
+	{
+		return TDC_IS_POINTER;
+	}
+	virtual T_TDC_DESCRIPTOR_BASE* implement_new_descriptor () const;
+};
+
+template<class T> struct T_TDC_HANDLE_POINTER:T_TDC_HANDLE_POINTER_BASE
+{
+	typedef T_TDC_DESCRIPTOR_POINTER<T> T_DESCRIPTOR_POINTER;
+	virtual long get_sizeof ()
+	{
+		return sizeof *this;
+	}
+	M_TDC_DESCRIPTOR_HANDLE_ADDITIONAL_PART (T_DESCRIPTOR_POINTER)
+protected:
+  virtual T_TDC_DESCRIPTOR_BASE* implement_new_descriptor () const;
+};
+
+#if DOT_COMPLETE 
+#else
+// the dot complete compiler can not handle this code
+template<class T> 
+T_TDC_DESCRIPTOR_BASE* T_TDC_HANDLE_POINTER<T>::implement_new_descriptor(void) const
+{
+	return new T_DESCRIPTOR_POINTER;
+}
+#endif
+
+#endif
+
+//----------------------------------------------------------------------------
+
+struct T_TDC_DESCRIPTOR_MAIN_BASE:T_TDC_DESCRIPTOR_BASE
+{
+	virtual int get_id () const
+	TDC_PURE_BODY(
+		return 0;
+	)
+	T_TDC_HANDLE_BASE* get_element (unsigned index)
+	{
+		char *first_element = (char*) this + sizeof *this;
+		return implement_get_element (index, first_element);
+	}
+};
+
+struct T_TDC_DESCRIPTOR_XSTRUCT_BASE:T_TDC_DESCRIPTOR_BASE
+{ 
+	int tap_handle;
+	int get_tap_xstruct_handle (T_TDC_TABLE_KIND table_kind);
+	T_TDC_DESCRIPTOR_XSTRUCT_BASE ();
+	~T_TDC_DESCRIPTOR_XSTRUCT_BASE ();
+	T_TDC_HANDLE_BASE* get_element (unsigned index);
+};
+
+struct T_TDC_DESCRIPTOR_INT_BASE:T_TDC_HANDLE_BASE
+{
+  virtual int get_tap_handle ();
+};
+
+//-----
+
+struct T_TDC_DESCRIPTOR_PRIM_BASE:T_TDC_DESCRIPTOR_MAIN_BASE
+{
+	virtual T_TDC_IS_ENUM is ()
+	{
+		return T_TDC_IS_ENUM (TDC_IS_COMP | TDC_IS_PRIM);
+	}
+};
+
+struct T_TDC_DESCRIPTOR_PSTRUCT_BASE:T_TDC_DESCRIPTOR_XSTRUCT_BASE
+{
+	virtual T_TDC_IS_ENUM is ()
+	{
+		return TDC_IS_STRUCT;
+	}
+	virtual int get_tap_handle  ();
+};
+
+struct T_TDC_DESCRIPTOR_PUNION_BASE:T_TDC_DESCRIPTOR_BASE
+{
+	virtual T_TDC_IS_ENUM is ()
+	{
+		return TDC_IS_UNION;
+	}
+};
+
+struct T_TDC_DESCRIPTOR_SDU_BASE:T_TDC_DESCRIPTOR_BASE
+{
+	virtual T_TDC_IS_ENUM is ()
+	{
+		return TDC_IS_SDU;
+	}
+	virtual int get_tap_handle ()
+	{
+		return TDC_DUMMY_TAP_HANDLE;
+	}
+	void invoke_tap (T_TDC_EVENT_ENUM event) const;
+};
+
+struct T_TDC_DESCRIPTOR_PENUM_BASE:T_TDC_HANDLE_BASE
+{
+  virtual int get_tap_handle ();
+	virtual T_TDC_IS_ENUM is ()
+	{
+		return TDC_IS_PVAR;
+	}
+};
+
+//-----
+
+struct T_TDC_DESCRIPTOR_MSG_BASE:T_TDC_DESCRIPTOR_MAIN_BASE
+{
+	virtual T_TDC_IS_ENUM is ()
+	{
+		return T_TDC_IS_ENUM (TDC_IS_COMP | TDC_IS_MSG);
+	}
+};
+
+struct T_TDC_DESCRIPTOR_MSTRUCT_BASE:T_TDC_DESCRIPTOR_XSTRUCT_BASE
+{
+	virtual T_TDC_IS_ENUM is ()
+	{
+		return TDC_IS_STRUCT;
+	}
+	virtual int get_tap_handle ();
+};
+
+struct T_TDC_DESCRIPTOR_MUNION_BASE:T_TDC_DESCRIPTOR_BASE
+{
+	virtual T_TDC_IS_ENUM is ()
+	{
+		return TDC_IS_UNION;
+	}
+};
+
+struct T_TDC_DESCRIPTOR_MENUM_BASE:T_TDC_HANDLE_BASE
+{
+  virtual int get_tap_handle ();
+	virtual T_TDC_IS_ENUM is ()
+	{
+		return TDC_IS_MVAR;
+	}
+};
+
+//-----
+
+struct T_TDC_DESCRIPTOR_XXX_PRIMITIVE_UNION_BASE:T_TDC_DESCRIPTOR_BASE
+{
+};
+
+struct T_TDC_DESCRIPTOR_XXX_MESSAGE_UNION_BASE:T_TDC_DESCRIPTOR_BASE
+{
+};
+
+struct T_TDC_DESCRIPTOR_PRIMITIVE_UNION_BASE:T_TDC_DESCRIPTOR_BASE
+{
+};
+
+struct T_TDC_DESCRIPTOR_MESSAGE_UNION_BASE:T_TDC_DESCRIPTOR_BASE
+{
+	//TODO: construct munions (when called from make_element_info, shold be hamless in get_element_info)
+};
+
+//\}
+
+//============================================================================
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1S
+{
+  int i1S;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1S()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s. 
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1S s1S;
+  s1S->
+    i0;
+}
+#else
+#endif
+
+//----------------------------------------------------------------------------
+/// \defgroup T_TDC_INSTANCE T_TDC_INSTANCE
+/// base classes to repeat stuff that is similar in many instance classes
+//----------------------------------------------------------------------------
+///\{
+
+struct T_TDC_INSTANCE_BASE
+{
+//private:
+	T_TDC_HANDLE_BASE* implement_get_handle () const;
+	void implement_set_handle(T_TDC_HANDLE_BASE* handle);
+//protected:
+  virtual T_TDC_INTERFACE_BASE *new_interface () const;
+//public:
+	T_TDC_INTERFACE_BASE *get_navigation () const;
+//protected:
+	T_TDC_INTERFACE_BASE *get_element_navigation (int index) const;
+//public:
+  T_TDC_INTERFACE_BASE *make_element_navigation (int index, T_TDC_NEW_HANDLE new_element_handle);
+	T_TDC_HANDLE_BASE* get_descriptor_ref () const;
+	T_TDC_ASSIGN_ACTION set_action(const T_TDC_ACTION& action_);
+	void set_value (const T_TDC_INSTANCE_BASE& value_);
+	void copy_instance (const T_TDC_INSTANCE_BASE * value_);
+	void copy_interface (const T_TDC_INTERFACE_BASE * value_);
+	T_TDC_ASSIGN_ACTION construct_from_action(const T_TDC_ACTION& action_, T_TDC_NEW_HANDLE new_handle);
+	void construct_from_instance (const T_TDC_INSTANCE_BASE& value_, T_TDC_NEW_HANDLE new_handle);
+	void construct_from_interface (const T_TDC_INTERFACE_BASE * value_, T_TDC_NEW_HANDLE new_handle);
+	void set_descriptor_value (long value_);
+	long get_descriptor_value ();
+	bool cmp_descriptor_value (long value_); 
+	void construct_from_number (long value_, T_TDC_NEW_HANDLE new_handle);
+	void destroy_handle ();
+	T_TDC_HANDLE_BASE* construct_handle (T_TDC_NEW_HANDLE new_handle);
+  T_TDC_HANDLE_BASE* construct_array_handle (T_TDC_NEW_HANDLE new_handle,T_TDC_NEW_HANDLE new_element_handle);
+	T_TDC_DESCRIPTOR_BASE* construct_descriptor (T_TDC_NEW_HANDLE new_handle);
+	T_TDC_DESCRIPTOR_BASE* construct_array_descriptor (T_TDC_NEW_HANDLE new_handle,T_TDC_NEW_HANDLE new_element_handle);
+	T_TDC_INSTANCE_BASE();
+  ~T_TDC_INSTANCE_BASE();
+private:
+  ///Check for copy constructor missing in class derived from T_TDC_INSTANCE_BASE
+	T_TDC_INSTANCE_BASE(const T_TDC_INSTANCE_BASE&);
+};
+
+struct T_TDC_INSTANCE_MAIN_BASE:T_TDC_INSTANCE_BASE
+{
+	void set_main_value (const T_TDC_INTERFACE_MAIN_BASE* value_);
+	void set_main_value (const T_TDC_INSTANCE_MAIN_BASE* value_);
+	void construct_main_value (const T_TDC_INTERFACE_MAIN_BASE* value_, T_TDC_NEW_HANDLE new_handle);
+	void construct_main_value (const T_TDC_INSTANCE_MAIN_BASE* value_, T_TDC_NEW_HANDLE new_handle);
+};
+
+struct T_TDC_INSTANCE_PART_BASE
+#if DOT_COMPLETE
+#else
+	TDC_DOT_COMPLETE_HIDE(:T_TDC_INSTANCE_BASE)
+#endif
+{
+};
+
+struct T_TDC_INSTANCE_PRIMITIVE_BASE
+#if DOT_COMPLETE
+#else
+	TDC_DOT_COMPLETE_HIDE(:T_TDC_INSTANCE_MAIN_BASE)
+#endif
+{
+#if DOT_COMPLETE
+#else
+	TDC_DOT_COMPLETE_HIDE(void invoke_tap (T_TDC_EVENT_ENUM) const;)
+#endif
+};
+
+struct T_TDC_INSTANCE_MESSAGE_BASE
+#if DOT_COMPLETE
+#else
+	TDC_DOT_COMPLETE_HIDE(:T_TDC_INSTANCE_MAIN_BASE)
+#endif
+{
+};
+
+struct T_TDC_INSTANCE_PRIM_BASE:T_TDC_INSTANCE_PRIMITIVE_BASE
+{
+};
+
+struct T_TDC_INSTANCE_PSTRUCT_BASE:T_TDC_INSTANCE_PART_BASE
+{
+};
+
+struct T_TDC_INSTANCE_PUNION_BASE:T_TDC_INSTANCE_PART_BASE
+{
+};
+
+struct T_TDC_INSTANCE_SDU_BASE:T_TDC_INSTANCE_PART_BASE
+{
+};
+
+struct T_TDC_INSTANCE_PENUM_BASE:T_TDC_INSTANCE_PART_BASE
+{
+};
+
+struct T_TDC_INSTANCE_MSG_BASE:T_TDC_INSTANCE_MESSAGE_BASE
+{
+};
+
+struct T_TDC_INSTANCE_MSTRUCT_BASE:T_TDC_INSTANCE_PART_BASE
+{
+};
+
+struct T_TDC_INSTANCE_MUNION_BASE:T_TDC_INSTANCE_PART_BASE
+{
+};
+
+struct T_TDC_INSTANCE_MENUM_BASE:T_TDC_INSTANCE_PART_BASE
+{
+};
+
+struct T_TDC_INSTANCE_INT_BASE:T_TDC_INSTANCE_PART_BASE
+{
+};
+
+struct T_TDC_INSTANCE_XXX_PRIMITIVE_UNION_BASE:T_TDC_INSTANCE_PRIMITIVE_BASE
+{
+};
+
+struct T_TDC_INSTANCE_XXX_MESSAGE_UNION_BASE:T_TDC_INSTANCE_MESSAGE_BASE
+{
+};
+
+struct T_TDC_INSTANCE_PRIMITIVE_UNION_BASE:T_TDC_INSTANCE_PRIMITIVE_BASE
+{
+};
+
+struct T_TDC_INSTANCE_MESSAGE_UNION_BASE:T_TDC_INSTANCE_MESSAGE_BASE
+{
+};
+
+//----------------------------------------------------------------------------
+
+struct T_TDC_INSTANCE_ARRAY_BASE
+#if DOT_COMPLETE
+#else
+	TDC_DOT_COMPLETE_HIDE(:T_TDC_INSTANCE_BASE)
+#endif
+{
+#if DOT_COMPLETE_MEMBERS
+	T_TDC_ASSIGN_ACTION _skip () {} /* you can use '= SKIP' as well */
+	T_TDC_ASSIGN_ACTION _show () {} /* you can use '= SHOW' as well */
+	T_TDC_ASSIGN_ACTION _forbid () {} /* you can use '= FORBID' as well */
+	T_TDC_ASSIGN_ACTION _require () {} /* you can use '= REQUIRE' as well */
+#else//DOT_COMPLETE_MEMBERS
+	T_TDC_ASSIGN_ACTION tdc_skip (); /* you can use '= SKIP' as well */
+	T_TDC_ASSIGN_ACTION tdc_show (); /* you can use '= SHOW' as well */
+	T_TDC_ASSIGN_ACTION tdc_forbid (); /* you can use '= FORBID' as well */
+	T_TDC_ASSIGN_ACTION tdc_require (); /* you can use '= REQUIRE' as well */
+	/*T_ARRAY operator = (const T_TDC_ACTION& action_)
+	{
+		set_action (action_);
+		return *this;
+	}*/
+#endif//DOT_COMPLETE_MEMBERS
+};
+
+#if DOT_COMPLETE
+template<class T /*T_INSTANCE*/, int DUMMY> struct T_ARRAY
+#else
+template<class T /*T_INSTANCE*/> struct T_ARRAY
+#endif
+	:T_TDC_INSTANCE_ARRAY_BASE
+{
+  T::T_INTERFACE& operator [] (int index_)
+  {
+		return *(T::T_INTERFACE*)make_element_navigation(index_,T::implement_new_handle);
+  }
+  /*
+  T::T_INTERFACE& operator -> ()
+  {
+		return *(T::T_INTERFACE*)get_element_navigation(0);
+  }
+  */
+#if DOT_COMPLETE
+#else
+	typedef T_TDC_HANDLE_ARRAY<T::T_HANDLE> T_HANDLE;
+  T_HANDLE* handle;
+	friend T_TDC_HANDLE_BASE* new_T_HANDLE()\
+	{
+		return new T_HANDLE;//(T::implement_new_handle);
+	}
+	T_ARRAY operator = (const T_ARRAY& value_)
+	{
+		set_value (value_);
+		return *this;
+	}
+	T_ARRAY ()
+	{
+		construct_array_handle(new_T_HANDLE,T::implement_new_handle);
+	}
+	~T_ARRAY ()
+	{
+		destroy_handle();
+	}
+	// T_ARRAY (const T_ARRAY<T>& u1)  =>  ambiguous call to overloaded function
+	void assign (const T_ARRAY<T>& array, unsigned size, void* address)
+	{
+		construct_array_descriptor(new_T_HANDLE,T::implement_new_handle);
+		T_TDC_COPY(handle).copy_descriptor_ref (array.handle);
+	}
+	template<class U1> void assign (const U1* array, unsigned size, void* address)
+	{
+		tdc_check_array_assignment(array, address);
+		int count = size / sizeof *array;
+		T_TDC_DESCRIPTOR_BASE* descriptor = construct_array_descriptor(new_T_HANDLE,T::implement_new_handle);
+		for (int i = 0; i < count; i++)
+		{
+			T_TDC_COPY element = descriptor->make_element(i);
+			element.copy_descriptor_ref ((T_TDC_HANDLE_BASE*) array[i].handle);
+		}
+	}
+	void assign (const T_TDC_ACTION& action_, unsigned size, void *address)
+	{
+		construct_from_action (action_, new_T_HANDLE);
+	}
+	/*T_ARRAY (const T_ARRAY& array) //ambiguous call to overloaded function
+	{
+		assign (array, sizeof array, (void*)&array);
+	}*/
+	template<class U1> T_ARRAY (const U1& array)
+	{
+		assign (array, sizeof array, (void*)&array);
+	}
+	template<class U1> T_ARRAY (const U1& u1, T_TDC_ACTION action)
+	{
+		const T* array = u1;
+		int count = sizeof u1 / sizeof *u1;
+		T_TDC_DESCRIPTOR_BASE* descriptor = construct_array_descriptor(new_T_HANDLE,T::implement_new_handle);
+    descriptor->set_skip_to_end_from_action (action.action);
+		for (int i = 0; i < count; i++)
+		{
+			T_TDC_COPY element = descriptor->make_element(i);
+			element.copy_descriptor_ref ((T_TDC_HANDLE_BASE*) array[i].handle);
+		}
+	}
+  template<class U1> T_ARRAY (const U1& u1, T_TDC_CREATE_ACTION action)
+  {
+    const T* array = u1;
+    int count = sizeof u1 / sizeof *u1;
+    T_TDC_DESCRIPTOR_BASE* descriptor = construct_array_descriptor(new_T_HANDLE,T::implement_new_handle);
+    descriptor->set_skip_to_end_from_action (action.action);
+    for (int i = 0; i < count; i++)
+    {
+      T_TDC_COPY element = descriptor->make_element(i);
+      element.copy_descriptor_ref ((T_TDC_HANDLE_BASE*) array[i].handle);
+    }
+  }
+	template<class U1, class U2> T_ARRAY (const U1& u1, const U2& u2)
+	{
+		tdc_tbd_array_assignment_error_T_ARRAY();
+	}
+  /*
+	template<class U1, class U2, class U3> T_ARRAY (U1 u1, U2 u2, U3 u3)
+	{
+		TDC_TBD();
+	}
+	template<class U1, class U2, class U3, class U4> T_ARRAY (U1 u1, U2 u2, U3 u3, U4 u4)
+	{
+		TDC_TBD();
+	}
+	template<class U1, class U2, class U3, class U4, class U5> T_ARRAY (U1 u1, U2 u2, U3 u3, U4 u4, U5 u5)
+	{
+		TDC_TBD();
+	}
+  */
+	virtual T_TDC_INTERFACE_BASE *new_interface () const
+	{
+		return new T::T_INTERFACE;
+	}
+#endif
+};
+
+
+#define	M_TDC_BASIC_ARRAY(T_BASIC)\
+	T_ARRAY ()\
+	{\
+		/*construct_handle(new_T_HANDLE);*/\
+	}\
+	template<class U1>\
+	T_ARRAY (const U1& array, T_TDC_ACTION action)\
+	{\
+		assign (array, sizeof array, (void*)&array, action);\
+	}\
+	template<class U1>\
+	T_ARRAY (const U1& array)\
+	{\
+		assign (array, sizeof array, (void*)&array, TDC_ACTION_UNKNOWN);\
+	}\
+	T_ARRAY operator = (const T_ARRAY& value_)\
+	{\
+		set_value (value_);\
+		return *this;\
+	}\
+	T_ARRAY operator = (const T_TDC_ACTION& action_)\
+	{\
+		construct_from_action (action_,new_T_HANDLE);\
+		return *this;\
+	}\
+
+template<class T, class T_BASIC> struct T_TDC_INSTANCE_BASIC_ARRAY:T_TDC_INSTANCE_ARRAY_BASE
+{
+	typedef T_TDC_HANDLE_ARRAY<T::T_HANDLE> T_HANDLE;
+  T_HANDLE* handle;
+	static T_TDC_HANDLE_BASE* new_T_HANDLE()\
+	{
+		return new T_HANDLE;//(T::implement_new_handle);
+	}
+	T_TDC_INSTANCE_BASIC_ARRAY ()
+	{
+		construct_array_descriptor(new_T_HANDLE,T::implement_new_handle);
+	}
+	void assign (const T_BASIC* array, unsigned size, void* address, T_TDC_ACTION action)
+	{
+		tdc_check_array_assignment(array, address);
+		unsigned count = size / sizeof T_BASIC;
+		T_TDC_DESCRIPTOR_BASE* descriptor = construct_array_descriptor(new_T_HANDLE,T::implement_new_handle);
+    descriptor->set_skip_to_end_from_action (action.action);
+		for (int i = 0; i < count; i++)
+		{
+			T_TDC_COPY element= descriptor->make_element(i);
+			element.copy_number (array[i]);
+		}
+	}
+  void assign (const T_BASIC* array, unsigned size, void* address, T_TDC_CREATE_ACTION action)
+  {
+    tdc_check_array_assignment(array, address);
+    unsigned count = size / sizeof T_BASIC;
+    T_TDC_DESCRIPTOR_BASE* descriptor = construct_array_descriptor(new_T_HANDLE,T::implement_new_handle);
+    descriptor->set_skip_to_end_from_action (action.action);
+    for (int i = 0; i < count; i++)
+    {
+      T_TDC_COPY element= descriptor->make_element(i);
+      element.copy_number (array[i]);
+    }
+  }
+	void assign (const T_ARRAY<T>& array, unsigned size, void* address)
+	{
+		construct_array_descriptor(new_T_HANDLE,T::implement_new_handle);
+		T_TDC_COPY(handle).copy_descriptor_ref (array.handle);
+	}
+	template<class U1> void assign (const U1* array, unsigned size, void* address)
+	{
+		tdc_check_array_assignment(array, address);
+		int count = size / sizeof *array;
+		T_TDC_DESCRIPTOR_BASE* descriptor = construct_array_descriptor(new_T_HANDLE,T::implement_new_handle);
+		for (int i = 0; i < count; i++)
+		{
+			T_TDC_COPY element = descriptor->make_element(i);
+			element.copy_descriptor_ref ((T_TDC_HANDLE_BASE*) array[i].handle);
+		}
+	}
+	void assign (const T_TDC_ACTION& action_, unsigned size, void *address)
+	{
+		construct_from_action (action_, new_T_HANDLE);
+	}
+	void assign (const T_ARRAY<T_BASIC>& array, unsigned size, void* address, T_TDC_ACTION action)
+	{
+    construct_from_instance(array,new_T_HANDLE);
+	}
+  T::T_INTERFACE& operator [] (int index_)
+  {
+	  return *(T::T_INTERFACE*)get_element_navigation(index_);
+  }
+	virtual T_TDC_INTERFACE_BASE *new_interface () const
+	{
+		return new T::T_INTERFACE;
+	}
+};
+
+//\}
+
+//============================================================================
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W
+{
+  int i1W;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s. 
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W s1W;
+  s1W->
+    i0;
+}
+#else
+#endif
+
+//============================================================================
+/// \defgroup BuildInTypes build in types
+//============================================================================
+//\{
+
+//#pragma M_TDC_MESSAGE (M_TDC_STRING(M_TDC_FORWARD_INT (U8)))
+M_TDC_FORWARD_INT (U8)
+M_TDC_FORWARD_INT (S8)
+M_TDC_FORWARD_INT (U16)
+M_TDC_FORWARD_INT (S16)
+M_TDC_FORWARD_INT (U32)
+M_TDC_FORWARD_INT (S32)
+
+M_TDC_FORWARD_PSTRUCT (raw)
+M_TDC_FORWARD_PSTRUCT (aim)
+M_TDC_FORWARD_COMP (MESSAGE_UNION,TDC_IS_MESSAGE_UNION)
+
+//M_TDC_FORWARD_MSTRUCT(COMP_STENCIL)
+M_TDC_FORWARD_BASE(COMP_STENCIL, T_TDC_HANDLE_COMP_STENCIL)
+M_TDC_HANDLE(M_TDC_IN_CLASS,M_TDC_WITHOUT_BODY,COMP_STENCIL,TDC_IS_COMP)
+
+#ifndef TDC_DOT_COMPLETE_HIDE_PROTOTYPES
+struct T_PRIMITIVE_UNION;
+struct T_TDC_INTERFACE_PRIMITIVE_UNION;
+struct T_TDC_DESCRIPTOR_PRIMITIVE_UNION;
+struct T_TDC_HANDLE_PRIMITIVE_UNION;
+T_TDC_HANDLE_BASE* new_T_TDC_HANDLE_PRIMITIVE_UNION();
+
+struct T_MESSAGE_UNION;
+struct T_TDC_INTERFACE_MESSAGE_UNION;
+struct T_TDC_DESCRIPTOR_MESSAGE_UNION;
+struct T_TDC_HANDLE_MESSAGE_UNION;
+T_TDC_HANDLE_BASE* new_T_TDC_HANDLE_MESSAGE_UNION();
+#endif
+
+struct T_TDC_DESCRIPTOR_S8:T_TDC_DESCRIPTOR_INT_BASE
+{
+	M_TDC_DESCRIPTOR_INT_ADDITIONAL (S8)
+};
+
+struct T_TDC_DESCRIPTOR_U8:T_TDC_DESCRIPTOR_INT_BASE
+{
+	M_TDC_DESCRIPTOR_INT_ADDITIONAL (U8)
+};
+
+struct T_TDC_DESCRIPTOR_S16:T_TDC_DESCRIPTOR_INT_BASE
+{
+	M_TDC_DESCRIPTOR_INT_ADDITIONAL (S16)
+};
+
+struct T_TDC_DESCRIPTOR_U16:T_TDC_DESCRIPTOR_INT_BASE
+{
+	M_TDC_DESCRIPTOR_INT_ADDITIONAL (U16)
+};
+
+struct T_TDC_DESCRIPTOR_S32:T_TDC_DESCRIPTOR_INT_BASE
+{
+	M_TDC_DESCRIPTOR_INT_ADDITIONAL (S32)
+};
+
+struct T_TDC_DESCRIPTOR_U32:T_TDC_DESCRIPTOR_INT_BASE
+{
+	M_TDC_DESCRIPTOR_INT_ADDITIONAL (U32)
+};
+
+struct T_TDC_DESCRIPTOR_raw:T_TDC_DESCRIPTOR_PSTRUCT_BASE
+{
+	M_TDC_DESCRIPTOR_PSTRUCT_ADDITIONAL (raw)
+	T_TDC_HANDLE_U16 l_buf;
+	T_TDC_HANDLE_U16 o_buf;
+	T_TDC_HANDLE_ARRAY<T_TDC_DESCRIPTOR_U8> buf;
+	virtual int get_tap_handle ();
+};
+
+struct T_TDC_DESCRIPTOR_COMP_STENCIL:T_TDC_DESCRIPTOR_MSTRUCT_BASE
+{
+	M_TDC_DESCRIPTOR_MSTRUCT_ADDITIONAL (COMP_STENCIL)
+};
+
+struct T_TDC_DESCRIPTOR_VAR_STENCIL:T_TDC_DESCRIPTOR_MENUM_BASE
+{
+  typedef long T_TDC_ENUM_VAR_STENCIL;
+	M_TDC_DESCRIPTOR_MENUM_ADDITIONAL (VAR_STENCIL)
+};
+ 
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W1
+{
+  int i1W1;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W1()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s. 
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W1 s1W1;
+  s1W1->
+    i0;
+}
+#else
+#endif
+
+
+typedef T_TDC_DESCRIPTOR_ARRAY<T_TDC_HANDLE_COMP_STENCIL> T_TDC_DESCRIPTOR_ARRAY_STENCIL;
+typedef T_TDC_DESCRIPTOR_POINTER<T_TDC_HANDLE_COMP_STENCIL> T_TDC_DESCRIPTOR_POINTER_STENCIL;
+typedef T_TDC_HANDLE_POINTER<T_TDC_HANDLE_COMP_STENCIL> T_TDC_HANDLE_POINTER_STENCIL;
+
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W4
+{
+  int i1W4;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W4()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s. 
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W4 s1W4;
+  s1W4->
+    i0;
+}
+#else
+#endif
+
+#if !defined TDC_DESCRIPTOR || defined TDC_PRECOMPILE 
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W5
+{
+  int i1W5;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W5()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s. 
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W5 s1W5;
+  s1W5->
+    i0;
+}
+#else
+#endif
+
+struct T_U8:T_TDC_INSTANCE_INT_BASE
+{
+//enable pragma line to see expanded version of macro in list file
+//#pragma M_TDC_MESSAGE (M_TDC_STRING(M_TDC_INSTANCE_INT_ADDITIONAL (U8)))
+	M_TDC_INSTANCE_INT_ADDITIONAL (U8)
+	T_TDC_INTERFACE_U8* operator-> ();
+};
+struct T_TDC_INTERFACE_U8:T_TDC_INTERFACE_INT_BASE
+{
+//enable pragma line to see expanded version of macro in list file
+//#pragma M_TDC_MESSAGE (M_TDC_STRING(M_TDC_INTERFACE_INT_ADDITIONAL (U8)))
+	M_TDC_INTERFACE_INT_ADDITIONAL (U8)
+#ifdef TDC_TYPE_NAME_COMPLETE
+	struct T_TDC_TYPE_NAME { char T_U8, ___dummy__basic_type_have_no_members; } _type_name () M_TDC_TYPE_NAME_COMPLETE //HINT: ??? press CTRL + SHIFT + Q to create a reference to this variable
+#endif
+};
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W6
+{
+  int i1W6;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W6()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s. 
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W6 s1W6;
+  s1W6->
+    i0;
+}
+#else
+#endif
+
+struct T_S8:T_TDC_INSTANCE_INT_BASE
+{
+	M_TDC_INSTANCE_INT_ADDITIONAL (S8)
+	T_TDC_INTERFACE_S8* operator-> ();
+};
+struct T_TDC_INTERFACE_S8:T_TDC_INTERFACE_INT_BASE
+{
+	M_TDC_INTERFACE_INT_ADDITIONAL (S8)
+#ifdef TDC_TYPE_NAME_COMPLETE
+	struct T_TDC_TYPE_NAME { char T_S8, ___dummy__basic_type_have_no_members; } _type_name () M_TDC_TYPE_NAME_COMPLETE //HINT: ??? press CTRL + SHIFT + Q to create a reference to this variable
+#endif
+};
+
+struct T_U16:T_TDC_INSTANCE_INT_BASE
+{
+	M_TDC_INSTANCE_INT_ADDITIONAL (U16)
+	T_TDC_INTERFACE_U16* operator-> ();
+};
+struct T_TDC_INTERFACE_U16:T_TDC_INTERFACE_INT_BASE
+{
+	M_TDC_INTERFACE_INT_ADDITIONAL (U16)
+#ifdef TDC_TYPE_NAME_COMPLETE
+	struct T_TDC_TYPE_NAME { char T_U16, ___dummy__basic_type_have_no_members; } _type_name () M_TDC_TYPE_NAME_COMPLETE //HINT: ??? press CTRL + SHIFT + Q to create a reference to this variable
+#endif
+};
+
+struct T_S16:T_TDC_INSTANCE_INT_BASE
+{
+	M_TDC_INSTANCE_INT_ADDITIONAL (S16)
+	T_TDC_INTERFACE_S16* operator-> ();
+};
+struct T_TDC_INTERFACE_S16:T_TDC_INTERFACE_INT_BASE
+{
+	M_TDC_INTERFACE_INT_ADDITIONAL (S16)
+#ifdef TDC_TYPE_NAME_COMPLETE
+	struct T_TDC_TYPE_NAME { char T_S16, ___dummy__basic_type_have_no_members; } _type_name () M_TDC_TYPE_NAME_COMPLETE //HINT: ??? press CTRL + SHIFT + Q to create a reference to this variable
+#endif
+};
+
+struct T_U32:T_TDC_INSTANCE_INT_BASE
+{
+	M_TDC_INSTANCE_INT_ADDITIONAL (U32)
+	T_TDC_INTERFACE_U32* operator-> ();
+};
+struct T_TDC_INTERFACE_U32:T_TDC_INTERFACE_INT_BASE
+{
+	M_TDC_INTERFACE_INT_ADDITIONAL (U32)
+#ifdef TDC_TYPE_NAME_COMPLETE
+	struct T_TDC_TYPE_NAME { char T_U32, ___dummy__basic_type_have_no_members; } _type_name () M_TDC_TYPE_NAME_COMPLETE //HINT: ??? press CTRL + SHIFT + Q to create a reference to this variable
+#endif
+};
+
+struct T_S32:T_TDC_INSTANCE_INT_BASE
+{
+	M_TDC_INSTANCE_INT_ADDITIONAL (S32)
+	T_TDC_INTERFACE_S32* operator-> ();
+};
+struct T_TDC_INTERFACE_S32:T_TDC_INTERFACE_INT_BASE
+{
+	M_TDC_INTERFACE_INT_ADDITIONAL (S32)
+#ifdef TDC_TYPE_NAME_COMPLETE
+	struct T_TDC_TYPE_NAME { char T_S32, ___dummy__basic_type_have_no_members; } _type_name () M_TDC_TYPE_NAME_COMPLETE //HINT: ??? press CTRL + SHIFT + Q to create a reference to this variable
+#endif
+};
+
+struct T_raw:T_TDC_INSTANCE_PSTRUCT_BASE
+{
+	M_TDC_INSTANCE_PSTRUCT_ADDITIONAL (raw,raw)
+	T_TDC_INTERFACE_raw* operator-> ();
+};
+struct T_TDC_INTERFACE_raw:T_TDC_INTERFACE_PSTRUCT_BASE
+{
+	M_TDC_INTERFACE_PSTRUCT_ADDITIONAL (raw,raw)
+	T_TDC_INTERFACE_U16 l_buf; //number of valid bits
+	T_TDC_INTERFACE_U16 o_buf; //offset of first valid bit
+	T_TDC_INTERFACE_ARRAY<T_TDC_INTERFACE_U8> buf; //array size = (o_buf + l_buf + 7) /8 
+#ifdef TDC_TYPE_NAME_COMPLETE
+	struct T_TDC_TYPE_NAME { char T_raw, ___l_buf___o_buf___buf; } _type_name () M_TDC_TYPE_NAME_COMPLETE //HINT: ??? press CTRL + SHIFT + Q to create a reference to this variable
+#endif
+};
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W9
+{
+  int i1W9;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W9()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s. 
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W9 s1W9;
+  s1W9->
+    i0;
+}
+#else
+#endif
+
+struct T_COMP_STENCIL:T_TDC_INSTANCE_MSTRUCT_BASE
+{
+  /*void copy_instance (const T_TDC_INSTANCE_BASE * value_)
+  {
+    TDC_INTERNAL_ERROR();
+  }*/
+  M_TDC_INSTANCE_MSTRUCT_ADDITIONAL (COMP_STENCIL,COMP_STENCIL)
+};
+struct T_TDC_INTERFACE_COMP_STENCIL:T_TDC_INTERFACE_MSTRUCT_BASE
+{
+  M_TDC_INTERFACE_MSTRUCT_ADDITIONAL (COMP_STENCIL,COMP_STENCIL)
+};
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W9A9
+{
+  int i1W9A9;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W9A9()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s. 
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W9A9 s1W9A9;
+  s1W9A9->
+    i0;
+}
+#else
+#endif
+
+#ifndef TDC_DOT_COMPLETE_SOURCE_INSIGHT
+/**
+ allocation call tree:
+  function                                                defined in                          
+    T_PRIMITIVE_UNION()                                     tdc_base.h
+                                                              T_PRIMITIVE_UNION
+                                                                M_TDC_INSTANCE_ADDITIONAL_BASE                                                              
+      construct_handle(new_T_TDC_HANDLE_PRIMITIVE_UNION)    tdc.cpp
+                                                              T_TDC_INSTANCE_BASE
+        new_T_TDC_HANDLE_PRIMITIVE_UNION                    ???                                 global
+          ???
+            implement_new_handle ()                         tdc_lib_main_dsc.cpp                virtual in T_TDC_HANDLE_PRIMITIVE_UNION
+                                                              M_TDC_POST_COMP                   
+                                                                M_TDC_POST_DESCRIPTOR_COMP      
+                                                                  M_TDC_HANDLE_ADDITIONAL 
+              new T_TDC_HANDLE_PRIMITIVE_UNION()            not explicit declared
+                T_TDC_HANDLE_BASE ()                        tdc_dsc.cpp
+                  implement_set_action(TDC_ACTION_DEFAULT)  tdc_dsc.cpp
+                  
+    T_PRIMITIVE_UNION
+
+        make_descriptor()                                   tdc.cpp
+          implement_new_descriptor ()                       tdc.cpp
+            new T_TDC_DESCRIPTOR_PRIMITIVE_UNION            tdc_lib_main_dsc.cpp
+                                                              M_TDC_POST_COMP
+                                                                M_TDC_POST_DESCRIPTOR_COMP
+                                                                  
+
+ */
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W9B
+{
+  int i1W9B;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W9B()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s. 
+    i;
+  s->
+    i0;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W9B s1W9B;
+  s1W9B->
+    i0;
+}
+#else
+#endif
+
+struct T_PRIMITIVE_UNION
+  TDC_DOT_COMPLETE_HIDE(:T_TDC_INSTANCE_PRIMITIVE_UNION_BASE)
+{
+	TDC_DOT_COMPLETE_HIDE(M_TDC_INSTANCE_PRIMITIVE_ADDITIONAL ())
+	T_TDC_INTERFACE_PRIMITIVE_UNION* operator-> ();
+};
+
+struct T_MESSAGE_UNION:T_TDC_INSTANCE_MESSAGE_UNION_BASE
+{
+	TDC_DOT_COMPLETE_HIDE(M_TDC_INSTANCE_MESSAGE_ADDITIONAL ())
+	T_TDC_INTERFACE_MESSAGE_UNION* operator-> ();
+};
+
+#if TDC_DEBUG_DOT_COMPLETE
+struct T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W9B
+{
+  int i1W9B;
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 operator->(){return 0;}
+};
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1W9B()
+{
+  T_PRIMITIVE_UNION primitive_union;
+  primitive_union-> XX_TDC_1;
+}
+#else
+#endif
+
+#else
+typedef T_TDC_INTERFACE_PRIMITIVE_UNION* T_PRIMITIVE_UNION;
+typedef T_TDC_INTERFACE_MESSAGE_UNION* T_MESSAGE_UNION;
+#endif
+
+//----------------------------------------------------------------------------
+
+//#if TDC_DOT_COMPLETE
+//#else
+template<> struct T_ARRAY<U8>:T_TDC_INSTANCE_BASIC_ARRAY<T_U8, U8>
+{
+	M_TDC_BASIC_ARRAY(U8)
+};
+
+template<> struct T_ARRAY<S8>:T_TDC_INSTANCE_BASIC_ARRAY<T_S8, S8>
+{
+	M_TDC_BASIC_ARRAY(S8)
+};
+
+template<> struct T_ARRAY<U16>:T_TDC_INSTANCE_BASIC_ARRAY<T_U16, U16>
+{
+	M_TDC_BASIC_ARRAY(U16)
+};
+
+template<> struct T_ARRAY<S16>:T_TDC_INSTANCE_BASIC_ARRAY<T_S16, S16>
+{
+	M_TDC_BASIC_ARRAY(S16)
+};
+
+template<> struct T_ARRAY<U32>:T_TDC_INSTANCE_BASIC_ARRAY<T_U32, U32>
+{
+	M_TDC_BASIC_ARRAY(U32)
+};
+
+template<> struct T_ARRAY<S32>:T_TDC_INSTANCE_BASIC_ARRAY<T_S32, S32>
+{
+	M_TDC_BASIC_ARRAY(S32)
+};
+//#endif
+
+#endif //!defined TDC_DESCRIPTOR || defined TDC_PRECOMPILE 
+
+//\}
+
+//============================================================================
+// types used by dynamic part
+//============================================================================
+
+struct T_TDC_AWAIT_CONTEXT;
+struct T_TDC_SEND_CONTEXT;
+struct T_TDC_AWAIT;
+
+#ifdef DOT_COMPLETE
+struct T_ON{};
+#endif
+
+//============================================================================
+
+enum T_TDC_JMPRET 
+{
+	TDC_JMPRET_SETJMP = 0, //setjmp is hard coded to return 0
+	TDC_JMPRET_INITIAL = 1,
+	TDC_JMPRET_FAIL = 2,
+	TDC_JMPRET_PASS = 3,
+	TDC_JMPRET_BAD_BREAK = 4,
+	TDC_JMPRET_CASE_PASS = 5,
+	TDC_JMPRET_STEP_PASS = 6,
+	TDC_JMPRET_ON_PASS = 7,
+	TDC_JMPRET_ON_TEST = 8,
+	TDC_JMPRET_ALT_ENTER = 9,
+	TDC_JMPRET_OTHERWISE_PASS = 10,
+	TDC_JMPRET_OTHERWISE_PARK = 11,
+	TDC_JMPRET_TRAP_PASS = 12,
+	TDC_JMPRET_POPED = 13,
+	TDC_JMPRET_USER_ERROR = 14,
+	TDC_JMPRET_INTERNAL_ERROR = 15,
+  TDC_JMPRET_TAP_EXCLUDED = 16
+};
+
+enum T_TDC_CONTEXT
+{
+  TDC_CONTEXT_UNKNOWN,
+  TDC_CONTEXT_FUNCTION,
+  TDC_CONTEXT_CASE,
+  TDC_CONTEXT_STEP,
+  TDC_CONTEXT_ALT,
+  TDC_CONTEXT_ON,
+  TDC_CONTEXT_OTHERWISE,
+  TDC_CONTEXT_TRAP
+};
+
+struct T_TDC_DYNAMIC_CONTEXT_DATA
+{
+	T_TDC_DYNAMIC_CONTEXT_DATA* parent;
+	jmp_buf mark;
+	T_TDC_DYNAMIC_CONTEXT_DATA* prev;
+	T_TDC_JMPRET jmpret;
+	char* file;
+	int line;
+	int event;
+	bool testing;
+	char *text;
+	int destroy_on_fail_handles_count;
+  T_TDC_CONTEXT context;
+	T_TDC_HANDLE_BASE** destroy_on_fail_handles;
+	void add_destroy_on_fail (T_TDC_HANDLE_BASE* handle);
+  void remove_destroy_on_fail (T_TDC_HANDLE_BASE* handle);
+	T_TDC_DYNAMIC_CONTEXT_DATA* pop ();
+	T_TDC_DYNAMIC_CONTEXT_DATA (T_TDC_CONTEXT 
+    context_, T_TDC_DYNAMIC_CONTEXT_DATA* parent_, char* file_, int line_, char* text_);
+	~T_TDC_DYNAMIC_CONTEXT_DATA();
+	void jmp(T_TDC_JMPRET jmpret_);
+};
+
+struct T_TDC_CONTEXT_BASE
+{
+};
+
+struct T_TDC_FUNCTION_CONTEXT:T_TDC_CONTEXT_BASE //the name of this type is contructed to give more info from error message
+{
+	/* 
+		Got this error?
+			error C2039: 'tdc_alt_context' : is not a member of 'T_TDC_FUNCTION_CONTEXT'
+		you are violating the following rules:
+		
+			"ON(...)...;" and "OTHERWISE()...;" must be inside an "ALT{...}" 
+
+		TODO: test above statement
+	*/
+	T_TDC_DYNAMIC_CONTEXT_DATA tdc_function_context; //this member name is contructed to give more info from error message
+	T_TDC_FUNCTION_CONTEXT (char* file_, int line_);
+};
+
+struct T_TDC_USER_ERROR_CASE_BASE
+{
+  // for testing TDC only
+  unsigned int failed;
+};
+
+struct T_TDC_CASE 
+{
+	/** \struct T_TDC_CASE 
+		this type can not have constructor or member functions as it virolate 'extern "C"' in T_CASE macro
+
+		this type should only contain one member so that if returned from a function with '__declspec(dllexport)' 
+		it will be returned in the same way as if such a function returned int, returning an int is what tap2.exe
+		expect
+
+		from an internal tdc point of view there is no difference between a function of type T_CASE and one of
+		type T_TDC_CASE, this is used in some tdc_test test cases
+
+    founctions of type T_CASE (T_TDC_CASE) should not have explicit returns instead they should contain
+    a BEGIN_CASE(...) which will make an implicit return (return is hidden inside macro);
+	*/
+	unsigned int passed;
+};
+
+struct T_TDC_CASE_CONTEXT:T_TDC_CONTEXT_BASE
+{
+	T_TDC_DYNAMIC_CONTEXT_DATA tdc_not_alt_context;
+	T_TDC_CASE_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA* parent_, char* file_, int line_, char* text_);
+	void tdc_end_for ();
+	bool tdc_do_return ();
+  void prepare_exit (int exit_code, char *message);
+	T_TDC_CASE tdc_return_value ();
+  T_TDC_USER_ERROR_CASE_BASE tdc_user_error_return_value ();
+};
+
+struct T_TDC_only_one__BEGIN_CASE__allowed_per_function:T_TDC_CONTEXT_BASE
+{
+	/* TODO: wrong text type name should say it all
+		Got this error?
+			error C2039: 'tdc_alt_context' : is not a member of 'T_TDC__OTHERWISE__MUST_BE_LAST_IN_ALT'
+
+		you are violating one of the following rules:
+		A)
+			"ON(...)...;" cannot follow "OTHERWISE()...;"
+
+		B)
+			"AWAIT(...)" is not allow in side "ALT{...}" enclose it with an "ON(...)"
+			e.g. ALT{... ON(AWAIT(...))...; ...}
+		C)
+			"FAIL()", "PASS()", "SEND(...)" are not allowed inside "ALT{...}" they must be 
+			inside the body of an "ON(AWAIT(something))...;" or "OTHERWISE()...;"
+
+		remember to use curly parantheses "{...}" when the body contain more than one command
+	*/
+	T_TDC_DYNAMIC_CONTEXT_DATA* parent;
+	T_TDC_only_one__BEGIN_CASE__allowed_per_function (T_TDC_DYNAMIC_CONTEXT_DATA& parent_);
+};
+
+/// return of a step
+struct T_STEP 
+{
+	T_STEP ()
+	{
+		//nothing
+	}
+};
+
+struct T_TDC_STEP_CONTEXT:T_TDC_CONTEXT_BASE
+{
+	T_TDC_DYNAMIC_CONTEXT_DATA tdc_not_alt_context;
+	T_TDC_STEP_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA* parent_, char* file_, int line_, char* text_);
+	void tdc_end_for ();
+	bool tdc_do_return ();
+	T_STEP tdc_return_value ();
+};
+
+struct T_TDC_only_one__BEGIN_STEP__allowed_per_function:T_TDC_CONTEXT_BASE
+{
+	/* TODO: wrong text type name should say it all
+		Got this error?
+			error C2039: 'tdc_alt_context' : is not a member of 'T_TDC_only_one__BEGIN_STEP__allowed_per_function'
+
+		you are violating one of the following rules:
+		A)
+			"ON(...)...;" cannot follow "OTHERWISE()...;"
+
+		B)
+			"AWAIT(...)" is not allow in side "ALT{...}" enclose it with an "ON(...)"
+			e.g. ALT{... ON(AWAIT(...))...; ...}
+		C)
+			"FAIL()", "PASS()", "SEND(...)" are not allowed inside "ALT{...}" they must be 
+			inside the body of an "ON(AWAIT(something))...;" or "OTHERWISE()...;"
+
+		remember to use curly parantheses "{...}" when the body contain more than one command
+	*/
+	T_TDC_DYNAMIC_CONTEXT_DATA* parent;
+	T_TDC_only_one__BEGIN_STEP__allowed_per_function (T_TDC_DYNAMIC_CONTEXT_DATA& parent_);
+};
+
+struct T_TDC_ALT_CONTEXT:T_TDC_CONTEXT_BASE
+{
+	/* 
+		Got this error?
+			error C2039: 'tdc_not_alt_context' : is not a member of 'T_TDC_ALT_CONTEXT'
+
+		you are violating one of the following rules:
+		A)
+			"AWAIT(...)" is not allow in side "ALT{...}" enclose it with an "ON(...)"
+			e.g. ALT{... ON(AWAIT(...))...; ...}
+		B)
+			"FAIL()", "PASS()", "SEND(...)", "ALT{...}" are not allowed inside "ALT{...}" they must be 
+			inside the body of an "ON(AWAIT(something))...;" or "OTHERWISE()...;"
+
+		remember to use curly parantheses "{...}" when the body contain more than one command
+	*/
+	T_TDC_DYNAMIC_CONTEXT_DATA tdc_alt_context;
+	T_TDC_ALT_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA& parent_, char* file_, int line_);
+	void tdc_end_for();
+	bool tdc_enter_for();
+};
+
+struct T_TDC_ON_CONTEXT:T_TDC_CONTEXT_BASE
+{
+	T_TDC_DYNAMIC_CONTEXT_DATA tdc_not_alt_context;
+	T_TDC_ON_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA& parent_, char* file_, int line_, char* text_);
+	void tdc_end_for ();
+	bool tdc_enter_for();
+	bool tdc_on_expects_await(T_TDC_AWAIT& await_);
+};
+
+struct T_TDC__OTHERWISE__MUST_BE_LAST_IN_ALT:T_TDC_CONTEXT_BASE
+{
+	/* 
+		Got this error?
+			error C2039: 'tdc_alt_context' : is not a member of 'T_TDC__OTHERWISE__MUST_BE_LAST_IN_ALT'
+
+		you are violating one of the following rules:
+		A)
+			"ON(...)...;" cannot follow "OTHERWISE()...;"
+
+		B)
+			"AWAIT(...)" is not allow in side "ALT{...}" enclose it with an "ON(...)"
+			e.g. ALT{... ON(AWAIT(...))...; ...}
+		C)
+			"FAIL()", "PASS()", "SEND(...)" are not allowed inside "ALT{...}" they must be 
+			inside the body of an "ON(AWAIT(something))...;" or "OTHERWISE()...;"
+
+		remember to use curly parantheses "{...}" when the body contain more than one command
+	*/
+	T_TDC_DYNAMIC_CONTEXT_DATA* parent;
+	T_TDC__OTHERWISE__MUST_BE_LAST_IN_ALT (T_TDC_DYNAMIC_CONTEXT_DATA& parent_);
+};
+
+struct T_TDC_OTHERWISE_CONTEXT:T_TDC_CONTEXT_BASE
+{
+	T_TDC_DYNAMIC_CONTEXT_DATA tdc_not_alt_context;
+	T_TDC_OTHERWISE_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA* parent_, char* file_, int line_);
+	void tdc_end_for ();
+	bool tdc_enter_for ();
+};
+
+struct T_TDC_TRAP_CONTEXT:T_TDC_CONTEXT_BASE
+{
+	T_TDC_DYNAMIC_CONTEXT_DATA tdc_not_alt_context;
+	T_TDC_TRAP_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA& parent_, char* file_, int line_);
+	void tdc_end_for ();
+	bool tdc_trap_testing ();
+	bool tdc_initial ();
+	bool tdc_enter_for ();
+};
+
+struct T_TDC_EVENT_CONTEXT:T_TDC_CONTEXT_BASE
+{
+  T_TDC_EVENT_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_, int line_, char* text_, char* primitive_);
+  T_TDC_EVENT_CONTEXT ();
+};
+
+//============================================================================
+
+#ifdef TDC_PORT
+struct T_PORT
+{
+  T_PORT operator +(T_PORT& port); // be aware: ("x->y","z") + ("a->b","c") != ("x;a->y;b","z;c")
+#if DOT_COMPLETE
+  T_ON AWAIT (T_PRIMITIVE_UNION primitive){}
+  void SEND (T_PRIMITIVE_UNION primitive){}
+#else//DOT_COMPLETE
+  char* src_list;
+  char* dst_list;
+  char* sap_list;
+  bool is_send_port; // -> or <-> was specified
+  bool is_await_port;// <- or <-> was specified
+  T_PORT* next; // used when 2 or more ports have been linked together with operator +
+  void construct(char* src_and_dst_list, char* sap_list_);
+  T_PORT (char* src_and_dst_list, char* sap_list_);
+  T_PORT (char* src_and_dst_list);
+  T_PORT (T_PORT& port,T_PORT* port2=0);
+  ~T_PORT ();
+  T_TDC_AWAIT_CONTEXT tdc_await_context(T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_, int line_, char* primitive_);
+  T_TDC_SEND_CONTEXT tdc_send_context(T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_, int line_, char* primitive_);
+#endif//DOT_COMPLETE
+};
+
+extern T_PORT DEFAULT_PORT;
+#endif
+
+//============================================================================
+/// \defgroup AWAIT
+//\{
+
+/// Special values that can be awaited for the sake of testing TDC 
+enum T_TDC_AWAIT_TESTING {
+	TDC_AWAIT_FAIL, /// Hardcode AWAIT to fail
+	TDC_AWAIT_PASS, /// Hardcode AWAIT to pass
+	TDC_AWAIT_FORCE_PASS, 
+};
+
+#if DOT_COMPLETE
+int TDC_AWAIT_FAIL;
+int TDC_AWAIT_PASS;
+int TDC_AWAIT_FORCE_PASS;
+#endif
+
+///What an AWAIT returns
+struct T_TDC_AWAIT
+{
+  T_TDC_AWAIT();
+private:
+  template<class T> T_TDC_AWAIT operator, (T)
+  {
+    tdc_user_error ("AWAIT can not be part of a comma expression"); // should be courth compiletime as this function is private
+    return T_TDC_AWAIT ();
+  }
+};
+
+struct T_TDC_AWAIT_CONTEXT:T_TDC_EVENT_CONTEXT
+{
+  friend T_TDC_AWAIT_CONTEXT tdc_await_context (T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_, int line_, char* primitive_);
+#ifdef TDC_PORT
+  T_TDC_AWAIT_CONTEXT (T_PORT* port_, T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_, int line_, char* primitive_);
+#else
+  T_TDC_AWAIT_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_, int line_, char* primitive_);
+#endif
+  ~T_TDC_AWAIT_CONTEXT ();
+  T_TDC_AWAIT tdc_implement_await (T_TDC_AWAIT_TESTING pass_or_fail);
+  T_TDC_AWAIT tdc_implement_await (const T_TDC_INSTANCE_PRIMITIVE_BASE& primitive);
+  template<class T> T_TDC_AWAIT tdc_implement_await (T (*f) ())
+  {
+    T primitive = f ();
+    return tdc_implement_await (primitive);
+  }
+  template<class T> T_TDC_AWAIT tdc_implement_await (void (*f) (T))
+  {
+    T primitive;
+    f (primitive);
+    return tdc_implement_await (primitive);
+  }
+};
+
+//\}
+
+//----------------------------------------------------------------------------
+/// \defgroup SEND
+//\{
+
+struct T_TDC_SEND_CONTEXT
+  :T_TDC_EVENT_CONTEXT
+{
+  friend T_TDC_SEND_CONTEXT tdc_send_context (T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_, int line_, char* primitive_);
+#ifdef TDC_PORT
+  T_TDC_SEND_CONTEXT (T_PORT* port_, T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_, int line_, char* primitive_);
+#else
+  T_TDC_SEND_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_, int line_, char* primitive_);
+#endif
+  ~T_TDC_SEND_CONTEXT ();
+  void tdc_implement_send (T_TDC_AWAIT_TESTING pass_or_fail);
+  void tdc_implement_send (const T_TDC_INSTANCE_PRIMITIVE_BASE& primitive);
+  template<class T>void tdc_implement_send (T (*f) ())
+  {
+    T primitive = f ();
+    return tdc_implement_send (primitive);
+  }  
+  template<class T>void tdc_implement_send (void (*f) (T))
+  {
+    T primitive;
+    f (primitive);
+    return tdc_implement_send (primitive);
+  }
+};
+
+//\}
+
+//----------------------------------------------------------------------------
+/// \defgroup COMMAND COMMAND 
+//\{
+
+///What a COMMAND returns
+struct T_TDC_COMMAND
+{
+	T_TDC_COMMAND ();
+private:
+  ///Hides ',' operator for COMMANDS
+	template<class T>
+	T_TDC_COMMAND operator, (T)
+	{
+    tdc_user_error ("COMMAND can not be part of comma expression"); // should be courth compiletime as this function is private		
+		return T_TDC_COMMAND();
+	}
+};
+
+struct T_TDC_COMMAND_CONTEXT:T_TDC_EVENT_CONTEXT
+{
+	T_TDC_COMMAND_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_,int line_, char* text_);
+	T_TDC_COMMAND_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_,int line_, char* text_, char* command_);
+	T_TDC_COMMAND_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_,int line_, char* text_, char* value_text_, long value_);
+	T_TDC_COMMAND operator || (T_TDC_COMMAND& command_);
+};
+
+//\}
+
+/// \defgroup PARKING PARKING Command
+//\{
+
+enum T_TDC_PARKING_ENUM /// Values should be indentical to those defined in tap_int.h
+{
+  DISABLE = 0,
+  SHORT_TERM = 1,
+  LONG_TERM = 2,
+  SHORT_TERM_FAIL = 3,
+  LONG_TERM_FAIL = 4
+};
+
+struct T_TDC_PARKING_CONTEXT:private T_TDC_COMMAND_CONTEXT
+{
+	T_TDC_PARKING_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_,int line_, char* value_text_, T_TDC_PARKING_ENUM value_);
+  T_TDC_PARKING_CONTEXT (T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_,int line_, char* value_text_, bool value_);
+	T_TDC_PARKING_ENUM operator || (T_TDC_PARKING_ENUM value_);
+};
+
+//\}
+
+//============================================================================
+
+extern T_TDC_FUNCTION_CONTEXT tdc_syntax_context;
+
+extern T_TDC_DYNAMIC_CONTEXT_DATA* tdc_dynamic_context;
+
+//----------------------------------------------------------------------------
+
+extern void tdc_implement_fail(T_TDC_JMPRET jmpret);
+
+extern void tdc_implement_user_fail(T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_, int line_);
+
+extern void tdc_implement_pass();
+
+extern void tdc_implement_user_pass(T_TDC_DYNAMIC_CONTEXT_DATA& parent, char* file_, int line_);
+
+//----------------------------------------------------------------------------
+
+extern T_TDC_COMMAND tdc_implement_command (const char* text);
+
+extern T_TDC_COMMAND tdc_implement_timeout (int time);
+
+extern T_TDC_COMMAND tdc_implement_mute (int time);
+
+extern T_TDC_COMMAND tdc_implement_start_timeout (int time);
+
+extern T_TDC_COMMAND tdc_implement_wait_timeout ();
+
+extern T_TDC_PARKING_ENUM tdc_implement_parking (T_TDC_PARKING_ENUM enabled);
+extern T_TDC_PARKING_ENUM tdc_implement_parking (bool enabled);
+
+//============================================================================
+
+#endif //TDC_TESTING
+
+//============================================================================
+/// \defgroup TryCatchProtection
+//\{
+
+/** 
+  map try, catch and throw to our version that prevent the user from using them
+  by having both a plain and a "tdc_implement_..." version it is faily simple
+  temporary to disable the mapping through #undef when need be
+  this is some thing that the user should never do, but tdc have to, so the debugger
+  see our longjmps as exceptions
+
+  //TODO: do this stuff debugger see longjumps as exceptions
+*/
+
+/// try, catch and throw conflicts with longjmp in vc6, use TRAP
+#define try tdc_implement_try		
+/// try, catch and throw conflicts with longjmp in vc6, use ELSE
+#define catch(exception) tdc_implement_catch(exception)	
+/// try, catch and throw conflicts with longjmp in vc6, use FAIL or PASS
+#define throw tdc_implement_throw	
+
+/// try, catch and throw conflicts with longjmp in vc6, use TRAP
+#define tdc_implement_try while(tdc_try_disabled)		
+/// try, catch and throw conflicts with longjmp in vc6, use ELSE
+#define tdc_implement_catch(exception) while(tdc_catch_disabled)	
+/// try, catch and throw conflicts with longjmp in vc6, use FAIL or PASS
+#define tdc_implement_throw while(tdc_throw_disabled)throw	
+
+//\}
+//----------------------------------------------------------------------------
+
+#if DOT_COMPLETE //DOT_COMPLETE_PROTOTYPES
+#ifndef M_TDC_DOC //we don't want theses to occour twice in the call graph
+
+// dummy functions to generate hint in dot-complete (e.g. when pressing <ctrl-shift-space> )
+// remember that functions must have a body to be considered for dot-completion by Visual Studio
+
+void FAIL (void){}
+
+void PASS (void){}
+
+void SEND (T_PRIMITIVE_UNION primitive){}
+
+T_ON AWAIT (T_PRIMITIVE_UNION primitive){}
+
+void COMMAND (char* command_string){}
+
+void TIMEOUT (int timeout){}
+
+void START_TIMEOUT (int timeout){}
+
+void WAIT_TIMEOUT (){}
+
+void MUTE (int timeout){}
+
+T_TDC_PARKING_ENUM PARKING (T_TDC_PARKING_ENUM enable){}
+
+T_similar_syntax_as_while_statement BEGIN_CASE (char* trace_comment){} 
+
+T_similar_syntax_as_while_statement BEGIN_STEP (char* trace_comment){}
+
+T_similar_syntax_as_while_statement ON (T_AWAIT){}
+
+T_similar_syntax_as_while_statement OTHERWISE (){}
+
+#endif//M_TDC_DOC
+#else//DOT_COMPLETE_PROTOTYPES
+
+// real implementation
+
+/*
+  special constructions used in these macros:
+
+    ensure that only a ; is allowed after this macro
+      do {...} while(0)
+
+    make variable declared in for(...) private to the statements ({...} or ...;) after this macro
+      if(0);else 
+
+    make implicit return at exit of loop (x might be replace by more code in the actual macros)
+      for (int x=0;;x=1) if (x) return ...; else
+*/
+
+#define FAIL() do {tdc_implement_user_fail (tdc_syntax_context.tdc_not_alt_context, __FILE__, __LINE__); } while (0)
+
+#define PASS() do {tdc_implement_user_pass (tdc_syntax_context.tdc_not_alt_context, __FILE__, __LINE__); } while (0)
+
+#define SEND(primitive) tdc_send_context(tdc_syntax_context.tdc_not_alt_context, __FILE__, __LINE__, #primitive).tdc_implement_send(T_PRIMITIVE_UNION(primitive))
+
+#define AWAIT(primitive) tdc_await_context(tdc_syntax_context.tdc_not_alt_context, __FILE__, __LINE__, #primitive).tdc_implement_await(T_PRIMITIVE_UNION(primitive))
+
+#define START_TIMEOUT(timeout) (T_TDC_COMMAND_CONTEXT (tdc_syntax_context.tdc_not_alt_context, __FILE__, __LINE__, "START_TIMEOUT", #timeout, timeout) || tdc_implement_start_timeout(timeout))
+
+#ifdef WAIT_TIMEOUT 
+#undef WAIT_TIMEOUT /* To avoid class with defined macro in winbase.h */
+#endif
+#define WAIT_TIMEOUT() (T_TDC_COMMAND_CONTEXT (tdc_syntax_context.tdc_not_alt_context, __FILE__, __LINE__, "WAIT_TIMEOUT") || tdc_implement_wait_timeout())
+
+#define MUTE(timeout) (T_TDC_COMMAND_CONTEXT (tdc_syntax_context.tdc_not_alt_context, __FILE__, __LINE__, "MUTE", #timeout, timeout) || tdc_implement_mute(timeout))
+
+#define COMMAND(command) (T_TDC_COMMAND_CONTEXT (tdc_syntax_context.tdc_not_alt_context, __FILE__, __LINE__, #command) || tdc_implement_command(command))
+
+#define TIMEOUT(timeout) (T_TDC_COMMAND_CONTEXT (tdc_syntax_context.tdc_not_alt_context, __FILE__, __LINE__, #timeout) || tdc_implement_timeout(timeout))
+
+#define PARKING(enable) (T_TDC_PARKING_CONTEXT (tdc_syntax_context.tdc_not_alt_context, __FILE__, __LINE__, #enable, enable) || tdc_implement_parking(enable))
+
+// some short cuts where user forgot '()' after '_skip' etc.
+
+#define _skip tdc_skip()
+#define _show tdc_show()
+#define _forbid tdc_forbid()
+#define _require tdc_require()
+#define _skip_to_end tdc_skip_to_end()
+
+#define _SKIP tdc_skip()
+#define _SHOW tdc_show()
+#define _FORBID tdc_forbid()
+#define _REQUIRE tdc_require()
+#define _SKIP_TO_END tdc_skip_to_end()
+
+#endif//DOT_COMPLETE_PROTOTYPES
+
+#define M_TDC_COMMAND_MUST_BE_LAST_IN_SCOPE true
+
+/** \defgroup BEGIN_CASE BEGIN_CASE(){}
+  Usage:
+  <pre>
+    T_CASE casename () 
+    {
+      BEGIN_CASE ("trace_comment")
+      {
+        ...
+      }
+    }
+  </pre>
+*/
+//\{
+
+/// return type for a test CASE 
+#define T_CASE \
+	extern "C" __declspec(dllexport) T_TDC_CASE 
+
+/** \def T_TDC_USER_ERROR_CASE
+  Test cases defined with T_TDC_USER_ERROR_CASE 
+  are cases that passes when they fail and fails when they passes,
+  this is only intended for testing TDC it self.
+  T_TDC_USER_ERROR_CASE will not reverse the result of a syntax error.
+
+  <pre>
+  Usage:
+	  T_TDC_USER_ERROR_CASE casename () 
+	  {
+		  TDC_BEGIN_USER_ERROR_CASE ("trace_comment")
+		  {
+			  ...
+		  }
+	  }
+  </pre>
+*/
+
+/// return type for a test USER ERROR CASE 
+#define T_TDC_USER_ERROR_CASE\
+  extern "C" __declspec(dllexport) T_TDC_USER_ERROR_CASE_BASE
+
+/// stuff common  to BEGIN_CASE and TDC_BEGIN_USER_ERROR_CASE
+#define M_TDC_BEGIN_CASE_BASE(trace_comment,return_value)\
+	T_TDC_only_one__BEGIN_CASE__allowed_per_function tdc_begin_case (tdc_syntax_context.tdc_function_context);\
+  if(0);else/*hide tdc_syntax_context after for body*/\
+	for (T_TDC_CASE_CONTEXT tdc_context (tdc_begin_case.parent,__FILE__,__LINE__,trace_comment),\
+			&tdc_syntax_context = ((tdc_context.tdc_not_alt_context.jmpret = T_TDC_JMPRET (setjmp (tdc_context.tdc_not_alt_context.mark))),tdc_context);\
+		M_TDC_COMMAND_MUST_BE_LAST_IN_SCOPE;\
+		tdc_context.tdc_end_for ())\
+	if (tdc_context.tdc_do_return ())\
+		return tdc_context.return_value ();\
+	else
+
+/// BEGIN_CASE should be the outermost scope in a CASE
+#define BEGIN_CASE(trace_comment)\
+  M_TDC_BEGIN_CASE_BASE(trace_comment,tdc_return_value)
+
+/// TDC_BEGIN_USER_ERROR_CASE a BEGIN_CASE for T_TDC_USER_ERROR_CASE
+#define TDC_BEGIN_USER_ERROR_CASE(trace_comment)\
+  M_TDC_BEGIN_CASE_BASE(trace_comment,tdc_user_error_return_value)
+
+//\}		
+
+/** \defgroup BEGIN_STEP BEGIN_STEP(){}
+<pre>
+  Usage:
+	  T_STEP stepname (...) 
+	  {
+		  BEGIN_STEP ("trace_comment")
+		  {
+			  ...
+		  }
+	  }
+</pre>
+*/
+//\{
+
+//TODO: move functionality from tdc_context to tdc_begin_step and delete tdc_context 
+#define BEGIN_STEP(trace_comment)\
+  T_TDC_only_one__BEGIN_STEP__allowed_per_function tdc_begin_step (tdc_syntax_context.tdc_function_context), &tdc_syntax_context = tdc_begin_step;\
+  if (0); else\
+  for (T_TDC_STEP_CONTEXT tdc_context (tdc_begin_step.parent,__FILE__,__LINE__,trace_comment),\
+      &tdc_syntax_context = ((tdc_context.tdc_not_alt_context.jmpret = T_TDC_JMPRET (setjmp (tdc_context.tdc_not_alt_context.mark))),tdc_context);\
+    M_TDC_COMMAND_MUST_BE_LAST_IN_SCOPE;\
+    tdc_context.tdc_end_for ())\
+  if (tdc_context.tdc_do_return ())\
+    return tdc_context.tdc_return_value ();\
+  else
+
+//\}
+
+/** \defgroup TRAP_ONFAIL TRAP{} & ONFAIL{}
+<pre>
+  Usage:
+    TRAP
+    {
+      ...
+      FAIL();
+    }
+    ONFAIL
+    {
+      ...
+    }
+</pre>
+*/
+//\{
+
+#define TRAP\
+	if (0); else\
+	for (T_TDC_TRAP_CONTEXT tdc_context (tdc_syntax_context.tdc_not_alt_context, __FILE__, __LINE__);\
+		tdc_context.tdc_initial () && \
+			(tdc_context.tdc_not_alt_context.jmpret = T_TDC_JMPRET (setjmp (tdc_context.tdc_not_alt_context.mark)),\
+			tdc_context.tdc_enter_for ());\
+		)\
+	if (tdc_context.tdc_trap_testing ())\
+	for (T_TDC_TRAP_CONTEXT &tdc_syntax_context = tdc_context; ; tdc_syntax_context.tdc_end_for())
+
+#ifdef M_TDC_DOC
+#define ONFAIL() //Soure Insight will only draw call gaphs if "()" is present
+#else
+#define ONFAIL else // we don't want to do something special here, as we can't ensure warning on a plain else
+#endif
+
+//\}
+
+/** \defgroup ALT_ON_OTHERWISE ALT{}, ON() & OTHERWISE()
+<pre>
+  Usage:
+    ALT
+    {
+      ON (AWAIT (...)) ...;
+      ON (AWAIT (...)) ...;
+      ON (AWAIT (...)) ...;
+      OTHERWISE () ...;
+    }
+</pre>
+*/
+//\{
+
+#define ALT\
+	if (0); else\
+	for (T_TDC_ALT_CONTEXT tdc_context (tdc_syntax_context.tdc_not_alt_context, __FILE__, __LINE__), &tdc_syntax_context = tdc_context;\
+		tdc_context.tdc_alt_context.jmpret = T_TDC_JMPRET (setjmp (tdc_context.tdc_alt_context.mark)),\
+			tdc_context.tdc_enter_for ();\
+		tdc_context.tdc_end_for ())
+
+#define ON(await)\
+	if (0); else\
+	for (T_TDC_ON_CONTEXT tdc_context (tdc_syntax_context.tdc_alt_context,__FILE__,__LINE__,#await), &tdc_syntax_context = tdc_context;\
+		tdc_context.tdc_not_alt_context.jmpret = T_TDC_JMPRET (setjmp (tdc_context.tdc_not_alt_context.mark)),\
+			tdc_context.tdc_enter_for () && tdc_context.tdc_on_expects_await (await);\
+		tdc_context.tdc_end_for ())
+
+#define OTHERWISE()\
+	T_TDC__OTHERWISE__MUST_BE_LAST_IN_ALT tdc_otherwise (tdc_syntax_context.tdc_alt_context), &tdc_syntax_context = tdc_otherwise;\
+	if (0); else\
+	for (T_TDC_OTHERWISE_CONTEXT tdc_syntax_context (tdc_otherwise.parent, __FILE__, __LINE__);\
+		tdc_syntax_context.tdc_not_alt_context.jmpret = T_TDC_JMPRET (setjmp (tdc_syntax_context.tdc_not_alt_context.mark)),\
+			tdc_syntax_context.tdc_enter_for (), M_TDC_COMMAND_MUST_BE_LAST_IN_SCOPE ;\
+		tdc_syntax_context.tdc_end_for ()) 
+
+//\}
+
+//============================================================================
+
+#if TDC_DEBUG_DOT_COMPLETE
+void F_TDC_DEBUG_DOT_COMPLETE__TDC_H_1Z()
+{
+  T_TDC_DEBUG_DOT_COMPLETE__TDC_H_1 s;
+  s. 
+    i;
+  s->i0;
+  T_TDC_INTERFACE_ARRAY<int> i;
+  i.
+}
+#else
+#endif
+
+//============================================================================
+
+#endif //TDC_BASE_H
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/tdc_msg.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,357 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   : TDC
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifdef TDC_H
+#error "TDC.H already included, TDC.H must come after all primitives and messages"
+#endif
+
+#ifndef TDC_MSG_H
+#define TDC_MSG_H
+
+#if DOT_COMPLETE_DEFINES
+
+//----------------------------------------------------------------------------
+// macros to repeat stuff that is similar in many interface classes 
+//----------------------------------------------------------------------------
+
+#define M_TDC_INTERFACE_PRIM_ADDITIONAL(SHORT_NAME)
+
+#define M_TDC_INTERFACE_PSTRUCT_ADDITIONAL(SHORT_NAME)
+
+#define M_TDC_INTERFACE_PUNION_ADDITIONAL(SHORT_NAME)
+
+#define M_TDC_INTERFACE_SDU_ADDITIONAL(SHORT_NAME)
+
+#define M_TDC_INTERFACE_PENUM_ADDITIONAL(SHORT_NAME)
+
+#define M_TDC_INTERFACE_PINT_ADDITIONAL(INT_NAME, SHORT_NAME)
+
+//-----
+
+#define M_TDC_INTERFACE_MSG_ADDITIONAL(SHORT_NAME)
+
+#define M_TDC_INTERFACE_MSTRUCT_ADDITIONAL(SHORT_NAME)
+
+#define M_TDC_INTERFACE_MUNION_ADDITIONAL(SHORT_NAME)
+
+#define M_TDC_INTERFACE_MENUM_ADDITIONAL(SHORT_NAME)
+
+#define M_TDC_INTERFACE_MINT_ADDITIONAL(INT_NAME, SHORT_NAME)
+
+//-----
+
+#define M_TDC_INTERFACE_INT_ADDITIONAL(SHORT_NAME)
+
+#define M_TDC_INTERFACE_XXX_PRIMITIVE_UNION_ADDITIONAL(SAP)
+
+#define M_TDC_INTERFACE_XXX_MESSAGE_UNION_ADDITIONAL(MSG)
+
+#define M_TDC_CREATE_DEFAULT_PRIMITIVE_INTERFACE_CLASS(SAP)
+
+#define M_TDC_INTERFACE_PRIMITIVE_ADDITIONAL()
+
+#define M_TDC_INTERFACE_PRIMITIVE_ELEMENT_ADDITIONAL(SAP)
+
+#define M_TDC_CREATE_DEFAULT_MESSAGE_INTERFACE_CLASS(MSG)
+
+#define M_TDC_INTERFACE_MESSAGE_ADDITIONAL()
+
+#define M_TDC_INTERFACE_MESSAGE_ELEMENT_ADDITIONAL(MSG)
+
+#else
+#endif
+
+#include "tdc_base.h"
+
+#ifndef TDC_DESCRIPTOR
+#include "message.h"
+#include "primitive.h"
+#else
+#include "message_dsc.h"
+#include "primitive_dsc.h"
+#endif
+
+struct T_TDC_INTERFACE_U8;
+
+//TODO: eliminate need for these types used by M_RR (this is a bug work around)
+typedef T_TDC_HANDLE_U8 T_TDC_HANDLE_AVG_W;
+typedef T_TDC_HANDLE_U8 T_TDC_HANDLE_AVG_T;
+typedef T_TDC_INTERFACE_U8 T_TDC_INTERFACE_AVG_W;
+typedef T_TDC_INTERFACE_U8 T_TDC_INTERFACE_AVG_T;
+//TODO: eliminate need for these types used by M_GRR (this is a bug work around)
+typedef T_TDC_HANDLE_U8 T_TDC_HANDLE_RESEL;
+typedef T_TDC_INTERFACE_U8 T_TDC_INTERFACE_RESEL;
+
+typedef struct T_TDC_HANDLE_TEST_var4 T_TDC_HANDLE_TEST_var4T;
+typedef struct T_TDC_HANDLE_TEST_enum4 T_TDC_HANDLE_TEST_enum4T;
+
+M_TDC_FORWARD_SDU (sdu)
+struct T_TDC_DESCRIPTOR_sdu;
+struct T_TDC_HANDLE_sdu;
+struct T_TDC_INTERFACE_sdu;
+struct T_sdu;
+typedef T_TDC_HANDLE_sdu T_TDC_HANDLE_SDU;
+typedef T_TDC_DESCRIPTOR_sdu T_TDC_DESCRIPTOR_SDU;
+typedef T_TDC_INTERFACE_sdu T_TDC_INTERFACE_SDU;
+typedef T_sdu T_TDC_INSTANCE_SDU;
+
+
+
+///\todo make some sencible stuff here
+struct T_TDC_HANDLE_desc_list
+{
+  int dummy_to_keep_doxygen_happy;
+};
+
+///\todo make some sencible stuff here
+struct T_TDC_HANDLE_desc
+{
+  int dummy_to_keep_doxygen_happy;
+};
+
+///\todo make some sencible stuff here
+struct T_TDC_INTERFACE_desc_list
+{
+  int dummy_to_keep_doxygen_happy;
+};
+
+///\todo make some sencible stuff here
+struct T_TDC_INTERFACE_desc
+{
+  int dummy_to_keep_doxygen_happy;
+};
+
+
+
+#ifdef TDC_DESCRIPTOR
+
+/*M_TDC_FORWARD_PSTRUCT(raw)
+M_TDC_FORWARD_PSTRUCT(aim)
+M_TDC_FORWARD_PSTRUCT(sdu)*/
+
+struct T_TDC_DESCRIPTOR_aim:T_TDC_DESCRIPTOR_PSTRUCT_BASE
+{
+	M_TDC_DESCRIPTOR_PSTRUCT_ADDITIONAL (aim)
+	T_TDC_HANDLE_U8 ti; 
+	T_TDC_HANDLE_U8 tie;
+  T_TDC_HANDLE_U8 nsd;
+	T_TDC_HANDLE_MESSAGE_UNION entity;
+};
+
+struct T_TDC_DESCRIPTOR_sdu:T_TDC_DESCRIPTOR_SDU_BASE
+{
+	M_TDC_DESCRIPTOR_SDU_ADDITIONAL (sdu)
+	T_TDC_HANDLE_raw raw; //manual sdu
+	T_TDC_HANDLE_aim aim; //coded sdu
+};
+
+#endif
+
+#if !defined TDC_DESCRIPTOR || defined TDC_PRECOMPILE 
+
+struct T_aim:T_TDC_INSTANCE_PSTRUCT_BASE
+{
+  M_TDC_INSTANCE_PSTRUCT_ADDITIONAL (aim,aim)
+  T_TDC_INTERFACE_aim* operator-> ();
+};
+struct T_TDC_INTERFACE_aim:T_TDC_INTERFACE_PSTRUCT_BASE
+{
+  M_TDC_INTERFACE_PSTRUCT_ADDITIONAL (aim,aim)
+  T_TDC_INTERFACE_U8 ti;
+  T_TDC_INTERFACE_U8 tie;
+  T_TDC_INTERFACE_U8 nsd;
+  T_TDC_INTERFACE_MESSAGE_UNION entity;
+#ifdef TDC_TYPE_NAME_COMPLETE
+  struct { char T_aim, ___ti___tie___nsd___entiy; } _type_name ();
+#endif
+};
+
+struct T_sdu:T_TDC_INSTANCE_SDU_BASE
+{
+  M_TDC_INSTANCE_SDU_ADDITIONAL (sdu)
+  T_sdu(const T_MESSAGE_UNION& msg);
+  T_sdu(const T_TDC_INSTANCE_MSG_BASE& msg);
+  T_TDC_INTERFACE_sdu* operator-> ();
+};
+struct T_TDC_INTERFACE_sdu:T_TDC_INTERFACE_SDU_BASE
+{
+  M_TDC_INTERFACE_PSTRUCT_ADDITIONAL (sdu,sdu)
+  T_TDC_INTERFACE_raw raw; //manual sdu
+  T_TDC_INTERFACE_aim aim; //coded sdu
+#ifdef TDC_TYPE_NAME_COMPLETE
+  struct { char T_sdu, ___raw___aim; } _type_name ();
+#endif
+};
+inline T_sdu::T_sdu(const T_MESSAGE_UNION& msg)
+{
+  construct();
+  (*this)->aim.entity=msg;
+}
+inline T_sdu::T_sdu(const T_TDC_INSTANCE_MSG_BASE& msg)
+{
+  construct();
+  (*this)->aim.entity=msg;
+}
+
+
+#endif //!defined TDC_DESCRIPTOR || defined TDC_PRECOMPILE 
+
+//============================================================================
+template <class T>
+T_sdu tds_array_to_sdu(const T& U8array)
+//This function is a temporary solution to help the convertion from TDS U8 arrays to TDC SDU's.
+{
+	T_sdu sdu; 
+	sdu->raw.l_buf = U8array[0] + U8array[1] * 256;
+	sdu->raw.o_buf = U8array[2] + U8array[3] * 256;
+	if (sizeof(U8array)>4)
+	{
+		for (int i = 4; i < sizeof(U8array);i++)
+		{
+			sdu->raw.buf[i-4] = U8array[i];
+		}
+	}
+	else
+	{
+		sdu->raw.buf = T_ARRAY<U8>();
+	}
+	return sdu;
+}
+//============================================================================
+template <class T>
+T_sdu BIN(const T& U8array)
+{
+	T_sdu sdu;
+	int i=0,bit=0,l_buf=0;
+	U8 temp=0;
+
+	while(U8array[i] != '\0')
+	{
+		if(U8array[i] == 0x20)				//(0x20 is space) 
+		{
+			if(bit != 0)
+				tdc_user_error("BIN(): There is not 8 bits between spaces!");	
+		}	
+		else
+		{
+			switch(U8array[i])
+			{
+				case 0x31:  //(0x31 ascii code for 1)
+					temp += 1<<(7-bit);
+					break;	
+
+				case 0x30:	//(0x30 ascii code for 0)
+					break;	
+
+				default:
+					tdc_user_error("BIN(): string character neither '0' or '1': %c",U8array[i]);
+					break;
+			}
+			bit ++;
+			if(bit == 8)
+			{
+				sdu->raw.buf[l_buf/8] = temp;
+				temp = 0;
+				bit=0;
+			}
+			l_buf++;
+		}
+		i++;
+	}
+	if(bit != 0)		//if the number of bits is not a multiplum of 8 the last few bits will be assigned here
+	{
+		sdu->raw.buf[l_buf/8] = temp;
+	}
+
+	sdu->raw.l_buf=l_buf;
+	sdu->raw.o_buf=0;
+	return sdu;
+}
+
+template <class T>
+T_sdu HEX(const T& U8array)
+{
+  T_sdu sdu;
+  int i = 0, nibble = 0, l_buf = 0;
+  U8 temp = 0;
+  
+  while(U8array[i] != '\0')
+    {
+      if(U8array[i] == 0x20)				//(0x20 is space) 
+	{
+	  if(nibble != 0)
+	    tdc_user_error("HEX(): There is not 2 nibbles between spaces!");	
+	}	
+      else
+	{
+	  if(('0' <= U8array[i]) &&  (U8array[i] <= '9'))
+	    {
+	      temp += (U8array[i] - 0x30) << (4*(1-nibble));
+	    }
+	  else if(('A' <= U8array[i]) &&  (U8array[i] <= 'F'))
+	    {
+	      temp += (U8array[i] - 0x37) << (4*(1-nibble));
+	    }
+	  else if(('a' <= U8array[i]) && (U8array[i] <= 'f'))
+	    {
+	      temp += (U8array[i] - 0x57) << (4*(1-nibble));
+	    }
+	  else
+	    {
+	      tdc_user_error("HEX(): String character not a HEX number: %c",U8array[i]);
+	    }
+	  nibble ++;
+	  if(nibble == 2)
+	    {
+	      sdu->raw.buf[l_buf/8] = temp;
+	      temp = 0;
+	      nibble = 0;
+	    }
+	  l_buf += 4;
+	}
+      i++;
+    }	
+  
+  if(nibble != 0) //checks whether the number of nibbles are odd. IF THIS SHOULD BE MADE LEGAL 
+    {				//remove the '//' in front of the line above and comment out the error function call!			
+      tdc_user_error("HEX(): Odd number of nibbles (hex numbers)");
+      //sdu->raw.buf[l_buf/8]=temp;
+    }
+  sdu->raw.l_buf = l_buf;
+  sdu->raw.o_buf = 0;
+  return sdu;
+}
+
+template <class T>
+T_sdu CHR(const T& U8array)
+{
+	T_sdu sdu;
+	int i=0;
+	while(U8array[i] != '\0')	
+	{
+		sdu->raw.buf[i]= (U8)U8array[i];
+		i++;
+	}
+	sdu->raw.l_buf=8*i;
+	sdu->raw.o_buf=0;
+	return sdu;
+}
+
+#endif //TDC_MSG_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/tdc_prim.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,34 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   :  TDC
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifdef TDC_H
+#error "TDC.H already included, TDC.H must come after all primitives and messages"
+#endif
+
+#ifndef TDC_PRIM_H
+#define TDC_PRIM_H
+
+#include "tdc_base.h"
+#include "tdc_msg.h"
+
+#define TDC_PRIM_H_BODY
+
+#endif //TDC_PRIM_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/tok.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,53 @@
+/*
++------------------------------------------------------------------------------
+|  File:       tok.h
++------------------------------------------------------------------------------
+|                 Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG.
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++------------------------------------------------------------------------------
+| Purpose:    Definitions for the configuration string functions.
++------------------------------------------------------------------------------
+*/
+
+
+#ifndef __TOK_H__
+#define __TOK_H__
+
+/*==== CONSTANTS ==================================================*/
+
+#define TOK_ERRBASE    (-300)
+#define TOK_OK         (0)
+#define TOK_EOCS       (TOK_ERRBASE - 1)
+#define TOK_NOT_FOUND  (TOK_ERRBASE - 2)
+
+/*==== TYPES ======================================================*/
+
+typedef struct KW_DATA
+{
+   const char * const keyword;
+   const SHORT code;   
+} KW_DATA;
+
+typedef struct TOK_DCB
+{
+  char   * tokbuf;
+  char   * nexttok;
+  char   lastchar;
+} TOK_DCB;
+
+/*==== EXPORT =====================================================*/
+
+void  tok_init (char *);
+SHORT tok_next (char **, char **);
+SHORT tok_key  (KW_DATA *, char *);
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/tools.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,43 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       tools.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions and prototypes.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef __TOOLS_H__
+#define __TOOLS_H__
+
+/*==== INCLUDES =============================================================*/
+
+/*==== CONSTS ===============================================================*/
+
+#define CHARS_FOR_8BIT       2
+#define CHARS_FOR_16BIT      4
+#define CHARS_FOR_32BIT      8
+
+/*==== TYPES ================================================================*/
+
+
+/*==== PROTOTYPES ===========================================================*/
+
+unsigned int GetNextToken (char *source, char *token, char const *seperators);
+char *HexToASCII (ULONG value, char *ptr, int num);
+unsigned int ASCIIToHex (char *p, int num);
+char* InsertString (char *string, char *p, int num);
+char *rm_path ( const char *file );
+
+#endif                
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/tst_mux.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,53 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       tst_mux.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Prototypes for TST multiplexer access 
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef TST_MUX_H
+#define TST_MUX_H
+
+/*==== INCLUDES =============================================================*/
+
+
+/*==== CONSTS ===============================================================*/
+
+/* channels for ETM */
+#define MAX_TST_CHANNEL   2
+
+#define MAX_TST_MUX_CMD_LEN  512
+
+/*==== TYPES ================================================================*/
+
+typedef struct
+{
+  U8 channel_id;
+  void * rcv_data_ptr;
+  int rcv_data_size;
+  void (*rcv_callback)(void *,int);
+  T_HANDLE drv_handle;
+  void * send_data;
+} T_TST_MUX_CHANNEL;
+
+/*==== PROTOTYPES ===========================================================*/
+
+int tst_mux_send     ( U8 id, void * buffer, int size );
+int tst_mux_register ( U8 id, void (*callback)(void * buffer, int size));
+int tst_mux_init     ( void );
+void tst_mux_callback( U8 id, void * buffer, int size );
+
+
+#endif /* !TST_MUX_H.H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/tstheader.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,150 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       tstheader.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for the TST internal header 
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef TSTHEADER_H
+#define TSTHEADER_H
+
+/*==== INCLUDES =============================================================*/
+
+#include "tools.h" 
+
+/*==== CONSTS ===============================================================*/
+
+#ifdef CONNECT_2_PS
+#define TOOLSIDE
+#else
+#define STACKSIDE
+#endif
+
+#if defined STACKSIDE && defined _TARGET_
+#define TARGET_STACK
+#endif
+
+#if defined STACKSIDE && !defined _TARGET_
+#define EMULATED_STACK
+#endif
+
+
+#define ID_OFFSET             0
+#define TIMESTAMP_OFFSET      1
+#define LENGTH_OFFSET         5
+#define SENDER_OFFSET         9
+#define RECEIVER_OFFSET      13
+#define DATA_OFFSET          17
+
+#define ID_SUBTRACT          17
+#define TIMESTAMP_SUBTRACT   16
+#define LENGTH_SUBTRACT      12
+#define SENDER_SUBTRACT       8
+#define RECEIVER_SUBTRACT     4
+#define OPC_SUBTRACT          4
+#define DATA_SUBTRACT         0
+
+#define PROT_PRIM_ID        'P'
+#define PROT_PRIM_ID_32BIT  'Q'
+#define SYS_PRIM_ID         'S'
+#define TRACE_ID            'T'
+
+#define IDENT_PS_PRIM       0x10  /* former 'P' */
+#define IDENT_SYS_PRIM      0x30  /* former 'S' */
+#define IDENT_ABORT         0x00  /* former 'A' */
+#define IDENT_TRACE         0x20  /* former 'T' */
+
+
+#define HDR_VALID_VERSION_0   0x40  /* 01 OLD TST Header */
+#define HDR_VALID_VERSION_1   0x80  /* 10 NEW TST Header */
+#define HDR_VALID_VERSION_2   0x00  /* 00 reserved       */
+#define HDR_VALID_VERSION_3   0xC0  /* 11 reserved       */
+
+#define HDR_TIME_MS     0x04  /* 01 ms Time Frame   */
+#define HDR_TIME_TDMA   0x08  /* 10 TDMA Time Frame */
+
+#define HDR_VERSION_MASK      0xc0  
+#define HDR_IDENT_MASK        0x30  
+#define HDR_TIME_MASK         0x0c  
+#define HDR_RESERVED_MASK     0x03  
+
+#define LOW_MASK 0xFF
+
+#define EMPTY_BYTE  0
+#define INFO_BYTE   1
+#define FIRST_BYTE  2
+#define SECOND_BYTE 3
+
+#define TST_HEADER_LEADING_FIELDS 3   /* .info + .size */
+#define TST_HEADER_TRAILING_FIELDS 12 /* .time + .sender + .receiver */
+/*  the .orgreceiver field will be added dynamically, if used */
+
+/*==== TYPES =================================================================*/
+typedef struct
+{
+  UBYTE combined [4];
+  unsigned long time;
+  char sender[4];
+  char receiver[4];
+} TST_SMALL_HEADER;
+
+typedef struct
+{
+  UBYTE combined [4];
+  unsigned long time;
+  char sender[4];
+  char receiver[4];
+  UCHAR trace_opc;
+} TST_MED_HEADER;
+
+typedef struct
+{
+  UBYTE combined [4];
+  unsigned long time;
+  char sender[4];
+  char receiver[4];
+  char orgreceiver[4];
+  int opc;
+} TST_BIG_HEADER;
+
+#define TST_SMALL_HEADER_SIZE (sizeof(TST_SMALL_HEADER) -1)
+#define TST_BIG_HEADER_SIZE (sizeof(TST_BIG_HEADER) -1)
+
+#if defined (_LINUX_) || defined (_SOLARIS_)
+#define PRIM_HEADER_FLAG 0x00000000
+#define PRIM_DATA_FLAG   0x00000000
+#define PRIM_FLAG_MASK   0x00000000
+
+#define EXCHANGE_4BYTES_ENDIANESS(val_ptr)    {\
+                                                char c;\
+                                                char *p = (char*) val_ptr;\
+                                                c = p[0];\
+                                                p[0] = p[3];\
+                                                p[3] = c;\
+                                                c = p[1];\
+                                                p[1] = p[2];\
+                                                p[2] = c;\
+                                              }
+#else
+#define PRIM_HEADER_FLAG 0x40000000
+#define PRIM_DATA_FLAG   0x80000000
+#define PRIM_FLAG_MASK   0xc0000000
+
+#define EXCHANGE_4BYTES_ENDIANESS(val_ptr)
+#endif
+
+/*==== EXPORTS ===============================================================*/
+
+#endif /* !TSTHEADER.H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/typedefs.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,160 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       typedefs.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Standard definitions.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef __TYPEDEFS_H__
+#define __TYPEDEFS_H__
+
+/*===== Include operating system specific type definitions ========*/
+#ifdef _VXWORKS_
+  #include <vxWorks.h>
+#endif
+
+#ifdef PSOS
+  #include <stdio.h>
+#endif
+
+/*==== CONSTANTS ==================================================*/
+
+#ifndef __INCvxWorksh
+#define IMPORT  EXTERN
+#endif
+
+#ifndef __cplusplus
+  #define EXTERN  extern
+#else
+  #define EXTERN  extern "C"
+#endif
+#define LOCAL   static
+#define GLOBAL  
+#define EXPORT GLOBAL
+
+/*lint -e723 supress Info -- Suspicious use of = */
+#define EQ  ==
+/*lint +e723 */
+#define NEQ !=
+#define AND &&
+#define OR  ||
+#define XOR(A,B) ((!(A) AND (B)) OR ((A) AND !(B)))
+
+#ifndef FALSE
+  #define FALSE 0
+#endif
+
+#ifndef TRUE
+  #define TRUE 1
+#endif
+
+#ifndef NULL
+  #define NULL 0
+#endif
+
+/*==== TYPES ======================================================*/
+#ifndef STDDEFS_H
+  typedef unsigned char       U8;
+  typedef signed char         S8;
+  typedef unsigned short      U16;
+  typedef signed short        S16;
+  typedef unsigned long       U32;
+  typedef signed long         S32;
+  typedef U32                 MEMHANDLE;
+/*
+ * UINT16 added for TI include files, to be removed ASAP 
+ */ 
+
+#ifndef GENERAL_H  /* rivera include definitions are as ours */
+#ifndef __INCvxTypesOldh
+  #if !defined NUCLEUS || !defined PLUS_VERSION_COMP
+    /* UINT16 is already defined in the nucleus.h for the arm9 */
+    typedef unsigned short UINT16;
+  #endif
+#endif
+
+
+  typedef unsigned char       UBYTE;
+  typedef short               SHORT;
+  typedef UBYTE               BYTE;
+
+  #if !defined (NUCLEUS)
+  typedef char                CHAR;
+  #endif
+
+  /* the following construction assumes that we are on I86 using Windows. 
+     It is introduced to avoid using WIN32 in GPF but keeping the compatibility with the 
+     protocol stack 
+  */
+  #if defined WIN32 || defined _WIN32
+    typedef int               BOOL;
+  #else
+    #ifdef _VXWORKS_
+      #ifndef __INCvxTypesOldh
+        typedef int               BOOL;
+      #endif
+    #else
+      typedef UBYTE             BOOL;
+    #endif
+  #endif
+
+
+  #ifndef _TYPES_H
+   #ifndef __INCvxTypesOldh
+      typedef unsigned char       UCHAR;
+      typedef unsigned short      USHORT;
+      typedef unsigned long       ULONG;
+      typedef unsigned int        UINT;
+    #endif
+  #endif
+
+#endif /* rivera include definitions are as ours */
+
+  typedef long                LONG;
+  
+  typedef unsigned long T_VOID_STRUCT;
+
+  typedef unsigned long T_ENUM; 
+
+#endif
+
+
+/*==== EXPORT =====================================================*/
+
+#define MAXIMUM(A,B) (((A)>(B))?(A):(B))
+
+#define MINIMUM(A,B) (((A)<(B))?(A):(B))
+
+/*
+ * NOTE: This is necessary until all occurences of Sprintf() in the
+ * protocol stack (GSM and GPRS) have been replaced with sprintf().
+ */
+#define Sprintf sprintf
+
+
+/*
+ * NOTE: The following macros redefine the predefined macros of
+ * the TMS470 compiler. This is usefull for creating binary
+ * equivalent object files. These files can be used for the
+ * comparison of to builds e.g. BUSYB and g23.pl.
+ *
+ * This approach may not work with other compilers.
+ */
+#define TMS470_CDS "__NO_DATE__"
+#define TMS470_CTS "__NO_TIME__"
+#define TMS470_CFS "__NO_FILE__"
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gpf2/inc/vsi.h	Sun Sep 25 23:38:58 2016 +0000
@@ -0,0 +1,835 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       vsi.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for Virtual System Interface.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef VSI_H
+#define VSI_H
+
+/*==== INCLUDES =============================================================*/
+
+#include <stddef.h>
+#include "header.h"
+#include "gdi.h"
+#include "drvconf.h"
+#include "prf_func.h"
+
+/*==== CONSTANTS ===============================================================*/
+
+#ifdef _TOOLS_
+  #ifdef FRAME_DLL
+    #define DLL_IMPORT_DATA extern
+  #else /* FRAME_DLL*/
+    #define DLL_IMPORT_DATA __declspec( dllimport )
+  #endif /* FRAME_DLL*/
+#endif /* _TOOLS_ */
+  
+#ifdef MEMORY_SUPERVISION
+ #define FILE_LINE              ,file,line
+ #define FILE_LINE_TYPE         ,const char *file, int line
+ #define FILE_LINE_MACRO        ,__FILE__,__LINE__
+ #define FILE_LINE_MACRO_PASSED ,rm_path(file),line
+#else
+ #define FILE_LINE
+ #define FILE_LINE_TYPE
+ #define FILE_LINE_MACRO
+ #define FILE_LINE_MACRO_PASSED ,__FILE__,__LINE__
+#endif
+
+#define NO_TASK           0
+
+/*
+ * defines if the frame is controlling a protocol stack or a tools application (TAP,PCO,...)
+ */
+#define ENV_STACK         0
+#define ENV_TOOLS         1
+
+#define PASSIVE_BODY        0x00000001    /* main loop in the frame compared to ACTIVE_BODY with main loop in pei_run() */
+#define COPY_BY_REF         0x00000002    /* only pointers to message are exchanged between the entities                */
+#define SYSTEM_PROCESS      0x00000004    /* currently used to have a non-blocking tracing behavior for TST and RCV     */
+#define TRC_NO_SUSPEND      0x00000008    /* discard traces, if no memory available or test interface queue full        */
+#define PARTITION_AUTO_FREE 0x00000010    /* automatically free memory after primitive processing                       */
+#define PRIM_NO_SUSPEND     0x00000020    /* drop duplicated prim, if no memory available or test interface queue full  */
+#define INT_DATA_TASK       0x00000040    /* allocate task stack and queue memory from internal memory                  */
+#define ADD_QUEUE_SIZES     0x00000080    /* add queue size for grouped entities (default is to take biggest value)     */
+#define USE_LEMU_QUEUE      0x00000100    /* use registered "os_sendtoqueue" function instead of standard function      */
+
+/*
+ * return values
+ */
+#define VSI_OK         0
+#define VSI_TIMEOUT    1
+#define VSI_ERROR     (-1)
+
+/*
+ * message types
+ */
+#define MSG_PRIMITIVE   1
+#define MSG_SIGNAL      2
+#define MSG_TIMEOUT     3
+
+/*
+ * definitions for dynamic primitive allocation
+ */
+#define DP_FRAME_GUESS     0xffffffff
+#define DP_NO_FRAME_GUESS  0
+
+
+#ifndef NTRACE
+  #ifndef NTRACE_FUNC
+    #define TRACE_FUNC 
+  #endif
+  #define TRACE_EVE
+  #define TRACE_ERR
+  #define TRACE_PRIM
+  #ifndef NTRACE_GET_STATE
+    #define TRACE_GET_STATE
+  #endif
+  #ifndef NTRACE_SET_STATE
+    #define TRACE_SET_STATE
+  #endif
+  #define TRACE_IS              /* entity internal signals */
+  #define TRACE_BIN
+  #define TRACE_PRF
+#endif
+
+/*
+ * trace bit masks
+ */
+#define TC_FUNC           0x00000001
+#define TC_EVENT          0x00000002
+#define TC_PRIM           0x00000004
+#define TC_STATE          0x00000008
+#define TC_SYSTEM         0x00000010
+#define TC_ISIG           0x00000020
+#define TC_ERROR          0x00000040
+#define TC_CCD            0x00000080
+#define TC_TIMER          0x00000100
+#define TC_DATA           0x00000200
+#define TC_SDU            0x00000400
+#define TC_PROFILER       0x00000800
+#define TC_ALERT_HINT     0x00001000
+#define TC_ALERT_WARNING  0x00002000
+#define TC_ALERT_ERROR    TC_ERROR
+#define TC_ALERT_FATAL    0x00004000
+
+#define TC_USER1          0x00010000
+#define TC_USER2          0x00020000
+#define TC_USER3          0x00040000
+#define TC_USER4          0x00080000
+#define TC_USER5          0x00100000
+#define TC_USER6          0x00200000
+#define TC_USER7          0x00400000
+#define TC_USER8          0x00800000
+
+/*
+ * TC_ENABLE is use for sending primitives from target to tools.
+ * In case these do not need to be dependent on trace filter
+ * settings, TC_ENABLE must be passed to vsi_o_primsend resp. the 
+ * macros calling vsi_o_primsend.
+ */
+#define TC_ENABLE         0xffffffff
+
+/*
+ * trace opc's
+ */
+#define TRACE_OPC           0x00000000
+
+#define BIN_TRACE_OPC       0xC7654321
+
+#define IP_TRACE_OPC        0xC0000800
+#define HEX_TRACE_OPC       0xC0010800
+#define SDU_TRACE_OPC       0xC0020800
+
+#define TRACE_SAP           0x00000801
+
+#define FUNC_TRACE_OPC      0xC0010801
+#define EVENT_TRACE_OPC     0xC0020801 
+#define PRIM_TRACE_OPC      0xC0030801
+#define STATE_TRACE_OPC     0xC0040801
+#define SYSTEM_TRACE_OPC    0xC0050801
+#define ISIG_TRACE_OPC      0xC0060801
+#define ERROR_TRACE_OPC     0xC0070801
+#define CCD_TRACE_OPC       0xC0080801
+#define TIMER_TRACE_OPC     0xC0090801
+#define PROFILER_TRACE_OPC  0xC00A0801
+
+#define USER1_TRACE_OPC     0xC00F0801
+#define USER2_TRACE_OPC     0xC0100801
+#define USER3_TRACE_OPC     0xC0110801
+#define USER4_TRACE_OPC     0xC0120801
+#define USER5_TRACE_OPC     0xC0130801
+#define USER6_TRACE_OPC     0xC0140801
+#define USER7_TRACE_OPC     0xC0150801
+#define USER8_TRACE_OPC     0xC0160801
+
+/* system primitive mask  */
+#define SYS_MASK            0x8000             
+
+/* declare trace queue names */
+#ifdef _TOOLS_
+#ifdef FRAME_DLL
+  extern UBYTE SuppressOK;
+  extern char FRM_SYST_NAME[RESOURCE_NAMELEN];
+  extern char FRM_TST_NAME[RESOURCE_NAMELEN];
+  extern char FRM_RCV_NAME[RESOURCE_NAMELEN];
+  extern char FRM_PCO_NAME[RESOURCE_NAMELEN];
+#else /* FRAME_DLL */
+  __declspec (dllimport) char FRM_SYST_NAME[RESOURCE_NAMELEN];
+  __declspec (dllimport) char FRM_TST_NAME[RESOURCE_NAMELEN];
+  __declspec (dllimport) char FRM_RCV_NAME[RESOURCE_NAMELEN];
+  __declspec (dllimport) char FRM_PCO_NAME[RESOURCE_NAMELEN];
+#endif /* FRAME_DLL */
+#else /* _TOOLS_ */
+  extern char FRM_SYST_NAME[];
+  extern char FRM_TST_NAME[];
+  extern char FRM_RCV_NAME[];
+  extern char FRM_PCO_NAME[];
+#endif /* _TOOLS_ */
+
+/*
+ * masks for different kind of info passed to the type parameter at memory allocation  
+ */
+#define VSI_MEM_POOL_MASK     0x000000ff
+#define VSI_MEM_FLAG_MASK     0x0000ff00
+#define VSI_MEM_DESC_MASK     0x00ff0000
+
+/*
+ * types of partition pools to allocate from 
+ */
+#define PRIM_POOL_PARTITION   PrimGroupHandle
+#define DMEM_POOL_PARTITION   DmemGroupHandle
+
+/*
+ * flags to determine allocation behavior 
+ */
+#define VSI_MEM_NON_BLOCKING  0x00000100
+  
+/*
+ * descriptor types for allocation 
+ */
+#define VSI_DESC_TYPE0        0x00000000
+#define VSI_DESC_TYPE1        0x00010000
+#define VSI_DESC_TYPE2        0x00020000
+#define VSI_DESC_TYPE3        0x00030000
+
+/*
+ * definitions for dynamic timer configuration 
+ */
+#define TIMER_SET        1
+#define TIMER_RESET      2
+#define TIMER_SPEED_UP   3
+#define TIMER_SLOW_DOWN  4
+#define TIMER_SUPPRESS   5
+#define TIMER_CLEAN      6
+
+/*
+ * maximum length for a text trace 
+ */
+#define TTRACE_LEN            100
+
+/*
+ * values do be passed to vsi_m_init() to define if the allocated
+ * partitions shall be initialized with a predefined value.
+ */
+#define DISABLE_PARTITON_INIT   0
+#define ENABLE_PARTITON_INIT    1
+
+#define TIME_MODE_MASK    0xc0000000
+#define TIME_IS_TDMA      0x80000000
+
+#define CHECK_TRC_SUSPEND        1
+#define CHECK_PRIM_SUSPEND       2
+
+/*==== TYPES ================================================================*/
+
+typedef ULONG T_TIME;
+typedef int T_HANDLE;
+
+#include "pei.h"
+#include "alert.h"
+
+union T_MSG
+{
+  struct T_Prim
+  {
+    T_VOID_STRUCT *Prim;
+    ULONG		      PrimLen;
+  } Primitive;
+  struct Sig
+  {
+    ULONG		      SigOPC;
+    T_VOID_STRUCT *SigBuffer;
+    ULONG		SigLen;
+  } Signal;
+  struct Tim
+  {
+    ULONG    Index;
+  } Timer;
+};
+
+typedef	struct
+{
+   USHORT		 MsgType;
+   union T_MSG Msg;
+} T_QMSG;
+
+typedef struct 
+{
+   char const *Str;
+   USHORT  Ind;
+} T_STR_IND;
+
+#include <stdarg.h>
+
+typedef struct
+{
+  void (*trace_error)(const char * const format, va_list varpars);      
+  void (*trace_assert)(const char * const format, va_list varpars);      
+} T_EXT_TRACE_FUNC;
+
+/*==== EXTERNALS ===============================================================*/
+
+extern T_HANDLE PrimGroupHandle;
+extern T_HANDLE DmemGroupHandle;
+#ifdef FF_FAST_MEMORY
+extern T_HANDLE FastGroupHandle;
+#endif
+
+/*==== PROTOTYPES ===============================================================*/
+
+T_HANDLE        vsi_p_create      (T_HANDLE Caller, 
+                                   SHORT (*pei_create)(T_PEI_INFO const ** info),
+                                   void (*TaskEntry)(T_HANDLE, ULONG), 
+                                   T_HANDLE MemPoolHandle );
+int             vsi_p_exit        (T_HANDLE Caller, T_HANDLE TaskHandle);
+int             vsi_p_delete      (T_HANDLE Caller, T_HANDLE TaskHandle);
+int             vsi_p_start       (T_HANDLE Caller, T_HANDLE TaskHandle);
+int             vsi_p_stop        (T_HANDLE Caller, T_HANDLE TaskHandle);
+int             vsi_p_name        (T_HANDLE Caller, T_HANDLE Handle, char *Name);
+T_HANDLE        vsi_p_handle      (T_HANDLE Caller, char *Name);
+void            vsi_o_set_htrace  (T_HANDLE comhandle);
+
+T_VOID_STRUCT * vsi_m_new         (ULONG Size, ULONG type FILE_LINE_TYPE);
+T_VOID_STRUCT * vsi_m_new_size    (ULONG size, ULONG type, 
+                                   ULONG *partition_size FILE_LINE_TYPE);
+int             vsi_m_free        (T_VOID_STRUCT **Addr FILE_LINE_TYPE);
+int             vsi_m_status      (T_HANDLE caller, ULONG size, USHORT type, USHORT *free, USHORT *alloc);
+int             vsi_m_init        (char enable_init, char pattern);
+T_VOID_STRUCT * vsi_m_cnew        (ULONG size, ULONG type FILE_LINE_TYPE);
+int             vsi_m_cfree       (T_VOID_STRUCT **ptr FILE_LINE_TYPE);
+int             vsi_m_attach      (T_VOID_STRUCT *ptr FILE_LINE_TYPE);
+int             vsi_m_register_pool(char * name, T_HANDLE *pool_gr_id);
+
+
+char          * vsi_c_init_com_matrix (int max_entities);
+int             vsi_c_get_com_matrix_entry (int entry, char *dst);
+int             vsi_c_get_entity_com_entry (int entry, T_HANDLE rcv, T_HANDLE *snd);
+T_HANDLE        vsi_c_open        (T_HANDLE Caller, char *Name);
+int             vsi_c_close       (T_HANDLE Caller, T_HANDLE ComHandle);
+int             vsi_c_clear       (T_HANDLE Caller, T_HANDLE ComHandle);
+T_VOID_STRUCT * vsi_c_pnew_generic(T_HANDLE Caller, ULONG Size, ULONG opc, ULONG flags FILE_LINE_TYPE);
+T_VOID_STRUCT * vsi_c_pnew        (ULONG Size, ULONG opc FILE_LINE_TYPE);
+T_VOID_STRUCT * vsi_c_pnew_nb     (ULONG Size, ULONG opc FILE_LINE_TYPE);
+T_VOID_STRUCT * vsi_c_new_sdu     (ULONG Size, ULONG opc, USHORT sdu_len, USHORT sdu_offset, USHORT encode_offset FILE_LINE_TYPE);
+T_VOID_STRUCT * vsi_c_new_sdu_generic(ULONG Size, ULONG opc, USHORT sdu_len, USHORT sdu_offset, USHORT encode_offset, ULONG flags FILE_LINE_TYPE);
+T_VOID_STRUCT * vsi_c_ppass       (T_VOID_STRUCT *prim, ULONG opc FILE_LINE_TYPE);
+void            vsi_c_pstore      (T_VOID_STRUCT *prim FILE_LINE_TYPE);
+int             vsi_c_pattach     (T_VOID_STRUCT *prim FILE_LINE_TYPE);
+int             vsi_c_pfree       (T_VOID_STRUCT **Msg FILE_LINE_TYPE);
+int             vsi_c_ssend       (T_HANDLE ComHandle, ULONG opc,
+                                   T_VOID_STRUCT *ptr, ULONG MsgLen FILE_LINE_TYPE);
+int             vsi_c_psend       (T_HANDLE ComHandle, T_VOID_STRUCT *ptr FILE_LINE_TYPE);
+int             vsi_c_psend_caller(T_HANDLE caller, T_HANDLE ComHandle, T_VOID_STRUCT *ptr FILE_LINE_TYPE);
+T_VOID_STRUCT * vsi_c_reuse       (T_PRIM_HEADER *ptr, ULONG Size, 
+                                   ULONG opc, USHORT sdu_len, USHORT sdu_offset, 
+                                   USHORT encode_offset FILE_LINE_TYPE);
+T_VOID_STRUCT * vsi_c_new         (T_HANDLE Caller, ULONG Size, ULONG opc FILE_LINE_TYPE);
+int             vsi_c_send        (T_HANDLE Caller, T_HANDLE ComHandle, 
+                                   T_QMSG *Msg FILE_LINE_TYPE);
+int             vsi_c_free        (T_HANDLE Caller, T_VOID_STRUCT **Msg FILE_LINE_TYPE);
+int             vsi_c_pmax_size   (void);
+int             vsi_c_sync        (T_HANDLE Caller, T_TIME timeout);
+int             vsi_c_alloc_send  (T_HANDLE com_handle, char* rcv, char* snd, void *prim, char* string);
+T_VOID_STRUCT * vsi_drpo_new      (ULONG size, ULONG opc, ULONG guess FILE_LINE_TYPE);
+T_VOID_STRUCT * vsi_drpo_new_sdu  (ULONG size, ULONG opc, USHORT sdu_len, USHORT sdu_offset, USHORT encode_offset, ULONG guess FILE_LINE_TYPE );
+T_VOID_STRUCT * vsi_drp_new       (ULONG size, ULONG guess FILE_LINE_TYPE);
+T_VOID_STRUCT * vsi_dp_new        (ULONG size, T_VOID_STRUCT *addr, ULONG guess FILE_LINE_TYPE);
+int             vsi_drp_bind      (T_VOID_STRUCT *child, T_VOID_STRUCT *parent FILE_LINE_TYPE);
+int             vsi_free          (T_VOID_STRUCT **Msg FILE_LINE_TYPE);
+int             vsi_dp_sum        (T_VOID_STRUCT *addr, ULONG *size);
+int             vsi_dp_max_size   (void);
+int             vsi_c_await       (T_HANDLE Caller, T_HANDLE ComHandle, T_QMSG *Msg, 
+                                   ULONG Timeout);
+int             vsi_c_primitive   (T_HANDLE Caller, void *Prim);
+int             vsi_c_awake       (T_HANDLE caller );
+int             vsi_c_status      (T_HANDLE q_handle, unsigned int *used, unsigned int *free);
+
+int             vsi_t_start       (T_HANDLE Caller, USHORT Index, T_TIME Value);
+int             vsi_t_pstart      (T_HANDLE Caller, USHORT Index, T_TIME Value1, T_TIME Value2 );
+int             vsi_t_stop        (T_HANDLE Caller, USHORT Index );
+int             vsi_t_status      (T_HANDLE Caller, USHORT Index, T_TIME *Value );
+int             vsi_t_config      (T_HANDLE Caller, USHORT Index, UBYTE Mode, ULONG Value );
+int             _vsi_t_config     (T_HANDLE Caller, char *CfgString, const T_STR_IND *pTable );
+
+T_HANDLE        vsi_s_open        (T_HANDLE Caller, char *Name, USHORT Count);
+int             vsi_s_close       (T_HANDLE Caller, T_HANDLE SemHandle);
+int             vsi_s_get         (T_HANDLE Caller, T_HANDLE SemHandle);
+int             vsi_s_release     (T_HANDLE Caller, T_HANDLE SemHandle);
+int             vsi_s_status      (T_HANDLE Caller, T_HANDLE SemHandle, USHORT *Count);
+
+/* *** ATTENTION START: A modification of the prototypes below requires a modification of STR2IND *** */ 
+int             vsi_o_func_ttrace (const char * const format, ... );
+int             vsi_o_event_ttrace(const char * const format, ... );
+int             vsi_o_error_ttrace(const char * const format, ... );
+int             vsi_o_state_ttrace(const char * const format, ... );
+int             vsi_o_class_ttrace(ULONG TraceClass, const char * const format, ... );
+int             vsi_o_func_itrace (ULONG index, const char * const format, ... );
+int             vsi_o_event_itrace(ULONG index, const char * const format, ... );
+int             vsi_o_error_itrace(ULONG index, const char * const format, ... );
+int             vsi_o_state_itrace(ULONG index, const char * const format, ... );
+int             vsi_o_class_itrace(ULONG TraceClass, ULONG index, const char * const format, ... );
+/* *** ATTENTION   END: A modification of the prototypes above requires a modification of STR2IND *** */ 
+
+int             vsi_o_ttrace      (T_HANDLE Caller, ULONG TraceClass, const char * const format, ... );
+int             vsi_o_itrace      (T_HANDLE Caller, ULONG TraceClass, ULONG index, const char * const format, ... );
+int             vsi_o_ptrace      (T_HANDLE Caller, ULONG opc, UBYTE dir );
+int             vsi_o_strace      (T_HANDLE Caller,  const char *const machine,
+                                   const char *const curstate,
+                                   const char *const newstate);
+void            vsi_ext_trace_register (T_EXT_TRACE_FUNC * func);
+int             vsi_o_memtrace    (T_HANDLE Caller, void *ptr, unsigned int len);
+int             vsi_o_primsend    (T_HANDLE Caller, unsigned int mask, T_HANDLE dst, char *ext_dst, unsigned int opc, void *ptr, unsigned int len FILE_LINE_TYPE);
+int             vsi_o_sdusend     (T_HANDLE caller, T_HANDLE dst, char *ext_dst, int opc, char ent, char dir, char type, void *ptr, unsigned int len FILE_LINE_TYPE);
+int             vsi_o_assert      (T_HANDLE Caller, USHORT cause, const char *file, int line, const char * const format, ...);
+int             vsi_settracemask  (T_HANDLE Caller, T_HANDLE Handle, ULONG Mask );
+int             vsi_gettracemask  (T_HANDLE Caller, T_HANDLE Handle, ULONG *Mask );
+int             vsi_trcsuspend    (T_HANDLE Caller, T_HANDLE Handle, ULONG Suspend );
+int             vsi_trc_free      (T_HANDLE Caller, T_VOID_STRUCT **Msg);
+ULONG           get_suspend_state (T_HANDLE caller, int type);
+
+
+void            vsi_ppm_new       (T_HANDLE Caller, ULONG Size, T_PRIM_HEADER *prim, const char* file, int line );
+void            vsi_ppm_rec       (T_HANDLE Caller, T_PRIM_HEADER *prim, const char* file, int line );
+void            vsi_ppm_access    (T_HANDLE Caller, T_PRIM_HEADER *prim, const char* file, int line );
+void            vsi_ppm_store     (T_HANDLE Caller, T_PRIM_HEADER *prim, const char* file, int line );
+void            vsi_ppm_send      (T_HANDLE Caller, T_HANDLE rcv, T_PRIM_HEADER *prim, const char* file, int line );
+void            vsi_ppm_reuse     (T_HANDLE Caller, T_PRIM_HEADER *prim, const char* file, int line );
+void            vsi_ppm_free      (T_HANDLE Caller, T_PRIM_HEADER *prim, const char* file, int line );
+void            vsi_ppm_setend    (T_PRIM_HEADER *Prim, ULONG Size );
+
+int             vsi_gettaskname   (T_HANDLE Caller, T_HANDLE Handle, char *Name);
+T_HANDLE        vsi_gettaskhandle (T_HANDLE Caller, char *Name);
+int             vsi_e_name        (T_HANDLE Caller, T_HANDLE Handle, char *Name);
+T_HANDLE        vsi_e_handle      (T_HANDLE Caller, char *Name);
+int             vsi_gettaskflags  (T_HANDLE Caller, T_HANDLE Handle, U32 *Flags);
+int             vsi_t_time        (T_HANDLE Caller, T_TIME *Value);
+int             vsi_t_sleep       (T_HANDLE Caller, T_TIME Value);
+int             vsi_object_info   (T_HANDLE caller, USHORT Id, USHORT Index, char *Buffer, USHORT Size);
+
+void            vsi_d_callback    (T_DRV_SIGNAL *Signal );
+int             vsi_d_create      (T_HANDLE Caller, T_TST_DRV_ENTRY *drv_info );
+int             vsi_d_init        (T_HANDLE Caller );
+int             vsi_d_exit        (T_HANDLE Caller, T_HANDLE DrvHandle );
+int             vsi_d_open        (T_HANDLE Caller, char *Name );
+int             vsi_d_close       (T_HANDLE Caller, T_HANDLE DrvHandle );
+int             vsi_d_read        (T_HANDLE Caller, T_HANDLE DrvHandle, void *Buffer, ULONG *Size );
+int             vsi_d_write       (T_HANDLE Caller, T_HANDLE DrvHandle, void *Buffer, ULONG Size );
+int             vsi_d_flush       (T_HANDLE Caller, T_HANDLE DrvHandle );
+int             vsi_d_setsignal   (T_HANDLE Caller, T_HANDLE DrvHandle, USHORT SignalType );
+int             vsi_d_resetsignal (T_HANDLE Caller, T_HANDLE DrvHandle, USHORT SignalType );
+int             vsi_d_setconfig   (T_HANDLE Caller, T_HANDLE DrvHandle, char *Config );
+int             vsi_d_getconfig   (T_HANDLE Caller, T_HANDLE DrvHandle, char *Config );
+
+void            vsi_pcheck_init   (void);
+void            vsi_pcheck_register(ULONG (*func)(ULONG, void*), ULONG ret_ok);
+
+/*==== MACROS ================================================================*/
+
+#define ConfigTimer             _vsi_t_config
+
+#ifdef MEMORY_SUPERVISION
+  #define  VSI_PPM_REC(B,F,L)   
+  #define  VSI_PPM_RCV(B)       vsi_ppm_rec (VSI_CALLER ((T_PRIM_HEADER*)(B)),__FILE__, __LINE__);
+  #define  VSI_PPM_NEW(B,S)     vsi_ppm_new (VSI_CALLER S,((T_PRIM_HEADER*)(B)),__FILE__, __LINE__);
+  #define  VSI_PPM_FREE(B)      vsi_ppm_free (VSI_CALLER ((T_PRIM_HEADER*)(B)),__FILE__, __LINE__);
+  #define  VSI_PPM_REUSE(B)     vsi_ppm_reuse (VSI_CALLER (T_PRIM_HEADER*)B,__FILE__,__LINE__);
+  #define  VSI_PPM_ACCESS(B)    vsi_ppm_access (VSI_CALLER (T_PRIM_HEADER*)B,__FILE__,__LINE__);
+  #define  VSI_PPM_SEND(B,D)    vsi_ppm_send (VSI_CALLER D,(T_PRIM_HEADER*)B,__FILE__,__LINE__);
+#else
+  #define  VSI_PPM_REC(B,F,L)
+  #define  VSI_PPM_RCV(B)
+  #define  VSI_PPM_NEW(B)
+  #define  VSI_PPM_FREE(B)
+  #define  VSI_PPM_REUSE(B)
+  #define  VSI_PPM_ACCESS(B)
+  #define  VSI_PPM_SEND(B,D)
+#endif /* MEMORY_SUPERVISION */
+
+#define  ALIGN(S)                  (((S)+3)&~0x03)
+#define  ALIGN_SIZE(S)			   (((S)+sizeof(int)-1)&~(sizeof(int)-1))	
+#define  S_ALLOC_SIZE(S)           (ALIGN((S)+sizeof(T_PRIM_HEADER)+sizeof(T_S_HEADER)))
+#define  S_HDR_OFFSET(S)           (ALIGN(S)>>2)
+#define  D_ALLOC_SIZE(S)           (ALIGN((S)+sizeof(T_PRIM_HEADER)+sizeof(T_DP_HEADER)))
+#define  D_HDR_OFFSET(S)           (ALIGN((S)-sizeof(T_DP_HEADER))>>2)
+
+#define  P2D(P)                    ((T_PRIM_HEADER*)(P)+1)
+#define  D2P(D)                    ((T_PRIM_HEADER*)(D)-1)
+
+#define  P2D_AC(P,T)               P2D(P)
+
+#define  P_OPC(P)                  (((T_PRIM_HEADER*)(P))->opc)
+#define  P_OPC2(P)                 (((T_PRIM_HEADER*)(P))->opc2)
+#define  P_LEN(P)                  (((T_PRIM_HEADER*)(P))->len)
+#define  P_TID(P)                  (((T_PRIM_HEADER*)(P))->tid)
+#define  P_SDU(P)                  (((T_PRIM_HEADER*)(P))->sdu)
+#define  P_CNT(P)                  (((T_PRIM_HEADER*)(P))->use_cnt)
+#define  P_IDX(P)                  (*(ULONG*)(P))
+#define  P_PPM_IDX(P)              (*((ULONG*)(P)-PPM_OFFSET))
+#define  P_PNR(P)                  (*((ULONG*)(P)-PPM_OFFSET) & 0xffff)
+#define  P_PGR(P)                  ((*((ULONG*)(P)-PPM_OFFSET) >> 16) & 0xffff)
+#define  P_SHDR(P)                 ((T_S_HEADER*)((ULONG*)(P)+((T_PRIM_HEADER*)(P))->sh_offset))
+#define  P_RCV(P)                  (((T_S_HEADER*)P_SHDR(P))->rcv) 
+#define  P_SND(P)                  (((T_S_HEADER*)P_SHDR(P))->snd) 
+#define  P_TIME(P)                 (((T_S_HEADER*)P_SHDR(P))->time) 
+#define  P_SHO(P)                  (((T_PRIM_HEADER*)(P))->sh_offset)
+#define  P_DPHO(P)                 (((T_PRIM_HEADER*)(P))->dph_offset)
+#define  P_MEMHANDLE(P)            (*(U32*)P2D(P))
+#define  P_MEMHANDLE_SDU(P)        (*(((U32*)P2D(P))+1))
+
+#define  D_OPC(D)                  P_OPC(D2P(D))
+#define  D_OPC2(D)                 P_OPC2(D2P(D))
+#define  D_LEN(D)                  P_LEN(D2P(D))
+#define  D_CNT(D)                  P_CNT(D2P(D))
+#define  D_TID(D)                  P_TID(D2P(D))
+#define  D_SDU(D)                  P_SDU(D2P(D))
+
+#define  D_SDU_LEN(D)              (D_SDU(D)->l_buf)
+#define  D_SDU_OFF(D)              (D_SDU(D)->o_buf)
+
+#define  BITS_PER_BYTE             8
+#define  BYTELEN(BITLEN)           ((BITLEN)<=0?0:((((BITLEN)-1)/BITS_PER_BYTE)+1))
+#define  BYTELEN_POS(BITLEN)       (((BITLEN)+7)/BITS_PER_BYTE)
+
+#define  SDU_TRAIL                 ((char*)(((T_sdu*)0)+1)-(char*)(((T_sdu*)0)->buf))
+#define  PSIZE(D)                  D_LEN(D)
+
+#define  SIZ(T)                    ((ULONG)(sizeof(T_PRIM_HEADER)+sizeof(T)))
+#define  SIZ_SDU(T,M)              ((ULONG)(SIZ(T)+BYTELEN((M)+ENCODE_OFFSET)-SDU_TRAIL))
+/*  NOTE : received SDUs may have a different          ENCODE_OFFSET */
+
+#ifndef ADD_BSIZE
+#define ADD_BSIZE 0
+#endif
+
+#define  NO_SDU   0xffff
+
+/*lint -e773 Info 773: Expression-like macro '...' not parenthesized 
+  this message has to be disabled to avoid LINT complaining about missing parentesis in the macros
+  that create a pointer and initialize it. Here we cannot set paranthesis because in this case the
+  existing entity code will not compile without ';'. To disable this message is safe for these macros */
+
+#define  DRPO_ALLOC(T,G)           (T_##T*)vsi_drpo_new(sizeof(T_##T),T,G FILE_LINE_MACRO)
+#define  DRPO_ALLOC_SDU(T,N,G)     (T_##T*)vsi_drpo_new_sdu(sizeof(T_##T),T,N,offsetof(T_##T,sdu),ENCODE_OFFSET,G FILE_LINE_MACRO)
+#define  DRP_ALLOC(S,G)            (T_VOID_STRUCT*)vsi_drp_new(S,G FILE_LINE_MACRO)
+#define  DRP_BIND(C,P)             vsi_drp_bind((T_VOID_STRUCT*)C,(T_VOID_STRUCT*)P FILE_LINE_MACRO)
+#define  DP_ALLOC(S,P,G)           (T_VOID_STRUCT*)vsi_dp_new(S,(T_VOID_STRUCT*)P,G FILE_LINE_MACRO)
+#define  FREE(D)                   { T_VOID_STRUCT *z=(T_VOID_STRUCT*)D;\
+                                     vsi_free((T_VOID_STRUCT **)&z FILE_LINE_MACRO);}
+#define  MALLOC(P,S)               P = (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE0) FILE_LINE_MACRO)
+#define  M_ALLOC(S)                (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE0) FILE_LINE_MACRO)
+
+#ifdef FF_FAST_MEMORY
+#define  FMALLOC(P,S)              P = (void*)vsi_m_cnew(S,(FastGroupHandle|VSI_DESC_TYPE0) FILE_LINE_MACRO)
+#define  FM_ALLOC(S)               (void*)vsi_m_cnew(S,(FastGroupHandle|VSI_DESC_TYPE0) FILE_LINE_MACRO)
+#else
+#define  FMALLOC(P,S)              MALLOC(P,S)
+#define  FM_ALLOC(S)               M_ALLOC(S)
+#endif
+
+#define  MALLOC_GENERIC(P,S,G,F)   P = (void*)vsi_m_cnew(S,(G|(F)) FILE_LINE_MACRO)
+#define  M_ALLOC_GENERIC(S,G,F)    (void*)vsi_m_cnew(S,(G|(F)) FILE_LINE_MACRO)
+
+#define  MALLOC_DESC1(P,S)         P = (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE1) FILE_LINE_MACRO)
+#define  M_ALLOC_DESC1(S)          (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE1) FILE_LINE_MACRO)
+
+#define  MALLOC_DESC2(P,S)         P = (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE2) FILE_LINE_MACRO)
+#define  M_ALLOC_DESC2(S)          (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE2) FILE_LINE_MACRO)
+
+#define  MALLOC_DESC3(P,S)         P = (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE3) FILE_LINE_MACRO)
+#define  M_ALLOC_DESC3(S)          (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE3) FILE_LINE_MACRO)
+
+#define  MALLOC_NB(P,S)            P = (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE0|VSI_MEM_NON_BLOCKING) FILE_LINE_MACRO)
+#define  M_ALLOC_NB(S)             (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE0|VSI_MEM_NON_BLOCKING) FILE_LINE_MACRO)
+
+#define  MALLOC_DESC1_NB(P,S)      P = (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE1|VSI_MEM_NON_BLOCKING) FILE_LINE_MACRO)
+#define  M_ALLOC_DESC1_NB(S)       (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE1|VSI_MEM_NON_BLOCKING) FILE_LINE_MACRO)
+
+#define  MALLOC_DESC2_NB(P,S)      P = (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE2|VSI_MEM_NON_BLOCKING) FILE_LINE_MACRO)
+#define  M_ALLOC_DESC2_NB(S)       (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE2|VSI_MEM_NON_BLOCKING) FILE_LINE_MACRO)
+
+#define  MALLOC_DESC3_NB(P,S)      P = (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE3|VSI_MEM_NON_BLOCKING) FILE_LINE_MACRO)
+#define  M_ALLOC_DESC3_NB(S)       (void*)vsi_m_cnew(S,(PrimGroupHandle|VSI_DESC_TYPE3|VSI_MEM_NON_BLOCKING) FILE_LINE_MACRO)
+
+#define  MATTACH(M)                vsi_m_attach((T_VOID_STRUCT*)M FILE_LINE_MACRO)
+#define  M_ATTACH(M)               vsi_m_attach((T_VOID_STRUCT*)M FILE_LINE_MACRO)
+
+#define  DMALLOC(P,S)              P = (void*)vsi_m_new(S,DmemGroupHandle FILE_LINE_MACRO)
+#define  D_ALLOC(S)                (void*)vsi_m_new(S,DmemGroupHandle FILE_LINE_MACRO)
+
+#define  DMALLOC_NB(P,S)           P = (void*)vsi_m_new(S,DmemGroupHandle|VSI_MEM_NON_BLOCKING FILE_LINE_MACRO)
+#define  D_ALLOC_NB(S)             (void*)vsi_m_new(S,DmemGroupHandle|VSI_MEM_NON_BLOCKING FILE_LINE_MACRO)
+
+#define  PALLOC_GENERIC(D,T,G,F)   T_##T  *D = (T_##T*)vsi_c_pnew_generic(0,sizeof(T_##T),T,(G|(F)) FILE_LINE_MACRO)
+#define  P_ALLOC_GENERIC(T,G,F)    (T_##T*)vsi_c_pnew_generic(0,sizeof(T_##T),T,(G|(F)) FILE_LINE_MACRO )
+
+#define  PALLOC(D,T)               T_##T  *D = (T_##T*)vsi_c_pnew(sizeof(T_##T),T FILE_LINE_MACRO)
+#define  P_ALLOC(T)                (T_##T*)vsi_c_pnew(sizeof(T_##T),T FILE_LINE_MACRO )
+
+#define  PALLOC_NB(D,T)            T_##T  *D = (T_##T*)vsi_c_pnew_nb(sizeof(T_##T),T FILE_LINE_MACRO)
+#define  P_ALLOC_NB(T)             (T_##T*)vsi_c_pnew_nb(sizeof(T_##T),T FILE_LINE_MACRO )
+
+#define  PALLOC_MSG(D,T,M)         T_##T  *D = (T_##T*)vsi_c_new_sdu(sizeof(T_##T),T,BSIZE_##M+ADD_BSIZE,offsetof(T_##T,sdu),ENCODE_OFFSET FILE_LINE_MACRO)
+#define  P_ALLOC_MSG(T,M)          (T_##T*)vsi_c_new_sdu(sizeof(T_##T),T,BSIZE_##M+ADD_BSIZE,offsetof(T_##T,sdu),ENCODE_OFFSET FILE_LINE_MACRO)
+
+#define  PALLOC_SDU(D,T,N)         T_##T  *D = (T_##T*)vsi_c_new_sdu(sizeof(T_##T),T,N,offsetof(T_##T,sdu),ENCODE_OFFSET FILE_LINE_MACRO)
+#define  P_ALLOC_SDU(T,N)          (T_##T*)vsi_c_new_sdu(sizeof(T_##T),T,N,offsetof(T_##T,sdu),ENCODE_OFFSET FILE_LINE_MACRO)
+
+#ifdef FF_FAST_MEMORY
+#define  FPALLOC_SDU(D,T,N)        T_##T  *D = (T_##T*)vsi_c_new_sdu_generic(sizeof(T_##T),T,N,offsetof(T_##T,sdu),ENCODE_OFFSET,FastGroupHandle FILE_LINE_MACRO)
+#define  FP_ALLOC_SDU(T,N)         (T_##T*)vsi_c_new_sdu_generic(sizeof(T_##T),T,N,offsetof(T_##T,sdu),ENCODE_OFFSET,FastGroupHandle FILE_LINE_MACRO)
+#else
+#define  FPALLOC_SDU(D,T,N)        PALLOC_SDU(D,T,N)
+#define  FP_ALLOC_SDU(T,N)         P_ALLOC_SDU(T,N) 
+#endif
+
+#define  PALLOC_DESC(D,T)          T_##T  *D = (T_##T*)vsi_c_pnew(sizeof(T_##T),T FILE_LINE_MACRO);\
+                                   ((T_PRIM_HEADER*)D2P(D))->dph_offset = (ULONG)(((offsetof(T_##T,desc_list)+sizeof(T_PRIM_HEADER))>>2));
+
+#define  PALLOC_DESC2(D,T)         T_##T  *D = (T_##T*)vsi_c_pnew(sizeof(T_##T),T FILE_LINE_MACRO);\
+                                   ((T_PRIM_HEADER*)D2P(D))->dph_offset = (ULONG)(((offsetof(T_##T,desc_list2)+sizeof(T_PRIM_HEADER))>>2));
+
+#define  PALLOC_DESC3(D,T)         T_##T  *D = (T_##T*)vsi_c_pnew(sizeof(T_##T),T FILE_LINE_MACRO);\
+                                   ((T_PRIM_HEADER*)D2P(D))->dph_offset = (ULONG)(((offsetof(T_##T,desc_list3)+sizeof(T_PRIM_HEADER))>>2));
+
+#define  PALLOC_DESC_NB(D,T)       T_##T  *D = (T_##T*)vsi_c_pnew_nb(sizeof(T_##T),T FILE_LINE_MACRO);\
+                                   ((T_PRIM_HEADER*)D2P(D))->dph_offset = (ULONG)(((offsetof(T_##T,desc_list)+sizeof(T_PRIM_HEADER))>>2));
+
+#define  PALLOC_DESC2_NB(D,T)      T_##T  *D = (T_##T*)vsi_c_pnew_nb(sizeof(T_##T),T FILE_LINE_MACRO);\
+                                   ((T_PRIM_HEADER*)D2P(D))->dph_offset = (ULONG)(((offsetof(T_##T,desc_list2)+sizeof(T_PRIM_HEADER))>>2));
+
+#define  PALLOC_DESC3_NB(D,T)      T_##T  *D = (T_##T*)vsi_c_pnew_nb(sizeof(T_##T),T FILE_LINE_MACRO);\
+                                   ((T_PRIM_HEADER*)D2P(D))->dph_offset = (ULONG)(((offsetof(T_##T,desc_list3)+sizeof(T_PRIM_HEADER))>>2));
+
+#define  PATTACH(D)                vsi_c_pattach((T_VOID_STRUCT*)D FILE_LINE_MACRO)
+#define  P_ATTACH(D)               vsi_c_pattach((T_VOID_STRUCT*)D FILE_LINE_MACRO)
+
+#define  PREUSE(D0,D,T)            T_##T  *D = (T_##T*)vsi_c_reuse((T_PRIM_HEADER*)D0,SIZ(T_##T),T,0,NO_SDU,0 FILE_LINE_MACRO)
+#define  P_REUSE(D0,T)             (T_##T*)vsi_c_reuse((T_PRIM_HEADER*)D0,SIZ(T_##T),T,0,NO_SDU,0 FILE_LINE_MACRO)
+
+#define  PREUSE_MSG(D,T,M)         T_##T  *D = (T_##T*)vsi_c_reuse(D0,SIZ(T_##T),T,BSIZE_##M+ADD_BSIZE,offsetof(T_##T,sdu),ENCODE_OFFSET FILE_LINE_MACRO)
+#define  P_REUSE_MSG(T,M)          (T_##T*)vsi_c_reuse(D0,SIZ(T_##T),T,BSIZE_##M+ADD_BSIZE,offsetof(T_##T,sdu),ENCODE_OFFSET FILE_LINE_MACRO)
+
+#define  PREUSE_SDU(D,T,N)         T_##T  *D = (T_##T*)vsi_c_reuse(D0,SIZ(T_##T),T,N,offsetof(T_##T,sdu),ENCODE_OFFSET FILE_LINE_MACRO)
+#define  P_REUSE_SDU(T,N)          (T_##T*)vsi_c_reuse(D0,SIZ(T_##T),T,N,offsetof(T_##T,sdu),ENCODE_OFFSET FILE_LINE_MACRO)
+
+#define  PSEND(E,D)                vsi_c_psend ( E ,(T_VOID_STRUCT*)D FILE_LINE_MACRO )
+#define  P_SEND(E,D)               vsi_c_psend ( E ,(T_VOID_STRUCT*)D FILE_LINE_MACRO )
+
+#define  PSEND_CALLER(C,E,D)       vsi_c_psend_caller ( C, E ,(T_VOID_STRUCT*)D FILE_LINE_MACRO )
+#define  P_SEND_CALLER(C,E,D)      vsi_c_psend_caller ( C, E ,(T_VOID_STRUCT*)D FILE_LINE_MACRO )
+
+#define  PSIGNAL(E,O,D)            vsi_c_ssend ( E ,O,(T_VOID_STRUCT*)D,SIZ(T_##O) FILE_LINE_MACRO )
+#define  P_SIGNAL(E,O,D)           vsi_c_ssend ( E ,O,(T_VOID_STRUCT*)D,SIZ(T_##O) FILE_LINE_MACRO )
+
+#define  PRIM_SEND_TO_PC(S,R,P)        vsi_o_primsend(S,TC_ENABLE,0,R,0,P,0 FILE_LINE_MACRO)
+#define  DATA_SEND_TO_PC(S,F,R,O,P,L)  vsi_o_primsend(S,F,0,R,O,P,L FILE_LINE_MACRO)
+
+#define  PFREE(D)                  { T_VOID_STRUCT *z=(T_VOID_STRUCT*)D;\
+                                   vsi_c_pfree((T_VOID_STRUCT **)&z FILE_LINE_MACRO);}
+#define  P_FREE(D)                 { T_VOID_STRUCT *z=(T_VOID_STRUCT*)D;\
+                                   vsi_c_pfree((T_VOID_STRUCT **)&z FILE_LINE_MACRO);}
+
+#define  PPASS(D0,D,T)             T_##T  *D    = (T_##T*)vsi_c_ppass ( (T_VOID_STRUCT*)D0, T FILE_LINE_MACRO )
+#define  P_PASS(D0,D,T)            T_##T  *D    = (T_##T*)vsi_c_ppass ( (T_VOID_STRUCT*)D0, T FILE_LINE_MACRO )
+
+#define  PACCESS(D)                VSI_PPM_ACCESS(D2P(D))
+#define  P_ACCESS(D)               VSI_PPM_ACCESS(D2P(D))
+
+#define  PSTORE(D)                 vsi_c_pstore ((T_VOID_STRUCT*)D FILE_LINE_MACRO)
+#define  P_STORE(D)                vsi_c_pstore ((T_VOID_STRUCT*)D FILE_LINE_MACRO)
+
+#define  MFREE(P)                  vsi_m_cfree((T_VOID_STRUCT **)&P FILE_LINE_MACRO)
+#define  M_FREE(P)                 vsi_m_cfree((T_VOID_STRUCT **)&P FILE_LINE_MACRO)
+
+#define  D_FREE(P)                 vsi_m_free((T_VOID_STRUCT **)&P FILE_LINE_MACRO)
+
+/*lint +e773 */
+
+#ifdef TRACE_FUNC
+  #define TRACE_FUNCTION(a)                                     vsi_o_func_ttrace(a)
+  #define TRACE_FUNCTION_P1(f,a1)                               vsi_o_func_ttrace(f,a1)
+  #define TRACE_FUNCTION_P2(f,a1,a2)                            vsi_o_func_ttrace(f,a1,a2)
+  #define TRACE_FUNCTION_P3(f,a1,a2,a3)                         vsi_o_func_ttrace(f,a1,a2,a3)
+  #define TRACE_FUNCTION_P4(f,a1,a2,a3,a4)                      vsi_o_func_ttrace(f,a1,a2,a3,a4)
+  #define TRACE_FUNCTION_P5(f,a1,a2,a3,a4,a5)                   vsi_o_func_ttrace(f,a1,a2,a3,a4,a5)
+  #define TRACE_FUNCTION_P6(f,a1,a2,a3,a4,a5,a6)                vsi_o_func_ttrace(f,a1,a2,a3,a4,a5,a6)
+  #define TRACE_FUNCTION_P7(f,a1,a2,a3,a4,a5,a6,a7)             vsi_o_func_ttrace(f,a1,a2,a3,a4,a5,a6,a7)
+  #define TRACE_FUNCTION_P8(f,a1,a2,a3,a4,a5,a6,a7,a8)          vsi_o_func_ttrace(f,a1,a2,a3,a4,a5,a6,a7,a8)
+  #define TRACE_FUNCTION_P9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9)       vsi_o_func_ttrace(f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
+#else
+  #define TRACE_FUNCTION(a)                                     ((void)(0))                               
+  #define TRACE_FUNCTION_P1(f,a1)                               ((void)(0))
+  #define TRACE_FUNCTION_P2(f,a1,a2)                            ((void)(0))                      
+  #define TRACE_FUNCTION_P3(f,a1,a2,a3)                         ((void)(0))                    
+  #define TRACE_FUNCTION_P4(f,a1,a2,a3,a4)                      ((void)(0))                 
+  #define TRACE_FUNCTION_P5(f,a1,a2,a3,a4,a5)                   ((void)(0))              
+  #define TRACE_FUNCTION_P6(f,a1,a2,a3,a4,a5,a6)                ((void)(0))           
+  #define TRACE_FUNCTION_P7(f,a1,a2,a3,a4,a5,a6,a7)             ((void)(0))        
+  #define TRACE_FUNCTION_P8(f,a1,a2,a3,a4,a5,a6,a7,a8)          ((void)(0))     
+  #define TRACE_FUNCTION_P9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9)       ((void)(0))  
+#endif
+
+#ifdef TRACE_EVE
+  #define TRACE_EVENT(a)                                        vsi_o_event_ttrace(a)
+  #define TRACE_EVENT_P1(f,a1)                                  vsi_o_event_ttrace(f,a1)
+  #define TRACE_EVENT_P2(f,a1,a2)                               vsi_o_event_ttrace(f,a1,a2)
+  #define TRACE_EVENT_P3(f,a1,a2,a3)                            vsi_o_event_ttrace(f,a1,a2,a3)
+  #define TRACE_EVENT_P4(f,a1,a2,a3,a4)                         vsi_o_event_ttrace(f,a1,a2,a3,a4)
+  #define TRACE_EVENT_P5(f,a1,a2,a3,a4,a5)                      vsi_o_event_ttrace(f,a1,a2,a3,a4,a5)
+  #define TRACE_EVENT_P6(f,a1,a2,a3,a4,a5,a6)                   vsi_o_event_ttrace(f,a1,a2,a3,a4,a5,a6)
+  #define TRACE_EVENT_P7(f,a1,a2,a3,a4,a5,a6,a7)                vsi_o_event_ttrace(f,a1,a2,a3,a4,a5,a6,a7)
+  #define TRACE_EVENT_P8(f,a1,a2,a3,a4,a5,a6,a7,a8)             vsi_o_event_ttrace(f,a1,a2,a3,a4,a5,a6,a7,a8)
+  #define TRACE_EVENT_P9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9)          vsi_o_event_ttrace(f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
+  #define TRACE_USER_CLASS(c,a)                                 vsi_o_class_ttrace(c,a)
+  #define TRACE_USER_CLASS_P1(c,f,a1)                           vsi_o_class_ttrace(c,f,a1)
+  #define TRACE_USER_CLASS_P2(c,f,a1,a2)                        vsi_o_class_ttrace(c,f,a1,a2)
+  #define TRACE_USER_CLASS_P3(c,f,a1,a2,a3)                     vsi_o_class_ttrace(c,f,a1,a2,a3)
+  #define TRACE_USER_CLASS_P4(c,f,a1,a2,a3,a4)                  vsi_o_class_ttrace(c,f,a1,a2,a3,a4)
+  #define TRACE_USER_CLASS_P5(c,f,a1,a2,a3,a4,a5)               vsi_o_class_ttrace(c,f,a1,a2,a3,a4,a5)
+  #define TRACE_USER_CLASS_P6(c,f,a1,a2,a3,a4,a5,a6)            vsi_o_class_ttrace(c,f,a1,a2,a3,a4,a5,a6)
+  #define TRACE_USER_CLASS_P7(c,f,a1,a2,a3,a4,a5,a6,a7)         vsi_o_class_ttrace(c,f,a1,a2,a3,a4,a5,a6,a7)
+  #define TRACE_USER_CLASS_P8(c,f,a1,a2,a3,a4,a5,a6,a7,a8)      vsi_o_class_ttrace(c,f,a1,a2,a3,a4,a5,a6,a7,a8)
+  #define TRACE_USER_CLASS_P9(c,f,a1,a2,a3,a4,a5,a6,a7,a8,a9)   vsi_o_class_ttrace(c,f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
+#else
+  #define TRACE_EVENT(a)                                        ((void)(0))                              
+  #define TRACE_EVENT_P1(f,a1)                                  ((void)(0))
+  #define TRACE_EVENT_P2(f,a1,a2)                               ((void)(0))                     
+  #define TRACE_EVENT_P3(f,a1,a2,a3)                            ((void)(0))                   
+  #define TRACE_EVENT_P4(f,a1,a2,a3,a4)                         ((void)(0))                 
+  #define TRACE_EVENT_P5(f,a1,a2,a3,a4,a5)                      ((void)(0))              
+  #define TRACE_EVENT_P6(f,a1,a2,a3,a4,a5,a6)                   ((void)(0))           
+  #define TRACE_EVENT_P7(f,a1,a2,a3,a4,a5,a6,a7)                ((void)(0))        
+  #define TRACE_EVENT_P8(f,a1,a2,a3,a4,a5,a6,a7,a8)             ((void)(0))    
+  #define TRACE_EVENT_P9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9)          ((void)(0))  
+  #define TRACE_USER_CLASS(c,a)                                 ((void)(0))                   
+  #define TRACE_USER_CLASS_P1(c,f,a1)                           ((void)(0))
+  #define TRACE_USER_CLASS_P2(c,f,a1,a2)                        ((void)(0))
+  #define TRACE_USER_CLASS_P3(c,f,a1,a2,a3)                     ((void)(0))
+  #define TRACE_USER_CLASS_P4(c,f,a1,a2,a3,a4)                  ((void)(0))
+  #define TRACE_USER_CLASS_P5(c,f,a1,a2,a3,a4,a5)               ((void)(0))
+  #define TRACE_USER_CLASS_P6(c,f,a1,a2,a3,a4,a5,a6)            ((void)(0))
+  #define TRACE_USER_CLASS_P7(c,f,a1,a2,a3,a4,a5,a6,a7)         ((void)(0))
+  #define TRACE_USER_CLASS_P8(c,f,a1,a2,a3,a4,a5,a6,a7,a8)      ((void)(0))
+  #define TRACE_USER_CLASS_P9(c,f,a1,a2,a3,a4,a5,a6,a7,a8,a9)   ((void)(0))
+#endif
+
+#ifdef TRACE_BIN
+  #define TRACE_MEMORY(s,p,l)                                   vsi_o_memtrace(s,p,l)
+  #define TRACE_MEMORY_PRIM(s,r,o,p,l)                          vsi_o_primsend(s,TC_DATA,r,FRM_PCO_NAME,o,p,l FILE_LINE_MACRO)
+  #define TRACE_USER_CLASS_MEMORY_PRIM(s,m,r,o,p,l)             vsi_o_primsend(s,m,r,FRM_PCO_NAME,o,p,l FILE_LINE_MACRO)
+  #define TRACE_BINDUMP(s,m,d,p,l)                             {vsi_o_ttrace(s,m,d);vsi_o_primsend(s,m,0,FRM_PCO_NAME,BIN_TRACE_OPC,p,l FILE_LINE_MACRO);}
+  #define TRACE_HEXDUMP(s,p,l)                                  vsi_o_primsend(s,TC_DATA,0,FRM_PCO_NAME,HEX_TRACE_OPC,p,l FILE_LINE_MACRO);
+  #define TRACE_SDU(s,r,e,d,t,p,l)                              vsi_o_sdusend(s,r,FRM_PCO_NAME,SDU_TRACE_OPC,e,d,t,p,l FILE_LINE_MACRO)
+  #define TRACE_IP(s,r,u,p,l)                                   vsi_o_primsend(s,TC_DATA,r,FRM_PCO_NAME,(IP_TRACE_OPC|u),p,l FILE_LINE_MACRO)
+  #define TRACE_PRIMDUMP(s,r,o,p,l)                             vsi_o_primsend(s,TC_DATA,r,FRM_PCO_NAME,o,p,l FILE_LINE_MACRO)
+#else
+  #define TRACE_MEMORY(s,p,l)                                   ((void)(0))
+  #define TRACE_MEMORY_PRIM(s,r,o,p,l)                          ((void)(0))
+  #define TRACE_USER_CLASS_MEMORY_PRIM(s,r,o,p,l)               ((void)(0))
+  #define TRACE_BINDUMP(s,m,d,p,l)                              ((void)(0))
+  #define TRACE_HEXDUMP(s,p,l)                                  ((void)(0))
+  #define TRACE_SDU(s,r,e,d,t,p,l)                              ((void)(0))
+  #define TRACE_IP(s,r,u,p,l)                                   ((void)(0))
+  #define TRACE_PRIMDUMP(s,r,o,p,l)                             ((void)(0))
+#endif
+
+#ifdef TRACE_ERR
+  #define TRACE_ERROR(a)                                        vsi_o_error_ttrace(a)   
+#else
+  #define TRACE_ERROR(a)                                        ((void)(0))
+#endif
+
+#ifdef TRACE_IS                                                 /* entity internal signals */
+  #define TRACE_ISIG(a)                                         vsi_o_class_ttrace( TC_ISIG,a)
+#else
+  #define TRACE_ISIG(a)                                         ((void)(0))
+#endif
+
+#ifdef TRACE_PRIM
+  #define PTRACE_IN(OPC)                                        vsi_o_ptrace (VSI_CALLER OPC, 0)
+  #define PTRACE_OUT(OPC)                                       vsi_o_ptrace (VSI_CALLER OPC, 1)
+#else
+  #define PTRACE_IN(OPC)                                        ((void)(0))
+  #define PTRACE_OUT(OPC)                                       ((void)(0))
+#endif
+
+#ifdef TRACE_PRF
+  #define PRF_LOG_FUNC_ENTRY(F)                                 prf_log_function_entry(F)
+  #define PRF_LOG_FUNC_EXIT(F)                                  prf_log_function_exit(F)
+  #define PRF_LOG_POI(P)                                        prf_log_point_of_interest(P)
+#else
+  #define PRF_LOG_FUNC_ENTRY(F)                                 ((void)(0))
+  #define PRF_LOG_FUNC_EXIT(F)                                  ((void)(0))
+  #define PRF_LOG_POI(P)                                        ((void)(0))
+#endif
+
+#undef TRACE_ASSERT
+#if defined NDEBUG
+  #define TRACE_ASSERT(e)                                       ((void)(0))
+#else                                                           
+  #define _TRACE_ASSERT(e)                                      ((void)((e)?0:vsi_o_assert(0,0x8000,__FILE__,__LINE__,#e)))
+  #define TRACE_ASSERT(e)                                       ((void)((e)?0:vsi_o_assert(0,0x8000,__FILE__,__LINE__,"Assertion failed:" #e)))
+#endif
+
+#ifdef    assert
+  #undef  assert
+#endif
+
+  #define assert TRACE_ASSERT                                   
+
+#ifdef TRACE_SET_STATE
+  #define SET_STATE(PROCESS,STATE)\
+                { vsi_o_state_ttrace ( #PROCESS ":%s -> " #STATE,\
+                                       PROCESS##_NAME [ ENTITY_DATA->state[PROCESS] ]);\
+                                       ENTITY_DATA->state[PROCESS] = STATE;}
+#else /* TRACE_SET_STATE */
+  #define SET_STATE(PROCESS,STATE)    (ENTITY_DATA->state[PROCESS] = STATE)
+#endif /* TRACE_SET_STATE */
+
+#ifdef TRACE_GET_STATE
+  #define GET_STATE(PROCESS)\
+                  (vsi_o_state_ttrace (#PROCESS ":%s",\
+                                       PROCESS##_NAME [ ENTITY_DATA->state[PROCESS] ]),\
+                                       ENTITY_DATA->state[PROCESS] )
+#else /* TRACE_GET_STATE */
+  #define GET_STATE(PROCESS)           ENTITY_DATA->state[PROCESS]
+#endif /* TRACE_GET_STATE */
+
+
+#endif /* VSI_H */
+