From eb2fc4f608d8a94f5f659b2603cd1661c807cd6e Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Tue, 1 Jun 2021 18:43:32 +0530 Subject: [PATCH] Example to read configuration Example to demonstrate reading configuration. Signed-off-by: subhash kumar singh Change-Id: Ife41214be107c76f31d61addc2f91fd1678796e4 --- config/config-file.json | 3 +++ hwApp.go | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config/config-file.json b/config/config-file.json index 8caecdb..9ba61e9 100644 --- a/config/config-file.json +++ b/config/config-file.json @@ -106,4 +106,7 @@ ] } ] + "db" : { + "waitForSdl": false + } } diff --git a/hwApp.go b/hwApp.go index 1704dda..90aed67 100755 --- a/hwApp.go +++ b/hwApp.go @@ -51,7 +51,11 @@ func (e *HWApp) Run() { // register callback after xapp ready xapp.SetReadyCB(e.xAppStartCB, true) - xapp.RunWithParams(e, false) + // reading configuration from config file + waitForSdl := xapp.Config.GetBool("db.waitForSdl") + + // start xapp + xapp.RunWithParams(e, waitForSdl) } -- 2.16.6