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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG-RAN
Commits
2cd5c1fa
Commit
2cd5c1fa
authored
2 months ago
by
Teodora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add <supervision-watchdog-reset> RPC for M-plane
parent
6266239c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
radio/fhi_72/mplane/init-mplane.c
radio/fhi_72/mplane/init-mplane.c
+7
-0
radio/fhi_72/mplane/subscribe-mplane.c
radio/fhi_72/mplane/subscribe-mplane.c
+25
-0
radio/fhi_72/mplane/subscribe-mplane.h
radio/fhi_72/mplane/subscribe-mplane.h
+2
-0
No files found.
radio/fhi_72/mplane/init-mplane.c
View file @
2cd5c1fa
...
...
@@ -159,7 +159,14 @@ bool manage_ru(ru_session_t *ru_session, const openair0_config_t *oai, const siz
success
=
subscribe_mplane
(
ru_session
,
stream
,
filter
,
(
void
*
)
&
ru_session
->
ru_notif
);
AssertError
(
success
,
return
false
,
"[MPLANE] Unable to continue: could not get RU answer via subscribe_mplane().
\n
"
);
// when subscribed to the supervision notification, the watchdog timer needs to be updated
char
*
watchdog_answer
=
NULL
;
success
=
update_timer_mplane
(
ru_session
,
&
watchdog_answer
);
AssertError
(
success
,
return
false
,
"[MPLANE] Unable to update the watchdog timer. RU will do a reset after default supervision timer of (60+10)[s] expires.
\n
"
);
MP_LOG_I
(
"Watchdog timer answer:
\n\t
%s
\n
"
,
watchdog_answer
);
free
(
operational_ds
);
free
(
watchdog_answer
);
return
true
;
}
This diff is collapsed.
Click to expand it.
radio/fhi_72/mplane/subscribe-mplane.c
View file @
2cd5c1fa
...
...
@@ -131,3 +131,28 @@ bool subscribe_mplane(ru_session_t *ru_session, const char *stream, const char *
return
true
;
}
bool
update_timer_mplane
(
ru_session_t
*
ru_session
,
char
**
answer
)
{
int
timeout
=
CLI_RPC_REPLY_TIMEOUT
;
struct
nc_rpc
*
rpc
;
NC_WD_MODE
wd
=
NC_WD_ALL
;
NC_PARAMTYPE
param
=
NC_PARAMTYPE_CONST
;
const
char
*
content
=
"<supervision-watchdog-reset xmlns=
\"
urn:o-ran:supervision:1.0
\"
>
\n
\
<supervision-notification-interval>65535</supervision-notification-interval>
\n
\
<guard-timer-overhead>65535</guard-timer-overhead>
\n
\
</supervision-watchdog-reset>"
;
MP_LOG_I
(
"RPC request to RU
\"
%s
\"
=
\"
%s
\"
.
\n
"
,
ru_session
->
ru_ip_add
,
content
);
rpc
=
nc_rpc_act_generic_xml
(
content
,
param
);
AssertError
(
rpc
!=
NULL
,
return
false
,
"[MPLANE] <supervision-watchdog-reset> RPC creation failed.
\n
"
);
bool
success
=
rpc_send_recv
((
struct
nc_session
*
)
ru_session
->
session
,
rpc
,
wd
,
timeout
,
answer
);
AssertError
(
success
,
return
false
,
"[MPLANE] Failed to update the watchdog timer.
\n
"
);
MP_LOG_I
(
"Successfully updated supervision timer to (65535+65535)[s] for RU
\"
%s
\"
.
\n
"
,
ru_session
->
ru_ip_add
);
nc_rpc_free
(
rpc
);
return
true
;
}
This diff is collapsed.
Click to expand it.
radio/fhi_72/mplane/subscribe-mplane.h
View file @
2cd5c1fa
...
...
@@ -28,4 +28,6 @@
bool
subscribe_mplane
(
ru_session_t
*
ru_session
,
const
char
*
stream
,
const
char
*
filter
,
void
*
answer
);
bool
update_timer_mplane
(
ru_session_t
*
ru_session
,
char
**
answer
);
#endif
/* SUBSCRIBE_MPLANE_H */
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