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
5e20c970
Commit
5e20c970
authored
Dec 09, 2017
by
shahab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
warning decreasing
parent
dc9cada6
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
30 deletions
+19
-30
openair2/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c
openair2/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c
+1
-1
openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
+3
-5
openair2/ENB_APP/flexran_agent_async.c
openair2/ENB_APP/flexran_agent_async.c
+2
-2
openair2/ENB_APP/flexran_agent_common_internal.c
openair2/ENB_APP/flexran_agent_common_internal.c
+2
-5
openair2/ENB_APP/flexran_agent_handler.c
openair2/ENB_APP/flexran_agent_handler.c
+1
-1
openair2/ENB_APP/flexran_agent_net_comm.c
openair2/ENB_APP/flexran_agent_net_comm.c
+4
-4
openair2/ENB_APP/flexran_agent_ran_api.c
openair2/ENB_APP/flexran_agent_ran_api.c
+4
-10
openair2/UTIL/ASYNC_IF/ringbuffer_queue.c
openair2/UTIL/ASYNC_IF/ringbuffer_queue.c
+1
-1
openair2/UTIL/ASYNC_IF/ringbuffer_queue.h
openair2/UTIL/ASYNC_IF/ringbuffer_queue.h
+1
-1
No files found.
openair2/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c
View file @
5e20c970
...
@@ -77,7 +77,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
...
@@ -77,7 +77,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
// Protocol__FlexHeader *header;
// Protocol__FlexHeader *header;
int
i
,
j
,
k
;
int
i
;
// int cc_id = 0;
// int cc_id = 0;
...
...
openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
View file @
5e20c970
...
@@ -262,11 +262,11 @@ int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg) {
...
@@ -262,11 +262,11 @@ int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg) {
/* this is called by RRC as a part of rrc xface . The controller previously requested this*/
/* this is called by RRC as a part of rrc xface . The controller previously requested this*/
void
flexran_trigger_rrc_measurements
(
mid_t
mod_id
,
MeasResults_t
*
measResults
)
{
void
flexran_trigger_rrc_measurements
(
mid_t
mod_id
,
MeasResults_t
*
measResults
)
{
int
i
,
m
,
k
;
int
i
;
// int priority = 0; // Warning Preventing
// int priority = 0; // Warning Preventing
// void *data;
// void *data;
// int size;
// int size;
err_code_t
err_code
=
-
100
;
//
err_code_t err_code = -100;
triggered_rrc
=
true
;
triggered_rrc
=
true
;
int
num
;
int
num
;
...
@@ -490,9 +490,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
...
@@ -490,9 +490,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
// Protocol__FlexHeader *header;
// Protocol__FlexHeader *header;
int
i
,
j
,
k
;
int
i
;
// int cc_id = 0;
int
enb_id
=
mod_id
;
/* Allocate memory for list of UE reports */
/* Allocate memory for list of UE reports */
if
(
report_config
->
nr_ue
>
0
)
{
if
(
report_config
->
nr_ue
>
0
)
{
...
...
openair2/ENB_APP/flexran_agent_async.c
View file @
5e20c970
...
@@ -68,12 +68,12 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
...
@@ -68,12 +68,12 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
error:
error:
LOG_I
(
FLEXRAN_AGENT
,
"there was an error
\n
"
);
LOG_I
(
FLEXRAN_AGENT
,
"there was an error
\n
"
);
return
1
;
return
NULL
;
}
}
int
flexran_agent_async_msg_send
(
void
*
data
,
int
size
,
int
priority
,
void
*
channel_info
)
{
int
flexran_agent_async_msg_send
(
void
*
data
,
int
size
,
int
priority
,
void
*
channel_info
)
{
flexran_agent_async_channel_t
*
channel
;
flexran_agent_async_channel_t
*
channel
;
channel
=
(
flexran_agent_channel_t
*
)
channel_info
;
channel
=
(
flexran_agent_
async_
channel_t
*
)
channel_info
;
return
message_put
(
channel
->
send_queue
,
data
,
size
,
priority
);
return
message_put
(
channel
->
send_queue
,
data
,
size
,
priority
);
}
}
...
...
openair2/ENB_APP/flexran_agent_common_internal.c
View file @
5e20c970
...
@@ -129,10 +129,8 @@ int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy
...
@@ -129,10 +129,8 @@ int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy
int
parse_enb_id
(
mid_t
mod_id
,
yaml_parser_t
*
parser
)
{
int
parse_enb_id
(
mid_t
mod_id
,
yaml_parser_t
*
parser
)
{
yaml_event_t
event
;
yaml_event_t
event
;
void
*
param
;
char
*
endptr
;
char
*
endptr
;
int
is_array
=
0
;
// int is_array;
int
i
=
0
;
int
done
=
0
;
int
done
=
0
;
int
mapping_started
=
0
;
int
mapping_started
=
0
;
...
@@ -145,7 +143,7 @@ int parse_enb_id(mid_t mod_id, yaml_parser_t *parser) {
...
@@ -145,7 +143,7 @@ int parse_enb_id(mid_t mod_id, yaml_parser_t *parser) {
switch
(
event
.
type
)
{
switch
(
event
.
type
)
{
// We are expecting a mapping of parameters
// We are expecting a mapping of parameters
case
YAML_SEQUENCE_START_EVENT
:
case
YAML_SEQUENCE_START_EVENT
:
is_array
=
1
;
//
is_array = 1;
break
;
break
;
case
YAML_MAPPING_START_EVENT
:
case
YAML_MAPPING_START_EVENT
:
LOG_D
(
ENB_APP
,
"The mapping of the parameters started
\n
"
);
LOG_D
(
ENB_APP
,
"The mapping of the parameters started
\n
"
);
...
@@ -193,7 +191,6 @@ int parse_enb_id(mid_t mod_id, yaml_parser_t *parser) {
...
@@ -193,7 +191,6 @@ int parse_enb_id(mid_t mod_id, yaml_parser_t *parser) {
int
parse_enb_config_parameters
(
mid_t
mod_id
,
yaml_parser_t
*
parser
)
{
int
parse_enb_config_parameters
(
mid_t
mod_id
,
yaml_parser_t
*
parser
)
{
yaml_event_t
event
;
yaml_event_t
event
;
void
*
param
;
char
*
endptr
;
char
*
endptr
;
int
done
=
0
;
int
done
=
0
;
...
...
openair2/ENB_APP/flexran_agent_handler.c
View file @
5e20c970
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include "flexran_agent_common.h"
#include "flexran_agent_common.h"
#include "flexran_agent_mac.h"
#include "flexran_agent_mac.h"
#include "flexran_agent_rrc.h"
#include "flexran_agent_rrc.h"
#include "flexran_agent_pdcp.h"
#include "flexran_agent_timer.h"
#include "flexran_agent_timer.h"
#include "flexran_agent_ran_api.h"
#include "flexran_agent_ran_api.h"
#include "log.h"
#include "log.h"
...
@@ -97,7 +98,6 @@ Protocol__FlexranMessage* flexran_agent_handle_message (mid_t mod_id,
...
@@ -97,7 +98,6 @@ Protocol__FlexranMessage* flexran_agent_handle_message (mid_t mod_id,
err_code
=
PROTOCOL__FLEXRAN_ERR__MSG_DECODING
;
err_code
=
PROTOCOL__FLEXRAN_ERR__MSG_DECODING
;
goto
error
;
goto
error
;
}
}
// printf("==================> %d %d \n", decoded_message->msg_case, decoded_message->msg_dir);
if
((
decoded_message
->
msg_case
>
sizeof
(
agent_messages_callback
)
/
(
3
*
sizeof
(
flexran_agent_message_decoded_callback
)))
||
if
((
decoded_message
->
msg_case
>
sizeof
(
agent_messages_callback
)
/
(
3
*
sizeof
(
flexran_agent_message_decoded_callback
)))
||
(
decoded_message
->
msg_dir
>
PROTOCOL__FLEXRAN_DIRECTION__UNSUCCESSFUL_OUTCOME
)){
(
decoded_message
->
msg_dir
>
PROTOCOL__FLEXRAN_DIRECTION__UNSUCCESSFUL_OUTCOME
)){
err_code
=
PROTOCOL__FLEXRAN_ERR__MSG_NOT_HANDLED
;
err_code
=
PROTOCOL__FLEXRAN_ERR__MSG_NOT_HANDLED
;
...
...
openair2/ENB_APP/flexran_agent_net_comm.c
View file @
5e20c970
...
@@ -141,9 +141,9 @@ int flexran_agent_destroy_channel(int channel_id) {
...
@@ -141,9 +141,9 @@ int flexran_agent_destroy_channel(int channel_id) {
for
(
i
=
0
;
i
<
NUM_MAX_ENB
;
i
++
)
{
for
(
i
=
0
;
i
<
NUM_MAX_ENB
;
i
++
)
{
for
(
j
=
0
;
j
<
FLEXRAN_AGENT_MAX
;
j
++
)
{
for
(
j
=
0
;
j
<
FLEXRAN_AGENT_MAX
;
j
++
)
{
if
(
agent_channel
[
i
][
j
]
!=
NULL
)
{
if
(
agent_channel
[
i
][
j
]
!=
NULL
)
{
if
(
agent_channel
[
i
][
j
]
->
channel_id
==
e
->
channel_id
)
{
if
(
agent_channel
[
i
][
j
]
->
channel_id
==
e
->
channel_id
)
{
agent_channel
[
i
][
j
]
==
NULL
;
free
(
agent_channel
[
i
][
j
])
;
}
}
}
}
}
}
}
}
...
@@ -164,7 +164,7 @@ err_code_t flexran_agent_init_channel_container(void) {
...
@@ -164,7 +164,7 @@ err_code_t flexran_agent_init_channel_container(void) {
for
(
i
=
0
;
i
<
NUM_MAX_ENB
;
i
++
)
{
for
(
i
=
0
;
i
<
NUM_MAX_ENB
;
i
++
)
{
for
(
j
=
0
;
j
<
FLEXRAN_AGENT_MAX
;
j
++
)
{
for
(
j
=
0
;
j
<
FLEXRAN_AGENT_MAX
;
j
++
)
{
agent_channel
[
i
][
j
]
=
=
NULL
;
agent_channel
[
i
][
j
]
=
malloc
(
sizeof
(
flexran_agent_channel_t
))
;
}
}
}
}
...
...
openair2/ENB_APP/flexran_agent_ran_api.c
View file @
5e20c970
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
void
*
enb
[
NUM_MAX_ENB
];
void
*
enb
[
NUM_MAX_ENB
];
void
*
enb_ue
[
NUM_MAX_ENB
];
void
*
enb_ue
[
NUM_MAX_ENB
];
void
*
enb_rrc
[
NUM_MAX_ENB
];
void
*
enb_rrc
[
NUM_MAX_ENB
];
Enb_properties_array_t
*
enb_properties
;
void
flexran_set_enb_vars
(
mid_t
mod_id
,
ran_name_t
ran
){
void
flexran_set_enb_vars
(
mid_t
mod_id
,
ran_name_t
ran
){
...
@@ -47,10 +48,12 @@ void flexran_set_enb_vars(mid_t mod_id, ran_name_t ran){
...
@@ -47,10 +48,12 @@ void flexran_set_enb_vars(mid_t mod_id, ran_name_t ran){
enb
[
mod_id
]
=
NULL
;
enb
[
mod_id
]
=
NULL
;
enb_ue
[
mod_id
]
=
NULL
;
enb_ue
[
mod_id
]
=
NULL
;
enb_rrc
[
mod_id
]
=
NULL
;
enb_rrc
[
mod_id
]
=
NULL
;
enb_properties
=
NULL
;
}
else
{
}
else
{
enb
[
mod_id
]
=
(
void
*
)
&
eNB_mac_inst
[
mod_id
];
enb
[
mod_id
]
=
(
void
*
)
&
eNB_mac_inst
[
mod_id
];
enb_ue
[
mod_id
]
=
(
void
*
)
&
eNB_mac_inst
[
mod_id
].
UE_list
;
enb_ue
[
mod_id
]
=
(
void
*
)
&
eNB_mac_inst
[
mod_id
].
UE_list
;
enb_rrc
[
mod_id
]
=
(
void
*
)
&
eNB_rrc_inst
[
mod_id
];
enb_rrc
[
mod_id
]
=
(
void
*
)
&
eNB_rrc_inst
[
mod_id
];
enb_properties
=
(
Enb_properties_array_t
*
)
enb_config_get
();
}
}
break
;
break
;
default
:
default
:
...
@@ -1039,52 +1042,43 @@ int flexran_get_antenna_ports(mid_t mod_id, int CC_id){
...
@@ -1039,52 +1042,43 @@ int flexran_get_antenna_ports(mid_t mod_id, int CC_id){
uint32_t
flexran_agent_get_operating_dl_freq
(
mid_t
mod_id
,
int
cc_id
)
{
uint32_t
flexran_agent_get_operating_dl_freq
(
mid_t
mod_id
,
int
cc_id
)
{
const
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
return
(
enb_properties
->
properties
[
mod_id
]
->
downlink_frequency
[
cc_id
]
/
1000000
);
return
(
enb_properties
->
properties
[
mod_id
]
->
downlink_frequency
[
cc_id
]
/
1000000
);
}
}
uint32_t
flexran_agent_get_operating_ul_freq
(
mid_t
mod_id
,
int
cc_id
)
{
uint32_t
flexran_agent_get_operating_ul_freq
(
mid_t
mod_id
,
int
cc_id
)
{
const
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
return
((
enb_properties
->
properties
[
mod_id
]
->
downlink_frequency
[
cc_id
]
+
enb_properties
->
properties
[
0
]
->
uplink_frequency_offset
[
cc_id
])
/
1000000
);
return
((
enb_properties
->
properties
[
mod_id
]
->
downlink_frequency
[
cc_id
]
+
enb_properties
->
properties
[
0
]
->
uplink_frequency_offset
[
cc_id
])
/
1000000
);
}
}
int
flexran_agent_get_operating_eutra_band
(
mid_t
mod_id
,
int
cc_id
)
{
int
flexran_agent_get_operating_eutra_band
(
mid_t
mod_id
,
int
cc_id
)
{
const
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
return
enb_properties
->
properties
[
mod_id
]
->
eutra_band
[
cc_id
];
return
enb_properties
->
properties
[
mod_id
]
->
eutra_band
[
cc_id
];
}
}
int
flexran_agent_get_operating_pdsch_refpower
(
mid_t
mod_id
,
int
cc_id
)
{
int
flexran_agent_get_operating_pdsch_refpower
(
mid_t
mod_id
,
int
cc_id
)
{
const
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
return
enb_properties
->
properties
[
mod_id
]
->
pdsch_referenceSignalPower
[
cc_id
];
return
enb_properties
->
properties
[
mod_id
]
->
pdsch_referenceSignalPower
[
cc_id
];
}
}
int
flexran_agent_get_operating_pusch_p0
(
mid_t
mod_id
,
int
cc_id
)
{
int
flexran_agent_get_operating_pusch_p0
(
mid_t
mod_id
,
int
cc_id
)
{
const
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
return
enb_properties
->
properties
[
mod_id
]
->
pusch_p0_Nominal
[
cc_id
];
return
enb_properties
->
properties
[
mod_id
]
->
pusch_p0_Nominal
[
cc_id
];
}
}
void
flexran_agent_set_operating_dl_freq
(
mid_t
mod_id
,
int
cc_id
,
uint32_t
dl_freq_mhz
)
{
void
flexran_agent_set_operating_dl_freq
(
mid_t
mod_id
,
int
cc_id
,
uint32_t
dl_freq_mhz
)
{
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
enb_properties
->
properties
[
mod_id
]
->
downlink_frequency
[
cc_id
]
=
dl_freq_mhz
*
1000000
;
enb_properties
->
properties
[
mod_id
]
->
downlink_frequency
[
cc_id
]
=
dl_freq_mhz
*
1000000
;
/*printf("[ENB_APP] mod id %d ccid %d dl freq %d/%d\n", mod_id, cc_id, dl_freq_mhz, enb_properties->properties[mod_id]->downlink_frequency[cc_id]); */
/*printf("[ENB_APP] mod id %d ccid %d dl freq %d/%d\n", mod_id, cc_id, dl_freq_mhz, enb_properties->properties[mod_id]->downlink_frequency[cc_id]); */
}
}
void
flexran_agent_set_operating_ul_freq
(
mid_t
mod_id
,
int
cc_id
,
int32_t
ul_freq_offset_mhz
)
{
void
flexran_agent_set_operating_ul_freq
(
mid_t
mod_id
,
int
cc_id
,
int32_t
ul_freq_offset_mhz
)
{
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
enb_properties
->
properties
[
mod_id
]
->
uplink_frequency_offset
[
cc_id
]
=
ul_freq_offset_mhz
*
1000000
;
enb_properties
->
properties
[
mod_id
]
->
uplink_frequency_offset
[
cc_id
]
=
ul_freq_offset_mhz
*
1000000
;
}
}
//TBD
//TBD
void
flexran_agent_set_operating_eutra_band
(
mid_t
mod_id
,
int
cc_id
)
{
void
flexran_agent_set_operating_eutra_band
(
mid_t
mod_id
,
int
cc_id
)
{
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
enb_properties
->
properties
[
mod_id
]
->
eutra_band
[
cc_id
]
=
7
;
enb_properties
->
properties
[
mod_id
]
->
eutra_band
[
cc_id
]
=
7
;
}
}
void
flexran_agent_set_operating_bandwidth
(
mid_t
mod_id
,
int
cc_id
,
int
bandwidth
)
{
void
flexran_agent_set_operating_bandwidth
(
mid_t
mod_id
,
int
cc_id
,
int
bandwidth
)
{
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
enb_properties
->
properties
[
mod_id
]
->
N_RB_DL
[
cc_id
]
=
bandwidth
;
enb_properties
->
properties
[
mod_id
]
->
N_RB_DL
[
cc_id
]
=
bandwidth
;
}
}
void
flexran_agent_set_operating_frame_type
(
mid_t
mod_id
,
int
cc_id
,
int
frame_type
)
{
void
flexran_agent_set_operating_frame_type
(
mid_t
mod_id
,
int
cc_id
,
int
frame_type
)
{
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
enb_properties
->
properties
[
mod_id
]
->
frame_type
[
cc_id
]
=
frame_type
;
enb_properties
->
properties
[
mod_id
]
->
frame_type
[
cc_id
]
=
frame_type
;
}
}
...
...
openair2/UTIL/ASYNC_IF/ringbuffer_queue.c
View file @
5e20c970
...
@@ -117,7 +117,7 @@ int message_get(message_queue_t *queue, void **data, int *size, int *priority) {
...
@@ -117,7 +117,7 @@ int message_get(message_queue_t *queue, void **data, int *size, int *priority) {
return
0
;
return
0
;
}
}
message_queue_t
destroy_message_queue
(
message_queue_t
*
queue
)
{
void
destroy_message_queue
(
message_queue_t
*
queue
)
{
struct
lfds700_misc_prng_state
ls
;
struct
lfds700_misc_prng_state
ls
;
message_t
*
m
;
message_t
*
m
;
...
...
openair2/UTIL/ASYNC_IF/ringbuffer_queue.h
View file @
5e20c970
...
@@ -48,6 +48,6 @@ typedef struct {
...
@@ -48,6 +48,6 @@ typedef struct {
message_queue_t
*
new_message_queue
(
int
size
);
message_queue_t
*
new_message_queue
(
int
size
);
int
message_put
(
message_queue_t
*
queue
,
void
*
data
,
int
size
,
int
priority
);
int
message_put
(
message_queue_t
*
queue
,
void
*
data
,
int
size
,
int
priority
);
int
message_get
(
message_queue_t
*
queue
,
void
**
data
,
int
*
size
,
int
*
priority
);
int
message_get
(
message_queue_t
*
queue
,
void
**
data
,
int
*
size
,
int
*
priority
);
message_queue_t
destroy_message_queue
(
message_queue_t
*
queue
);
void
destroy_message_queue
(
message_queue_t
*
queue
);
#endif
/* RINGBUFFER_QUEUE_H */
#endif
/* RINGBUFFER_QUEUE_H */
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