comparison src/g23m-aci/aci/cmh_snds.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 :
4 | Modul :
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 implements the set fuinctions related to the
18 | protocol stack adapter for the SNDCP entity.
19 +-----------------------------------------------------------------------------
20 */
21
22 #ifdef GPRS
23
24 #ifndef CMH_SNDS_C
25 #define CMH_SNDS_C
26 #endif
27
28 #include "aci_all.h"
29 /*==== INCLUDES ===================================================*/
30 #include "dti.h" /* functionality of the dti library */
31 #include "dti_conn_mng.h"
32
33 #include "aci_cmh.h"
34
35 #include "cmh_snd.h"
36
37 #include "dti_cntrl_mng.h"
38
39 #include "gaci_cmh.h"
40 #include "gaci.h"
41 #include "psa.h"
42 #include "cmh.h"
43 #include "psa_sm.h"
44 #include "cmh_sm.h"
45 #include "psa_upm.h"
46
47 /*==== CONSTANTS ==================================================*/
48
49 /*==== EXPORT =====================================================*/
50
51 /*==== VARIABLES ==================================================*/
52 EXTERN T_PDP_CONTEXT_INTERNAL *p_pdp_context_list;
53
54
55 /*==== FUNCTIONS ==================================================*/
56
57
58 /*
59 +--------------------------------------------------------------------+
60 | PROJECT : GSM-PS (8441) MODULE : CMH_SMS |
61 | STATE : finnished ROUTINE : sAT_PercentSNCNT |
62 +--------------------------------------------------------------------+
63
64 PURPOSE : This is the functional counterpart to the %SNCNT = AT
65 command which resets the SNDCP Counter.
66 */
67 GLOBAL T_ACI_RETURN sAT_PercentSNCNT( T_ACI_CMD_SRC srcId, BOOL reset_counter )
68 {
69 UBYTE sndcp_id;
70 BOOL prim_sent = FALSE;
71 T_PDP_CONTEXT_INTERNAL *p_pdp_context_node = NULL;
72
73 TRACE_FUNCTION ("sAT_PercentSNCNT()");
74
75 sndcpShrdPrm.srcId = srcId;
76
77 p_pdp_context_node = p_pdp_context_list;
78 while( p_pdp_context_node )
79 {
80 if ( p_pdp_context_node->internal_data.state EQ PDP_CONTEXT_STATE_DATA_LINK OR
81 p_pdp_context_node->internal_data.state EQ PDP_CONTEXT_STATE_ACTIVATED )
82 {
83 sndcp_id = (U8)CID_TO_NSAPI( p_pdp_context_node->cid );
84 psa_upm_count_req( sndcp_id, reset_counter );
85 prim_sent = TRUE;
86
87 TRACE_EVENT_P1("found PDP connection on channel %d", sndcp_id);
88 }
89 p_pdp_context_node = p_pdp_context_node->p_next;
90 }
91
92 if (prim_sent)
93 {
94 return AT_EXCT;
95 }
96 else
97 {
98 return AT_CMPL;
99 }
100 }
101
102 #endif /* GPRS */