diff options
author | Akio Fukubayashi <fukubayashi.akio@genetec.co.jp> | 2019-09-03 09:45:11 +0900 |
---|---|---|
committer | Akio Fukubayashi <fukubayashi.akio@genetec.co.jp> | 2019-09-03 09:45:11 +0900 |
commit | b24b2efe274e7cf49cd0952f1bc0f740c5dc9bb7 (patch) | |
tree | d28ffc8c78280c4637632c645c779ed52cfcfa66 | |
parent | 556884fe71a3577ffc9ba5ddf65029cf0ca699ee (diff) |
Fix place of connection.jsonsandbox/akiofukubayashi/als2019_8.0
Signed-off-by: Akio Fukubayashi <fukubayashi.akio@genetec.co.jp>
-rw-r--r-- | src/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/config/connection.json | 32 | ||||
-rw-r--r-- | src/wm_connection.cpp | 10 |
3 files changed, 15 insertions, 28 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 093b356..a2817a3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -118,6 +118,7 @@ add_custom_command(TARGET ${TARGETS_WM} POST_BUILD COMMAND cp -f ${PROJECT_SOURCE_DIR}/src/config/areas.json ${PROJECT_BINARY_DIR}/package/root/etc COMMAND cp -f ${PROJECT_SOURCE_DIR}/src/config/connection.json ${PROJECT_BINARY_DIR}/package/root/etc COMMAND cp -f ${PROJECT_SOURCE_DIR}/src/config/timeout.json ${PROJECT_BINARY_DIR}/package/root/etc + COMMAND cp -f ${PROJECT_SOURCE_DIR}/src/config/connection.json ${PROJECT_BINARY_DIR}/package/root/etc ) add_custom_target(package DEPENDS ${PROJECT_BINARY_DIR}/package/root diff --git a/src/config/connection.json b/src/config/connection.json index 18dc7ad..9a9a9c6 100644 --- a/src/config/connection.json +++ b/src/config/connection.json @@ -3,42 +3,22 @@ "wm_port": 54400, "areas": [ { - "area_name": "fullscreen", - "transmitter_port": 54401, - "width": 1920, - "height": 1080 + "area_name": "ssub", + "transmitter_port": 34400, + "width": 640, + "height": 720 } ], "connections": [ { "screen_name": "slave", - "ip": "192.168.200.101", + "ip": "192.168.200.16", "wm_port": 54410, "master_mode": false, "areas": [ { "area_name": "split.sub", - "transmitter_port": 54411, - "width": 640, - "height": 720 - } - ] - }, - { - "screen_name": "hud", - "ip": "192.168.200.102", - "wm_port": 54420, - "master_mode": false, - "areas": [ - { - "area_name": "fullscreen", - "transmitter_port": 54421, - "width": 1920, - "height": 1080 - }, - { - "area_name": "leftup", - "transmitter_port": 54422, + "transmitter_port": 34410, "width": 640, "height": 720 } diff --git a/src/wm_connection.cpp b/src/wm_connection.cpp index 3600cd4..b7b6a0f 100644 --- a/src/wm_connection.cpp +++ b/src/wm_connection.cpp @@ -41,7 +41,7 @@ namespace wm namespace { -static const char kPathConnectionConfigFile[] = "/etc/hmi-config/connection.json"; +static const char kPathConnectionConfigFile[] = "/etc/connection.json"; static const char kPathTimeoutConfigFile[] = "/etc/timeout.json"; static const char kDefaultIpAddr[] = "192.168.10.10"; static const int kDefaultPort = 4000; @@ -791,7 +791,13 @@ int WMConnection::loadTimeoutConfigFile() int WMConnection::loadConnectionConfigFile() { - std::string path = std::string(kPathConnectionConfigFile); + // Get afm application installed dir + char const *afm_app_install_dir = getenv("AFM_APP_INSTALL_DIR"); + if (!afm_app_install_dir) + { + HMI_ERROR("AFM_APP_INSTALL_DIR is not defined"); + } + std::string path = std::string(afm_app_install_dir) + std::string(kPathConnectionConfigFile); // Load connection config file json_object *json_obj, *json_cfg; |