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
常顺宇
OpenXG-RAN
Commits
ec67c1c9
Commit
ec67c1c9
authored
7 years ago
by
matzakos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce new executable for the UE (nfapi pnf in stub mode) lte-softmodem-stub
parent
9de8b0fc
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1649 additions
and
14 deletions
+1649
-14
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+47
-1
cmake_targets/build_oai
cmake_targets/build_oai
+1
-0
nfapi/nfapi_pnf.c
nfapi/nfapi_pnf.c
+12
-1
openair1/PHY/defs.h
openair1/PHY/defs.h
+1
-0
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+14
-4
openair2/ENB_APP/enb_config.h
openair2/ENB_APP/enb_config.h
+3
-0
targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf
...s/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf
+3
-3
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+2
-1
targets/RT/USER/lte-softmodem-stub.c
targets/RT/USER/lte-softmodem-stub.c
+1551
-0
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+2
-1
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+13
-3
No files found.
cmake_targets/CMakeLists.txt
View file @
ec67c1c9
...
@@ -1889,6 +1889,52 @@ target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CR
...
@@ -1889,6 +1889,52 @@ target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CR
target_link_libraries
(
lte-softmodem
${
LIB_LMS_LIBRARIES
}
)
target_link_libraries
(
lte-softmodem
${
LIB_LMS_LIBRARIES
}
)
target_link_libraries
(
lte-softmodem
${
T_LIB
}
)
target_link_libraries
(
lte-softmodem
${
T_LIB
}
)
# lte-softmodem-stub is both eNB and UE implementation
###################################################
add_executable
(
lte-softmodem-stub
${
rrc_h
}
${
s1ap_h
}
${
OPENAIR_BIN_DIR
}
/messages_xml.h
${
OPENAIR_TARGETS
}
/RT/USER/rt_wrapper.c
${
OPENAIR_TARGETS
}
/RT/USER/lte-ue.c
${
OPENAIR_TARGETS
}
/RT/USER/lte-enb.c
${
OPENAIR_TARGETS
}
/RT/USER/lte-softmodem-stub.c
${
OPENAIR1_DIR
}
/SIMULATION/TOOLS/taus.c
${
OPENAIR_TARGETS
}
/SIMU/USER/init_lte.c
${
OPENAIR_TARGETS
}
/COMMON/create_tasks.c
${
OPENAIR_TARGETS
}
/ARCH/COMMON/common_lib.c
${
OPENAIR1_DIR
}
/SIMULATION/ETH_TRANSPORT/netlink_init.c
${
OPENAIR3_DIR
}
/NAS/UE/nas_ue_task.c
${
OPENAIR_DIR
}
/common/utils/utils.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
GTPU_need_ITTI
}
${
RTAI_SOURCE
}
${
XFORMS_SOURCE
}
${
XFORMS_SOURCE_SOFTMODEM
}
${
T_SOURCE
}
${
CONFIG_SOURCES
}
${
SHLIB_LOADER_SOURCES
}
)
target_link_libraries
(
lte-softmodem-stub
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2
${
MSC_LIB
}
${
RAL_LIB
}
${
NAS_UE_LIB
}
${
ITTI_LIB
}
${
MIH_LIB
}
${
FLPT_MSG_LIB
}
${
ASYNC_IF_LIB
}
${
FLEXRAN_AGENT_LIB
}
LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB
NFAPI_USER_LIB
-Wl,--end-group z dl
)
target_link_libraries
(
lte-softmodem-stub
${
LIBXML2_LIBRARIES
}
)
target_link_libraries
(
lte-softmodem-stub pthread m
${
CONFIG_LIBRARIES
}
rt crypt
${
CRYPTO_LIBRARIES
}
${
OPENSSL_LIBRARIES
}
${
NETTLE_LIBRARIES
}
sctp
${
XFORMS_LIBRARIES
}
${
PROTOBUF_LIB
}
${
CMAKE_DL_LIBS
}
${
LIBYAML_LIBRARIES
}
)
target_link_libraries
(
lte-softmodem-stub
${
LIB_LMS_LIBRARIES
}
)
target_link_libraries
(
lte-softmodem-stub
${
T_LIB
}
)
# lte-softmodem-nos1 is both eNB and UE implementation
# lte-softmodem-nos1 is both eNB and UE implementation
###################################################
###################################################
add_executable
(
lte-softmodem-nos1
add_executable
(
lte-softmodem-nos1
...
@@ -2181,7 +2227,7 @@ endforeach(myExe)
...
@@ -2181,7 +2227,7 @@ endforeach(myExe)
if
(
${
T_TRACER
}
)
if
(
${
T_TRACER
}
)
foreach
(
i
foreach
(
i
#all "add_executable" definitions (except tests, rb_tool, updatefw)
#all "add_executable" definitions (except tests, rb_tool, updatefw)
lte-softmodem lte-softmodem-nos1 rrh_gw oaisim oaisim_nos1
lte-softmodem lte-softmodem-
stub lte-softmodem-
nos1 rrh_gw oaisim oaisim_nos1
dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim
dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim
pdcchsim pucchsim prachsim syncsim
pdcchsim pucchsim prachsim syncsim
#all "add_library" definitions
#all "add_library" definitions
...
...
This diff is collapsed.
Click to expand it.
cmake_targets/build_oai
View file @
ec67c1c9
...
@@ -506,6 +506,7 @@ function main() {
...
@@ -506,6 +506,7 @@ function main() {
else
else
lte_build_dir
=
lte_build_oai
lte_build_dir
=
lte_build_oai
lte_exec
=
lte-softmodem
lte_exec
=
lte-softmodem
#lte_exec=lte-softmodem-stub
fi
fi
# configuration module libraries, one currently available, using libconfig
# configuration module libraries, one currently available, using libconfig
...
...
This diff is collapsed.
Click to expand it.
nfapi/nfapi_pnf.c
View file @
ec67c1c9
...
@@ -38,8 +38,10 @@ extern pthread_mutex_t nfapi_sync_mutex;
...
@@ -38,8 +38,10 @@ extern pthread_mutex_t nfapi_sync_mutex;
extern
int
nfapi_sync_var
;
extern
int
nfapi_sync_var
;
extern
int
sync_var
;
extern
int
sync_var
;
char
uecap_xer_in
;
extern
void
init_eNB_afterRU
(
void
);
extern
void
init_eNB_afterRU
(
void
);
extern
void
init_UE_stub
(
int
nb_inst
,
int
,
int
);
extern
void
handle_nfapi_dci_dl_pdu
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
nfapi_dl_config_request_pdu_t
*
dl_config_pdu
);
extern
void
handle_nfapi_dci_dl_pdu
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
nfapi_dl_config_request_pdu_t
*
dl_config_pdu
);
extern
void
handle_nfapi_ul_pdu
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
nfapi_ul_config_request_pdu_t
*
ul_config_pdu
,
uint16_t
frame
,
uint8_t
subframe
,
uint8_t
srs_present
);
extern
void
handle_nfapi_ul_pdu
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
nfapi_ul_config_request_pdu_t
*
ul_config_pdu
,
uint16_t
frame
,
uint8_t
subframe
,
uint8_t
srs_present
);
extern
void
handle_nfapi_dlsch_pdu
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
nfapi_dl_config_request_pdu_t
*
dl_config_pdu
,
uint8_t
codeword_index
,
uint8_t
*
sdu
);
extern
void
handle_nfapi_dlsch_pdu
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
nfapi_dl_config_request_pdu_t
*
dl_config_pdu
,
uint8_t
codeword_index
,
uint8_t
*
sdu
);
...
@@ -1409,7 +1411,16 @@ int start_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfapi
...
@@ -1409,7 +1411,16 @@ int start_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfapi
//phy_init_RU(RC.ru[0]);
//phy_init_RU(RC.ru[0]);
printf
(
"[PNF] About to call init_eNB_afterRU()
\n
"
);
printf
(
"[PNF] About to call init_eNB_afterRU()
\n
"
);
// Panos: Instead
/*if (nfapi_mode == 3) {
init_UE_stub(1,0,uecap_xer_in);
}*/
//else{
if
(
nfapi_mode
!=
3
)
{
// Panos
init_eNB_afterRU
();
init_eNB_afterRU
();
}
// Signal to main thread that it can carry on - otherwise RU will startup too quickly and it is not initialised
// Signal to main thread that it can carry on - otherwise RU will startup too quickly and it is not initialised
{
{
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/defs.h
View file @
ec67c1c9
...
@@ -654,6 +654,7 @@ typedef struct {
...
@@ -654,6 +654,7 @@ typedef struct {
/// Panos: Structure holding timer_thread related elements (phy_stub_UE mode)
/// Panos: Structure holding timer_thread related elements (phy_stub_UE mode)
typedef
struct
{
typedef
struct
{
pthread_t
pthread_timer
;
/// Panos: mutex for waiting SF ticking
/// Panos: mutex for waiting SF ticking
pthread_mutex_t
mutex_ticking
;
pthread_mutex_t
mutex_ticking
;
/// Panos: \brief ticking var for ticking thread.
/// Panos: \brief ticking var for ticking thread.
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_config.c
View file @
ec67c1c9
...
@@ -253,17 +253,28 @@ void UE_config_stub_pnf(void) {
...
@@ -253,17 +253,28 @@ void UE_config_stub_pnf(void) {
// Panos: Right now that we have only one UE (thread) it is ok to put the eth_params in the UE_mac_inst.
// Panos: Right now that we have only one UE (thread) it is ok to put the eth_params in the UE_mac_inst.
// Later I think we have to change that to attribute eth_params to a global element for all the UEs.
// Later I think we have to change that to attribute eth_params to a global element for all the UEs.
else
if
(
strcmp
(
*
(
L1_ParamList
.
paramarray
[
j
][
L1_TRANSPORT_N_PREFERENCE_IDX
].
strptr
),
"nfapi"
)
==
0
)
{
else
if
(
strcmp
(
*
(
L1_ParamList
.
paramarray
[
j
][
L1_TRANSPORT_N_PREFERENCE_IDX
].
strptr
),
"nfapi"
)
==
0
)
{
UE_mac_inst
[
0
].
eth_params_n
.
local_if_name
=
strdup
(
*
(
L1_ParamList
.
paramarray
[
j
][
L1_LOCAL_N_IF_NAME_IDX
].
strptr
));
stub_eth_params
.
local_if_name
=
strdup
(
*
(
L1_ParamList
.
paramarray
[
j
][
L1_LOCAL_N_IF_NAME_IDX
].
strptr
));
stub_eth_params
.
my_addr
=
strdup
(
*
(
L1_ParamList
.
paramarray
[
j
][
L1_LOCAL_N_ADDRESS_IDX
].
strptr
));
stub_eth_params
.
remote_addr
=
strdup
(
*
(
L1_ParamList
.
paramarray
[
j
][
L1_REMOTE_N_ADDRESS_IDX
].
strptr
));
stub_eth_params
.
my_portc
=
*
(
L1_ParamList
.
paramarray
[
j
][
L1_LOCAL_N_PORTC_IDX
].
iptr
);
stub_eth_params
.
remote_portc
=
*
(
L1_ParamList
.
paramarray
[
j
][
L1_REMOTE_N_PORTC_IDX
].
iptr
);
stub_eth_params
.
my_portd
=
*
(
L1_ParamList
.
paramarray
[
j
][
L1_LOCAL_N_PORTD_IDX
].
iptr
);
stub_eth_params
.
remote_portd
=
*
(
L1_ParamList
.
paramarray
[
j
][
L1_REMOTE_N_PORTD_IDX
].
iptr
);
stub_eth_params
.
transp_preference
=
ETH_UDP_MODE
;
/*UE_mac_inst[0].eth_params_n.local_if_name = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr));
UE_mac_inst[0].eth_params_n.my_addr = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr));
UE_mac_inst[0].eth_params_n.my_addr = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr));
UE_mac_inst[0].eth_params_n.remote_addr = strdup(*(L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr));
UE_mac_inst[0].eth_params_n.remote_addr = strdup(*(L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr));
UE_mac_inst[0].eth_params_n.my_portc = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr);
UE_mac_inst[0].eth_params_n.my_portc = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr);
UE_mac_inst[0].eth_params_n.remote_portc = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTC_IDX].iptr);
UE_mac_inst[0].eth_params_n.remote_portc = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTC_IDX].iptr);
UE_mac_inst[0].eth_params_n.my_portd = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTD_IDX].iptr);
UE_mac_inst[0].eth_params_n.my_portd = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTD_IDX].iptr);
UE_mac_inst[0].eth_params_n.remote_portd = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr);
UE_mac_inst[0].eth_params_n.remote_portd = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr);
UE_mac_inst
[
0
].
eth_params_n
.
transp_preference
=
ETH_UDP_MODE
;
UE_mac_inst[0].eth_params_n.transp_preference = ETH_UDP_MODE;
*/
sf_ahead
=
4
;
// Cannot cope with 4 subframes betweem RX and TX - set it to 2
sf_ahead
=
4
;
// Cannot cope with 4 subframes betweem RX and TX - set it to 2
configure_nfapi_pnf
(
UE_mac_inst
[
0
].
eth_params_n
.
remote_addr
,
UE_mac_inst
[
0
].
eth_params_n
.
remote_portc
,
UE_mac_inst
[
0
].
eth_params_n
.
my_addr
,
UE_mac_inst
[
0
].
eth_params_n
.
my_portd
,
UE_mac_inst
[
0
].
eth_params_n
.
remote_portd
);
//configure_nfapi_pnf(UE_mac_inst[0].eth_params_n.remote_addr, UE_mac_inst[0].eth_params_n.remote_portc, UE_mac_inst[0].eth_params_n.my_addr, UE_mac_inst[0].eth_params_n.my_portd, UE_mac_inst[0].eth_params_n.remote_portd);
configure_nfapi_pnf
(
stub_eth_params
.
remote_addr
,
stub_eth_params
.
remote_portc
,
stub_eth_params
.
my_addr
,
stub_eth_params
.
my_portd
,
stub_eth_params
.
remote_portd
);
}
}
else
{
// other midhaul
else
{
// other midhaul
}
}
...
@@ -2934,7 +2945,6 @@ void RCConfig(void) {
...
@@ -2934,7 +2945,6 @@ void RCConfig(void) {
RC
.
nb_macrlc_inst
=
MACRLCParamList
.
numelt
;
RC
.
nb_macrlc_inst
=
MACRLCParamList
.
numelt
;
// Get num L1 instances
// Get num L1 instances
config_getlist
(
&
L1ParamList
,
NULL
,
0
,
NULL
);
config_getlist
(
&
L1ParamList
,
NULL
,
0
,
NULL
);
//config_getlist( &L1_ParamList,L1_Params,sizeof(L1_Params)/sizeof(paramdef_t), NULL);
RC
.
nb_L1_inst
=
L1ParamList
.
numelt
;
RC
.
nb_L1_inst
=
L1ParamList
.
numelt
;
// Get num RU instances
// Get num RU instances
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_config.h
View file @
ec67c1c9
...
@@ -93,9 +93,12 @@ typedef struct ru_config_s {
...
@@ -93,9 +93,12 @@ typedef struct ru_config_s {
uint8_t
if_compress
;
uint8_t
if_compress
;
}
ru_config_t
;
}
ru_config_t
;
eth_params_t
stub_eth_params
;
extern
void
RCconfig_RU
(
void
);
extern
void
RCconfig_RU
(
void
);
extern
void
RCconfig_L1
(
void
);
extern
void
RCconfig_L1
(
void
);
extern
void
RCconfig_macrlc
(
void
);
extern
void
RCconfig_macrlc
(
void
);
extern
void
UE_config_stub_pnf
(
void
);
extern
int
RCconfig_gtpu
(
void
);
extern
int
RCconfig_gtpu
(
void
);
extern
void
RCConfig
(
void
);
extern
void
RCConfig
(
void
);
...
...
This diff is collapsed.
Click to expand it.
targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf
View file @
ec67c1c9
...
@@ -19,9 +19,9 @@ L1s = (
...
@@ -19,9 +19,9 @@ L1s = (
{
{
num_cc
=
1
;
num_cc
=
1
;
tr_n_preference
=
"nfapi"
;
tr_n_preference
=
"nfapi"
;
local_n_if_name
=
"e
no1
"
;
local_n_if_name
=
"e
th0
"
;
remote_n_address
=
"1
92.168.1.28
"
;
remote_n_address
=
"1
0.0.0.20
"
;
local_n_address
=
"1
92.168.1.74
"
;
local_n_address
=
"1
0.0.0.10
"
;
local_n_portc
=
50000
;
local_n_portc
=
50000
;
remote_n_portc
=
50001
;
remote_n_portc
=
50001
;
local_n_portd
=
50010
;
local_n_portd
=
50010
;
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-enb.c
View file @
ec67c1c9
...
@@ -121,7 +121,8 @@ extern int transmission_mode;
...
@@ -121,7 +121,8 @@ extern int transmission_mode;
extern
int
oaisim_flag
;
extern
int
oaisim_flag
;
uint16_t
sf_ahead
=
4
;
//uint16_t sf_ahead=4;
extern
uint16_t
sf_ahead
;
//pthread_t main_eNB_thread;
//pthread_t main_eNB_thread;
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-softmodem-stub.c
0 → 100644
View file @
ec67c1c9
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-softmodem.c
View file @
ec67c1c9
...
@@ -118,6 +118,8 @@ int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
...
@@ -118,6 +118,8 @@ int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
uint8_t
nfapi_mode
=
0
;
uint8_t
nfapi_mode
=
0
;
uint16_t
sf_ahead
=
4
;
pthread_cond_t
sync_cond
;
pthread_cond_t
sync_cond
;
pthread_mutex_t
sync_mutex
;
pthread_mutex_t
sync_mutex
;
int
sync_var
=-
1
;
//!< protected by mutex \ref sync_mutex.
int
sync_var
=-
1
;
//!< protected by mutex \ref sync_mutex.
...
@@ -937,7 +939,6 @@ int main( int argc, char **argv )
...
@@ -937,7 +939,6 @@ int main( int argc, char **argv )
// set default parameters
// set default parameters
if
(
UE_flag
==
1
)
set_default_frame_parms
(
frame_parms
);
if
(
UE_flag
==
1
)
set_default_frame_parms
(
frame_parms
);
logInit
();
logInit
();
printf
(
"Reading in command-line options
\n
"
);
printf
(
"Reading in command-line options
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ue.c
View file @
ec67c1c9
...
@@ -76,6 +76,7 @@ void init_UE_threads(int);
...
@@ -76,6 +76,7 @@ void init_UE_threads(int);
void
init_UE_threads_stub
(
int
);
void
init_UE_threads_stub
(
int
);
void
*
UE_thread
(
void
*
arg
);
void
*
UE_thread
(
void
*
arg
);
void
init_UE
(
int
nb_inst
,
int
,
int
);
void
init_UE
(
int
nb_inst
,
int
,
int
);
void
init_UE_stub
(
int
nb_inst
,
int
,
int
);
extern
void
oai_subframe_ind
(
uint16_t
sfn
,
uint16_t
sf
);
extern
void
oai_subframe_ind
(
uint16_t
sfn
,
uint16_t
sf
);
//extern int tx_req_UE_MAC1();
//extern int tx_req_UE_MAC1();
...
@@ -1408,17 +1409,18 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg)
...
@@ -1408,17 +1409,18 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg)
return
0
;
return
0
;
}
}
// Panos: This timer thread is used only in the phy_sub mode as an independent timer
// Panos: This timer thread is used only in the phy_sub mode as an independent timer
// which will be ticking and provide the SFN/SF values that will be used from the UE threads
// which will be ticking and provide the SFN/SF values that will be used from the UE threads
// playing the role of nfapi-pnf.
// playing the role of nfapi-pnf.
static
void
*
timer_thread
(
void
*
param
)
{
static
void
*
timer_thread
(
void
*
param
)
{
timer_subframe
=
9
;
timer_subframe
=
9
;
timer_frame
=
1023
;
timer_frame
=
1023
;
phy_stub_ticking
=
(
SF_ticking
*
)
malloc
(
sizeof
(
SF_ticking
));
//
phy_stub_ticking = (SF_ticking*)malloc(sizeof(SF_ticking));
phy_stub_ticking
->
ticking_var
=
-
1
;
phy_stub_ticking
->
ticking_var
=
-
1
;
wait_sync
(
"timer_thread"
);
wait_sync
(
"timer_thread"
);
pthread_mutex_init
(
&
phy_stub_ticking
->
mutex_ticking
,
NULL
);
//
pthread_mutex_init(&phy_stub_ticking->mutex_ticking,NULL);
pthread_cond_init
(
&
phy_stub_ticking
->
cond_ticking
,
NULL
);
//
pthread_cond_init(&phy_stub_ticking->cond_ticking,NULL);
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
usleep
(
1000
);
usleep
(
1000
);
...
@@ -1454,6 +1456,14 @@ static void* timer_thread( void* param ) {
...
@@ -1454,6 +1456,14 @@ static void* timer_thread( void* param ) {
}
}
int
init_timer_thread
(
void
)
{
phy_stub_ticking
=
(
SF_ticking
*
)
malloc
(
sizeof
(
SF_ticking
));
pthread_mutex_init
(
&
phy_stub_ticking
->
mutex_ticking
,
NULL
);
pthread_cond_init
(
&
phy_stub_ticking
->
cond_ticking
,
NULL
);
pthread_create
(
phy_stub_ticking
->
pthread_timer
,
NULL
,
&
timer_thread
,
NULL
);
return
0
;
}
...
...
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