1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
/*This is the interface module between PHY
*Provided the FAPI style interface structures for P7.
*
*
*
*//*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file openair2/PHY_INTERFACE/IF_Module.h
* \brief data structures for PHY/MAC interface modules
* \author EURECOM/NTUST
* \date 2017
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr
* \note
* \warning
*/
#ifndef __IF_MODULE_UE__H__
#define __IF_MODULE_UE__H__
#include <stdint.h>
#include "openair1/PHY/LTE_TRANSPORT/defs.h"
#include "UE_MAC_interface.h"
#define MAX_NUM_DL_PDU 100
#define MAX_NUM_UL_PDU 100
#define MAX_NUM_HI_DCI0_PDU 100
#define MAX_NUM_TX_REQUEST_PDU 100
#define MAX_NUM_HARQ_IND 100
#define MAX_NUM_CRC_IND 100
#define MAX_NUM_SR_IND 100
#define MAX_NUM_CQI_IND 100
#define MAX_NUM_RACH_IND 100
#define MAX_NUM_SRS_IND 100
typedef struct{
/// Module ID
module_id_t module_id;
/// CC ID
int CC_id;
// / frame
frame_t frame;
/// subframe
sub_frame_t subframe;
/// harq ACKs indication list
//UE_MAC_hi_indication_body_t UE_hi_ind;
/// crc indication list
//UE_MAC_crc_indication_body_t UE_crc_ind;
/// RX BCH indication
UE_MAC_BCH_indication_body_t UE_BCH_ind;
/// RX DLSCH indication
UE_MAC_DLSCH_indication_body_t UE_DLSCH_ind;
} UE_DL_IND_t;
typedef struct{
/// Module ID
module_id_t module_id;
/// CC ID
int CC_id;
/// frame
frame_t frame;
/// subframe
sub_frame_t subframe;
/// Txon Indication type (Msg1 or Msg3)
uint8_t ind_type;
}UE_Tx_IND_t;
typedef struct{
/// Module ID
module_id_t module_id;
/// CC ID
int CC_id;
/// frame
frame_t frame;
/// subframe
sub_frame_t subframe;
/// Sidelink Control Information indication
ue_sci_indication_body_t UE_SCI_ind;
/// RX SLSCH indication
ue_SLSCH_indication_body_t UE_SLSCH_ind;
/// RX SLDCH indication
ue_SLDCH_indication_body_t UE_SLDCH_ind;
/// RX SLBCH indication
ue_SLBCH_indication_body_t UE_SLBCH_ind;
} UE_SL_IND_t;
// Downlink subframe P7
typedef struct{
/// Module ID
module_id_t module_id;
/// CC ID
uint8_t CC_id;
/// frame
frame_t frame;
/// subframe
sub_frame_t subframe;
/// UE_Mode to be filled only after
UE_MODE_t UE_mode[NUMBER_OF_CONNECTED_eNB_MAX];
/// MAC IFace UL Config Request
UE_MAC_ul_config_request_t *UE_UL_req;
/// MAC IFace SL Transmission Config Request
UE_MAC_sl_config_request_Tx_t *SL_Tx_req;
/// MAC IFace SL Reception Config Request
UE_MAC_sl_config_request_Rx_t *SL_Rx_req;
/// Pointers to UL SDUs
UE_MAC_tx_request_t *UE_TX_req;
/// Pointers to SL SDUs
UE_MAC_sl_tx_request_t *TX_SL_req;
}UE_Sched_Rsp_t;
typedef struct {
uint8_t Mod_id;
int CC_id;
UE_PHY_config_common_request_t *cfg_common;
UE_PHY_config_dedicated_request_t *cfg_dedicated;
}UE_PHY_Config_t;
typedef struct IF_Module_UE_s{
//define the function pointer
void (*UE_DL_indication)(UE_DL_IND_t *UE_DL_INFO);
void (*UE_SL_indication)(UE_SL_IND_t *UE_SL_INFO);
void (*UE_Tx_indication)(UE_Tx_IND_t *UE_Tx_INFO);
void (*UE_sched_response)(UE_Sched_Rsp_t *UE_Sched_INFO);
void (*UE_config_req)(UE_PHY_Config_t* UE_config_INFO);
//P: Perhaps an additional separate function for dedicated PHY configuration is needed.
//uint32_t CC_mask_ue;
uint16_t current_frame;
uint8_t current_subframe;
pthread_mutex_t if_mutex;
}IF_Module_UE_t;
IF_Module_UE_t *IF_Module_UE_init(int Mod_id);
void IF_Module_UE_kill(int Mod_id);
void UE_DL_indication(UE_DL_IND_t *UE_DL_INFO);
void UE_Tx_indication(UE_Tx_IND_t *UE_Tx_INFO);
/*Interface for Downlink, transmitting the DLSCH SDU, DCI SDU*/
void UE_schedule_response(UE_Sched_Rsp_t *UE_Sched_INFO);
#endif