comparison src/g23m-gprs/upm/upm_aci_output_handler.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: Output functions for primitives from UPM to the ACI entity.
17 | For design details, see:
18 | 8010.939 UPM Detailed Specification
19 +---------------------------------------------------------------------------*/
20
21 /*==== DECLARATION CONTROL =================================================*/
22
23 /*==== INCLUDES ============================================================*/
24
25 #include "upm.h"
26
27 #include "upm_aci_output_handler.h"
28
29 /*==== CONSTS ===============================================================*/
30
31 /*==== TYPES ================================================================*/
32
33 /*==== LOCALS ===============================================================*/
34
35 /*==== PUBLIC FUNCTIONS =====================================================*/
36
37 /*
38 +------------------------------------------------------------------------------
39 | Function : send_upm_count_cnf
40 +------------------------------------------------------------------------------
41 | Description : Allocate, pack and send UPM_COUNT_CNF primitive.
42 |
43 | Parameters : nsapi - NSAPI
44 | ul_bytecount - number of uplink octets transferred
45 | ul_pktcount - number of uplink packets transferred
46 | dl_bytecount - number of downlink octets transferred
47 | dl_pktcount - number of downlink packets transferred
48 +------------------------------------------------------------------------------
49 */
50 void send_upm_count_cnf(U8 nsapi, U32 ul_bytecount, U32 dl_bytecount,
51 U32 ul_pktcount, U32 dl_pktcount)
52 {
53 (void)TRACE_FUNCTION("send_upm_count_cnf");
54
55 {
56 PALLOC(prim, UPM_COUNT_CNF);
57
58 TRACE_ASSERT(prim != NULL);
59
60 /*lint -e613 (Possible use of null pointer 'prim' in left argument to operator '->') */
61 prim->nsapi = nsapi;
62 prim->octets_uplink = ul_bytecount;
63 prim->octets_downlink = dl_bytecount;
64 prim->packets_uplink = ul_pktcount;
65 prim->packets_downlink = dl_pktcount;
66 /*lint +e613 (Possible use of null pointer 'prim' in left argument to operator '->') */
67
68 (void)PSEND(hCommACI, prim);
69 }
70 }
71
72 /*
73 +------------------------------------------------------------------------------
74 | Function : send_upm_dti_cnf
75 +------------------------------------------------------------------------------
76 | Description : Allocate, pack and send UPM_DTI_CNF primitive.
77 |
78 | Parameters : dti_linkid - DTI link ID
79 | dti_conn - connection type
80 +------------------------------------------------------------------------------
81 */
82 void send_upm_dti_cnf(U32 dti_linkid, U8 dti_conn)
83 {
84 (void)TRACE_FUNCTION("send_upm_dti_cnf");
85 {
86 PALLOC(prim, UPM_DTI_CNF);
87
88 TRACE_ASSERT(prim != NULL);
89 /*lint -e613 (Possible use of null pointer 'prim' in left argument to operator '->') */
90 prim->dti_linkid = dti_linkid;
91 prim->dti_conn = dti_conn;
92 /*lint +e613 (Possible use of null pointer 'prim' in left argument to operator '->') */
93
94 (void)PSEND(hCommACI, prim);
95 }
96 }
97
98 /*==== END OF FILE ==========================================================*/