FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/gpf/inc/pcon.h @ 316:79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Thu, 10 Apr 2014 04:06:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
315:1b4beffc8055 | 316:79080922d8e4 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : | |
4 | Modul : pcon.h | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : Condat Coder Decoder For Primitives | |
18 | Global function prototypes | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 | |
22 | |
23 #ifndef PCON_H | |
24 #define PCON_H | |
25 | |
26 #define PCON_LITTLE 1 | |
27 #define PCON_BIG 2 | |
28 | |
29 #define PCON_OK 0 | |
30 #define PCON_INVALID_OPC 1 /* operation code of primitive not defined */ | |
31 #define PCON_INVALID_CNT 2 /* wrong number of entries of an variable long array */ | |
32 #define PCON_INVALID_OFFS 3 /* wrong sum of l_buf and o_buf of an sdu */ | |
33 #define PCON_INVALID_TYPE 4 /* wrong entry in pvar table */ | |
34 #define PCON_INVALID_INIT 5 /* wrong initialization */ | |
35 #define PCON_INVALID_UTAG 6 /* union controller too large */ | |
36 #define PCON_NO_MEM 7 /* out of memory */ | |
37 #define PCON_CCDDATA_ERROR 8 /* wrong ccddata format */ | |
38 #define PCON_INVALID_PTR 9 /* user supplied null pointer for a | |
39 mandatory element */ | |
40 #define PCON_INVALID_VALFLAG 10 /* user supplied valid flag that is neither | |
41 1 nor 0 */ | |
42 #define PCON_INVALID_VALUE 11 /* user supplied value for basetype not | |
43 defined in specification */ | |
44 #define PCON_INVALID_PATH 12 /* component path for prim not found */ | |
45 | |
46 #define PCON_CONFIG_PRIM 23 /* primitive was for internal use of PCON, | |
47 * not to be relayed to stack | |
48 */ | |
49 #ifdef _TOOLS_ | |
50 #define PCON_DLLFUNC_ERROR 24 /* could not find a function in pcon.dll */ | |
51 #define PCON_STRING_END 25 /* command string end reached */ | |
52 #endif /* _TOOLS_ */ | |
53 | |
54 #define PCON_NOT_PRES 0xFFFF | |
55 #define PCON_NOT_INCL 0xFFFE | |
56 | |
57 #if !defined (CCDDATA_PREF) | |
58 #if defined (_TOOLS_) && defined (CCDDATA_LOAD) | |
59 #define CCDDATA_PREF(pcon_fun) cddl_##pcon_fun | |
60 #else | |
61 #define CCDDATA_PREF(pcon_fun) pcon_fun | |
62 #endif /* _TOOLS_ && CCDDATA_LOAD */ | |
63 #endif /* !CCDDATA_PREF */ | |
64 | |
65 typedef struct | |
66 { | |
67 #ifdef _TOOLS_ | |
68 ULONG (*init_prim_coding) (T_HANDLE, UBYTE); | |
69 ULONG (*decode_prim) (ULONG, void **, void *, ULONG *, ULONG); | |
70 ULONG (*code_prim) (ULONG, void *, void **, ULONG *, ULONG, char*); | |
71 ULONG (*make_filter) (char *, void **); | |
72 #else | |
73 ULONG (*init_prim_coding) (T_HANDLE, UBYTE); | |
74 ULONG (*decode_prim) (ULONG, void **, void *, ULONG *, ULONG); | |
75 ULONG (*code_prim) (ULONG, void *, void **, ULONG *, ULONG, char*); | |
76 ULONG (*pcheck) (ULONG, void *); | |
77 #endif | |
78 int stack_offset; | |
79 } T_PCON_PROPERTIES; | |
80 | |
81 typedef struct | |
82 { | |
83 USHORT struct_level; /* the substructure level within the structure, where | |
84 * the counting started from */ | |
85 USHORT cnt_sub_elems; /* the counter of structure subelements */ | |
86 BOOL count_subs ; /* flag whether sub elements should be counted */ | |
87 } T_SUB_ELEM_COUNT; | |
88 | |
89 #define PCON_STACK_OFFSET 3072 | |
90 | |
91 | |
92 #ifndef PCON_C | |
93 /* | |
94 * function prototypes | |
95 */ | |
96 extern ULONG CCDDATA_PREF(pcon_init_prim_coding)(T_HANDLE caller, UBYTE format); | |
97 | |
98 extern ULONG CCDDATA_PREF(pcon_decodePrim) (ULONG opc, | |
99 void ** decoded_prim, | |
100 void * coded_prim, | |
101 ULONG * length, | |
102 ULONG woff); | |
103 | |
104 extern ULONG CCDDATA_PREF(pcon_codePrim) (ULONG opc, | |
105 void * decoded_prim, | |
106 void ** coded_prim, | |
107 ULONG * length, | |
108 ULONG woff, | |
109 char* receiver); | |
110 | |
111 #ifdef _TOOLS_ | |
112 extern ULONG CCDDATA_PREF(pcon_init_ccddata)(void); | |
113 /* | |
114 * The format for the command string in pcon_make_filter is: | |
115 * [<receiver> [<opc>|<primname> [+|-<elem_pathnames>]]] | |
116 * With <elem_pathnames>: <elem_pathname>[,<elem_pathnames] | |
117 * and <elem_pathname> is the unique path of and element in a | |
118 * primitive, with the structure member names separated by '.'. | |
119 * Examples: | |
120 * "TAP ENT_FOO_IND +struct_3.elem_2,struct_1.substruct_0.elem_1" - Set filter | |
121 * if primitive ENT_FOO_IND if sent to TAP for the two elements elem_2 in | |
122 * struct_3 and elem_1 in substruct_0 in struct_1. | |
123 * "TAP 800000AF1 +struct_3.elem_2,struct_1.substruct_0.elem_1" - same for given | |
124 * opc instead of prim name. | |
125 * "TAP ENT_FOO_IND -struct_3.elem_2,struct_1.substruct_0.elem_1" - Set filter | |
126 * for all other elements than two given here | |
127 * "TAP ENT_FOO_IND" - Delete filter setting for primitive ENT_FOO_IND | |
128 * sent to TAP | |
129 * "TAP" - Delete all filter settings for any primitive sent to TAP | |
130 * "" - Delete all filter settings | |
131 */ | |
132 extern ULONG CCDDATA_PREF(pcon_make_filter)(char* string, void** prim); | |
133 extern ULONG CCDDATA_PREF(pcon_filter_decode_prim) (ULONG opc, | |
134 void** decoded_prim, | |
135 void* coded_prim, | |
136 ULONG* length, | |
137 ULONG woff, | |
138 void** shadow_prim); | |
139 #else | |
140 extern ULONG pcon_pcheck (ULONG opc, void * decoded_prim); | |
141 #endif /* _TOOLS_ */ | |
142 | |
143 #endif /* !PCON_C */ | |
144 | |
145 #endif |