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
wangwenhui
OpenXG-RAN
Commits
ad2da99d
Commit
ad2da99d
authored
Jan 18, 2018
by
William Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing of Discovery transmission/reception
parent
ccdc09c8
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
208 additions
and
218 deletions
+208
-218
openair1/PHY/LTE_TRANSPORT/defs.h
openair1/PHY/LTE_TRANSPORT/defs.h
+12
-13
openair1/PHY/LTE_TRANSPORT/sldch.c
openair1/PHY/LTE_TRANSPORT/sldch.c
+4
-5
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+74
-78
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+23
-20
openair2/RRC/LITE/L2_interface.c
openair2/RRC/LITE/L2_interface.c
+10
-9
openair2/RRC/LITE/defs.h
openair2/RRC/LITE/defs.h
+5
-7
openair2/RRC/LITE/proto.h
openair2/RRC/LITE/proto.h
+7
-7
openair2/RRC/LITE/rrc_UE.c
openair2/RRC/LITE/rrc_UE.c
+43
-41
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+30
-38
No files found.
openair1/PHY/LTE_TRANSPORT/defs.h
View file @
ad2da99d
...
...
@@ -939,8 +939,7 @@ typedef struct {
typedef
struct
{
/// payload length
int
payload_length
;
/// pointer to payload
uint8_t
*
payload
;
uint8_t
payload
[
100
];
}
SLDCH_t
;
#define TTI_SYNC 0
...
...
openair1/PHY/LTE_TRANSPORT/sldch.c
View file @
ad2da99d
...
...
@@ -42,14 +42,13 @@ void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx)
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
,
s
ldch
->
payload_length
);
memcpy
((
void
*
)
&
pdu
.
sldch
,
(
void
*
)
sldch
,
s
izeof
(
SLDCH_t
)
);
LOG_I
(
PHY
,
"SLDCH configuration %d bytes, TBS payload %d bytes => %d bytes
\n
"
,
sizeof
(
SLDCH_t
)
-
sizeof
(
uint8_t
*
),
...
...
@@ -58,7 +57,7 @@ void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx)
multicast_link_write_sock
(
0
,
&
pdu
,
sldch_header_len
+
sizeof
(
SLDCH_t
)
-
sizeof
(
uint8_t
*
)
+
sldch
->
payload_length
);
sldch_header_len
+
sizeof
(
SLDCH_t
));
}
...
...
openair2/LAYER2/MAC/defs.h
View file @
ad2da99d
...
...
@@ -1378,7 +1378,6 @@ typedef struct {
int
sltx_active
;
SLSCH_t
slsch
;
SLDCH_t
sldch
;
ULDCH_PDU
sldch_pdu
;
ULSCH_PDU
slsch_pdu
;
int
slsch_lcid
;
#endif
...
...
@@ -1498,6 +1497,3 @@ typedef struct {
#include "proto.h"
/*@}*/
#endif
/*__LAYER2_MAC_DEFS_H__ */
openair2/LAYER2/MAC/ue_procedures.c
View file @
ad2da99d
...
...
@@ -2748,24 +2748,27 @@ SLSS_t *ue_get_slss(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t su
}
SLDCH_t
*
ue_get_sldch
(
module_id_t
Mod_id
,
int
CC_id
,
frame_t
frame_tx
,
sub_frame_t
subframe_tx
)
{
/* int sdu_length;
UE_MAC_INST
*
ue
=
&
UE_mac_inst
[
Mod_id
];
SLDCH_t
*
sldch
=
&
UE_mac_inst
[
Mod_id
].
sldch
;
LOG_I(MAC, "[ue_get_sldch]");
int sdu
_length = mac_rrc_data_req(Mod_id,
sldch
->
payload
_length
=
mac_rrc_data_req
(
Mod_id
,
CC_id
,
frame_tx
,
SL_DISCOVERY
,
1
,
(char*)(
ue->sldch_pdu.
payload), //&UE_mac_inst[Mod_id].SL_Discovery[0].Tx_buffer.Payload[0],
(
char
*
)(
sldch
->
payload
),
//&UE_mac_inst[Mod_id].SL_Discovery[0].Tx_buffer.Payload[0],
0
,
0
,
//eNB_indexP
0
);
if (sdu_length >0 ) return (&ue->sldch);
if
(
sldch
->
payload_length
>
0
)
{
LOG_I
(
MAC
,
"Got %d bytes from RRC for SLDCH @ %p
\n
"
,
sldch
->
payload_length
,
sldch
);
return
(
sldch
);
}
else
*/
return
((
SLDCH_t
*
)
NULL
);
}
...
...
openair2/RRC/LITE/L2_interface.c
View file @
ad2da99d
...
...
@@ -329,10 +329,11 @@ mac_rrc_data_req(
LOG_D
(
RRC
,
"[UE %d] Frame %d buffer_pP status %d,
\n
"
,
Mod_idP
,
frameP
,
UE_rrc_inst
[
Mod_idP
].
SL_Discovery
[
eNB_index
].
Tx_buffer
.
payload_size
);
//TTN (for D2D)
if
(
(
Srb_id
&
RAB_OFFSET
)
==
SL_DISCOVERY
){
if
(
Srb_id
==
SL_DISCOVERY
&&
UE_rrc_inst
[
Mod_idP
].
SL_Discovery
[
eNB_index
].
Tx_buffer
.
payload_size
>
0
){
memcpy
(
&
buffer_pP
[
0
],
&
UE_rrc_inst
[
Mod_idP
].
SL_Discovery
[
eNB_index
].
Tx_buffer
.
Payload
[
0
],
UE_rrc_inst
[
Mod_idP
].
SL_Discovery
[
eNB_index
].
Tx_buffer
.
payload_size
);
uint8_t
Ret_size
=
UE_rrc_inst
[
Mod_idP
].
SL_Discovery
[
eNB_index
].
Tx_buffer
.
payload_size
;
// msg("[RRC][UE %d] Sending SL_Discovery\n",Mod_id);
LOG_I
(
RRC
,
"[UE %d] Sending SL_Discovery, size %d bytes
\n
"
,
Mod_idP
,
Ret_size
);
UE_rrc_inst
[
Mod_idP
].
SL_Discovery
[
eNB_index
].
Tx_buffer
.
payload_size
=
0
;
return
(
Ret_size
);
}
#endif
...
...
@@ -513,7 +514,7 @@ mac_rrc_data_ind(
}
//TTN (for D2D)
if
(
(
srb_idP
&
RAB_OFFSET
)
==
SL_DISCOVERY
)
{
if
(
srb_idP
==
SL_DISCOVERY
)
{
decode_SL_Discovery_Message
(
&
ctxt
,
eNB_indexP
,
sduP
,
sdu_lenP
);
}
...
...
openair2/RRC/LITE/defs.h
View file @
ad2da99d
...
...
@@ -134,11 +134,9 @@ struct PC5SEstablishRsp{
//example of PC5_DSICOVERY ANNOUNCEMENT (for testing only)
typedef
struct
{
uint8_t
msg_type
;
uint32_t
discoveryGroupId
;
//AnnouncerInfo
uint32_t
proSeUEId
;
}
__attribute__
((
__packed__
))
PC5DiscoveryAnnouncement
;
unsigned
char
bytes
[
29
];
}
__attribute__
((
__packed__
))
PC5DiscoveryAnnouncement
;
struct
sidelink_ctrl_element
{
unsigned
short
type
;
...
...
openair2/RRC/LITE/proto.h
View file @
ad2da99d
...
...
@@ -90,7 +90,7 @@ rrc_ue_decode_dcch(
);
#ifdef Rel14
int
decode_SL_D
ISCOVERY
_Message
(
int
decode_SL_D
iscovery
_Message
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
eNB_index
,
uint8_t
*
const
Sdu
,
...
...
openair2/RRC/LITE/rrc_UE.c
View file @
ad2da99d
...
...
@@ -5806,14 +5806,16 @@ void *rrc_control_socket_thread_fct(void *arg)
#ifdef DEBUG_CTRL_SOCKET
LOG_I
(
RRC
,
"[PC5DiscoveryAnnouncement] Received on socket from ProSe App (msg type: %d)
\n
"
,
sl_ctrl_msg_recv
->
type
);
LOG_I
(
RRC
,
"[PC5DiscoveryAnnouncement] type: %d
\n
"
,
sl_ctrl_msg_recv
->
sidelinkPrimitive
.
pc5_discovery_announcement
.
msg_type
);
LOG_I
(
RRC
,
"[PC5DiscoveryAnnouncement] discoveryGroupId: 0x%08x
\n
"
,
sl_ctrl_msg_recv
->
sidelinkPrimitive
.
pc5_discovery_announcement
.
discoveryGroupId
);
LOG_I
(
RRC
,
"[PC5DiscoveryAnnouncement] proSeUEId: 0x%08x
\n
"
,
sl_ctrl_msg_recv
->
sidelinkPrimitive
.
pc5_discovery_announcement
.
proSeUEId
);
//
LOG_I(RRC,"[PC5DiscoveryAnnouncement] type: %d\n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5_discovery_announcement.msg_type);
// LOG_D
(RRC,"[PC5DiscoveryAnnouncement] discoveryGroupId: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5_discovery_announcement.discoveryGroupId);
// LOG_D
(RRC,"[PC5DiscoveryAnnouncement] proSeUEId: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5_discovery_announcement.proSeUEId);
#endif
//prepare SL_Discovery buffer
if
(
UE_rrc_inst
)
{
memcpy
((
void
*
)
&
UE_rrc_inst
[
module_id
].
SL_Discovery
[
0
].
Tx_buffer
.
Payload
[
0
],
(
void
*
)
receive_buf
,
n
);
UE_rrc_inst
[
module_id
].
SL_Discovery
[
0
].
Tx_buffer
.
payload_size
=
n
;
LOG_I
(
RRC
,
"[PC5DiscoveryAnnouncement] Copied %d bytes
\n
"
,
n
);
}
break
;
default:
break
;
...
...
@@ -5825,7 +5827,7 @@ void *rrc_control_socket_thread_fct(void *arg)
//-----------------------------------------------------------------------------
int
decode_SL_D
ISCOVERY
_Message
(
int
decode_SL_D
iscovery
_Message
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
eNB_index
,
uint8_t
*
const
Sdu
,
...
...
targets/RT/USER/lte-ue.c
View file @
ad2da99d
...
...
@@ -1640,11 +1640,3 @@ int init_timer_thread(void) {
pthread_create
(
&
phy_stub_ticking
->
pthread_timer
,
NULL
,
&
timer_thread
,
NULL
);
return
0
;
}
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