rlc_um_control_primitives.h 9.71 KB
Newer Older
1
/*******************************************************************************
gauthier's avatar
gauthier committed
2
3
    OpenAirInterface
    Copyright(c) 1999 - 2014 Eurecom
4

gauthier's avatar
gauthier committed
5
6
7
8
    OpenAirInterface is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
9
10


gauthier's avatar
gauthier committed
11
12
13
14
    OpenAirInterface is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
15

gauthier's avatar
gauthier committed
16
17
18
19
    You should have received a copy of the GNU General Public License
    along with OpenAirInterface.The full GNU General Public License is
   included in this distribution in the file called "COPYING". If not,
   see <http://www.gnu.org/licenses/>.
20

gauthier's avatar
gauthier committed
21
22
23
24
25
  Contact Information
  OpenAirInterface Admin: openair_admin@eurecom.fr
  OpenAirInterface Tech : openair_tech@eurecom.fr
  OpenAirInterface Dev  : openair4g-devel@eurecom.fr

ghaddab's avatar
ghaddab committed
26
  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
gauthier's avatar
gauthier committed
27
28

 *******************************************************************************/
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*! \file rlc_um_control_primitives.h
* \brief This file defines the prototypes of the functions dealing with the control primitives and initialization.
* \author GAUTHIER Lionel
* \date 2010-2011
* \version
* \note
* \bug
* \warning
*/
/** @defgroup _rlc_um_init_impl_ RLC UM Init Reference Implementation
* @ingroup _rlc_um_impl_
* @{
*/
#    ifndef __RLC_UM_CONTROL_PRIMITIVES_H__
#        define __RLC_UM_CONTROL_PRIMITIVES_H__
//-----------------------------------------------------------------------------
#        include "rlc_um_entity.h"
#        include "mem_block.h"
#        include "rlc_um_structs.h"
#        include "rlc_um_constants.h"
#        include "platform_types.h"
#        include "DL-UM-RLC.h"
#        include "UL-UM-RLC.h"
//-----------------------------------------------------------------------------
#        ifdef RLC_UM_CONTROL_PRIMITIVES_C
#            define private_rlc_um_control_primitives(x)    x
#            define protected_rlc_um_control_primitives(x)  x
#            define public_rlc_um_control_primitives(x)     x
#        else
#            ifdef RLC_UM_MODULE
#                define private_rlc_um_control_primitives(x)
#                define protected_rlc_um_control_primitives(x)  extern x
#                define public_rlc_um_control_primitives(x)     extern x
#            else
#                define private_rlc_um_control_primitives(x)
#                define protected_rlc_um_control_primitives(x)
#                define public_rlc_um_control_primitives(x)     extern x
#            endif
#        endif

typedef volatile struct {
gauthier's avatar
gauthier committed
70
71
72
73
    uint32_t             is_uplink_downlink;
    uint32_t             timer_reordering;
    uint32_t             sn_field_length; // 5 or 10
    uint32_t             is_mXch; // boolean, true if configured for MTCH or MCCH
74
75
76
} rlc_um_info_t;


77
78
79
80
81
82
83
84
/*! \fn void config_req_rlc_um (
 * const module_id_t enb_module_idP,
 * const module_id_t ue_module_idP,
 * const frame_t frameP,
 * const eNB_flag_t eNB_flagP,
 * const srb_flag_t srb_flagP,
 * const rlc_um_info_t * const config_umP,
 * const rb_id_t rb_idP)
85
* \brief    Allocate memory for RLC UM instance, reset protocol variables, and set protocol parameters. After this configuration the RLC UM protocol instance will be in RLC_DATA_TRANSFER_READY_STATE state.
86
* \param[in]  frameP                     Frame index.
87
* \param[in]  eNB_flag                  Flag to indicate eNB (1) or UE (0)
88
* \param[in]  srb_flagP                 Flag to indicate signalling radio bearer (1) or data radio bearer (0).
gauthier's avatar
gauthier committed
89
90
* \param[in]  enb_module_idP            eNB Virtualized module identifier.
* \param[in]  ue_module_idP             UE Virtualized module identifier.
91
92
93
* \param[in]  config_umP                Configuration parameters for RLC UM instance.
* \param[in]  rb_idP                    Radio bearer identifier.
*/
94
95
96
97
98
99
100
101
public_rlc_um_control_primitives(   void config_req_rlc_um (
    const module_id_t enb_module_idP,
    const module_id_t ue_module_idP,
    const frame_t frameP,
    const eNB_flag_t eNB_flagP,
    const srb_flag_t srb_flagP,
    const rlc_um_info_t * const config_umP,
    const rb_id_t rb_idP);)
102

103
104
105
106
107
108
109
110
111
112
113
114
/*! \fn void config_req_rlc_um_asn1 (
 *     const module_id_t enb_module_idP,
 *     const module_id_t ue_module_idP,
 *     const frame_t frameP,
 *     const eNB_flag_t eNB_flagP,
 *     const srb_flag_t srb_flagP,
 *     const MBMS_flag_t mbms_flagP,
 *     const mbms_session_id_t  mbms_session_idP,
 *     const mbms_service_id_t  mbms_service_idP,
 *     const UL_UM_RLC_t* const ul_rlcP,
 *     const DL_UM_RLC_t* const dl_rlcP,
 *     const rb_id_t rb_idP)
115
* \brief    Allocate memory for RLC UM instance, reset protocol variables, and set protocol parameters. After this configuration the RLC UM protocol instance will be in RLC_DATA_TRANSFER_READY_STATE state.
116
117
118
* \param[in]  frameP                    Frame index.
* \param[in]  eNB_flagP                 Flag to indicate eNB (1) or UE (0)
* \param[in]  srb_flagP                 Flag to indicate signalling radio bearer (1) or data radio bearer (0).
119
* \param[in]  mbms_flagP                Flag to indicate if this RLC is configured for MBMS.
gauthier's avatar
gauthier committed
120
121
* \param[in]  enb_module_idP            eNB Virtualized module identifier.
* \param[in]  ue_module_idP             UE Virtualized module identifier.
gauthier's avatar
gauthier committed
122
123
* \param[in]  mbms_session_idP          MBMS session id.
* \param[in]  mbms_service_idP          MBMS service id.
124
125
126
127
* \param[in]  ul_rlcP                   Configuration parameters for RLC UM UL instance.
* \param[in]  dl_rlcP                   Configuration parameters for RLC UM DL instance.
* \param[in]  rb_idP                    Radio bearer identifier.
*/
128
129
130
131
132
133
134
135
136
137
138
139
public_rlc_um_control_primitives(   void config_req_rlc_um_asn1 (
    const module_id_t        enb_module_idP,
    const module_id_t        ue_module_idP,
    const frame_t            frameP,
    const eNB_flag_t         eNB_flagP,
    const srb_flag_t         srb_flagP,
    const MBMS_flag_t        mbms_flagP,
    const mbms_session_id_t  mbms_session_idP,
    const mbms_service_id_t  mbms_service_idP,
    const UL_UM_RLC_t       * const ul_rlcP,
    const DL_UM_RLC_t       * const dl_rlcP,
    const rb_id_t            rb_idP);)
140
141
142
143
144

/*! \fn void rlc_um_init (rlc_um_entity_t *rlcP)
* \brief    Initialize a RLC UM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC UM protocol instance will be in RLC_NULL_STATE state.
* \param[in]  rlcP                      RLC UM protocol instance pointer.
*/
145
protected_rlc_um_control_primitives(void rlc_um_init (rlc_um_entity_t * const rlcP);)
146
147
148
149
150

/*! \fn void rlc_um_reset_state_variables (rlc_um_entity_t *rlcP)
* \brief    Reset protocol variables and state variables to initial values.
* \param[in]  rlcP                      RLC UM protocol instance pointer.
*/
151
protected_rlc_um_control_primitives(void rlc_um_reset_state_variables (rlc_um_entity_t * const rlcP);)
152
153
154
155
156

/*! \fn void rlc_um_cleanup(rlc_um_entity_t *rlcP)
* \brief    Free all allocated memory (lists and buffers) previously allocated by this RLC UM instance.
* \param[in]  rlcP                      RLC UM protocol instance pointer.
*/
157
public_rlc_um_control_primitives(   void rlc_um_cleanup(rlc_um_entity_t * const rlcP);)
158

159
160
161
162
163
164
165
/*! \fn void rlc_um_configure(
 *     rlc_um_entity_t * const rlcP,
 *     const frame_t frameP,
 *     const uint32_t timer_reorderingP,
 *     const uint32_t rx_sn_field_lengthP,
 *     const uint32_t tx_sn_field_lengthP,
 *     const uint32_t is_mXchP)
166
167
* \brief    Configure RLC UM protocol parameters.
* \param[in]  rlcP                      RLC UM protocol instance pointer.
168
169
* \param[in]  frameP                     Frame index.
* \param[in]  timer_reorderingP         t-Reordering timer initialization value, units in frameP.
170
171
172
173
* \param[in]  rx_sn_field_lengthP       Length of the sequence number, 5 or 10 bits in reception.
* \param[in]  tx_sn_field_lengthP       Length of the sequence number, 5 or 10 bits in transmission.
* \param[in]  is_mXchP                  Is the radio bearer for MCCH, MTCH.
*/
174
175
176
177
178
179
180
protected_rlc_um_control_primitives(void rlc_um_configure(
    rlc_um_entity_t *const  rlcP,
    const frame_t frameP,
    const uint32_t timer_reorderingP,
    const uint32_t rx_sn_field_lengthP,
    const uint32_t tx_sn_field_lengthP,
    const uint32_t is_mXchP);)
181

182
183
184
185
186
187
188
189
/*! \fn void rlc_um_set_debug_infos(
 *     rlc_um_entity_t * const rlcP,
 *     const module_id_t enb_module_idP,
 *     const module_id_t ue_module_idP,
 *     const frame_t     frameP,
 *     const eNB_flag_t  eNB_flagP,
 *     const srb_flag_t  srb_flagP,
 *     const rb_id_t     rb_idP)
190
191
* \brief    Set debug informations for a RLC UM protocol instance, these informations are only for trace purpose.
* \param[in]  rlcP                      RLC UM protocol instance pointer.
192
* \param[in]  frameP                     Frame index.
193
* \param[in]  eNB_flag                  Flag to indicate eNB (1) or UE (0)
gauthier's avatar
gauthier committed
194
195
* \param[in]  enb_module_idP            eNB Virtualized module identifier.
* \param[in]  ue_module_idP             UE Virtualized module identifier.
196
* \param[in]  rb_idP                    Radio bearer identifier.
197
* \param[in]  srb_flagP                 Flag to indicate signalling radio bearer (1) or data radio bearer (0).
198
*/
199
protected_rlc_um_control_primitives(void rlc_um_set_debug_infos(
200
    rlc_um_entity_t * const rlcP,
201
202
203
204
205
206
    const module_id_t enb_module_idP,
    const module_id_t ue_module_idP,
    const frame_t frameP,
    const eNB_flag_t eNB_flagP,
    const srb_flag_t srb_flagP,
    const rb_id_t rb_idP);)
207
208
/** @} */
#    endif