comparison g23m/condat/ms/src/aci/cmh_l2rq.c @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:509db1a7b7b8
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-PS (6147)
4 | Modul : CMH_L2RQ
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 provides the query functions related to the
18 | protocol stack adapter for L2R.
19 +-----------------------------------------------------------------------------
20 */
21
22 #ifndef CMH_L2RQ_C
23 #define CMH_L2RQ_C
24 #endif
25
26 #include "aci_all.h"
27
28 /*==== INCLUDES ===================================================*/
29 #include "aci_cmh.h"
30 #include "ati_cmd.h"
31 #include "aci_cmd.h"
32 #include "dti.h" /* functionality of the dti library */
33
34 #ifdef FAX_AND_DATA
35 #include "aci_fd.h"
36 #endif /* of #ifdef FAX_AND_DATA */
37
38 #include "dti_conn_mng.h"
39
40 #include "cmh_ra.h"
41 #include "psa.h"
42 #include "psa_l2r.h"
43 #include "cmh.h"
44 #include "cmh_l2r.h"
45
46 /*==== CONSTANTS ==================================================*/
47
48 /*==== EXPORT =====================================================*/
49
50 /*==== VARIABLES ==================================================*/
51
52 /*==== FUNCTIONS ==================================================*/
53
54 /*
55 +--------------------------------------------------------------------+
56 | PROJECT : GSM-PS (6147) MODULE : CMH_L2RQ |
57 | STATE : code ROUTINE : qAT_PlusCRLP |
58 +--------------------------------------------------------------------+
59
60 PURPOSE : This is the functional counterpart to the +CRLP? AT command
61 which returns the current setting of iws, mws, t1 and
62 n2.
63
64 <iws>: IWF to MS window size.
65 <mws>: MS to IWF window size
66 <t1> : acknowledge timer
67 <n2> : retransmission attemps
68 */
69
70 GLOBAL T_ACI_RETURN qAT_PlusCRLP ( T_ACI_CMD_SRC srcId,
71 SHORT* iws, SHORT* mws,
72 SHORT* t1, SHORT* n2 )
73 {
74 T_L2R_CMD_PRM * pL2RCmdPrm; /* points to L2R command parameters */
75
76 TRACE_FUNCTION ("qAT_PlusCRLP()");
77
78 /*
79 *-------------------------------------------------------------------
80 * check command source
81 *-------------------------------------------------------------------
82 */
83 if(!cmh_IsVldCmdSrc (srcId))
84 {
85 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter );
86 return( AT_FAIL );
87 }
88
89 pL2RCmdPrm = &fnd_cmhPrm[srcId].l2rCmdPrm;
90
91 /*
92 *-------------------------------------------------------------------
93 * fill in parameters
94 *-------------------------------------------------------------------
95 */
96 *iws = pL2RCmdPrm -> CRLPiws;
97 *mws = pL2RCmdPrm -> CRLPmws;
98 *t1 = pL2RCmdPrm -> CRLPt1;
99 *n2 = pL2RCmdPrm -> CRLPn2;
100
101
102 return( AT_CMPL );
103 }
104
105 /*
106 +--------------------------------------------------------------------+
107 | PROJECT : GSM-PS (6147) MODULE : CMH_L2RQ |
108 | STATE : code ROUTINE : qAT_PlusDS |
109 +--------------------------------------------------------------------+
110
111 PURPOSE : This is the functional counterpart to the +DS? AT command
112 which returns the current setting of dir, comp, maxDict
113 and maxStr.
114
115 <dir> : desired direction of data compression.
116 <comp> : mode of continue
117 <maxDict> : maximum number of dictionary entries
118 <maxStr> : maximum string length
119 */
120
121 GLOBAL T_ACI_RETURN qAT_PlusDS ( T_ACI_CMD_SRC srcId,
122 T_ACI_DS_DIR* dir,
123 T_ACI_DS_COMP* comp,
124 LONG* maxDict,
125 SHORT* maxStr )
126 {
127 T_L2R_CMD_PRM * pL2RCmdPrm; /* points to L2R command parameters */
128
129 TRACE_FUNCTION ("qAT_PlusDS()");
130
131 /*
132 *-------------------------------------------------------------------
133 * check command source
134 *-------------------------------------------------------------------
135 */
136 if(!cmh_IsVldCmdSrc (srcId))
137 {
138 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter );
139 return( AT_FAIL );
140 }
141
142 pL2RCmdPrm = &fnd_cmhPrm[srcId].l2rCmdPrm;
143
144 /*
145 *-------------------------------------------------------------------
146 * fill in parameters
147 *-------------------------------------------------------------------
148 */
149 *dir = pL2RCmdPrm -> DSdir;
150 *comp = pL2RCmdPrm -> DScomp;
151 *maxDict = pL2RCmdPrm -> DSmaxDict;
152 *maxStr = pL2RCmdPrm -> DSmaxStr;
153
154
155 return( AT_CMPL );
156 }
157
158
159 /*==== EOF ========================================================*/