comparison src/g23m-fad/l2r/tra_mgts.c @ 174:90eb61ecd093

src/g23m-fad: initial import from TCS3.2/LoCosto
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 12 Oct 2016 05:40:46 +0000
parents
children
comparison
equal deleted inserted replaced
173:bf64d785238a 174:90eb61ecd093
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : CSD (8411)
4 | Modul : tra_mgts.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 defines the functions for processing
18 | of incomming signals for the component TRA
19 +-----------------------------------------------------------------------------
20 */
21
22 #ifndef TRA_MGTS_C
23 #define TRA_MGTS_C
24 #endif
25
26 #define ENTITY_L2R
27
28 /*==== INCLUDES ===================================================*/
29 #include <string.h>
30
31 #include "typedefs.h"
32 #include "pconst.cdg"
33 #include "vsi.h"
34 #include "macdef.h"
35 #include "custom.h"
36 #include "gsm.h"
37 #include "prim.h"
38 #include "pei.h"
39 #include "tok.h"
40 #include "dti.h"
41
42 #include "cl_ribu.h"
43 #include "tra_pei.h"
44 #include "tra.h"
45
46 /*==== CONST =======================================================*/
47
48 /*==== TYPES =======================================================*/
49
50 /*==== VAR EXPORT ==================================================*/
51
52 /*==== VAR LOCAL ===================================================*/
53
54 /*==== FUNCTIONS ===================================================*/
55
56 /*
57 +------------------------------------------------------------------------------
58 | Function : sig_up_tra_mgt_break_ind
59 +------------------------------------------------------------------------------
60 | Description : Process signal SIG_UP_MGT_BREAK_IND received from process DN.
61 |
62 | Parameters : USHORT break_len
63 |
64 |
65 | Return : -
66 +------------------------------------------------------------------------------
67 */
68
69 GLOBAL void sig_up_tra_mgt_break_ind(USHORT break_len)
70 {
71 TRACE_FUNCTION ("sig_up_tra_mgt_break_ind()");
72
73 switch (GET_STATE (MGT))
74 {
75 case MGT_IDLE:
76 sig_mgt_tra_up_break_req();
77 sig_mgt_tra_up_send_break_req(break_len);
78 break;
79 }
80 }
81
82 /*
83 +------------------------------------------------------------------------------
84 | Function : sig_dn_tra_mgt_break_ind
85 +------------------------------------------------------------------------------
86 | Description : Process signal SIG_DN_MGT_BREAK_IND received from process DN.
87 |
88 | Parameters : sa -
89 | sb
90 | flow
91 |
92 | Return :
93 +------------------------------------------------------------------------------
94 */
95 GLOBAL void sig_dn_tra_mgt_break_ind(U8 sa, U8 sb, U8 flow, USHORT break_len)
96 {
97 TRACE_FUNCTION ("sig_dn_mgt_break_ind()");
98
99 switch (GET_STATE (MGT))
100 {
101 case MGT_IDLE:
102 {
103 PALLOC (dti_data_ind, DTI2_DATA_IND);
104 dti_data_ind->parameters.st_lines.st_line_sa = sa;
105 dti_data_ind->parameters.st_lines.st_line_sb = sb;
106 dti_data_ind->parameters.st_lines.st_flow = flow;
107 dti_data_ind->desc_list2.first = 0;
108 dti_data_ind->desc_list2.list_len = 0;
109 dti_data_ind->parameters.st_lines.st_break_len = break_len;
110 dti_data_ind->parameters.p_id = DTI_PID_UOS;
111 tra_data->dn.Brk_dti_data_ind = dti_data_ind;
112 }
113 sig_mgt_tra_dn_break_req();
114 sig_mgt_tra_up_break_req();
115 sig_any_tra_dn_send_break_req();
116 break;
117 }
118 }