[Docs] Add some document for DBus application
authorDongju Chae <dongju.chae@samsung.com>
Fri, 11 Jun 2021 02:24:54 +0000 (11:24 +0900)
committer채동주/On-Device Lab(SR)/Staff Engineer/삼성전자 <dongju.chae@samsung.com>
Mon, 14 Jun 2021 01:24:54 +0000 (10:24 +0900)
This patch adds some document for DBus application.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
docs/markdown/DBusApp.md [new file with mode: 0644]
docs/sitemap.txt

diff --git a/docs/markdown/DBusApp.md b/docs/markdown/DBusApp.md
new file mode 100644 (file)
index 0000000..1abac74
--- /dev/null
@@ -0,0 +1,59 @@
+---
+title: DBus App
+short-description: DBus Application with NPU-DDK
+...
+
+# DBus Application with NPU-DDK
+
+This page describes how to prepare DBus-compatible environment in the FastModel simulator,
+and how to run our test program using DBus.
+
+## Setting up DBus
+
+First of all, you should install `dbus` package in the FastModel.
+
+```console
+$ telnet localhost 5000
+Trying 127.0.0.1...
+Connected to localhost.
+Escape character is '^]'.
+...
+sh-3.2# zypper install dbus
+...
+```
+
+Also, make sure that DBus's runtime directory exists. If don't, just create it.
+```console
+sh-3.2# ls /run/dbus
+cannot access /run/dbus: No such file or directory
+sh-3.2# mkdir -p /run/dbus
+```
+
+Then, you can start the dbus daemon. We recommend to append this to your `/init` script.
+```console
+sh-3.2# /usr/bin/dbus-daemon --system --nopidfile --syslog-only
+sh-3.2# ls /run/dbus
+pid  system_bus_socket
+```
+
+## Starting DBus Service 
+
+We provide sample DBus application which emulates VD NPU Manager. Note that it's not real one
+and just uses the provided interface only.
+```console
+sh-3.2# zypper install npu-engine-example
+...
+sh-3.2# ls /usr/share/dbus-1/system.d/
+sr.odl.NPUManager.conf
+sh-3.2# /usr/bin/dbus-daemon --system --nopidfile --syslog-only
+sh-3.2# /usr/lib64/npu-engine/bin/apptests/npumgr/dummy_npumgr
+sh-3.2# /usr/lib64/npu-engine/bin/apptests/npumgr/apptest_npumgr \
+        /usr/share/npu-engine/testdata/TRIV235_2TOPS/MOBILENET_V1
+[   25.222285] triv2 30410000.triv2: Execution Cycles: 114545
+[APPTEST] /usr/lib64/npu-engine/bin/apptests/npumgr/apptest_npumgr: PASSED
+```
+
+## Additional Notes
+
+Because our FastModel simulator only supports a single host CPU core, a multi-thread daemon such as DBus may make the overall system slow down.
+So, please terminate the DBus daemon when you don't use it anymore.
index 1189e08..80c8709 100644 (file)
@@ -10,5 +10,6 @@ index.md
        Examples.md
                CommandLine.md
                TizenSample.md
+               DBusApp.md
        Debugging.md
        TestingGuide.md