comparison g23m/condat/com/src/comlib/cl_rlcmac.c @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:509db1a7b7b8
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : COMLIB
4 | Modul : RLCMAC
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 : Definitions of common library functions: RLC/MAC layer.
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifndef CL_RLCMAC_C
22 #define CL_RLCMAC_C
23 #endif /* #ifndef CL_RLCMAC_C */
24
25 #define ENTITY_GRLC
26 #define ENTITY_GRR
27
28 #ifdef _TARGET_
29
30 #undef TRACE_FUNCTION
31 #define TRACE_FUNCTION(a)
32
33 #undef TRACE_ISIG
34 #define TRACE_ISIG(a)
35
36 #endif /* #ifdef _TARGET_ */
37
38 /*==== INCLUDES =============================================================*/
39
40 #include "typedefs.h"
41 #include "vsi.h"
42 #include "macdef.h"
43 #include "gprs.h"
44 #include "gsm.h"
45 #include "ccdapi.h"
46 #include "prim.h"
47 #include "message.h"
48 #include "cl_rlcmac.h"
49
50 /*==== CONST ================================================================*/
51
52 /*==== LOCAL VARS ===========================================================*/
53
54 /*==== PRIVATE FUNCTIONS ====================================================*/
55
56 /*==== PUBLIC FUNCTIONS =====================================================*/
57 /*
58 +------------------------------------------------------------------------------
59 | Function : cl_rlcmac_get_msg_name
60 +------------------------------------------------------------------------------
61 | Description :
62 |
63 | Parameters :
64 |
65 +------------------------------------------------------------------------------
66 */
67
68 #if !defined (NTRACE)
69
70 /*
71 * The pointer <ptr> is just used to check, whether the messge name
72 * is written according to the related CCD data types.
73 */
74 #define RETURN(msg) { T_##msg* ptr; return( #msg ); }
75
76 GLOBAL char* cl_rlcmac_get_msg_name ( UBYTE msg_type,
77 T_RLC_MAC_ROUTE route )
78 {
79 if( route EQ RLC_MAC_ROUTE_UL )
80 {
81 switch( msg_type )
82 {
83 case U_RESOURCE_REQ_c: RETURN( U_RESOURCE_REQ ); /*lint !e527*/
84 case U_DL_ACK_c: RETURN( U_DL_ACK ); /*lint !e527 !e825*/
85 case U_CTRL_ACK_c: RETURN( U_CTRL_ACK ); /*lint !e527 !e825*/
86 case U_CELL_CHAN_FAILURE_c: RETURN( U_CELL_CHAN_FAILURE ); /*lint !e527 !e825*/
87 case U_UL_DUMMY_c: RETURN( U_UL_DUMMY ); /*lint !e527 !e825*/
88 case U_MEAS_REPORT_c: RETURN( U_MEAS_REPORT ); /*lint !e527 !e825*/
89 case U_MS_TBF_STATUS_c: RETURN( U_MS_TBF_STATUS ); /*lint !e527 !e825*/
90 case U_PSI_STATUS_MSG_c: RETURN( U_PSI_STATUS_MSG ); /*lint !e527 !e825*/
91 case U_MSG_TYPE_CHANNEL_REQ_c: return( "U_MSG_TYPE_CHANNEL_REQ" ); /*lint !e527 !e825*/
92 case U_MSG_TYPE_UNKNOWN_c: /*lint !e527 !e825*/
93 default: return( "U_MSG_TYPE_UNKNOWN" ); /*lint !e527 !e825*/
94 }
95 }
96 else
97 {
98 switch( msg_type )
99 {
100 case D_ACCESS_REJ_c: RETURN( D_ACCESS_REJ ); /*lint !e527*/
101 case D_QUEUING_NOT_c: RETURN( D_QUEUING_NOT ); /*lint !e527 !e825*/
102 case D_UL_ASSIGN_c: RETURN( D_UL_ASSIGN ); /*lint !e527 !e825*/
103 case D_DL_ASSIGN_c: RETURN( D_DL_ASSIGN ); /*lint !e527 !e825*/
104 case D_TBF_RELEASE_c: RETURN( D_TBF_RELEASE ); /*lint !e527 !e825*/
105 case D_PAGING_REQ_c: RETURN( D_PAGING_REQ ); /*lint !e527 !e825*/
106 case D_UL_ACK_c: RETURN( D_UL_ACK ); /*lint !e527 !e825*/
107 case PSI_1_c: RETURN( PSI_1 ); /*lint !e527 !e825*/
108 case PSI_2_c: RETURN( PSI_2 ); /*lint !e527 !e825*/
109 case PSI_3_c: RETURN( PSI_3 ); /*lint !e527 !e825*/
110 case PSI_3_BIS_c: RETURN( PSI_3_BIS ); /*lint !e527 !e825*/
111 case PSI_4_c: RETURN( PSI_4 ); /*lint !e527 !e825*/
112 case PSI_5_c: RETURN( PSI_5 ); /*lint !e527 !e825*/
113 case PSI_13_c: RETURN( PSI_13 ); /*lint !e527 !e825*/
114 case D_CELL_CHAN_ORDER_c: RETURN( D_CELL_CHAN_ORDER ); /*lint !e527 !e825*/
115 case D_DL_DUMMY_c: RETURN( D_DL_DUMMY ); /*lint !e527 !e825*/
116 case D_MEAS_ORDER_c: RETURN( D_MEAS_ORDER ); /*lint !e527 !e825*/
117 case D_PDCH_RELEASE_c: RETURN( D_PDCH_RELEASE ); /*lint !e527 !e825*/
118 case D_POLLING_REQ_c: RETURN( D_POLLING_REQ ); /*lint !e527 !e825*/
119 case D_CTRL_PWR_TA_c: RETURN( D_CTRL_PWR_TA ); /*lint !e527 !e825*/
120 case D_PRACH_PAR_c: RETURN( D_PRACH_PAR ); /*lint !e527 !e825*/
121 case D_TS_RECONFIG_c: RETURN( D_TS_RECONFIG ); /*lint !e527 !e825*/
122 case D_MSG_TYPE_CRC_ERROR_c: return( "D_MSG_TYPE_CRC_ERROR" ); /*lint !e527 !e825*/
123 case D_MSG_TYPE_2ND_SEGMENT_c: return( "D_MSG_TYPE_2ND_SEGMENT" ); /*lint !e527 !e825*/
124 case D_MSG_TYPE_UNKNOWN_c: /*lint !e527 !e825*/
125 default: return( "D_MSG_TYPE_UNKNOWN" ); /*lint !e527 !e825*/
126 }
127 }
128 } /* cl_rlcmac_get_msg_name */
129
130 #endif /* #if !defined (NTRACE) */