aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/facemgr/src/api.c
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2020-12-07 11:21:24 +0100
committerJordan Augé <jordan.auge+fdio@cisco.com>2020-12-07 17:32:48 +0100
commit514b0ba878d93626e9b6a94441c4fac428c47914 (patch)
tree2a8349c59702492a10da51427062a2609e50b7b0 /ctrl/facemgr/src/api.c
parent190b3218c0443e9c60b62823f415f2b5462e4079 (diff)
[HICN-660] Add priority priority control example based on RSSI
Change-Id: Idc940d600e436f39fe78cd44bc29bd696c7dc9d6 Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'ctrl/facemgr/src/api.c')
-rw-r--r--ctrl/facemgr/src/api.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ctrl/facemgr/src/api.c b/ctrl/facemgr/src/api.c
index f934883de..aeca057e0 100644
--- a/ctrl/facemgr/src/api.c
+++ b/ctrl/facemgr/src/api.c
@@ -63,6 +63,8 @@
#include "interfaces/android_utility/android_utility.h"
#endif /* WITH_ANDROID_UTILITY */
+#include "interfaces/priority_controller/priority_controller.h"
+
#include <hicn/ctrl/face.h>
#include <hicn/facemgr/facelet.h>
#include "common.h"
@@ -2258,7 +2260,12 @@ facemgr_bootstrap(facemgr_t * facemgr)
#ifdef WITH_PRIORITY_CONTROLLER
INFO("[facemgr_bootstrap] creating priority_controller interface");
- rc = facemgr_create_interface(facemgr, "pc", "priority_controller", NULL, &facemgr->pc);
+ priority_controller_cfg_t pc_cfg = {
+#ifdef PRIORITY_CONTROLLER_INTERNAL
+ .jvm = facemgr->jvm,
+#endif /* PRIORITY_CONTROLLER_INTERNAL */
+ };
+ rc = facemgr_create_interface(facemgr, "pc", "priority_controller", &pc_cfg, &facemgr->pc);
if (rc < 0) {
ERROR("Error creating 'Priority Controller' interface\n");
goto ERR_PC_CREATE;