comparison src/aci2/aci/cmh_snds.c @ 3:93999a60b835

src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Sep 2016 00:29:36 +0000
parents
children
comparison
equal deleted inserted replaced
2:c41a534f33c6 3:93999a60b835
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
46 /*==== CONSTANTS ==================================================*/
47
48 /*==== EXPORT =====================================================*/
49
50 /*==== VARIABLES ==================================================*/
51
52 /*==== FUNCTIONS ==================================================*/
53 EXTERN void psaSN_CountReq ( UBYTE c_id, BOOL reset );
54
55
56 /*
57 +--------------------------------------------------------------------+
58 | PROJECT : GSM-PS (8441) MODULE : CMH_SMS |
59 | STATE : finnished ROUTINE : sAT_PercentSNCNT |
60 +--------------------------------------------------------------------+
61
62 PURPOSE : This is the functional counterpart to the %SNCNT = AT
63 command which resets the SNDCP Counter.
64 */
65 GLOBAL T_ACI_RETURN sAT_PercentSNCNT( T_ACI_CMD_SRC srcId, BOOL reset_counter )
66 {
67 UBYTE i;
68 UBYTE sndcp_id;
69
70 TRACE_FUNCTION ("sAT_PercentSNCNT()");
71
72 sndcpShrdPrm.srcId = srcId;
73
74 for (i = 0; i < MAX_CID ; i++) /* Count req is sent for both activated and deactivated CID */
75 {
76 if ( (pdp_context[i].state EQ CS_DATA_LINK OR
77 pdp_context[i].state EQ CS_ACTIVATED) OR (pdp_context[i].nsapi NEQ UNUSED_NSAPI AND
78 pdp_context[i].state EQ CS_DEFINED))
79 {
80 sndcp_id = pdp_context[i].nsapi;
81 psaSN_CountReq( sndcp_id, reset_counter );
82
83 TRACE_EVENT_P1("found SNDCP connection on channel %d", sndcp_id);
84 }
85 }
86
87 return AT_CMPL;
88 }
89
90 #endif /* GPRS */