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
2f9bb850
Commit
2f9bb850
authored
Jul 01, 2022
by
Manu Agrawal
Browse files
Options
Browse Files
Download
Plain Diff
SYS IND task & Port Changes
parents
366df745
31ec1b80
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
328 additions
and
3 deletions
+328
-3
ci-scripts/conf_files/firecell/proxy_rcc.band1.tm1.nfapi.conf
...cripts/conf_files/firecell/proxy_rcc.band1.tm1.nfapi.conf
+1
-0
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
common/utils/ocp_itti/intertask_interface.h
common/utils/ocp_itti/intertask_interface.h
+1
-0
openair2/COMMON/ss_messages_def.h
openair2/COMMON/ss_messages_def.h
+2
-0
openair2/COMMON/ss_messages_types.h
openair2/COMMON/ss_messages_types.h
+15
-0
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+3
-2
openair2/ENB_APP/enb_paramdef.h
openair2/ENB_APP/enb_paramdef.h
+4
-1
openair2/LAYER2/MAC/eNB_scheduler_RA.c
openair2/LAYER2/MAC/eNB_scheduler_RA.c
+12
-0
openair3/SS/ss_eNB_sysind_task.c
openair3/SS/ss_eNB_sysind_task.c
+276
-0
openair3/SS/ss_eNB_sysind_task.h
openair3/SS/ss_eNB_sysind_task.h
+8
-0
targets/ARCH/SS/ss_config.h
targets/ARCH/SS/ss_config.h
+1
-0
targets/COMMON/create_tasks.c
targets/COMMON/create_tasks.c
+4
-0
No files found.
ci-scripts/conf_files/firecell/proxy_rcc.band1.tm1.nfapi.conf
View file @
2f9bb850
...
@@ -176,6 +176,7 @@ SSConfig = (
...
@@ -176,6 +176,7 @@ SSConfig = (
Srb_port
=
7778
;
#Port Number for System Simulator Srb Port
Srb_port
=
7778
;
#Port Number for System Simulator Srb Port
Vng_port
=
7779
;
#Port Number for System Simulator VNG Port
Vng_port
=
7779
;
#Port Number for System Simulator VNG Port
Vtp_port
=
7780
;
#Port Number for System Simulator VTP Port
Vtp_port
=
7780
;
#Port Number for System Simulator VTP Port
SysInd_port
=
7782
;
#Port Number for System Simulator SysIND Port
SSMode
=
1
;
#SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
SSMode
=
1
;
#SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
}
}
);
);
...
...
cmake_targets/CMakeLists.txt
View file @
2f9bb850
...
@@ -2074,6 +2074,7 @@ include_directories (SIDL_SRC_DIR ${SIDL_DIR}/ser/api)
...
@@ -2074,6 +2074,7 @@ include_directories (SIDL_SRC_DIR ${SIDL_DIR}/ser/api)
set
(
SS_SRC
set
(
SS_SRC
${
OPENAIR3_DIR
}
/SS/ss_eNB_port_man_task.c
${
OPENAIR3_DIR
}
/SS/ss_eNB_port_man_task.c
${
OPENAIR3_DIR
}
/SS/ss_eNB_sys_task.c
${
OPENAIR3_DIR
}
/SS/ss_eNB_sys_task.c
${
OPENAIR3_DIR
}
/SS/ss_eNB_sysind_task.c
${
OPENAIR3_DIR
}
/SS/ss_eNB_srb_task.c
${
OPENAIR3_DIR
}
/SS/ss_eNB_srb_task.c
${
OPENAIR3_DIR
}
/SS/ss_eNB_vng_task.c
${
OPENAIR3_DIR
}
/SS/ss_eNB_vng_task.c
${
OPENAIR3_DIR
}
/SS/ss_eNB_vtp_task.c
${
OPENAIR3_DIR
}
/SS/ss_eNB_vtp_task.c
...
...
common/utils/ocp_itti/intertask_interface.h
View file @
2f9bb850
...
@@ -328,6 +328,7 @@ void *rrc_enb_process_msg(void *);
...
@@ -328,6 +328,7 @@ void *rrc_enb_process_msg(void *);
TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_PORTMAN, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_PORTMAN, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SYS, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SYS, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_SYSIND, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_SRB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_SRB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_SRB_ACP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_SRB_ACP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_VNG, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_VNG, TASK_PRIORITY_MED, 200, NULL, NULL) \
...
...
openair2/COMMON/ss_messages_def.h
View file @
2f9bb850
...
@@ -42,3 +42,5 @@ MESSAGE_DEF(SS_VT_TIME_OUT, MESSAGE_PRIORITY_MED, ss_vt_time_o
...
@@ -42,3 +42,5 @@ MESSAGE_DEF(SS_VT_TIME_OUT, MESSAGE_PRIORITY_MED, ss_vt_time_o
MESSAGE_DEF
(
SS_SS_PAGING_IND
,
MESSAGE_PRIORITY_MED
,
ss_paging_ind_t
,
ss_paging_ind
)
MESSAGE_DEF
(
SS_SS_PAGING_IND
,
MESSAGE_PRIORITY_MED
,
ss_paging_ind_t
,
ss_paging_ind
)
MESSAGE_DEF
(
SS_L1MACIND_CTRL
,
MESSAGE_PRIORITY_MED
,
ss_l1macind_ctrl_t
,
ss_l1macind_ctrl
)
MESSAGE_DEF
(
SS_L1MACIND_CTRL
,
MESSAGE_PRIORITY_MED
,
ss_l1macind_ctrl_t
,
ss_l1macind_ctrl
)
MESSAGE_DEF
(
SS_SYSTEM_IND
,
MESSAGE_PRIORITY_MED
,
ss_system_ind_t
,
ss_system_ind
)
openair2/COMMON/ss_messages_types.h
View file @
2f9bb850
...
@@ -52,6 +52,9 @@
...
@@ -52,6 +52,9 @@
#define SS_VT_TIME_OUT(mSGpTR) (mSGpTR)->ittiMsg.ss_vt_time_out
#define SS_VT_TIME_OUT(mSGpTR) (mSGpTR)->ittiMsg.ss_vt_time_out
#define SDU_SIZE (512)
#define SDU_SIZE (512)
/** SYS IND */
#define SS_SYSTEM_IND(mSGpTR) (mSGpTR)->ittiMsg.ss_system_ind
/** PORTMAN */
/** PORTMAN */
typedef
struct
ss_sys_port_msg_ind
{
typedef
struct
ss_sys_port_msg_ind
{
struct
SYSTEM_CTRL_REQ
*
req
;
struct
SYSTEM_CTRL_REQ
*
req
;
...
@@ -224,4 +227,16 @@ typedef struct ss_vtp_proxy_ack_s {
...
@@ -224,4 +227,16 @@ typedef struct ss_vtp_proxy_ack_s {
typedef
struct
ss_vt_time_out_s
{
typedef
struct
ss_vt_time_out_s
{
void
*
msg
;
void
*
msg
;
}
ss_vt_time_out_t
;
}
ss_vt_time_out_t
;
/** SYS IND */
typedef
struct
ss_system_ind_s
{
bool
bitmask
;
//Flag for presence of optional parameter repetitionsPerPreambleAttempt
uint8_t
sfn
;
uint16_t
sf
;
uint8_t
ra_PreambleIndex
;
bool
prtPower_Type
;
uint32_t
repetitionsPerPreambleAttempt
;
}
ss_system_ind_t
;
#endif
/* SS_MESSAGES_TYPES_H_ */
#endif
/* SS_MESSAGES_TYPES_H_ */
openair2/ENB_APP/enb_config.c
View file @
2f9bb850
...
@@ -215,10 +215,11 @@ void RCconfig_ssparam(void) {
...
@@ -215,10 +215,11 @@ void RCconfig_ssparam(void) {
RC
.
ss
.
Srbport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_SRBPORT_IDX
].
iptr
);
RC
.
ss
.
Srbport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_SRBPORT_IDX
].
iptr
);
RC
.
ss
.
Vngport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_VNGPORT_IDX
].
iptr
);
RC
.
ss
.
Vngport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_VNGPORT_IDX
].
iptr
);
RC
.
ss
.
Vtpport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_VTPPORT_IDX
].
iptr
);
RC
.
ss
.
Vtpport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_VTPPORT_IDX
].
iptr
);
RC
.
ss
.
SysIndport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_SYSINDPORT_IDX
].
iptr
);
RC
.
ss
.
mode
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_MODE_IDX
].
iptr
);
RC
.
ss
.
mode
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_MODE_IDX
].
iptr
);
}
}
LOG_A
(
ENB_APP
,
"SS_Config:SSMode %d, hostIp=%s, Sysport=%d, Srbport=%d Vngport=%d
\n
"
,
LOG_A
(
ENB_APP
,
"SS_Config:SSMode %d, hostIp=%s, Sysport=%d, Srbport=%d Vngport=%d
SysIndport=%d
\n
"
,
RC
.
ss
.
mode
,
RC
.
ss
.
hostIp
,
RC
.
ss
.
Sysport
,
RC
.
ss
.
Srbport
,
RC
.
ss
.
Vngport
);
RC
.
ss
.
mode
,
RC
.
ss
.
hostIp
,
RC
.
ss
.
Sysport
,
RC
.
ss
.
Srbport
,
RC
.
ss
.
Vngport
,
RC
.
ss
.
SysIndport
);
}
}
void
RCconfig_macrlc
(
int
macrlc_has_f1
[
MAX_MAC_INST
])
{
void
RCconfig_macrlc
(
int
macrlc_has_f1
[
MAX_MAC_INST
])
{
...
...
openair2/ENB_APP/enb_paramdef.h
View file @
2f9bb850
...
@@ -343,6 +343,7 @@ typedef enum {
...
@@ -343,6 +343,7 @@ typedef enum {
#define CONFIG_SS_SRBPORT "Srb_port"
#define CONFIG_SS_SRBPORT "Srb_port"
#define CONFIG_SS_VNGPORT "Vng_port"
#define CONFIG_SS_VNGPORT "Vng_port"
#define CONFIG_SS_VTPPORT "Vtp_port"
#define CONFIG_SS_VTPPORT "Vtp_port"
#define CONFIG_SS_SYSINDPORT "SysInd_port"
#define CONFIG_SS_MODE "SSMode"
#define CONFIG_SS_MODE "SSMode"
#define CONFIG_SS_HOSTIP_IDX 0
#define CONFIG_SS_HOSTIP_IDX 0
...
@@ -350,7 +351,8 @@ typedef enum {
...
@@ -350,7 +351,8 @@ typedef enum {
#define CONFIG_SS_SRBPORT_IDX 2
#define CONFIG_SS_SRBPORT_IDX 2
#define CONFIG_SS_VNGPORT_IDX 3
#define CONFIG_SS_VNGPORT_IDX 3
#define CONFIG_SS_VTPPORT_IDX 4
#define CONFIG_SS_VTPPORT_IDX 4
#define CONFIG_SS_MODE_IDX 5
#define CONFIG_SS_SYSINDPORT_IDX 5
#define CONFIG_SS_MODE_IDX 6
#define SSPARAMS_DESC { \
#define SSPARAMS_DESC { \
{CONFIG_SS_HOSTIP , NULL, 0, uptr:NULL, defstrval:"0.0.0.0", TYPE_STRING, 0}, \
{CONFIG_SS_HOSTIP , NULL, 0, uptr:NULL, defstrval:"0.0.0.0", TYPE_STRING, 0}, \
...
@@ -358,6 +360,7 @@ typedef enum {
...
@@ -358,6 +360,7 @@ typedef enum {
{CONFIG_SS_SRBPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_SRBPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_VNGPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_VNGPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_VTPPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_VTPPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_SYSINDPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_MODE , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_MODE , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
}
}
...
...
openair2/LAYER2/MAC/eNB_scheduler_RA.c
View file @
2f9bb850
...
@@ -1426,6 +1426,18 @@ initiate_ra_proc(module_id_t module_idP,
...
@@ -1426,6 +1426,18 @@ initiate_ra_proc(module_id_t module_idP,
"[eNB %d][RAPROC] CC_id %d Frame %d Activating RAR generation in Frame %d, subframe %d for process %d, rnti %x, state %d
\n
"
,
"[eNB %d][RAPROC] CC_id %d Frame %d Activating RAR generation in Frame %d, subframe %d for process %d, rnti %x, state %d
\n
"
,
module_idP
,
CC_id
,
frameP
,
ra
[
i
].
Msg2_frame
,
module_idP
,
CC_id
,
frameP
,
ra
[
i
].
Msg2_frame
,
ra
[
i
].
Msg2_subframe
,
i
,
ra
[
i
].
rnti
,
ra
[
i
].
state
);
ra
[
i
].
Msg2_subframe
,
i
,
ra
[
i
].
rnti
,
ra
[
i
].
state
);
// Populate and send the SS_SYSTEM_IND to System Simulator
MessageDef
*
m
=
itti_alloc_new_message
(
TASK_MAC_ENB
,
0
,
SS_SYSTEM_IND
);
SS_SYSTEM_IND
(
m
).
bitmask
=
false
;
SS_SYSTEM_IND
(
m
).
sfn
=
frameP
;
SS_SYSTEM_IND
(
m
).
sf
=
subframeP
;
SS_SYSTEM_IND
(
m
).
ra_PreambleIndex
=
preamble_index
;
SS_SYSTEM_IND
(
m
).
prtPower_Type
=
true
;
SS_SYSTEM_IND
(
m
).
repetitionsPerPreambleAttempt
=
0
;
itti_send_msg_to_task
(
TASK_SS_SYSIND
,
module_idP
,
m
);
LOG_A
(
MAC
,
"MAC Sending SS_SYSTEM_IND to System Simulator
\n
"
);
return
;
return
;
}
}
}
}
...
...
openair3/SS/ss_eNB_sysind_task.c
0 → 100644
View file @
2f9bb850
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdint.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <ifaddrs.h>
#include <net/if.h>
#include <netdb.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/sctp.h>
#include <arpa/inet.h>
#include "intertask_interface.h"
#include "common/ran_context.h"
#include "ss_eNB_context.h"
#include "acpSys.h"
#include "acpSysInd.h"
#include "ss_eNB_sysind_task.h"
extern
RAN_CONTEXT_t
RC
;
SSConfigContext_t
SS_context
;
static
acpCtx_t
ctx_sysind_g
=
NULL
;
static
unsigned
char
*
buffer
=
NULL
;
static
const
size_t
size
=
16
*
1024
;
static
instance_t
instance_g
=
0
;
enum
MsgUserId
{
// user defined IDs should be an int number >= 1
MSG_SysProcess_userId
=
1
,
MSG_SysIndProcessToSS_userId
,
};
//------------------------------------------------------------------------------
/*
* Function : ss_send_sysind_data
* Description: Function to send response to the TTCN/SIDL Client
* In :
* Out:
* newState: No impack on the State
*
*/
static
void
ss_send_sysind_data
(
ss_system_ind_t
*
p_ind
)
{
struct
SYSTEM_IND
ind
=
{};
uint32_t
status
=
0
;
DevAssert
(
p_ind
!=
NULL
);
size_t
msgSize
=
size
;
memset
(
&
ind
,
0
,
sizeof
(
ind
));
ind
.
Common
.
CellId
=
SS_context
.
eutra_cellId
;
// Populated the Routing Info
ind
.
Common
.
RoutingInfo
.
d
=
RoutingInfo_Type_None
;
ind
.
Common
.
RoutingInfo
.
v
.
None
=
true
;
// Populated the Timing Info
ind
.
Common
.
TimingInfo
.
d
=
TimingInfo_Type_SubFrame
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
d
=
SystemFrameNumberInfo_Type_Number
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
v
.
Number
=
p_ind
->
sfn
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
d
=
SubFrameInfo_Type_Number
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
=
p_ind
->
sf
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
HSFN
.
d
=
SystemFrameNumberInfo_Type_Number
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
HSFN
.
v
.
Number
=
0
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
Slot
.
d
=
SlotTimingInfo_Type_Any
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
Slot
.
v
.
Any
=
true
;
ind
.
Common
.
Status
.
d
=
IndicationStatus_Type_Ok
;
ind
.
Common
.
Status
.
v
.
Ok
=
true
;
ind
.
Common
.
RlcBearerRouting
.
d
=
true
;
ind
.
Common
.
RlcBearerRouting
.
v
.
d
=
RlcBearerRouting_Type_EUTRA
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
.
eutra_cellId
;
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] Frame: %d, Subframe: %d, RAPID: %d, PRTPower: %d, BitMask: %d
\n
"
,
p_ind
->
sfn
,
p_ind
->
sf
,
p_ind
->
ra_PreambleIndex
,
p_ind
->
prtPower_Type
,
p_ind
->
bitmask
);
/* Populate and Send the SYSTEM_IND to Client */
ind
.
Indication
.
d
=
SystemIndication_Type_RachPreamble
;
ind
.
Indication
.
v
.
RachPreamble
.
RAPID
=
p_ind
->
ra_PreambleIndex
;
ind
.
Indication
.
v
.
RachPreamble
.
PRTPower
=
p_ind
->
prtPower_Type
;
if
(
p_ind
->
bitmask
)
{
ind
.
Indication
.
v
.
RachPreamble
.
RepetitionsPerPreambleAttempt
.
d
=
true
;
ind
.
Indication
.
v
.
RachPreamble
.
RepetitionsPerPreambleAttempt
.
v
=
p_ind
->
repetitionsPerPreambleAttempt
;
}
/* Encode message */
if
(
acpSysIndProcessToSSEncSrv
(
ctx_sysind_g
,
buffer
,
&
msgSize
,
&
ind
)
!=
0
)
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] acpSysIndProcessToSSEncSrv Failure
\n
"
);
return
;
}
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] Buffer msgSize=%d (!!2) to EUTRACell %d"
,
(
int
)
msgSize
,
SS_context
.
eutra_cellId
);
/* Send message */
status
=
acpSendMsg
(
ctx_sysind_g
,
msgSize
,
buffer
);
if
(
status
!=
0
)
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] acpSendMsg failed. Error : %d on fd: %d
\n
"
,
status
,
acpGetSocketFd
(
ctx_sysind_g
));
return
;
}
else
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] acpSendMsg Success
\n
"
);
}
}
/*
* Function : ss_eNB_sysind_init
* Description: Function handles for initilization of SYSIND task
* In :
* req :
* Out:
* newState: No impack on the State
*
*/
void
ss_eNB_sysind_init
(
void
)
{
IpAddress_t
ipaddr
;
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Starting System Simulator SYSIND Thread
\n
"
);
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
acpConvertIp
(
hostIp
,
&
ipaddr
);
// Port number
int
port
=
RC
.
ss
.
SysIndport
;
const
struct
acpMsgTable
msgTable
[]
=
{
{
"SysIndProcessToSS"
,
MSG_SysIndProcessToSS_userId
},
{
"SysProcess"
,
MSG_SysProcess_userId
},
// The last element should be NULL
{
NULL
,
0
}};
// Arena size to decode received message
const
size_t
aSize
=
32
*
1024
;
// Start listening server and get ACP context,
// after the connection is performed, we can use all services
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_sysind_g
);
if
(
ret
<
0
)
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Connection failure err=%d
\n
"
,
ret
);
return
;
}
int
fd1
=
acpGetSocketFd
(
ctx_sysind_g
);
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Connection performed : %d
\n
"
,
fd1
);
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
assert
(
buffer
);
itti_subscribe_event_fd
(
TASK_SS_SYSIND
,
fd1
);
itti_mark_task_ready
(
TASK_SS_SYSIND
);
}
/*
* Function : ss_eNB_sysind_process_itti_msg
* Description: Funtion Handles the ITTI
* message received from the eNB on SYSIND Port
* In :
* Out:
* newState: No impact on state machine.
*
*/
void
*
ss_eNB_sysind_process_itti_msg
(
void
*
notUsed
)
{
MessageDef
*
received_msg
=
NULL
;
int
result
=
0
;
itti_receive_msg
(
TASK_SS_SYSIND
,
&
received_msg
);
/* Check if there is a packet to handle */
if
(
received_msg
!=
NULL
)
{
switch
(
ITTI_MSG_ID
(
received_msg
))
{
case
SS_SYSTEM_IND
:
{
task_id_t
origin_task
=
ITTI_MSG_ORIGIN_ID
(
received_msg
);
if
(
origin_task
==
TASK_SS_PORTMAN
)
{
LOG_D
(
ENB_APP
,
"[SS_SYSIND] DUMMY WAKEUP receviedfrom PORTMAN state %d
\n
"
,
RC
.
ss
.
State
);
}
else
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Received SS_SYSTEM_IND
\n
"
);
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_CONFIGURED
)
{
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
ss_send_sysind_data
(
&
received_msg
->
ittiMsg
.
ss_system_ind
);
}
else
{
LOG_E
(
ENB_SS
,
"[SS_SYSIND][SS_SYSTEM_IND] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
}
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
};
break
;
case
TERMINATE_MESSAGE
:
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Received TERMINATE_MESSAGE
\n
"
);
itti_exit_task
();
break
;
default:
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Received unhandled message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
break
;
}
}
return
NULL
;
}
/*
* Function : ss_eNB_sysind_task
* Description: Funtion Handles the SYSIND Task
* In :
* req :
* Out:
* newState: No impact on state machine.
*
*/
void
*
ss_eNB_sysind_task
(
void
*
arg
)
{
ss_eNB_sysind_init
();
while
(
1
)
{
(
void
)
ss_eNB_sysind_process_itti_msg
(
NULL
);
}
acpFree
(
buffer
);
return
NULL
;
}
openair3/SS/ss_eNB_sysind_task.h
0 → 100644
View file @
2f9bb850
#ifndef SS_ENB_SYSIND_TASK_H_
#define SS_ENB_SYSIND_TASK_H_
void
ss_eNB_sysind_init
(
void
);
void
*
ss_eNB_sysind_process_itti_msg
(
void
*
);
void
*
ss_eNB_sysind_task
(
void
*
arg
);
#endif
/* SS_ENB_SYSIND_TASK_H_ */
targets/ARCH/SS/ss_config.h
View file @
2f9bb850
...
@@ -56,6 +56,7 @@ typedef struct ss_config_s {
...
@@ -56,6 +56,7 @@ typedef struct ss_config_s {
int
Vngport
;
int
Vngport
;
/** VTP port number */
/** VTP port number */
int
Vtpport
;
int
Vtpport
;
int
SysIndport
;
/** State info */
/** State info */
int
State
;
int
State
;
int
vtp_ready
;
int
vtp_ready
;
...
...
targets/COMMON/create_tasks.c
View file @
2f9bb850
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
# include "ss_eNB_vng_task.h"
# include "ss_eNB_vng_task.h"
# include "ss_eNB_vtp_task.h"
# include "ss_eNB_vtp_task.h"
# include "ss_eNB_vt_timer_task.h"
# include "ss_eNB_vt_timer_task.h"
# include "ss_eNB_sysind_task.h"
extern
RAN_CONTEXT_t
RC
;
extern
RAN_CONTEXT_t
RC
;
...
@@ -69,6 +70,9 @@ int create_tasks(uint32_t enb_nb) {
...
@@ -69,6 +70,9 @@ int create_tasks(uint32_t enb_nb) {
rc
=
itti_create_task
(
TASK_SS_SRB_ACP
,
ss_eNB_srb_acp_task
,
NULL
);
rc
=
itti_create_task
(
TASK_SS_SRB_ACP
,
ss_eNB_srb_acp_task
,
NULL
);
AssertFatal
(
rc
>=
0
,
"Create task for SS SRB ACP failed
\n
"
);
AssertFatal
(
rc
>=
0
,
"Create task for SS SRB ACP failed
\n
"
);
rc
=
itti_create_task
(
TASK_SS_SYSIND
,
ss_eNB_sysind_task
,
NULL
);
AssertFatal
(
rc
>=
0
,
"Create task for SS SYSIND failed
\n
"
);
rc
=
itti_create_task
(
TASK_SS_SRB
,
ss_eNB_srb_task
,
NULL
);
rc
=
itti_create_task
(
TASK_SS_SRB
,
ss_eNB_srb_task
,
NULL
);
AssertFatal
(
rc
>=
0
,
"Create task for SS SRB failed
\n
"
);
AssertFatal
(
rc
>=
0
,
"Create task for SS SRB failed
\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