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
canghaiwuhen
OpenXG-RAN
Commits
3b335e1d
Commit
3b335e1d
authored
Jun 07, 2017
by
vettel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync
parent
7dc6ebf4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
6 deletions
+50
-6
openair2/COMMON/x2ap_messages_types.h
openair2/COMMON/x2ap_messages_types.h
+1
-1
openair2/RRC/LITE/MESSAGES/asn1_msg.c
openair2/RRC/LITE/MESSAGES/asn1_msg.c
+27
-0
openair2/RRC/LITE/MESSAGES/asn1_msg.h
openair2/RRC/LITE/MESSAGES/asn1_msg.h
+2
-0
openair2/RRC/LITE/rrc_eNB.c
openair2/RRC/LITE/rrc_eNB.c
+20
-5
No files found.
openair2/COMMON/x2ap_messages_types.h
View file @
3b335e1d
...
...
@@ -168,7 +168,7 @@ typedef struct x2ap_handover_req_ack_s {
int
source_x2id
;
/* TODO: to be fixed/remove */
/* TODO: this parameter has to be removed */
int
target_mod_id
;
uint8_t
rrc_buffer
[
255
/* TODO: should be RRC_BUF_SIZE
*/
];
uint8_t
rrc_buffer
[
1024
/* arbitrary, big enough
*/
];
int
rrc_buffer_size
;
}
x2ap_handover_req_ack_t
;
...
...
openair2/RRC/LITE/MESSAGES/asn1_msg.c
View file @
3b335e1d
...
...
@@ -58,6 +58,7 @@
#include "RRCConnectionSetup.h"
#include "SRB-ToAddModList.h"
#include "DRB-ToAddModList.h"
#include "HandoverCommand.h"
#if defined(Rel10) || defined(Rel14)
#include "MCCH-Message.h"
//#define MRB1 1
...
...
@@ -2600,6 +2601,32 @@ uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t
return
encoded
;
}
int
do_HandoverCommand
(
char
*
ho_buf
,
int
ho_size
,
char
*
rrc_buf
,
int
rrc_size
)
{
asn_enc_rval_t
enc_rval
;
HandoverCommand_t
ho
;
memset
(
&
ho
,
0
,
sizeof
(
ho
));
ho
.
criticalExtensions
.
present
=
HandoverCommand__criticalExtensions_PR_c1
;
ho
.
criticalExtensions
.
choice
.
c1
.
present
=
HandoverCommand__criticalExtensions__c1_PR_handoverCommand_r8
;
if
(
OCTET_STRING_fromBuf
(
&
ho
.
criticalExtensions
.
choice
.
c1
.
choice
.
handoverCommand_r8
.
handoverCommandMessage
,
rrc_buf
,
rrc_size
)
==
-
1
)
{
printf
(
"%s:%d: fatal: OCTET_STRING_fromBuf failed
\n
"
);
abort
();
}
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_HandoverCommand
,
&
ho
,
ho_buf
,
ho_size
);
/* TODO: free the OCTET_STRING */
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
OAI_UECapability_t
*
fill_ue_capability
(
char
*
UE_EUTRA_Capability_xer_fname
)
{
static
OAI_UECapability_t
UECapability
;
/* TODO declared static to allow returning this has an address should be allocated in a cleaner way. */
...
...
openair2/RRC/LITE/MESSAGES/asn1_msg.h
View file @
3b335e1d
...
...
@@ -258,6 +258,8 @@ uint8_t do_DLInformationTransfer(uint8_t Mod_id, uint8_t **buffer, uint8_t trans
uint8_t
do_ULInformationTransfer
(
uint8_t
**
buffer
,
uint32_t
pdu_length
,
uint8_t
*
pdu_buffer
);
int
do_HandoverCommand
(
char
*
ho_buf
,
int
ho_size
,
char
*
rrc_buf
,
int
rrc_size
);
OAI_UECapability_t
*
fill_ue_capability
(
char
*
UE_EUTRA_Capability_xer
);
uint8_t
...
...
openair2/RRC/LITE/rrc_eNB.c
View file @
3b335e1d
...
...
@@ -3158,7 +3158,7 @@ rrc_eNB_generate_handover_reconfiguration(
physicalConfigDedicated2
->
tpc_PDCCH_ConfigPUSCH
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
tpc_PDCCH_ConfigPUSCH
));
physicalConfigDedicated2
->
cqi_ReportConfig
=
NULL
;
//CALLOC(1,sizeof(*physicalConfigDedicated2->cqi_ReportConfig));
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
));
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
=
NULL
;
//
CALLOC(1,sizeof(*physicalConfigDedicated2->soundingRS_UL_ConfigDedicated));
physicalConfigDedicated2
->
antennaInfo
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
antennaInfo
));
physicalConfigDedicated2
->
schedulingRequestConfig
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
schedulingRequestConfig
));
...
...
@@ -3700,7 +3700,8 @@ rrc_eNB_generate_handover_reconfiguration(
mobilityInfo
=
CALLOC
(
1
,
sizeof
(
*
mobilityInfo
));
memset
((
void
*
)
mobilityInfo
,
0
,
sizeof
(
*
mobilityInfo
));
mobilityInfo
->
targetPhysCellId
=
0
;
mobilityInfo
->
targetPhysCellId
=
rrc_inst
->
configuration
.
cell_identity
;
//(PhysCellId_t) two_tier_hexagonal_cellIds[ue_context_pP->ue_context.handover_info->modid_t];
LOG_D
(
RRC
,
"[eNB %d] Frame %d: handover preparation: targetPhysCellId: %ld mod_id: %d ue: %x
\n
"
,
ctxt_pP
->
module_id
,
...
...
@@ -3782,6 +3783,7 @@ rrc_eNB_generate_handover_reconfiguration(
// store the srb and drb list for ho management, mainly in case of failure
#if 0
memcpy(ue_context_pP->ue_context.handover_info->as_config.sourceRadioResourceConfig.srb_ToAddModList,
(void*)SRB_configList2,
sizeof(SRB_ToAddModList_t));
...
...
@@ -3795,6 +3797,8 @@ rrc_eNB_generate_handover_reconfiguration(
memcpy((void*)ue_context_pP->ue_context.handover_info->as_config.sourceRadioResourceConfig.physicalConfigDedicated,
(void*)ue_context_pP->ue_context.physicalConfigDedicated,
sizeof(PhysicalConfigDedicated_t));
#endif
/* memcpy((void *)rrc_inst->handover_info[ue_mod_idP]->as_config.sourceRadioResourceConfig.sps_Config,
(void *)rrc_inst->sps_Config[ue_mod_idP],
sizeof(SPS_Config_t));
...
...
@@ -3845,9 +3849,11 @@ rrc_eNB_generate_handover_reconfiguration(
// rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->reportConfigToAddModList = ReportConfig_list;
memset
(
buffer
,
0
,
RRC_BUF_SIZE
);
size
=
do_RRCConnectionReconfiguration
(
char
rrc_buf
[
1000
/* arbitrary, should be big enough, has to be less than size of return buf by a few bits/bytes */
];
int
rrc_size
;
rrc_size
=
do_RRCConnectionReconfiguration
(
ctxt_pP
,
buffer
,
(
unsigned
char
*
)
rrc_buf
,
rrc_eNB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
),
//Transaction_id,
SRB_configList2
,
DRB_configList2
,
...
...
@@ -3870,7 +3876,16 @@ rrc_eNB_generate_handover_reconfiguration(
#endif
);
*
_size
=
size
;
if
(
rrc_size
<=
0
)
{
printf
(
"%s:%d: fatal
\n
"
,
__FILE__
,
__LINE__
);
abort
();
}
char
*
ho_buf
=
(
char
*
)
buffer
;
int
ho_size
;
ho_size
=
do_HandoverCommand
(
ho_buf
,
1024
/* TODO: this is the value found in struct x2ap_handover_req_ack_s for array rrc_buffer */
,
rrc_buf
,
rrc_size
);
*
_size
=
size
=
ho_size
;
LOG_I
(
RRC
,
"[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate RRCConnectionReconfiguration for handover (bytes %d, UE rnti %x)
\n
"
,
...
...
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