Example to read configuration 86/6186/1
authorsubhash kumar singh <subh.singh@samsung.com>
Tue, 1 Jun 2021 13:13:32 +0000 (18:43 +0530)
committersubhash kumar singh <subh.singh@samsung.com>
Tue, 1 Jun 2021 13:18:54 +0000 (18:48 +0530)
Example to demonstrate reading configuration.

Signed-off-by: subhash kumar singh <subh.singh@samsung.com>
Change-Id: Ife41214be107c76f31d61addc2f91fd1678796e4

config/config-file.json
hwApp.go

index 8caecdb..9ba61e9 100644 (file)
             ]
         }
     ]
+    "db" : {
+           "waitForSdl": false
+    }
 }
index 1704dda..90aed67 100755 (executable)
--- 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)
 
 }