FreeCalypso > hg > fc-selenite
comparison src/g23m-aci/aci/psa_trap.c @ 1:d393cd9bb723
src/g23m-*: initial import from Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 15 Jul 2018 04:40:46 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:b6a5e36de839 | 1:d393cd9bb723 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-PS (6147) | |
4 | Modul : PSA_TRAP | |
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 : This module defines the processing functions for the | |
18 | primitives send to the protocol stack adapter by TRA. | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 | |
22 #ifdef DTI | |
23 | |
24 #ifndef PSA_TRAP_C | |
25 #define PSA_TRAP_C | |
26 #endif | |
27 | |
28 #include "aci_all.h" | |
29 | |
30 /*==== INCLUDES ===================================================*/ | |
31 #include "dti.h" /* functionality of the dti library */ | |
32 #include "aci_cmh.h" | |
33 #include "ati_cmd.h" | |
34 #include "aci_cmd.h" | |
35 | |
36 #include "dti.h" | |
37 #include "dti_conn_mng.h" | |
38 #include "dti_cntrl_mng.h" | |
39 | |
40 #include "aci_fd.h" | |
41 /*#include "aci_io.h"*/ | |
42 #include "aci.h" | |
43 #include "psa.h" | |
44 #include "cmh.h" | |
45 #include "cmh_ra.h" | |
46 #include "psa_l2r.h" | |
47 #include "cmh_l2r.h" | |
48 #include "psa_ra.h" | |
49 #include "cmh_ra.h" | |
50 #include "psa_tra.h" | |
51 | |
52 /*#include "aci_lst.h" | |
53 #include "psa_uart.h" | |
54 #include "cmh_uart.h" */ | |
55 | |
56 #include "psa_cc.h" | |
57 | |
58 /*==== CONSTANTS ==================================================*/ | |
59 | |
60 | |
61 /*==== TYPES ======================================================*/ | |
62 | |
63 | |
64 /*==== EXPORT =====================================================*/ | |
65 | |
66 | |
67 /*==== VARIABLES ==================================================*/ | |
68 | |
69 | |
70 /*==== FUNCTIONS ==================================================*/ | |
71 | |
72 /* | |
73 +-------------------------------------------------------------------+ | |
74 | PROJECT : GSM-PS (6147) MODULE : PSA_TRA | | |
75 | ROUTINE : psa_tra_activate_cnf | | |
76 +-------------------------------------------------------------------+ | |
77 | |
78 PURPOSE : processes the TRA_ACTIVATE_CNF primitive sent by TRA. | |
79 | |
80 */ | |
81 | |
82 GLOBAL void psa_tra_activate_cnf | |
83 (T_TRA_ACTIVATE_CNF *tra_activate_cnf) | |
84 { | |
85 TRACE_FUNCTION ("psa_tra_activate_cnf()"); | |
86 | |
87 TRA_is_activated = TRUE; | |
88 cmhCC_L2R_or_TRA_Activated ( DTI_ENTITY_TRA, raShrdPrm.cId ); | |
89 | |
90 PFREE (tra_activate_cnf); | |
91 } | |
92 | |
93 /* | |
94 +-------------------------------------------------------------------+ | |
95 | PROJECT : GSM-PS (6147) MODULE : PSA_TRA | | |
96 | ROUTINE : psa_tra_deactivate_cnf | | |
97 +-------------------------------------------------------------------+ | |
98 | |
99 PURPOSE : processes the TRA_DEACTIVATE_CNF primitive sent by TRA. | |
100 | |
101 */ | |
102 | |
103 GLOBAL void psa_tra_deactivate_cnf | |
104 (T_TRA_DEACTIVATE_CNF *tra_deactivate_cnf) | |
105 { | |
106 TRACE_FUNCTION ("psa_tra_deactivate_cnf()"); | |
107 | |
108 TRA_is_activated = FALSE; | |
109 cmhTRA_Deactivated(); | |
110 | |
111 PFREE (tra_deactivate_cnf); | |
112 } | |
113 | |
114 /* | |
115 +-------------------------------------------------------------------+ | |
116 | PROJECT : GSM-PS (6147) MODULE : PSA_TRA | | |
117 | ROUTINE : psa_tra_dti_cnf | | |
118 +-------------------------------------------------------------------+ | |
119 | |
120 PURPOSE : processes the TRA_DTI_CNF primitive sent by TRA. | |
121 | |
122 */ | |
123 | |
124 GLOBAL void psa_tra_dti_cnf | |
125 (T_TRA_DTI_CNF *tra_dti_cnf) | |
126 { | |
127 TRACE_FUNCTION ("psa_tra_dti_cnf()"); | |
128 | |
129 /* store the current DTI id for the case of redirection */ | |
130 raShrdPrm.dti_id = EXTRACT_DTI_ID(tra_dti_cnf->link_id); | |
131 | |
132 switch( tra_dti_cnf->dti_conn ) | |
133 { | |
134 case(TRA_CONNECT_DTI): | |
135 dti_cntrl_entity_connected( tra_dti_cnf->link_id, DTI_ENTITY_TRA, DTI_OK ); | |
136 break; | |
137 | |
138 case(TRA_DISCONNECT_DTI): | |
139 /* it depends here on the context: | |
140 if network is disconnecting the call: */ | |
141 if( (ccShrdPrm.datStat EQ DS_DSC_REQ) | |
142 OR (ccShrdPrm.datStat EQ DS_STOP_REQ) | |
143 OR (ccShrdPrm.ctb[raShrdPrm.cId] EQ NULL) ) | |
144 { | |
145 dti_cntrl_entity_disconnected( tra_dti_cnf->link_id, DTI_ENTITY_TRA ); | |
146 psaTRA_Deactivate(); | |
147 } | |
148 else /* other cases */ | |
149 { | |
150 raEntStat.isTempDisconnected = TRUE; | |
151 dti_cntrl_entity_disconnected( tra_dti_cnf->link_id, DTI_ENTITY_TRA ); | |
152 } | |
153 | |
154 break; | |
155 } | |
156 | |
157 PFREE (tra_dti_cnf); | |
158 } | |
159 | |
160 /* | |
161 +-------------------------------------------------------------------+ | |
162 | PROJECT : GSM-PS (6147) MODULE : PSA_TRA | | |
163 | ROUTINE : psa_tra_dti_ind | | |
164 +-------------------------------------------------------------------+ | |
165 | |
166 PURPOSE : processes the TRA_DTI_IND primitive sent by TRA. | |
167 | |
168 */ | |
169 | |
170 GLOBAL void psa_tra_dti_ind | |
171 (T_TRA_DTI_IND *tra_dti_ind) | |
172 { | |
173 TRACE_FUNCTION ("psa_tra_dti_ind()"); | |
174 | |
175 PFREE (tra_dti_ind); | |
176 } | |
177 #endif /* DTI */ |