FreeCalypso > hg > fc-magnetite
comparison src/g23m-gprs/upm/upm_dispatcher_gsm.c @ 197:2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 14 Oct 2016 01:21:46 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
196:a04cde1fb771 | 197:2cf312e56ee7 |
---|---|
1 /*---------------------------------------------------------------------------- | |
2 | Project : 3G PS | |
3 | Module : UPM | |
4 +----------------------------------------------------------------------------- | |
5 | Copyright 2003 Texas Instruments. | |
6 | All rights reserved. | |
7 | | |
8 | This file is confidential and a trade secret of Texas | |
9 | Instruments . | |
10 | The receipt of or possession of this file does not convey | |
11 | any rights to reproduce or disclose its contents or to | |
12 | manufacture, use, or sell anything it may describe, in | |
13 | whole, or in part, without the specific written consent of | |
14 | Texas Instruments. | |
15 +----------------------------------------------------------------------------- | |
16 | Purpose: This module implements the process dispatcher for GSM primitives | |
17 | in the User Plane Manager (UPM) entity. | |
18 | For design details, see: | |
19 | 8010.939 UPM Detailed Specification | |
20 +---------------------------------------------------------------------------*/ | |
21 | |
22 /*==== DECLARATION CONTROL =================================================*/ | |
23 | |
24 | |
25 /*==== INCLUDES =============================================================*/ | |
26 | |
27 #include "upm.h" | |
28 | |
29 #ifndef UPM_WITHOUT_USER_PLANE | |
30 #include "upm_dti_output_handler.h" | |
31 #endif | |
32 | |
33 /*==== CONSTS ===============================================================*/ | |
34 | |
35 /*==== TYPES ================================================================*/ | |
36 | |
37 /*==== LOCALS ===============================================================*/ | |
38 | |
39 /*==== PRIVATE FUNCTIONS ====================================================*/ | |
40 | |
41 /*==== PUBLIC FUNCTIONS =====================================================*/ | |
42 | |
43 /* | |
44 +------------------------------------------------------------------------------ | |
45 | Function : upm_disp_mmpm_sequence_ind | |
46 +------------------------------------------------------------------------------ | |
47 | Description : Dispatch MMPM_SEQUENCE_IND | |
48 | | |
49 | Parameters : prim - received primitive | |
50 +------------------------------------------------------------------------------ | |
51 */ | |
52 void upm_disp_mmpm_sequence_ind (T_MMPM_SEQUENCE_IND *prim) | |
53 { | |
54 (void)TRACE_FUNCTION("upm_disp_mmpm_sequence_ind"); | |
55 | |
56 upm_sndcp_dispatch_mmpm_sequence_ind(prim); | |
57 } | |
58 | |
59 /* | |
60 +------------------------------------------------------------------------------ | |
61 | Function : upm_disp_sn_activate_cnf | |
62 +------------------------------------------------------------------------------ | |
63 | Description : Dispatch SN_ACTIVATE_CNF | |
64 | | |
65 | Parameters : prim - received primitive | |
66 +------------------------------------------------------------------------------ | |
67 */ | |
68 void upm_disp_sn_activate_cnf (T_SN_ACTIVATE_CNF *prim) | |
69 { | |
70 struct T_CONTEXT_DATA *context; | |
71 | |
72 (void)TRACE_FUNCTION("upm_disp_sn_activate_cnf"); | |
73 | |
74 /* Find context data using NSAPI as index */ | |
75 context = upm_get_context_data_from_nsapi(prim->nsapi); | |
76 | |
77 if (context != NULL) { | |
78 /* Forward primitive to SNDCP Control */ | |
79 upm_sndcp_control(context, UPM_P_SN_ACTIVATE_CNF, prim); | |
80 } else { | |
81 (void)TRACE_ERROR("Received SN_ACTIVATE_CNF for non-existing context " | |
82 "- discarded!"); | |
83 } | |
84 } | |
85 | |
86 /* | |
87 +------------------------------------------------------------------------------ | |
88 | Function : upm_disp_sn_count_cnf | |
89 +------------------------------------------------------------------------------ | |
90 | Description : Dispatch SN_COUNT_CNF | |
91 | | |
92 | Parameters : prim - received primitive | |
93 +------------------------------------------------------------------------------ | |
94 */ | |
95 void upm_disp_sn_count_cnf (T_SN_COUNT_CNF *prim) | |
96 { | |
97 struct T_CONTEXT_DATA *ptr_context_data; | |
98 | |
99 (void)TRACE_FUNCTION("upm_disp_sn_count_cnf"); | |
100 | |
101 ptr_context_data = upm_get_context_data_from_nsapi(prim->nsapi); | |
102 if (ptr_context_data != NULL) { | |
103 /* Forward primitive to SNDCP Control */ | |
104 upm_sndcp_dispatch_sn_count_cnf(prim); | |
105 } else { | |
106 (void)TRACE_ERROR("Received SN_COUNT_CNF for non-existing context " | |
107 "- discarded!"); | |
108 } | |
109 } | |
110 | |
111 /* | |
112 +------------------------------------------------------------------------------ | |
113 | Function : upm_disp_sn_deactivate_cnf | |
114 +------------------------------------------------------------------------------ | |
115 | Description : Dispatch SN_DEACTIVATE_CNF | |
116 | | |
117 | Parameters : prim - received primitive | |
118 +------------------------------------------------------------------------------ | |
119 */ | |
120 void upm_disp_sn_deactivate_cnf (T_SN_DEACTIVATE_CNF *prim) | |
121 { | |
122 struct T_CONTEXT_DATA *ptr_context_data; | |
123 | |
124 (void)TRACE_FUNCTION("upm_disp_sn_deactivate_cnf"); | |
125 | |
126 ptr_context_data = upm_get_context_data_from_nsapi(prim->nsapi); | |
127 if (ptr_context_data != NULL) { | |
128 /* Forward primitive to SNDCP Control */ | |
129 upm_sndcp_control(ptr_context_data, UPM_P_SN_DEACTIVATE_CNF, NULL); | |
130 | |
131 upm_check_for_released_context_and_release(ptr_context_data); | |
132 } | |
133 } | |
134 | |
135 /* | |
136 +------------------------------------------------------------------------------ | |
137 | Function : upm_disp_sn_modify_cnf | |
138 +------------------------------------------------------------------------------ | |
139 | Description : Dispatch SN_MODIFY_CNF | |
140 | | |
141 | Parameters : prim - received primitive | |
142 +------------------------------------------------------------------------------ | |
143 */ | |
144 void upm_disp_sn_modify_cnf (T_SN_MODIFY_CNF *prim) | |
145 { | |
146 struct T_CONTEXT_DATA *context; | |
147 | |
148 (void)TRACE_FUNCTION("upm_disp_sn_modify_cnf"); | |
149 | |
150 /* Find context data using NSAPI as index */ | |
151 context = upm_get_context_data_from_nsapi(prim->nsapi); | |
152 | |
153 if (context != NULL) { | |
154 /* Forward primitive to SNDCP Control */ | |
155 upm_sndcp_control(context, UPM_P_SN_MODIFY_CNF, prim); | |
156 } else { | |
157 (void)TRACE_ERROR("Received SN_MODIFY_CNF for non-existing context " | |
158 "- discarded!"); | |
159 } | |
160 } | |
161 | |
162 /*==== END OF FILE ==========================================================*/ |