FreeCalypso > hg > freecalypso-citrine
comparison comlib/cl_rlcmac.c @ 0:75a11d740a02
initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 09 Jun 2016 00:02:41 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:75a11d740a02 |
---|---|
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 #include "config.h" | |
26 #include "fixedconf.h" | |
27 | |
28 #define ENTITY_GRLC | |
29 #define ENTITY_GRR | |
30 | |
31 /*==== INCLUDES =============================================================*/ | |
32 | |
33 #include "typedefs.h" | |
34 #include "vsi.h" | |
35 #include "macdef.h" | |
36 #include "gprs.h" | |
37 #include "gsm.h" | |
38 #include "ccdapi.h" | |
39 #include "prim.h" | |
40 #include "message.h" | |
41 #include "cl_rlcmac.h" | |
42 | |
43 /*==== CONST ================================================================*/ | |
44 | |
45 /*==== LOCAL VARS ===========================================================*/ | |
46 | |
47 /*==== PRIVATE FUNCTIONS ====================================================*/ | |
48 | |
49 /*==== PUBLIC FUNCTIONS =====================================================*/ | |
50 /* | |
51 +------------------------------------------------------------------------------ | |
52 | Function : cl_rlcmac_get_msg_name | |
53 +------------------------------------------------------------------------------ | |
54 | Description : | |
55 | | |
56 | Parameters : | |
57 | | |
58 +------------------------------------------------------------------------------ | |
59 */ | |
60 | |
61 #if !defined (NTRACE) | |
62 | |
63 | |
64 #define RETURN(msg) return( #msg ); | |
65 | |
66 GLOBAL char* cl_rlcmac_get_msg_name ( UBYTE msg_type, | |
67 T_RLC_MAC_ROUTE route ) | |
68 { | |
69 if( route EQ RLC_MAC_ROUTE_UL ) | |
70 { | |
71 switch( msg_type ) | |
72 { | |
73 case U_RESOURCE_REQ_c: RETURN( U_RESOURCE_REQ ); /*lint !e527*/ | |
74 case U_DL_ACK_c: RETURN( U_DL_ACK ); /*lint !e527 !e825*/ | |
75 case U_CTRL_ACK_c: RETURN( U_CTRL_ACK ); /*lint !e527 !e825*/ | |
76 case U_CELL_CHAN_FAILURE_c: RETURN( U_CELL_CHAN_FAILURE ); /*lint !e527 !e825*/ | |
77 case U_UL_DUMMY_c: RETURN( U_UL_DUMMY ); /*lint !e527 !e825*/ | |
78 case U_MEAS_REPORT_c: RETURN( U_MEAS_REPORT ); /*lint !e527 !e825*/ | |
79 case U_MS_TBF_STATUS_c: RETURN( U_MS_TBF_STATUS ); /*lint !e527 !e825*/ | |
80 case U_PKT_PSI_STATUS_MSG_c: RETURN( U_PKT_PSI_STATUS_MSG ); /*lint !e527 !e825*/ | |
81 case U_MSG_TYPE_CHANNEL_REQ_c: return( "U_MSG_TYPE_CHANNEL_REQ" ); /*lint !e527 !e825*/ | |
82 case U_MSG_TYPE_UNKNOWN_c: /*lint !e527 !e825*/ | |
83 default: return( "U_MSG_TYPE_UNKNOWN" ); /*lint !e527 !e825*/ | |
84 } | |
85 } | |
86 else | |
87 { | |
88 switch( msg_type ) | |
89 { | |
90 case D_ACCESS_REJ_c: RETURN( D_ACCESS_REJ ); /*lint !e527*/ | |
91 case D_QUEUING_NOT_c: RETURN( D_QUEUING_NOT ); /*lint !e527 !e825*/ | |
92 case D_UL_ASSIGN_c: RETURN( D_UL_ASSIGN ); /*lint !e527 !e825*/ | |
93 case D_DL_ASSIGN_c: RETURN( D_DL_ASSIGN ); /*lint !e527 !e825*/ | |
94 case D_TBF_RELEASE_c: RETURN( D_TBF_RELEASE ); /*lint !e527 !e825*/ | |
95 case D_PAGING_REQ_c: RETURN( D_PAGING_REQ ); /*lint !e527 !e825*/ | |
96 case D_UL_ACK_c: RETURN( D_UL_ACK ); /*lint !e527 !e825*/ | |
97 case PSI_1_c: RETURN( PSI_1 ); /*lint !e527 !e825*/ | |
98 case PSI_2_c: RETURN( PSI_2 ); /*lint !e527 !e825*/ | |
99 case PSI_3_c: RETURN( PSI_3 ); /*lint !e527 !e825*/ | |
100 case PSI_3_BIS_c: RETURN( PSI_3_BIS ); /*lint !e527 !e825*/ | |
101 case PSI_4_c: RETURN( PSI_4 ); /*lint !e527 !e825*/ | |
102 case PSI_5_c: RETURN( PSI_5 ); /*lint !e527 !e825*/ | |
103 case PSI_13_c: RETURN( PSI_13 ); /*lint !e527 !e825*/ | |
104 case D_CELL_CHAN_ORDER_c: RETURN( D_CELL_CHAN_ORDER ); /*lint !e527 !e825*/ | |
105 case D_DL_DUMMY_c: RETURN( D_DL_DUMMY ); /*lint !e527 !e825*/ | |
106 case D_MEAS_ORDER_c: RETURN( D_MEAS_ORDER ); /*lint !e527 !e825*/ | |
107 case D_PDCH_RELEASE_c: RETURN( D_PDCH_RELEASE ); /*lint !e527 !e825*/ | |
108 case D_POLLING_REQ_c: RETURN( D_POLLING_REQ ); /*lint !e527 !e825*/ | |
109 case D_CTRL_PWR_TA_c: RETURN( D_CTRL_PWR_TA ); /*lint !e527 !e825*/ | |
110 case D_PRACH_PAR_c: RETURN( D_PRACH_PAR ); /*lint !e527 !e825*/ | |
111 case D_TS_RECONFIG_c: RETURN( D_TS_RECONFIG ); /*lint !e527 !e825*/ | |
112 case D_MSG_TYPE_CRC_ERROR_c: return( "D_MSG_TYPE_CRC_ERROR" ); /*lint !e527 !e825*/ | |
113 case D_MSG_TYPE_2ND_SEGMENT_c: return( "D_MSG_TYPE_2ND_SEGMENT" ); /*lint !e527 !e825*/ | |
114 case D_MSG_TYPE_UNKNOWN_c: /*lint !e527 !e825*/ | |
115 default: return( "D_MSG_TYPE_UNKNOWN" ); /*lint !e527 !e825*/ | |
116 } | |
117 } | |
118 } /* cl_rlcmac_get_msg_name */ | |
119 | |
120 #endif /* #if !defined (NTRACE) */ |