comparison src/aci2/aci/psa_btis.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 : GSM-PS (6147)
4 | Modul : PSA_BTIS
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 defines the signalling functions of the
18 | protocol stack adapter for BTI.
19 +-----------------------------------------------------------------------------
20 */
21
22 #ifndef PSA_BTIS_C
23 #define PSA_BTIS_C
24 #endif
25
26 #ifdef MFW
27 #define ENTITY_MFW
28 #else
29 #ifdef SMI
30 #define ENTITY_SMI
31 #else
32 #define ENTITY_ACI
33 #endif
34 #endif
35
36 #define ACI_MEMBER
37
38 /*==== INCLUDES ===================================================*/
39 #include <string.h>
40 #include <stdlib.h>
41 #include <stdio.h>
42 #include "typedefs.h"
43 #include "pconst.cdg"
44 #include "mconst.cdg"
45 #include "message.h"
46 #include "ccdapi.h"
47 #include "vsi.h"
48 #include "custom.h"
49 #include "gsm.h"
50 #include "prim.h"
51 #include "cnf_aci.h"
52 #include "mon_aci.h"
53 #include "pei.h"
54 #include "tok.h"
55 #include "dti.h" /* functionality of the dti library */
56 #include "aci_cmh.h"
57 #include "ati_cmd.h"
58 #include "aci_cmd.h"
59
60 #include "aci_fd.h"
61 #include "aci.h"
62 #include "psa.h"
63 #include "psa_bti.h"
64 /*==== CONSTANTS ==================================================*/
65 /*==== TYPES ======================================================*/
66 /*==== EXPORT =====================================================*/
67 /*==== VARIABLES ==================================================*/
68 /*==== FUNCTIONS ==================================================*/
69
70 /*
71 +-------------------------------------------------------------------+
72 | PROJECT : GSM-PS (6147) MODULE : PSA_BTI |
73 | ROUTINE : psaBTI_Dti_Req |
74 +-------------------------------------------------------------------+
75
76 PURPOSE : connect or disconnect BTI (depends on dti_conn).
77 */
78
79 GLOBAL void psaBTI_Dti_Req(
80 UBYTE dti_id,
81 T_DTI_ENTITY_ID peer_to_connect_to,
82 UBYTE dti_conn
83 )
84 {
85 CHAR *p_ent_name;
86
87 TRACE_FUNCTION ("psaBTI_Dti_Req()");
88
89 {
90 PALLOC (btp_dti_req, BTP_DTI_REQ);
91
92 switch( peer_to_connect_to )
93 {
94 case( DTI_ENTITY__ACI ):
95 p_ent_name = &ACI_NAME[0];
96 break;
97 case( DTI_ENTITY__L2R ):
98 p_ent_name = &L2R_NAME[0];
99 break;
100 case( DTI_ENTITY__TRA ):
101 p_ent_name = &TRA_NAME[0];
102 break;
103 case( DTI_ENTITY__T30 ):
104 p_ent_name = &T30_NAME[0];
105 break;
106 #ifdef FF_TRACE_OVER_MTST
107 case( DTI_ENTITY__MTST):
108 p_ent_name = &MTST_NAME[0];
109 break;
110 #endif /* FF_TRACE_OVER_MTST */
111 #ifdef GPRS
112 case( DTI_ENTITY__PPPS ):
113 p_ent_name = &PPP_NAME[0];
114 break;
115 #endif /* GPRS */
116
117 default:
118 TRACE_EVENT("unknown connection peer Id: BTP_DTI_REQ not sent");
119 PFREE(btp_dti_req);
120 return;
121 }
122
123 strcpy((CHAR*)btp_dti_req->entity_name, p_ent_name);
124 btp_dti_req->dti_conn = dti_conn;
125 btp_dti_req->link_id = dti_id;
126 btp_dti_req->dti_direction = DTI_CHANNEL_TO_HIGHER_LAYER;
127
128 PSENDX (BTI, btp_dti_req);
129 }
130 }
131 /*==== EOF ========================================================*/
132