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
lizhongxiao
OpenXG-RAN
Commits
f87354c9
Commit
f87354c9
authored
Mar 21, 2018
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add an additional bearer for SL communication (3 - direct communication, 4 - group communication )
parent
314bf57f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
openair2/RRC/LITE/rrc_UE.c
openair2/RRC/LITE/rrc_UE.c
+22
-19
No files found.
openair2/RRC/LITE/rrc_UE.c
View file @
f87354c9
...
...
@@ -5534,6 +5534,7 @@ void *rrc_control_socket_thread_fct(void *arg)
case
GROUP_COMMUNICATION_ESTABLISH_REQ
:
sourceL2Id
=
sl_ctrl_msg_recv
->
sidelinkPrimitive
.
group_comm_establish_req
.
sourceL2Id
;
groupL2Id
=
sl_ctrl_msg_recv
->
sidelinkPrimitive
.
group_comm_establish_req
.
groupL2Id
;
int
group_comm_rbid
=
4
;
#ifdef DEBUG_CTRL_SOCKET
LOG_I
(
RRC
,
"[GroupCommunicationEstablishReq] Received on socket from ProSe App (msg type: %d)
\n
"
,
sl_ctrl_msg_recv
->
type
);
...
...
@@ -5551,20 +5552,20 @@ void *rrc_control_socket_thread_fct(void *arg)
if
((
UE_rrc_inst
[
module_id
].
destinationList
[
i
]
==
0
)
&&
(
j
==
0
))
j
=
i
+
1
;
if
(
UE_rrc_inst
[
module_id
].
destinationList
[
i
]
==
groupL2Id
)
break
;
//group already exists!
}
if
((
i
==
MAX_NUM_DEST
)
&&
(
j
>
0
))
UE_
ma
c_inst
[
module_id
].
destinationList
[
j
-
1
]
=
groupL2Id
;
if
((
i
==
MAX_NUM_DEST
)
&&
(
j
>
0
))
UE_
rr
c_inst
[
module_id
].
destinationList
[
j
-
1
]
=
groupL2Id
;
// configure lower layers PDCP/MAC/PHY for this communication
//Establish a new RBID/LCID for this communication
// Establish a SLRB (using DRB
3
for now)
// Establish a SLRB (using DRB
4
for now)
UE
=
&
UE_rrc_inst
[
module_id
];
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
0
,
ENB_FLAG_NO
,
0x1234
,
0
,
0
,
0
);
UE
->
DRB_config
[
0
][
0
]
=
CALLOC
(
1
,
sizeof
(
struct
DRB_ToAddMod
));
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
=
CALLOC
(
1
,
sizeof
(
long
));
UE
->
DRB_config
[
0
][
0
]
->
drb_Identity
=
3
;
UE
->
DRB_config
[
0
][
0
]
->
drb_Identity
=
group_comm_rbid
;
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
=
CALLOC
(
1
,
sizeof
(
long
));
// allowed value 5..15, value : x+4
*
(
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
)
=
3
;
*
(
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
)
=
group_comm_rbid
;
UE
->
DRB_config
[
0
][
0
]
->
logicalChannelIdentity
=
CALLOC
(
1
,
sizeof
(
long
));
*
(
UE
->
DRB_config
[
0
][
0
]
->
logicalChannelIdentity
)
=
UE
->
DRB_config
[
0
][
0
]
->
drb_Identity
;
//(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2
...
...
@@ -5655,7 +5656,7 @@ void *rrc_control_socket_thread_fct(void *arg)
#endif
(
MeasObjectToAddMod_t
**
)
NULL
,
(
MAC_MainConfig_t
*
)
NULL
,
3
,
//LCID
group_comm_rbid
,
//LCID
(
struct
LogicalChannelConfig
*
)
NULL
,
(
MeasGapConfig_t
*
)
NULL
,
(
TDD_Config_t
*
)
NULL
,
...
...
@@ -5688,7 +5689,7 @@ void *rrc_control_socket_thread_fct(void *arg)
memset
(
send_buf
,
0
,
BUFSIZE
);
sl_ctrl_msg_send
=
calloc
(
1
,
sizeof
(
struct
sidelink_ctrl_element
));
sl_ctrl_msg_send
->
type
=
GROUP_COMMUNICATION_ESTABLISH_RSP
;
sl_ctrl_msg_send
->
sidelinkPrimitive
.
slrb_id
=
3
;
//slrb_id
sl_ctrl_msg_send
->
sidelinkPrimitive
.
slrb_id
=
group_comm_rbid
;
//slrb_id
memcpy
((
void
*
)
send_buf
,
(
void
*
)
sl_ctrl_msg_send
,
sizeof
(
struct
sidelink_ctrl_element
));
free
(
sl_ctrl_msg_send
);
...
...
@@ -5786,6 +5787,7 @@ void *rrc_control_socket_thread_fct(void *arg)
case
DIRECT_COMMUNICATION_ESTABLISH_REQ
:
sourceL2Id
=
sl_ctrl_msg_recv
->
sidelinkPrimitive
.
direct_comm_establish_req
.
sourceL2Id
;
destinationL2Id
=
sl_ctrl_msg_recv
->
sidelinkPrimitive
.
direct_comm_establish_req
.
destinationL2Id
;
int
direct_comm_rbid
=
3
;
#ifdef DEBUG_CTRL_SOCKET
LOG_I
(
RRC
,
"[DirectCommunicationEstablishReq] Received on socket from ProSe App (msg type: %d)
\n
"
,
sl_ctrl_msg_recv
->
type
);
...
...
@@ -5801,7 +5803,7 @@ void *rrc_control_socket_thread_fct(void *arg)
if
((
UE_rrc_inst
[
module_id
].
destinationList
[
i
]
==
0
)
&&
(
j
==
0
))
j
=
i
+
1
;
if
(
UE_rrc_inst
[
module_id
].
destinationList
[
i
]
==
destinationL2Id
)
break
;
//destination already exists!
}
if
((
i
==
MAX_NUM_DEST
)
&&
(
j
>
0
))
UE_
ma
c_inst
[
module_id
].
destinationList
[
j
-
1
]
=
destinationL2Id
;
if
((
i
==
MAX_NUM_DEST
)
&&
(
j
>
0
))
UE_
rr
c_inst
[
module_id
].
destinationList
[
j
-
1
]
=
destinationL2Id
;
// configure lower layers PDCP/MAC/PHY for this communication
//Establish a new RBID/LCID for this communication
...
...
@@ -5811,10 +5813,10 @@ void *rrc_control_socket_thread_fct(void *arg)
UE
->
DRB_config
[
0
][
0
]
=
CALLOC
(
1
,
sizeof
(
struct
DRB_ToAddMod
));
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
=
CALLOC
(
1
,
sizeof
(
long
));
UE
->
DRB_config
[
0
][
0
]
->
drb_Identity
=
3
;
UE
->
DRB_config
[
0
][
0
]
->
drb_Identity
=
direct_comm_rbid
;
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
=
CALLOC
(
1
,
sizeof
(
long
));
// allowed value 5..15, value : x+4
*
(
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
)
=
3
;
*
(
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
)
=
direct_comm_rbid
;
UE
->
DRB_config
[
0
][
0
]
->
logicalChannelIdentity
=
CALLOC
(
1
,
sizeof
(
long
));
*
(
UE
->
DRB_config
[
0
][
0
]
->
logicalChannelIdentity
)
=
UE
->
DRB_config
[
0
][
0
]
->
drb_Identity
;
//(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2
...
...
@@ -5905,7 +5907,7 @@ void *rrc_control_socket_thread_fct(void *arg)
#endif
(
MeasObjectToAddMod_t
**
)
NULL
,
(
MAC_MainConfig_t
*
)
NULL
,
3
,
//LCID
direct_comm_rbid
,
//LCID
(
struct
LogicalChannelConfig
*
)
NULL
,
(
MeasGapConfig_t
*
)
NULL
,
(
TDD_Config_t
*
)
NULL
,
...
...
@@ -5938,7 +5940,7 @@ void *rrc_control_socket_thread_fct(void *arg)
memset
(
send_buf
,
0
,
BUFSIZE
);
sl_ctrl_msg_send
=
calloc
(
1
,
sizeof
(
struct
sidelink_ctrl_element
));
sl_ctrl_msg_send
->
type
=
DIRECT_COMMUNICATION_ESTABLISH_RSP
;
sl_ctrl_msg_send
->
sidelinkPrimitive
.
slrb_id
=
3
;
//slrb_id
sl_ctrl_msg_send
->
sidelinkPrimitive
.
slrb_id
=
direct_comm_rbid
;
//slrb_id
memcpy
((
void
*
)
send_buf
,
(
void
*
)
sl_ctrl_msg_send
,
sizeof
(
struct
sidelink_ctrl_element
));
free
(
sl_ctrl_msg_send
);
...
...
@@ -5961,6 +5963,7 @@ void *rrc_control_socket_thread_fct(void *arg)
case
PC5S_ESTABLISH_REQ
:
type
=
sl_ctrl_msg_recv
->
sidelinkPrimitive
.
pc5s_establish_req
.
type
;
sourceL2Id
=
sl_ctrl_msg_recv
->
sidelinkPrimitive
.
pc5s_establish_req
.
sourceL2Id
;
int
pc5s_rbid
=
10
;
#ifdef DEBUG_CTRL_SOCKET
LOG_I
(
RRC
,
"[PC5EstablishReq] Received on socket from ProSe App (msg type: %d)
\n
"
,
sl_ctrl_msg_recv
->
type
);
LOG_I
(
RRC
,
"[PC5EstablishReq] type: %d
\n
"
,
sl_ctrl_msg_recv
->
sidelinkPrimitive
.
pc5s_establish_req
.
type
);
//RX/TX
...
...
@@ -5982,7 +5985,7 @@ void *rrc_control_socket_thread_fct(void *arg)
if
((
UE_rrc_inst
[
module_id
].
destinationList
[
i
]
==
0
)
&&
(
j
==
0
))
j
=
i
+
1
;
if
(
UE_rrc_inst
[
module_id
].
destinationList
[
i
]
==
destinationL2Id
)
break
;
//group already exists!
}
if
((
i
==
MAX_NUM_DEST
)
&&
(
j
>
0
))
UE_
ma
c_inst
[
module_id
].
destinationList
[
j
-
1
]
=
destinationL2Id
;
if
((
i
==
MAX_NUM_DEST
)
&&
(
j
>
0
))
UE_
rr
c_inst
[
module_id
].
destinationList
[
j
-
1
]
=
destinationL2Id
;
}
else
{
//RX
UE_rrc_inst
[
module_id
].
sourceL2Id
=
sourceL2Id
;
}
...
...
@@ -5995,10 +5998,10 @@ void *rrc_control_socket_thread_fct(void *arg)
UE
->
DRB_config
[
0
][
0
]
=
CALLOC
(
1
,
sizeof
(
struct
DRB_ToAddMod
));
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
=
CALLOC
(
1
,
sizeof
(
long
));
UE
->
DRB_config
[
0
][
0
]
->
drb_Identity
=
10
;
UE
->
DRB_config
[
0
][
0
]
->
drb_Identity
=
pc5s_rbid
;
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
=
CALLOC
(
1
,
sizeof
(
long
));
// allowed value 5..15, value : x+4
*
(
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
)
=
10
;
*
(
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
)
=
pc5s_rbid
;
UE
->
DRB_config
[
0
][
0
]
->
logicalChannelIdentity
=
CALLOC
(
1
,
sizeof
(
long
));
*
(
UE
->
DRB_config
[
0
][
0
]
->
logicalChannelIdentity
)
=
UE
->
DRB_config
[
0
][
0
]
->
drb_Identity
;
//(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2
...
...
@@ -6090,7 +6093,7 @@ void *rrc_control_socket_thread_fct(void *arg)
#endif
(
MeasObjectToAddMod_t
**
)
NULL
,
(
MAC_MainConfig_t
*
)
NULL
,
10
,
//LCID
pc5s_rbid
,
//LCID
(
struct
LogicalChannelConfig
*
)
NULL
,
(
MeasGapConfig_t
*
)
NULL
,
(
TDD_Config_t
*
)
NULL
,
...
...
@@ -6129,7 +6132,7 @@ void *rrc_control_socket_thread_fct(void *arg)
#endif
(
MeasObjectToAddMod_t
**
)
NULL
,
(
MAC_MainConfig_t
*
)
NULL
,
10
,
//LCID
pc5s_rbid
,
//LCID
(
struct
LogicalChannelConfig
*
)
NULL
,
(
MeasGapConfig_t
*
)
NULL
,
(
TDD_Config_t
*
)
NULL
,
...
...
@@ -6164,9 +6167,9 @@ void *rrc_control_socket_thread_fct(void *arg)
memset
(
send_buf
,
0
,
BUFSIZE
);
sl_ctrl_msg_send
=
calloc
(
1
,
sizeof
(
struct
sidelink_ctrl_element
));
sl_ctrl_msg_send
->
type
=
PC5S_ESTABLISH_RSP
;
sl_ctrl_msg_send
->
sidelinkPrimitive
.
pc5s_establish_rsp
.
slrbid_lcid28
=
10
;
sl_ctrl_msg_send
->
sidelinkPrimitive
.
pc5s_establish_rsp
.
slrbid_lcid29
=
10
;
sl_ctrl_msg_send
->
sidelinkPrimitive
.
pc5s_establish_rsp
.
slrbid_lcid30
=
10
;
sl_ctrl_msg_send
->
sidelinkPrimitive
.
pc5s_establish_rsp
.
slrbid_lcid28
=
pc5s_rbid
;
sl_ctrl_msg_send
->
sidelinkPrimitive
.
pc5s_establish_rsp
.
slrbid_lcid29
=
pc5s_rbid
;
sl_ctrl_msg_send
->
sidelinkPrimitive
.
pc5s_establish_rsp
.
slrbid_lcid30
=
pc5s_rbid
;
memcpy
((
void
*
)
send_buf
,
(
void
*
)
sl_ctrl_msg_send
,
sizeof
(
struct
sidelink_ctrl_element
));
prose_addr_len
=
sizeof
(
prose_app_addr
);
...
...
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