comparison src/g23m-gprs/sndcp/sndcp_pdas.c @ 1:fa8dc04885d8

src/g23m-*: import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Oct 2020 06:25:50 +0000
parents
children
comparison
equal deleted inserted replaced
0:4e78acac3d88 1:fa8dc04885d8
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GPRS (8441)
4 | Modul : sndcp_pdas.c
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 modul is part of the entity SNDCP and implements all
18 | functions to handles the incoming process internal signals as
19 | described in the SDL-documentation (PDA-statemachine)
20 +-----------------------------------------------------------------------------
21 */
22
23 #define ENTITY_SNDCP
24
25 /*==== INCLUDES =============================================================*/
26
27 #include "typedefs.h" /* to get Condat data types */
28 #include "vsi.h" /* to get a lot of macros */
29 #include "macdef.h"
30 #include "gsm.h" /* to get a lot of macros */
31 #include "prim.h" /* to get the definitions of used SAP and directions */
32
33 #include "dti.h"
34 #include "sndcp.h" /* to get the global entity definitions */
35 #include "sndcp_f.h" /* to get the functions to access the global arrays*/
36
37 /*==== CONST ================================================================*/
38
39 /*==== LOCAL VARS ===========================================================*/
40
41 /*==== PRIVATE FUNCTIONS ====================================================*/
42
43 /*==== PUBLIC FUNCTIONS =====================================================*/
44
45
46
47 /*
48 +------------------------------------------------------------------------------
49 | Function : sig_sda_pda_getdata_req
50 +------------------------------------------------------------------------------
51 | Description : Handles the internal signal SIG_SDA_PDA_GETDATA_REQ
52 |
53 | Parameters : the affected sapi.
54 |
55 +------------------------------------------------------------------------------
56 */
57 GLOBAL void sig_sda_pda_getdata_req (UBYTE sapi)
58 {
59 UBYTE sapi_index = 0;
60
61 TRACE_ISIG( "sig_sda_pda_getdata_req" );
62
63 /*
64 * set service instance according to sapi in primitive
65 */
66 sndcp_get_sapi_index(sapi, &sapi_index);
67 sndcp_data->pda = & sndcp_data->pda_base[sapi_index];
68
69 switch( GET_STATE( PDA ) )
70 {
71 case PDA_DEFAULT:
72 #ifdef SNDCP_TRACE_ALL
73 TRACE_EVENT("trying to palloc/send LL_GETDATA_REQ");
74 #endif
75 {
76 PALLOC(ll_getdata_req, LL_GETDATA_REQ);
77
78 ll_getdata_req->sapi = sapi;
79 /*
80 * TLLI is not evaluated by LLC.
81 */
82 PSEND(hCommLLC, ll_getdata_req);
83 }
84 break;
85 default:
86 TRACE_ERROR( "SIG_SDA_PDA_GETDATA_REQ unexpected" );
87 break;
88 }
89 } /* sig_sda_pda_getdata_req() */
90
91