FreeCalypso > hg > fc-magnetite
comparison src/g23m-fad/l2r/tra_pei.h @ 174:90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 12 Oct 2016 05:40:46 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
173:bf64d785238a | 174:90eb61ecd093 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : CSD (8411) | |
4 | Modul : tra_pei.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 : Definitions for the TRA Entity, for l2r_pei exclusively! | |
18 | TRA | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 | |
22 #ifndef TRA_PEI_H | |
23 #define TRA_PEI_H | |
24 | |
25 #define ENTITY_L2R | |
26 | |
27 /* | |
28 * Constants | |
29 */ | |
30 | |
31 /* | |
32 * information for dti library | |
33 */ | |
34 #define TRA_DTI_UP_INSTANCE 0 | |
35 #define TRA_DTI_UP_INTERFACE 1 | |
36 #define TRA_DTI_UP_CHANNEL 0 | |
37 | |
38 #define TRA_DTI_BUF_SIZE 400 /* UL buffer size for max dti_data_ind */ | |
39 #define MAX_SDU_SIZE 36 /* 14400/8/50 */ | |
40 | |
41 /**********************************************************************************/ | |
42 /* | |
43 * process global data | |
44 */ | |
45 | |
46 #ifndef NTRACE | |
47 | |
48 /* for trace purposes */ | |
49 | |
50 #define SERVICE_NAME_DTI "DTI" | |
51 #define SERVICE_NAME_MGT "MGT" | |
52 #define SERVICE_NAME_UP "UP" | |
53 #define SERVICE_NAME_DN "DN" | |
54 | |
55 #endif | |
56 | |
57 #define DTI dti. | |
58 #define MGT mgt. | |
59 #define UP up. | |
60 #define DN dn. | |
61 | |
62 /**********************************************************************************/ | |
63 /* | |
64 * data for process downlink | |
65 */ | |
66 | |
67 #define TRA_DLR_DEPTH 6 /* ring buffer depth */ | |
68 | |
69 typedef struct | |
70 { | |
71 UBYTE state; | |
72 #ifndef NTRACE | |
73 char *name; | |
74 char *state_name; | |
75 #endif | |
76 U8 sa; /* last sa bit in this primitive */ | |
77 U8 sb; /* last sb bit in this primitive */ | |
78 U8 x; /* last x bit in this primitive */ | |
79 T_DTI2_DATA_IND *prim; /* NULL if no DTI2_DATA_IND allocated */ | |
80 T_desc2 *list_end; /* NULL if no DTI2_DATA_IND allocated */ | |
81 T_RIBU_FD *ribu; | |
82 | |
83 T_DTI2_DATA_IND *Brk_dti_data_ind; /* data indication for relaying break indication */ | |
84 } T_TRA_DN; | |
85 | |
86 /**********************************************************************************/ | |
87 /* | |
88 * data for process uplink | |
89 */ | |
90 | |
91 typedef struct | |
92 { | |
93 UBYTE state; | |
94 #ifndef NTRACE | |
95 char *name; | |
96 char *state_name; | |
97 #endif | |
98 U8 sa; /* last sa bit in this primitive */ | |
99 U8 sb; /* last sb bit in this primitive */ | |
100 U8 x; /* last x bit in this primitive */ | |
101 UBYTE req_frames; /* amount of data RA is able to handle at next RA_DATA_REQ*/ | |
102 T_DTI2_DATA_REQ *Prim; /* For DTI interface to hold last received primitive */ | |
103 USHORT List_off; /* offset to the remaining data to be sent */ | |
104 T_FD fd; | |
105 UBYTE to_ra[MAX_SDU_SIZE]; /* data field to be handed to RA*/ | |
106 } T_TRA_UP; | |
107 | |
108 /**********************************************************************************/ | |
109 /* | |
110 * data for process management | |
111 */ | |
112 | |
113 /**********************************************************************************/ | |
114 | |
115 typedef struct | |
116 { | |
117 UBYTE state; | |
118 #ifndef NTRACE | |
119 char *name; | |
120 char *state_name; | |
121 #endif | |
122 } T_SUB_STATE_TRA; | |
123 | |
124 typedef struct | |
125 { | |
126 T_SUB_STATE_TRA dti; /* state variable for DTI library */ | |
127 T_SUB_STATE_TRA mgt; /* process management */ | |
128 T_TRA_UP up; /* process uplink */ | |
129 T_TRA_DN dn; /* process downlink */ | |
130 } T_TRA_DATA; | |
131 | |
132 /*==== EXPORT =====================================================*/ | |
133 /* | |
134 * data base | |
135 */ | |
136 | |
137 EXTERN T_TRA_DATA *tra_data; | |
138 EXTERN T_TRA_DATA *tra_data_first_elem; /* always on element 0 of l2r_data_base */ | |
139 | |
140 /* | |
141 * Prototypes | |
142 * | |
143 * MANAGEMENT primitive processing | |
144 */ | |
145 | |
146 #ifdef OPTION_MULTITHREAD | |
147 #define mgt_tra_activate_req _ENTITY_PREFIXED(mgt_tra_activate_req) | |
148 #define mgt_tra_deactivate_req _ENTITY_PREFIXED(mgt_tra_deactivate_req) | |
149 #define mgt_tra_dti_req _ENTITY_PREFIXED(mgt_tra_dti_req) | |
150 #endif | |
151 | |
152 EXTERN void mgt_tra_activate_req (T_TRA_ACTIVATE_REQ *tra_activate_req); | |
153 EXTERN void mgt_tra_deactivate_req (T_TRA_DEACTIVATE_REQ *tra_deactivate_req); | |
154 EXTERN void mgt_tra_dti_req (T_TRA_DTI_REQ *tra_dti_req); | |
155 | |
156 #ifdef OPTION_MULTITHREAD | |
157 #define rcv_ra_ready_ind _ENTITY_PREFIXED(rcv_ra_ready_ind) | |
158 #define rcv_ra_data_ind _ENTITY_PREFIXED(rcv_ra_data_ind) | |
159 #define rcv_ra_break_ind _ENTITY_PREFIXED(rcv_ra_break_ind) | |
160 #endif | |
161 | |
162 EXTERN void rcv_ra_ready_ind (T_RA_READY_IND *ra_ready_ind); | |
163 EXTERN void rcv_ra_data_ind (T_RA_DATA_IND *ra_data_ind); | |
164 EXTERN void rcv_ra_break_ind (T_RA_BREAK_IND *ra_break_ind); | |
165 | |
166 #ifdef OPTION_MULTITHREAD | |
167 #define sig_dti_tra_mgt_connection_opened_ind \ | |
168 _ENTITY_PREFIXED(sig_dti_tra_mgt_connection_opened_ind) | |
169 #define sig_dti_tra_mgt_connection_closed_ind \ | |
170 _ENTITY_PREFIXED(sig_dti_tra_mgt_connection_closed_ind) | |
171 #define sig_dti_tra_dn_tx_buffer_full_ind \ | |
172 _ENTITY_PREFIXED(sig_dti_tra_dn_tx_buffer_full_ind ) | |
173 #define sig_dti_tra_dn_tx_buffer_ready_ind \ | |
174 _ENTITY_PREFIXED(sig_dti_tra_dn_tx_buffer_ready_ind ) | |
175 #define sig_dti_tra_up_data_received_ind \ | |
176 _ENTITY_PREFIXED(sig_dti_tra_up_data_received_ind ) | |
177 #endif | |
178 | |
179 /* | |
180 * these functions are called by pei_sig_callback | |
181 */ | |
182 EXTERN void sig_dti_tra_mgt_connection_opened_ind(); | |
183 EXTERN void sig_dti_tra_mgt_connection_closed_ind(); | |
184 EXTERN void sig_dti_tra_dn_tx_buffer_full_ind(); | |
185 EXTERN void sig_dti_tra_dn_tx_buffer_ready_ind(); | |
186 EXTERN void sig_dti_tra_up_data_received_ind(T_DTI2_DATA_REQ *dti_data_req); | |
187 | |
188 /* | |
189 * Communication handles | |
190 */ | |
191 | |
192 #ifdef OPTION_MULTITHREAD | |
193 #define hCommCTRL _ENTITY_PREFIXED(hCommCTRL) | |
194 #ifdef _SIMULATION_ | |
195 #define hCommRA _ENTITY_PREFIXED(hCommRA) | |
196 #endif | |
197 #endif | |
198 | |
199 EXTERN T_HANDLE l2r_handle; | |
200 EXTERN T_HANDLE hCommCTRL; /* Controller Communication */ | |
201 | |
202 #ifdef _SIMULATION_ | |
203 EXTERN T_HANDLE hCommRA; /* RA Communication */ | |
204 #endif | |
205 | |
206 #endif |