Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG-RAN
Commits
ccdc09c8
Commit
ccdc09c8
authored
Jan 18, 2018
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final pieces for SLDCH emulation
parent
a7f21281
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
3 deletions
+52
-3
openair1/PHY/LTE_TRANSPORT/defs.h
openair1/PHY/LTE_TRANSPORT/defs.h
+4
-1
openair1/PHY/LTE_TRANSPORT/sldch.c
openair1/PHY/LTE_TRANSPORT/sldch.c
+24
-1
openair2/RRC/LITE/proto.h
openair2/RRC/LITE/proto.h
+1
-1
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+23
-0
No files found.
openair1/PHY/LTE_TRANSPORT/defs.h
View file @
ccdc09c8
...
...
@@ -937,7 +937,10 @@ typedef struct {
}
SLSCH_t
;
typedef
struct
{
/// payload length
int
payload_length
;
/// pointer to payload
uint8_t
*
payload
;
}
SLDCH_t
;
#define TTI_SYNC 0
...
...
openair1/PHY/LTE_TRANSPORT/sldch.c
View file @
ccdc09c8
...
...
@@ -36,8 +36,31 @@
void
generate_sldch
(
PHY_VARS_UE
*
ue
,
SLDCH_t
*
sldch
,
int
frame_tx
,
int
subframe_tx
)
{
AssertFatal
(
1
==
0
,
"Should get here yet for UE %d
\n
"
,
ue
->
Mod_id
);
UE_tport_t
pdu
;
size_t
sldch_header_len
=
sizeof
(
UE_tport_header_t
);
pdu
.
header
.
packet_type
=
SLDCH
;
pdu
.
header
.
absSF
=
(
frame_tx
*
10
)
+
subframe_tx
;
memcpy
((
void
*
)
&
pdu
.
sldch
,(
void
*
)
sldch
,
sizeof
(
SLDCH_t
)
-
sizeof
(
uint8_t
*
));
AssertFatal
(
sldch
->
payload_length
<=
1500
-
sldch_header_len
-
sizeof
(
SLDCH_t
)
+
sizeof
(
uint8_t
*
),
"SLDCH payload length > %d
\n
"
,
1500
-
sldch_header_len
-
sizeof
(
SLDCH_t
)
+
sizeof
(
uint8_t
*
));
memcpy
((
void
*
)
&
pdu
.
payload
[
0
],
(
void
*
)
sldch
->
payload
,
sldch
->
payload_length
);
LOG_I
(
PHY
,
"SLDCH configuration %d bytes, TBS payload %d bytes => %d bytes
\n
"
,
sizeof
(
SLDCH_t
)
-
sizeof
(
uint8_t
*
),
sldch
->
payload_length
,
sldch_header_len
+
sizeof
(
SLDCH_t
)
-
sizeof
(
uint8_t
*
)
+
sldch
->
payload_length
);
multicast_link_write_sock
(
0
,
&
pdu
,
sldch_header_len
+
sizeof
(
SLDCH_t
)
-
sizeof
(
uint8_t
*
)
+
sldch
->
payload_length
);
}
#endif
openair2/RRC/LITE/proto.h
View file @
ccdc09c8
...
...
@@ -363,7 +363,7 @@ SL_DiscConfig_r12_t rrc_eNB_get_sidelink_discTXPool(
/** \brief Process request from control socket
* \param arg
*/
static
void
*
rrc_control_socket_thread_fct
(
void
*
arg
);
void
*
rrc_control_socket_thread_fct
(
void
*
arg
);
//L2_interface.c
int8_t
...
...
targets/RT/USER/lte-ue.c
View file @
ccdc09c8
...
...
@@ -762,6 +762,7 @@ void ue_stub_rx_handler(unsigned int num_bytes, char *rx_buffer) {
UE_tport_t
*
pdu
=
(
UE_tport_t
*
)
rx_buffer
;
SLSCH_t
*
slsch
=
(
SLSCH_t
*
)
&
pdu
->
slsch
;
SLDCH_t
*
sldch
=
(
SLDCH_t
*
)
&
pdu
->
sldch
;
switch
(((
UE_tport_header_t
*
)
rx_buffer
)
->
packet_type
)
{
case
TTI_SYNC
:
...
...
@@ -788,6 +789,28 @@ void ue_stub_rx_handler(unsigned int num_bytes, char *rx_buffer) {
0
,
SL_DISCOVERY_FLAG_NO
);
break
;
case
SLDCH
:
LOG_I
(
PHY
,
"Emulator SFN.SF %d.%d, Got SLDCH packet
\n
"
,
emulator_absSF
/
10
,
emulator_absSF
%
10
);
LOG_I
(
PHY
,
"Received %d bytes on UE-UE link for SFN.SF %d.%d, sending SLDCH payload (%d bytes) to MAC
\n
"
,
num_bytes
,
pdu
->
header
.
absSF
/
10
,
pdu
->
header
.
absSF
%
10
,
sldch
->
payload_length
);
printf
(
"SLDCH:"
);
for
(
int
i
=
0
;
i
<
sizeof
(
SLDCH_t
);
i
++
)
printf
(
"%x "
,((
uint8_t
*
)
sldch
)[
i
]);
printf
(
"
\n
"
);
ue_send_sl_sdu
(
0
,
0
,
pdu
->
header
.
absSF
/
10
,
pdu
->
header
.
absSF
%
10
,
pdu
->
payload
,
sldch
->
payload_length
,
0
,
SL_DISCOVERY_FLAG_YES
);
break
;
}
}
...
...
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