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
alex037yang
OpenXG-RAN
Commits
cc101de8
Commit
cc101de8
authored
6 years ago
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support multiple flows (3 UEs)
parent
921242e2
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
87 additions
and
31 deletions
+87
-31
d2d_emulator_setup.txt
d2d_emulator_setup.txt
+1
-0
openair2/LAYER2/MAC/config.c
openair2/LAYER2/MAC/config.c
+20
-0
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+3
-1
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+1
-0
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+27
-6
openair2/RRC/LITE/MESSAGES/asn1_msg.c
openair2/RRC/LITE/MESSAGES/asn1_msg.c
+1
-4
openair2/RRC/LITE/defs.h
openair2/RRC/LITE/defs.h
+5
-3
openair2/RRC/LITE/rrc_UE.c
openair2/RRC/LITE/rrc_UE.c
+21
-7
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+8
-10
No files found.
d2d_emulator_setup.txt
View file @
cc101de8
...
@@ -34,6 +34,7 @@ OAI build/execute
...
@@ -34,6 +34,7 @@ OAI build/execute
- cp ../../../targets/bin/.usim* .
- cp ../../../targets/bin/.usim* .
- sudo insmod ../../../targets/bin/ue_ip.ko
- sudo insmod ../../../targets/bin/ue_ip.ko
UE1:
UE1:
- sudo ifconfig oip0 10.0.0.1
- sudo ifconfig oip0 10.0.0.1
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 224.0.0.3 -j MARK --set-mark 4
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 224.0.0.3 -j MARK --set-mark 4
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/config.c
View file @
cc101de8
...
@@ -1051,6 +1051,7 @@ rrc_mac_config_req_ue(
...
@@ -1051,6 +1051,7 @@ rrc_mac_config_req_ue(
,
config_action_t
config_action
,
config_action_t
config_action
,
const
uint32_t
*
const
sourceL2Id
,
const
uint32_t
*
const
sourceL2Id
,
const
uint32_t
*
const
destinationL2Id
,
const
uint32_t
*
const
destinationL2Id
,
const
uint32_t
*
const
groupL2Id
#endif
#endif
)
)
...
@@ -1384,6 +1385,8 @@ rrc_mac_config_req_ue(
...
@@ -1384,6 +1385,8 @@ rrc_mac_config_req_ue(
LOG_I
(
MAC
,
"[UE %d] Configure source L2Id 0x%08x
\n
"
,
Mod_idP
,
*
sourceL2Id
);
LOG_I
(
MAC
,
"[UE %d] Configure source L2Id 0x%08x
\n
"
,
Mod_idP
,
*
sourceL2Id
);
}
}
if
(
destinationL2Id
)
{
if
(
destinationL2Id
)
{
j
=
0
;
k
=
0
;
LOG_I
(
MAC
,
"[UE %d] Configure destination L2Id 0x%08x
\n
"
,
Mod_idP
,
*
destinationL2Id
);
LOG_I
(
MAC
,
"[UE %d] Configure destination L2Id 0x%08x
\n
"
,
Mod_idP
,
*
destinationL2Id
);
for
(
k
=
0
;
k
<
MAX_NUM_DEST
;
k
++
)
{
for
(
k
=
0
;
k
<
MAX_NUM_DEST
;
k
++
)
{
if
((
UE_mac_inst
[
Mod_idP
].
destinationList
[
k
]
==
0
)
&&
(
j
==
0
))
j
=
k
+
1
;
if
((
UE_mac_inst
[
Mod_idP
].
destinationList
[
k
]
==
0
)
&&
(
j
==
0
))
j
=
k
+
1
;
...
@@ -1397,9 +1400,26 @@ rrc_mac_config_req_ue(
...
@@ -1397,9 +1400,26 @@ rrc_mac_config_req_ue(
LOG_I
(
MAC
,
"[UE %d] destination %d L2Id 0x%08x
\n
"
,
Mod_idP
,
k
,
UE_mac_inst
[
Mod_idP
].
destinationList
[
k
]
);
LOG_I
(
MAC
,
"[UE %d] destination %d L2Id 0x%08x
\n
"
,
Mod_idP
,
k
,
UE_mac_inst
[
Mod_idP
].
destinationList
[
k
]
);
}
}
}
}
if
(
groupL2Id
)
{
j
=
0
;
k
=
0
;
LOG_I
(
MAC
,
"[UE %d] Configure group L2Id 0x%08x
\n
"
,
Mod_idP
,
*
groupL2Id
);
for
(
k
=
0
;
k
<
MAX_NUM_DEST
;
k
++
)
{
if
((
UE_mac_inst
[
Mod_idP
].
groupList
[
k
]
==
0
)
&&
(
j
==
0
))
j
=
k
+
1
;
if
(
UE_mac_inst
[
Mod_idP
].
groupList
[
k
]
==
*
groupL2Id
)
break
;
//group already exists!
}
if
((
k
==
MAX_NUM_DEST
)
&&
(
j
>
0
))
{
UE_mac_inst
[
Mod_idP
].
groupList
[
j
-
1
]
=
*
groupL2Id
;
// UE_mac_inst[Mod_idP].numCommFlows++;
}
for
(
k
=
0
;
k
<
MAX_NUM_DEST
;
k
++
)
{
LOG_I
(
MAC
,
"[UE %d] group %d L2Id 0x%08x
\n
"
,
Mod_idP
,
k
,
UE_mac_inst
[
Mod_idP
].
groupList
[
k
]
);
}
}
//store list of LCIDs for SL
//store list of LCIDs for SL
if
(
logicalChannelIdentity
>
0
){
if
(
logicalChannelIdentity
>
0
){
j
=
0
;
j
=
0
;
k
=
0
;
for
(
k
=
0
;
k
<
MAX_NUM_LCID
;
k
++
)
{
for
(
k
=
0
;
k
<
MAX_NUM_LCID
;
k
++
)
{
if
((
UE_mac_inst
[
Mod_idP
].
SL_LCID
[
k
]
==
0
)
&&
(
j
==
0
))
j
=
k
+
1
;
if
((
UE_mac_inst
[
Mod_idP
].
SL_LCID
[
k
]
==
0
)
&&
(
j
==
0
))
j
=
k
+
1
;
if
(
UE_mac_inst
[
Mod_idP
].
SL_LCID
[
k
]
==
logicalChannelIdentity
)
break
;
//LCID already exists!
if
(
UE_mac_inst
[
Mod_idP
].
SL_LCID
[
k
]
==
logicalChannelIdentity
)
break
;
//LCID already exists!
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/defs.h
View file @
cc101de8
...
@@ -1342,8 +1342,10 @@ typedef struct {
...
@@ -1342,8 +1342,10 @@ typedef struct {
uint32_t
groupL2Id
;
uint32_t
groupL2Id
;
//SL destinationL2Id
//SL destinationL2Id
uint32_t
destinationL2Id
;
uint32_t
destinationL2Id
;
//List of destinations
//List of destinations
(unicast)
uint32_t
destinationList
[
MAX_NUM_DEST
];
uint32_t
destinationList
[
MAX_NUM_DEST
];
//List of group (multicast)
uint32_t
groupList
[
MAX_NUM_DEST
];
uint8_t
numCommFlows
;
uint8_t
numCommFlows
;
uint32_t
SL_LCID
[
MAX_NUM_LCID
];
uint32_t
SL_LCID
[
MAX_NUM_LCID
];
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/proto.h
View file @
cc101de8
...
@@ -934,6 +934,7 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
...
@@ -934,6 +934,7 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
,
config_action_t
config_action
,
config_action_t
config_action
,
const
uint32_t
*
const
sourceL2Id
,
const
uint32_t
*
const
sourceL2Id
,
const
uint32_t
*
const
destinationL2Id
,
const
uint32_t
*
const
destinationL2Id
,
const
uint32_t
*
const
groupL2Id
#endif
#endif
);
);
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/ue_procedures.c
View file @
cc101de8
...
@@ -756,6 +756,7 @@ void ue_send_sl_sdu(module_id_t module_idP,
...
@@ -756,6 +756,7 @@ void ue_send_sl_sdu(module_id_t module_idP,
int
rlc_sdu_len
;
int
rlc_sdu_len
;
char
*
rlc_sdu
;
char
*
rlc_sdu
;
uint32_t
destinationL2Id
=
0x00000000
;
uint32_t
destinationL2Id
=
0x00000000
;
uint32_t
sourceL2Id
=
0x00000000
;
if
(
sl_discovery_flag
==
SL_DISCOVERY_FLAG_NO
)
{
if
(
sl_discovery_flag
==
SL_DISCOVERY_FLAG_NO
)
{
...
@@ -765,17 +766,22 @@ void ue_send_sl_sdu(module_id_t module_idP,
...
@@ -765,17 +766,22 @@ void ue_send_sl_sdu(module_id_t module_idP,
// extract header
// extract header
SLSCH_SUBHEADER_24_Bit_DST_LONG
*
longh
=
(
SLSCH_SUBHEADER_24_Bit_DST_LONG
*
)
sdu
;
SLSCH_SUBHEADER_24_Bit_DST_LONG
*
longh
=
(
SLSCH_SUBHEADER_24_Bit_DST_LONG
*
)
sdu
;
AssertFatal
(
longh
->
E
==
0
,
"E is non-zero
\n
"
);
AssertFatal
(
longh
->
E
==
0
,
"E is non-zero
\n
"
);
AssertFatal
(((
longh
->
LCID
==
3
)
|
(
longh
->
LCID
==
10
)
),
"LCID is %d (not 3
or 10)
\n
"
,
longh
->
LCID
);
AssertFatal
(((
longh
->
LCID
==
3
)
|
(
longh
->
LCID
==
10
)
|
(
longh
->
LCID
==
4
)),
"LCID is %d (not 3, 4
or 10)
\n
"
,
longh
->
LCID
);
//filter incoming packet based on destination address
//filter incoming packet based on destination address
destinationL2Id
=
(
longh
->
DST07
<<
16
)
|
(
longh
->
DST815
<<
8
)
|
(
longh
->
DST1623
);
destinationL2Id
=
(
longh
->
DST07
<<
16
)
|
(
longh
->
DST815
<<
8
)
|
(
longh
->
DST1623
);
LOG_I
(
MAC
,
"[DestinationL2Id: 0x%08x]
\n
"
,
destinationL2Id
);
sourceL2Id
=
(
longh
->
SRC07
<<
16
)
|
(
longh
->
SRC815
<<
8
)
|
(
longh
->
SRC1623
);
LOG_D
(
MAC
,
"[DestinationL2Id: 0x%08x]
\n
"
,
destinationL2Id
);
//in case of 1-n communication, verify that UE belongs to that group
//in case of 1-n communication, verify that UE belongs to that group
int
i
=
0
;
int
i
=
0
;
for
(
i
=
0
;
i
<
MAX_NUM_DEST
;
i
++
)
for
(
i
=
0
;
i
<
MAX_NUM_DEST
;
i
++
)
if
(
UE_mac_inst
[
module_idP
].
destinationList
[
i
]
==
destinationL2Id
)
break
;
if
(
UE_mac_inst
[
module_idP
].
groupList
[
i
]
==
destinationL2Id
)
break
;
int
j
=
0
;
for
(
j
=
0
;
j
<
MAX_NUM_DEST
;
j
++
)
if
(
UE_mac_inst
[
module_idP
].
destinationList
[
j
]
==
sourceL2Id
)
break
;
//match the destinationL2Id with UE L2Id or groupL2ID
//match the destinationL2Id with UE L2Id or groupL2ID
if
(
!
((
destinationL2Id
==
UE_mac_inst
[
module_idP
].
sourceL2Id
)
|
(
i
<
MAX_NUM_DEST
))){
if
(
!
((
(
destinationL2Id
==
UE_mac_inst
[
module_idP
].
sourceL2Id
)
&&
(
j
<
MAX_NUM_DEST
))
|
((
destinationL2Id
==
UE_mac_inst
[
module_idP
].
sourceL2Id
)
&&
(
longh
->
LCID
==
10
)
)
|
(
i
<
MAX_NUM_DEST
))){
LOG_
I
(
MAC
,
"[Destination Id is neither matched with Source Id nor with Group Id, drop the packet!!!
\n
"
);
LOG_
D
(
MAC
,
"[Destination Id is neither matched with Source Id nor with Group Id, drop the packet!!!
\n
"
);
return
;
return
;
}
}
...
@@ -2818,6 +2824,21 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
...
@@ -2818,6 +2824,21 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
break
;
break
;
}
}
}
}
if
((
ue
->
sourceL2Id
>
0
)
&&
(
ue
->
groupList
[
j
]
>
0
)
){
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
0x1234
,
0
,
frameP
,
subframeP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
ue
->
SL_LCID
[
i
],
0xFFFF
,
ue
->
sourceL2Id
,
ue
->
groupList
[
j
]);
if
(
rlc_status
.
bytes_in_buffer
>
2
){
LOG_I
(
MAC
,
"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer
\n
"
,
frameP
,
subframeP
,
rlc_status
.
bytes_in_buffer
);
// Fill in group id for off-network communications
ue
->
sltx_active
=
1
;
//store LCID, destinationL2Id
ue
->
slsch_lcid
=
ue
->
SL_LCID
[
i
];
ue
->
destinationL2Id
=
ue
->
groupList
[
j
];
break
;
}
}
}
}
}
}
if
(
ue
->
sltx_active
==
1
)
break
;
if
(
ue
->
sltx_active
==
1
)
break
;
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/MESSAGES/asn1_msg.c
View file @
cc101de8
...
@@ -658,6 +658,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
...
@@ -658,6 +658,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
sib18_part
=
CALLOC
(
1
,
sizeof
(
struct
SystemInformation_r8_IEs__sib_TypeAndInfo__Member
));
sib18_part
=
CALLOC
(
1
,
sizeof
(
struct
SystemInformation_r8_IEs__sib_TypeAndInfo__Member
));
sib19_part
=
CALLOC
(
1
,
sizeof
(
struct
SystemInformation_r8_IEs__sib_TypeAndInfo__Member
));
sib19_part
=
CALLOC
(
1
,
sizeof
(
struct
SystemInformation_r8_IEs__sib_TypeAndInfo__Member
));
//sib21_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
//sib21_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
memset
(
sib18_part
,
0
,
sizeof
(
struct
SystemInformation_r8_IEs__sib_TypeAndInfo__Member
));
memset
(
sib18_part
,
0
,
sizeof
(
struct
SystemInformation_r8_IEs__sib_TypeAndInfo__Member
));
memset
(
sib19_part
,
0
,
sizeof
(
struct
SystemInformation_r8_IEs__sib_TypeAndInfo__Member
));
memset
(
sib19_part
,
0
,
sizeof
(
struct
SystemInformation_r8_IEs__sib_TypeAndInfo__Member
));
//memset(sib21_part,0,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
//memset(sib21_part,0,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
...
@@ -670,8 +671,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
...
@@ -670,8 +671,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
*
sib19
=
&
sib19_part
->
choice
.
sib19_v1250
;
*
sib19
=
&
sib19_part
->
choice
.
sib19_v1250
;
//*sib21 = &sib19_part->choice.sib21_v14x0;
//*sib21 = &sib19_part->choice.sib21_v14x0;
// sib2
// sib2
(
*
sib2
)
->
ac_BarringInfo
=
NULL
;
(
*
sib2
)
->
ac_BarringInfo
=
NULL
;
...
@@ -1332,7 +1331,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
...
@@ -1332,7 +1331,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
//end SIB19
//end SIB19
bcch_message
->
message
.
present
=
BCCH_DL_SCH_MessageType_PR_c1
;
bcch_message
->
message
.
present
=
BCCH_DL_SCH_MessageType_PR_c1
;
bcch_message
->
message
.
choice
.
c1
.
present
=
BCCH_DL_SCH_MessageType__c1_PR_systemInformation
;
bcch_message
->
message
.
choice
.
c1
.
present
=
BCCH_DL_SCH_MessageType__c1_PR_systemInformation
;
...
@@ -1364,7 +1362,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
...
@@ -1364,7 +1362,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
//ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib21_part);
//ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib21_part);
#ifdef XER_PRINT
#ifdef XER_PRINT
xer_fprint
(
stdout
,
&
asn_DEF_BCCH_DL_SCH_Message
,
(
void
*
)
bcch_message
);
xer_fprint
(
stdout
,
&
asn_DEF_BCCH_DL_SCH_Message
,
(
void
*
)
bcch_message
);
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/defs.h
View file @
cc101de8
...
@@ -636,7 +636,7 @@ typedef struct {
...
@@ -636,7 +636,7 @@ typedef struct {
SystemInformationBlockType18_r12_t
*
sib18
;
SystemInformationBlockType18_r12_t
*
sib18
;
SystemInformationBlockType19_r12_t
*
sib19
;
SystemInformationBlockType19_r12_t
*
sib19
;
SystemInformationBlockType21_r14_t
*
sib21
;
SystemInformationBlockType21_r14_t
*
sib21
;
// End - TTN
SRB_INFO
SI
;
SRB_INFO
SI
;
SRB_INFO
Srb0
;
SRB_INFO
Srb0
;
}
rrc_eNB_carrier_data_t
;
}
rrc_eNB_carrier_data_t
;
...
@@ -741,8 +741,10 @@ typedef struct UE_RRC_INST_s {
...
@@ -741,8 +741,10 @@ typedef struct UE_RRC_INST_s {
uint32_t
groupL2Id
;
uint32_t
groupL2Id
;
//current destination
//current destination
uint32_t
destinationL2Id
;
uint32_t
destinationL2Id
;
//List of destinations
//List of destinations
(unicast)
uint32_t
destinationList
[
MAX_NUM_DEST
];
uint32_t
destinationList
[
MAX_NUM_DEST
];
//List of groups (multicast)
uint32_t
groupList
[
MAX_NUM_DEST
];
//sl_discovery..
//sl_discovery..
SRB_INFO
SL_Discovery
[
NB_CNX_UE
];
SRB_INFO
SL_Discovery
[
NB_CNX_UE
];
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/rrc_UE.c
View file @
cc101de8
...
@@ -1048,6 +1048,7 @@ rrc_ue_process_measConfig(
...
@@ -1048,6 +1048,7 @@ rrc_ue_process_measConfig(
,
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
NULL
#endif
#endif
);
);
...
@@ -1567,6 +1568,7 @@ rrc_ue_process_radioResourceConfigDedicated(
...
@@ -1567,6 +1568,7 @@ rrc_ue_process_radioResourceConfigDedicated(
,
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
NULL
#endif
#endif
);
);
...
@@ -1632,6 +1634,7 @@ rrc_ue_process_radioResourceConfigDedicated(
...
@@ -1632,6 +1634,7 @@ rrc_ue_process_radioResourceConfigDedicated(
,
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
NULL
#endif
#endif
);
);
...
@@ -1746,6 +1749,7 @@ rrc_ue_process_radioResourceConfigDedicated(
...
@@ -1746,6 +1749,7 @@ rrc_ue_process_radioResourceConfigDedicated(
,
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
NULL
#endif
#endif
);
);
...
@@ -2336,6 +2340,7 @@ rrc_ue_process_mobilityControlInfo(
...
@@ -2336,6 +2340,7 @@ rrc_ue_process_mobilityControlInfo(
,
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
NULL
#endif
#endif
);
);
...
@@ -3204,6 +3209,7 @@ int decode_SIB1( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index,
...
@@ -3204,6 +3209,7 @@ int decode_SIB1( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index,
,
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
NULL
#endif
#endif
);
);
...
@@ -3889,6 +3895,7 @@ uint64_t arfcn_to_freq(long arfcn) {
...
@@ -3889,6 +3895,7 @@ uint64_t arfcn_to_freq(long arfcn) {
,
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
NULL
#endif
#endif
);
);
...
@@ -4075,6 +4082,7 @@ uint64_t arfcn_to_freq(long arfcn) {
...
@@ -4075,6 +4082,7 @@ uint64_t arfcn_to_freq(long arfcn) {
,
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
NULL
#endif
#endif
);
);
...
@@ -4581,6 +4589,7 @@ int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB
...
@@ -4581,6 +4589,7 @@ int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB
,
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
NULL
#endif
#endif
);
);
...
@@ -5549,10 +5558,10 @@ void *rrc_control_socket_thread_fct(void *arg)
...
@@ -5549,10 +5558,10 @@ void *rrc_control_socket_thread_fct(void *arg)
j
=
0
;
j
=
0
;
i
=
0
;
i
=
0
;
for
(
i
=
0
;
i
<
MAX_NUM_DEST
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_NUM_DEST
;
i
++
)
{
if
((
UE_rrc_inst
[
module_id
].
destination
List
[
i
]
==
0
)
&&
(
j
==
0
))
j
=
i
+
1
;
if
((
UE_rrc_inst
[
module_id
].
group
List
[
i
]
==
0
)
&&
(
j
==
0
))
j
=
i
+
1
;
if
(
UE_rrc_inst
[
module_id
].
destination
List
[
i
]
==
groupL2Id
)
break
;
//group already exists!
if
(
UE_rrc_inst
[
module_id
].
group
List
[
i
]
==
groupL2Id
)
break
;
//group already exists!
}
}
if
((
i
==
MAX_NUM_DEST
)
&&
(
j
>
0
))
UE_rrc_inst
[
module_id
].
destination
List
[
j
-
1
]
=
groupL2Id
;
if
((
i
==
MAX_NUM_DEST
)
&&
(
j
>
0
))
UE_rrc_inst
[
module_id
].
group
List
[
j
-
1
]
=
groupL2Id
;
// configure lower layers PDCP/MAC/PHY for this communication
// configure lower layers PDCP/MAC/PHY for this communication
//Establish a new RBID/LCID for this communication
//Establish a new RBID/LCID for this communication
...
@@ -5681,6 +5690,7 @@ void *rrc_control_socket_thread_fct(void *arg)
...
@@ -5681,6 +5690,7 @@ void *rrc_control_socket_thread_fct(void *arg)
#if defined(Rel10) || defined(Rel14)
#if defined(Rel10) || defined(Rel14)
,
CONFIG_ACTION_ADD
,
,
CONFIG_ACTION_ADD
,
&
sourceL2Id
,
&
sourceL2Id
,
NULL
,
&
groupL2Id
&
groupL2Id
#endif
#endif
);
);
...
@@ -5753,7 +5763,8 @@ void *rrc_control_socket_thread_fct(void *arg)
...
@@ -5753,7 +5763,8 @@ void *rrc_control_socket_thread_fct(void *arg)
#if defined(Rel10) || defined(Rel14)
#if defined(Rel10) || defined(Rel14)
,
CONFIG_ACTION_REMOVE
,
,
CONFIG_ACTION_REMOVE
,
&
sourceL2Id
,
&
sourceL2Id
,
&
destinationL2Id
&
destinationL2Id
,
NULL
#endif
#endif
);
);
...
@@ -5932,7 +5943,8 @@ void *rrc_control_socket_thread_fct(void *arg)
...
@@ -5932,7 +5943,8 @@ void *rrc_control_socket_thread_fct(void *arg)
#if defined(Rel10) || defined(Rel14)
#if defined(Rel10) || defined(Rel14)
,
CONFIG_ACTION_ADD
,
,
CONFIG_ACTION_ADD
,
&
sourceL2Id
,
&
sourceL2Id
,
&
destinationL2Id
&
destinationL2Id
,
NULL
#endif
#endif
);
);
...
@@ -5983,7 +5995,7 @@ void *rrc_control_socket_thread_fct(void *arg)
...
@@ -5983,7 +5995,7 @@ void *rrc_control_socket_thread_fct(void *arg)
i
=
0
;
i
=
0
;
for
(
i
=
0
;
i
<
MAX_NUM_DEST
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_NUM_DEST
;
i
++
)
{
if
((
UE_rrc_inst
[
module_id
].
destinationList
[
i
]
==
0
)
&&
(
j
==
0
))
j
=
i
+
1
;
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
(
UE_rrc_inst
[
module_id
].
destinationList
[
i
]
==
destinationL2Id
)
break
;
//
destination
already exists!
}
}
if
((
i
==
MAX_NUM_DEST
)
&&
(
j
>
0
))
UE_rrc_inst
[
module_id
].
destinationList
[
j
-
1
]
=
destinationL2Id
;
if
((
i
==
MAX_NUM_DEST
)
&&
(
j
>
0
))
UE_rrc_inst
[
module_id
].
destinationList
[
j
-
1
]
=
destinationL2Id
;
}
else
{
//RX
}
else
{
//RX
...
@@ -6118,7 +6130,8 @@ void *rrc_control_socket_thread_fct(void *arg)
...
@@ -6118,7 +6130,8 @@ void *rrc_control_socket_thread_fct(void *arg)
#if defined(Rel10) || defined(Rel14)
#if defined(Rel10) || defined(Rel14)
,
CONFIG_ACTION_ADD
,
,
CONFIG_ACTION_ADD
,
&
sourceL2Id
,
&
sourceL2Id
,
&
destinationL2Id
&
destinationL2Id
,
NULL
#endif
#endif
);
);
}
else
{
//RX
}
else
{
//RX
...
@@ -6157,6 +6170,7 @@ void *rrc_control_socket_thread_fct(void *arg)
...
@@ -6157,6 +6170,7 @@ void *rrc_control_socket_thread_fct(void *arg)
#if defined(Rel10) || defined(Rel14)
#if defined(Rel10) || defined(Rel14)
,
CONFIG_ACTION_ADD
,
,
CONFIG_ACTION_ADD
,
&
sourceL2Id
,
&
sourceL2Id
,
NULL
,
NULL
NULL
#endif
#endif
);
);
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ue.c
View file @
cc101de8
...
@@ -775,16 +775,15 @@ void ue_stub_rx_handler(unsigned int num_bytes, char *rx_buffer) {
...
@@ -775,16 +775,15 @@ void ue_stub_rx_handler(unsigned int num_bytes, char *rx_buffer) {
wakeup_thread
(
&
UE
->
timer_mutex
,
&
UE
->
timer_cond
,
&
UE
->
instance_cnt_timer
,
"timer_thread"
);
wakeup_thread
(
&
UE
->
timer_mutex
,
&
UE
->
timer_cond
,
&
UE
->
instance_cnt_timer
,
"timer_thread"
);
break
;
break
;
case
SLSCH
:
case
SLSCH
:
LOG_D
(
PHY
,
"Emulator SFN.SF %d.%d, Got SLSCH packet
\n
"
,
emulator_absSF
/
10
,
emulator_absSF
%
10
);
LOG_D
(
PHY
,
"Received %d bytes on UE-UE link for SFN.SF %d.%d, sending SLSCH payload (%d bytes) to MAC
\n
"
,
num_bytes
,
LOG_I
(
PHY
,
"Emulator SFN.SF %d.%d, Got SLSCH packet
\n
"
,
emulator_absSF
/
10
,
emulator_absSF
%
10
);
LOG_I
(
PHY
,
"Received %d bytes on UE-UE link for SFN.SF %d.%d, sending SLSCH payload (%d bytes) to MAC
\n
"
,
num_bytes
,
pdu
->
header
.
absSF
/
10
,
pdu
->
header
.
absSF
%
10
,
pdu
->
header
.
absSF
/
10
,
pdu
->
header
.
absSF
%
10
,
slsch
->
payload_length
);
slsch
->
payload_length
);
#ifdef DEBUG_UE_RX
printf
(
"SLSCH:"
);
printf
(
"SLSCH:"
);
for
(
int
i
=
0
;
i
<
sizeof
(
SLSCH_t
);
i
++
)
printf
(
"%x "
,((
uint8_t
*
)
slsch
)[
i
]);
for
(
int
i
=
0
;
i
<
sizeof
(
SLSCH_t
);
i
++
)
printf
(
"%x "
,((
uint8_t
*
)
slsch
)[
i
]);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
#endif
ue_send_sl_sdu
(
0
,
ue_send_sl_sdu
(
0
,
0
,
0
,
pdu
->
header
.
absSF
/
10
,
pdu
->
header
.
absSF
/
10
,
...
@@ -796,16 +795,15 @@ void ue_stub_rx_handler(unsigned int num_bytes, char *rx_buffer) {
...
@@ -796,16 +795,15 @@ void ue_stub_rx_handler(unsigned int num_bytes, char *rx_buffer) {
break
;
break
;
case
SLDCH
:
case
SLDCH
:
LOG_D
(
PHY
,
"Emulator SFN.SF %d.%d, Got SLDCH packet
\n
"
,
emulator_absSF
/
10
,
emulator_absSF
%
10
);
LOG_D
(
PHY
,
"Received %d bytes on UE-UE link for SFN.SF %d.%d, sending SLDCH payload (%d bytes) to MAC
\n
"
,
num_bytes
,
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
,
pdu
->
header
.
absSF
/
10
,
pdu
->
header
.
absSF
%
10
,
sldch
->
payload_length
);
sldch
->
payload_length
);
#ifdef DEBUG_UE_RX
printf
(
"SLDCH:"
);
printf
(
"SLDCH:"
);
for
(
int
i
=
0
;
i
<
sizeof
(
SLDCH_t
);
i
++
)
printf
(
"%x "
,((
uint8_t
*
)
sldch
)[
i
]);
for
(
int
i
=
0
;
i
<
sizeof
(
SLDCH_t
);
i
++
)
printf
(
"%x "
,((
uint8_t
*
)
sldch
)[
i
]);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
#endif
ue_send_sl_sdu
(
0
,
ue_send_sl_sdu
(
0
,
0
,
0
,
pdu
->
header
.
absSF
/
10
,
pdu
->
header
.
absSF
/
10
,
...
...
This diff is collapsed.
Click to expand it.
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