Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
oai
openairinterface5G
Commits
2cc779b9
Commit
2cc779b9
authored
Jun 13, 2016
by
Sandeep Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added macros for packet_type
parent
29905893
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
12 deletions
+42
-12
openair1/PHY/LTE_TRANSPORT/if4_tools.c
openair1/PHY/LTE_TRANSPORT/if4_tools.c
+37
-11
openair1/PHY/LTE_TRANSPORT/if4_tools.h
openair1/PHY/LTE_TRANSPORT/if4_tools.h
+5
-1
No files found.
openair1/PHY/LTE_TRANSPORT/if4_tools.c
View file @
2cc779b9
...
...
@@ -45,6 +45,7 @@
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#endif
// Get device information
void
send_IF4
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
)
{
int
frame
=
proc
->
frame_tx
;
int
subframe
=
proc
->
subframe_tx
;
...
...
@@ -73,8 +74,15 @@ void send_IF4(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc) {
// Update information in generated packet
dl_packet
->
frame_status
.
sym_num
=
i
;
// Write the packet(s) to the fronthaul
// Write the packet(s) to the fronthaul
//if ((bytes_sent = dev->eth_dev.trx_write_func (&dev->eth_dev,
// timestamp_rx,
// rx_eNB,
// spp_eth,
// dev->eth_dev.openair0_cfg->rx_num_channels,
// 0)) < 0) {
// perror("RCC : ETHERNET write");
//}
}
}
else
{
IF4_ul_packet_t
*
ul_packet
=
(
IF4_ul_packet_t
*
)
malloc
(
sizeof_IF4_ul_packet_t
);
...
...
@@ -102,20 +110,38 @@ void send_IF4(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc) {
void
recv_IF4
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
)
{
// Read packet(s) from the fronthaul
// Caller: RRU - DL *** handle RCC case - UL and PRACH ***
if
(
eNB
->
node_function
==
NGFI_RRU_IF4
)
{
// Apply reverse processing - decompression
// Generate and return the OFDM symbols (txdataF)
// Caller: RRU - DL *** handle RCC case - UL and PRACH ***
for
(
i
=
0
;
i
<
fp
->
symbols_per_tti
;
i
++
)
{
// Read packet(s) from the fronthaul
if
(
dev
->
eth_dev
.
trx_read_func
(
&
dev
->
eth_dev
,
timestamp_rx
,
rx_eNB
,
spp_eth
,
dev
->
eth_dev
.
openair0_cfg
->
rx_num_channels
)
<
0
)
{
perror
(
"RRU : ETHERNET read"
);
}
// Apply reverse processing - decompression
// txAlawtolinear( Datablock )
// Generate and return the OFDM symbols (txdataF)
txDataF
}
}
else
{
}
}
void
gen_IF4_dl_packet
(
IF4_dl_packet_t
*
dl_packet
,
eNB_rxtx_proc_t
*
proc
)
{
// Set Type and Sub-Type
dl_packet
->
type
=
0x080A
;
dl_packet
->
sub_type
=
0x0020
;
dl_packet
->
sub_type
=
IF4_PDLFFT
;
// Leave reserved as it is
dl_packet
->
rsvd
=
0
;
...
...
@@ -135,7 +161,7 @@ void gen_IF4_dl_packet(IF4_dl_packet_t *dl_packet, eNB_rxtx_proc_t *proc) {
void
gen_IF4_ul_packet
(
IF4_ul_packet_t
*
ul_packet
,
eNB_rxtx_proc_t
*
proc
)
{
// Set Type and Sub-Type
ul_packet
->
type
=
0x080A
;
ul_packet
->
sub_type
=
0x0019
;
ul_packet
->
sub_type
=
IF4_PULFFT
;
// Leave reserved as it is
ul_packet
->
rsvd
=
0
;
...
...
@@ -159,7 +185,7 @@ void gen_IF4_ul_packet(IF4_ul_packet_t *ul_packet, eNB_rxtx_proc_t *proc) {
void
gen_IF4_prach_packet
(
IF4_prach_packet_t
*
prach_packet
,
eNB_rxtx_proc_t
*
proc
)
{
// Set Type and Sub-Type
prach_packet
->
type
=
0x080A
;
prach_packet
->
sub_type
=
0x0021
;
prach_packet
->
sub_type
=
IF4_PRACH
;
// Leave reserved as it is
prach_packet
->
rsvd
=
0
;
...
...
openair1/PHY/LTE_TRANSPORT/if4_tools.h
View file @
2cc779b9
...
...
@@ -38,6 +38,10 @@
* \warning
*/
#define IF4_PULFFT 0x0019
#define IF4_PDLFFT 0x0020
#define IF4_PRACH 0x0021
/// IF4 Frame Status (32 bits)
struct
IF4_frame_status
{
/// Antenna Numbers
...
...
@@ -175,4 +179,4 @@ void gen_IF4_prach_packet(IF4_prach_packet_t*, eNB_rxtx_proc_t*);
void
send_IF4
(
PHY_VARS_eNB
*
,
eNB_rxtx_proc_t
*
);
void
recv_IF4
(
PHY_VARS_eNB
*
,
eNB_rxtx_proc_t
*
);
void
recv_IF4
(
PHY_VARS_eNB
*
,
eNB_rxtx_proc_t
*
,
int
*
,
int
*
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment