197
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /*----------------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 | Project : 3G PS
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 | Module : UPM
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 +-----------------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 | Copyright 2003 Texas Instruments.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 | All rights reserved.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 | This file is confidential and a trade secret of Texas
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 | Instruments .
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 | The receipt of or possession of this file does not convey
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 | any rights to reproduce or disclose its contents or to
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 | manufacture, use, or sell anything it may describe, in
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 | whole, or in part, without the specific written consent of
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 | Texas Instruments.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 +-----------------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 | Purpose: Output functions for primitives from UPM to the ACI entity.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 | For design details, see:
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 | 8010.939 UPM Detailed Specification
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 +---------------------------------------------------------------------------*/
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 /*==== DECLARATION CONTROL =================================================*/
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 /*==== INCLUDES ============================================================*/
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 #include "upm.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 #include "upm_aci_output_handler.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 /*==== CONSTS ===============================================================*/
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 /*==== TYPES ================================================================*/
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 /*==== LOCALS ===============================================================*/
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 /*==== PUBLIC FUNCTIONS =====================================================*/
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 +------------------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 | Function : send_upm_count_cnf
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 +------------------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 | Description : Allocate, pack and send UPM_COUNT_CNF primitive.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 | Parameters : nsapi - NSAPI
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 | ul_bytecount - number of uplink octets transferred
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 | ul_pktcount - number of uplink packets transferred
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 | dl_bytecount - number of downlink octets transferred
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 | dl_pktcount - number of downlink packets transferred
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 +------------------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 void send_upm_count_cnf(U8 nsapi, U32 ul_bytecount, U32 dl_bytecount,
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 U32 ul_pktcount, U32 dl_pktcount)
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 (void)TRACE_FUNCTION("send_upm_count_cnf");
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 PALLOC(prim, UPM_COUNT_CNF);
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 TRACE_ASSERT(prim != NULL);
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 /*lint -e613 (Possible use of null pointer 'prim' in left argument to operator '->') */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 prim->nsapi = nsapi;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 prim->octets_uplink = ul_bytecount;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 prim->octets_downlink = dl_bytecount;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 prim->packets_uplink = ul_pktcount;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 prim->packets_downlink = dl_pktcount;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 /*lint +e613 (Possible use of null pointer 'prim' in left argument to operator '->') */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 (void)PSEND(hCommACI, prim);
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 +------------------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 | Function : send_upm_dti_cnf
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 +------------------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 | Description : Allocate, pack and send UPM_DTI_CNF primitive.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 | Parameters : dti_linkid - DTI link ID
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 | dti_conn - connection type
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 +------------------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 void send_upm_dti_cnf(U32 dti_linkid, U8 dti_conn)
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 (void)TRACE_FUNCTION("send_upm_dti_cnf");
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 PALLOC(prim, UPM_DTI_CNF);
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 TRACE_ASSERT(prim != NULL);
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 /*lint -e613 (Possible use of null pointer 'prim' in left argument to operator '->') */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 prim->dti_linkid = dti_linkid;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 prim->dti_conn = dti_conn;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 /*lint +e613 (Possible use of null pointer 'prim' in left argument to operator '->') */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 (void)PSEND(hCommACI, prim);
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 /*==== END OF FILE ==========================================================*/
|