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
014fa2f3
Commit
014fa2f3
authored
Sep 09, 2022
by
Manu Agrawal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the logging
parent
8ae621a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
29 deletions
+27
-29
openair3/SS/ss_gNB_port_man_task.c
openair3/SS/ss_gNB_port_man_task.c
+9
-11
openair3/SS/ss_gNB_sys_task.c
openair3/SS/ss_gNB_sys_task.c
+18
-18
No files found.
openair3/SS/ss_gNB_port_man_task.c
View file @
014fa2f3
...
...
@@ -185,7 +185,7 @@ void ss_nr_port_man_send_data(
void
ss_gNB_port_man_init
(
void
)
{
IpAddress_t
ipaddr
;
LOG_A
(
NR_RRC
,
"[SS-PORTMAN-
5GNR] Starting
System Simulator Manager
\n
"
);
LOG_A
(
NR_RRC
,
"[SS-PORTMAN-
GNB] Starting GNB
System Simulator Manager
\n
"
);
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
...
...
@@ -195,11 +195,9 @@ void ss_gNB_port_man_init(void)
int
port
=
RC
.
ss
.
SysportNR
;
acpInit
(
malloc
,
free
,
1000
);
/* TODO: Check for acpMsgTable 5G NR*/
const
struct
acpMsgTable
msgTable
[]
=
{
{
"NrSysProcess"
,
MSG_NrSysProcess_userId
},
// The last element should be NULL
{
NULL
,
0
}};
// Arena size to decode received message
...
...
@@ -210,11 +208,11 @@ void ss_gNB_port_man_init(void)
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
nrctx_g
);
if
(
ret
<
0
)
{
LOG_A
(
NR_RRC
,
"[SS-PORTMAN-
5GNR
] Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
NR_RRC
,
"[SS-PORTMAN-
GNB
] Connection failure err=%d
\n
"
,
ret
);
return
;
}
int
fd1
=
acpGetSocketFd
(
nrctx_g
);
LOG_A
(
NR_RRC
,
"[SS-PORTMAN-
5GNR
] Connection performed : %d
\n
"
,
fd1
);
LOG_A
(
NR_RRC
,
"[SS-PORTMAN-
GNB
] Connection performed : %d
\n
"
,
fd1
);
//itti_subscribe_event_fd(TASK_SS_PORTMAN, fd1);
...
...
@@ -260,8 +258,8 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx)
//Send Dummy Wake up ITTI message to SRB task.
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
LOG_A
(
NR_RRC
,
"[SS-PORTMAN-5GNR] Sending Wake up signal to SRB task
\n
"
);
#if 0
LOG_A(NR_RRC,"[SS-PORTMAN-5GNR] Sending Wake up signal to SRB task \n");
MessageDef *message_p = itti_alloc_new_message(TASK_SS_PORTMAN, INSTANCE_DEFAULT, SS_RRC_PDU_IND);
if (message_p)
{
...
...
@@ -283,7 +281,7 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx)
}
else
{
LOG_A
(
NR_RRC
,
"[SS-PORTMAN-
5GNR
] received msg %d from the client.
\n
"
,
userId
);
LOG_A
(
NR_RRC
,
"[SS-PORTMAN-
GNB
] received msg %d from the client.
\n
"
,
userId
);
if
(
acpNrSysProcessDecSrv
(
ctx
,
buffer
,
msgSize
,
&
req
)
!=
0
)
return
;
...
...
@@ -316,20 +314,20 @@ void *ss_port_man_5G_NR_process_itti_msg(void *notUsed)
if
(
received_msg
!=
NULL
)
{
LOG_A
(
NR_RRC
,
"[SS-PORTMAN-
5GNR
] Received a message id : %d
\n
"
,
LOG_A
(
NR_RRC
,
"[SS-PORTMAN-
GNB
] Received a message id : %d
\n
"
,
ITTI_MSG_ID
(
received_msg
));
switch
(
ITTI_MSG_ID
(
received_msg
))
{
case
SS_NRSET_TIM_INFO
:
{
LOG_A
(
RRC
,
"Received
timing info
\n
"
);
LOG_A
(
NR_RRC
,
"[SS-PORTMAN-GNB] Received NR
timing info
\n
"
);
ss_nr_port_man_send_data
(
0
,
0
,
&
received_msg
->
ittiMsg
.
ss_nrset_timinfo
);
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
}
break
;
case
SS_NR_SYS_PORT_MSG_CNF
:
{
LOG_A
(
RRC
,
"
Received SS_NR_SYS_PORT_MSG_CNF
\n
"
);
LOG_A
(
NR_RRC
,
"[SS-PORTMAN-GNB]
Received SS_NR_SYS_PORT_MSG_CNF
\n
"
);
ss_nr_port_man_send_cnf
(
*
(
SS_NR_SYS_PORT_MSG_CNF
(
received_msg
).
cnf
));
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
}
...
...
@@ -339,7 +337,7 @@ void *ss_port_man_5G_NR_process_itti_msg(void *notUsed)
break
;
default:
LOG_A
(
NR_RRC
,
"Received unhandled message %d:%s
\n
"
,
LOG_A
(
NR_RRC
,
"
[SS-PORTMAN-GNB]
Received unhandled message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
break
;
}
...
...
openair3/SS/ss_gNB_sys_task.c
View file @
014fa2f3
...
...
@@ -102,13 +102,13 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
/* The request has send confirm flag flase so do nothing in this funciton */
if
(
reqCnfFlag_g
==
FALSE
)
{
LOG_A
(
RRC
,
"[SYS
] No confirm required
\n
"
);
LOG_A
(
NR_RRC
,
"[SYS-GNB
] No confirm required
\n
"
);
return
;
}
if
(
message_p
)
{
LOG_A
(
RRC
,
"[SYS
] Send SS_NR_SYS_PORT_MSG_CNF
\n
"
);
LOG_A
(
NR_RRC
,
"[SYS-GNB
] Send SS_NR_SYS_PORT_MSG_CNF
\n
"
);
msgCnf
->
Common
.
CellId
=
SS_context
.
eutra_cellId
;
msgCnf
->
Common
.
Result
.
d
=
resType
;
msgCnf
->
Common
.
Result
.
v
.
Success
=
resVal
;
...
...
@@ -117,18 +117,18 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
{
case
NR_SystemConfirm_Type_Cell
:
{
LOG_A
(
RRC
,
"[SYS
] Send confirm for cell configuration
\n
"
);
LOG_A
(
NR_RRC
,
"[SYS-GNB
] Send confirm for cell configuration
\n
"
);
msgCnf
->
Confirm
.
v
.
Cell
=
true
;
break
;
}
default:
LOG_A
(
RRC
,
"[SYS] Error not handled CNF TYPE to [SS-PORTMAN
]"
);
LOG_A
(
NR_RRC
,
"[SYS-GNB] Error not handled CNF TYPE to [SS-PORTMAN-GNB
]"
);
}
SS_NR_SYS_PORT_MSG_CNF
(
message_p
).
cnf
=
msgCnf
;
int
send_res
=
itti_send_msg_to_task
(
TASK_SS_PORTMAN
,
INSTANCE_DEFAULT
,
message_p
);
if
(
send_res
<
0
)
{
LOG_A
(
RRC
,
"[SYS] Error sending to [SS-PORTMAN
]"
);
LOG_A
(
NR_RRC
,
"[SYS-GNB] Error sending to [SS-PORTMAN-GNB
]"
);
}
}
}
...
...
@@ -141,14 +141,14 @@ static void sys_handle_nr_enquire_timing(ss_nrset_timinfo_t *tinfo)
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SYS_GNB
,
INSTANCE_DEFAULT
,
SS_NRSET_TIM_INFO
);
if
(
message_p
)
{
LOG_A
(
RRC
,
"[SYS
] Reporting info sfn:%d
\t
sf:%d.
\n
"
,
tinfo
->
sfn
,
tinfo
->
slot
);
LOG_A
(
NR_RRC
,
"[SYS-GNB
] Reporting info sfn:%d
\t
sf:%d.
\n
"
,
tinfo
->
sfn
,
tinfo
->
slot
);
SS_NRSET_TIM_INFO
(
message_p
).
slot
=
tinfo
->
slot
;
SS_NRSET_TIM_INFO
(
message_p
).
sfn
=
tinfo
->
sfn
;
int
send_res
=
itti_send_msg_to_task
(
TASK_SS_PORTMAN_GNB
,
INSTANCE_DEFAULT
,
message_p
);
if
(
send_res
<
0
)
{
LOG_A
(
RRC
,
"[SYS] Error sending to [SS-PORTMAN
]"
);
LOG_A
(
NR_RRC
,
"[SYS-GNB] Error sending to [SS-PORTMAN-GNB
]"
);
}
}
}
...
...
@@ -167,21 +167,20 @@ static void sys_handle_nr_enquire_timing(ss_nrset_timinfo_t *tinfo)
static
void
ss_task_sys_nr_handle_req
(
struct
NR_SYSTEM_CTRL_REQ
*
req
,
ss_nrset_timinfo_t
*
tinfo
)
{
int
enterState
=
RC
.
ss
.
State
;
int
exitState
=
RC
.
ss
.
State
;
if
(
req
->
Common
.
CellId
)
SS_context
.
eutra_cellId
=
req
->
Common
.
CellId
;
LOG_A
(
NR_RRC
,
"
TASK_SYS_5G_NR:
Current SS_STATE %d received SystemRequest_Type %d eutra_cellId %d cnf_flag %d
\n
"
,
LOG_A
(
NR_RRC
,
"
[SYS-GNB]
Current SS_STATE %d received SystemRequest_Type %d eutra_cellId %d cnf_flag %d
\n
"
,
RC
.
ss
.
State
,
req
->
Request
.
d
,
SS_context
.
eutra_cellId
,
req
->
Common
.
ControlInfo
.
CnfFlag
);
switch
(
RC
.
ss
.
State
)
{
case
SS_STATE_NOT_CONFIGURED
:
if
(
req
->
Request
.
d
==
NR_SystemRequest_Type_Cell
)
{
LOG_A
(
NR_RRC
,
"
TASK_SYS_5G_NR:
NR_SystemRequest_Type_Cell received
\n
"
);
LOG_A
(
NR_RRC
,
"
[SYS-GNB]
NR_SystemRequest_Type_Cell received
\n
"
);
}
else
{
LOG_E
(
NR_RRC
,
"
TASK_SYS_5G_NR:
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
LOG_E
(
NR_RRC
,
"
[SYS-GNB]
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
RC
.
ss
.
State
,
req
->
Request
.
d
);
}
break
;
...
...
@@ -189,20 +188,20 @@ static void ss_task_sys_nr_handle_req(struct NR_SYSTEM_CTRL_REQ *req, ss_nrset_t
if
(
req
->
Request
.
d
==
NR_SystemRequest_Type_EnquireTiming
)
{
sys_handle_nr_enquire_timing
(
tinfo
);
LOG_A
(
NR_RRC
,
"
TASK_SYS_5G_NR:
NR_SystemRequest_Type_EnquireTiming received
\n
"
);
LOG_A
(
NR_RRC
,
"
[SYS-GNB]
NR_SystemRequest_Type_EnquireTiming received
\n
"
);
}
else
{
LOG_E
(
NR_RRC
,
"
TASK_SYS_5G_NR:
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
LOG_E
(
NR_RRC
,
"
[SYS-GNB]
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
RC
.
ss
.
State
,
req
->
Request
.
d
);
}
break
;
default:
LOG_E
(
NR_RRC
,
"
TASK_SYS_5G_NR:
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
LOG_E
(
NR_RRC
,
"
[SYS-GNB]
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
RC
.
ss
.
State
,
req
->
Request
.
d
);
break
;
}
LOG_A
(
NR_RRC
,
"
TASK_SYS_5G_NR:
SS_STATE %d New SS_STATE %d received SystemRequest_Type %d
\n
"
,
LOG_A
(
NR_RRC
,
"
[SYS-GNB]
SS_STATE %d New SS_STATE %d received SystemRequest_Type %d
\n
"
,
enterState
,
RC
.
ss
.
State
,
req
->
Request
.
d
);
}
...
...
@@ -226,11 +225,11 @@ bool valid_nr_sys_msg(struct NR_SYSTEM_CTRL_REQ *req)
bool
sendDummyCnf
=
TRUE
;
enum
SystemConfirm_Type_Sel
cnfType
=
0
;
LOG_A
(
NR_RRC
,
"
TASK_SYS_5G_NR:
received req : %d for cell %d RC.ss.state %d
\n
"
,
LOG_A
(
NR_RRC
,
"
[SYS-GNB]
received req : %d for cell %d RC.ss.state %d
\n
"
,
req
->
Request
.
d
,
req
->
Common
.
CellId
,
RC
.
ss
.
State
);
switch
(
req
->
Request
.
d
)
{
case
SystemRequest_Type_Cell
:
case
NR_
SystemRequest_Type_Cell
:
if
(
RC
.
ss
.
State
>=
SS_STATE_NOT_CONFIGURED
)
{
valid
=
TRUE
;
...
...
@@ -253,7 +252,7 @@ bool valid_nr_sys_msg(struct NR_SYSTEM_CTRL_REQ *req)
if
(
sendDummyCnf
)
{
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
LOG_A
(
NR_RRC
,
"
TASK_SYS_GNB:
Sending Dummy OK Req %d cnTfype %d ResType %d ResValue %d
\n
"
,
LOG_A
(
NR_RRC
,
"
[SYS-GNB]
Sending Dummy OK Req %d cnTfype %d ResType %d ResValue %d
\n
"
,
req
->
Request
.
d
,
cnfType
,
resType
,
resVal
);
}
return
valid
;
...
...
@@ -289,6 +288,7 @@ void *ss_gNB_sys_process_itti_msg(void *notUsed)
{
case
SS_NRUPD_TIM_INFO
:
{
LOG_A
(
NR_RRC
,
"TASK_SYS_GNB received SS_NRUPD_TIM_INFO with sfn=%d slot=%d
\n
"
,
SS_NRUPD_TIM_INFO
(
received_msg
).
sfn
,
SS_NRUPD_TIM_INFO
(
received_msg
).
slot
);
tinfo
.
slot
=
SS_NRUPD_TIM_INFO
(
received_msg
).
slot
;
tinfo
.
sfn
=
SS_NRUPD_TIM_INFO
(
received_msg
).
sfn
;
}
...
...
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