From d43607bd8665d5710e5258cf237c1f79ec94b7d9 Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Wed, 23 May 2018 20:44:01 +0200 Subject: Change the name of controller configuration files Change the name of controller configuration files to be sure that they will be found during 'CtlConfigScan'. Add the name that the binder should take into config.cmake to be sure that the controller configuration files will be found during 'CtlConfigScan'. Change-Id: I94c55c186c52f6f89b06400133cfbce36221d245 Signed-off-by: Jonathan Aillet --- 4a-hal-references-boards-cfg/4a-hal-sample1.json | 43 ---------------------- 4a-hal-references-boards-cfg/4a-hal-sample2.json | 43 ---------------------- 4a-hal-references-boards-cfg/hal-4a-sample1.json | 43 ++++++++++++++++++++++ 4a-hal-references-boards-cfg/hal-4a-sample2.json | 43 ++++++++++++++++++++++ .../4a-hal-controllers-api-loader.c | 4 +- conf.d/cmake/config.cmake | 2 +- 6 files changed, 89 insertions(+), 89 deletions(-) delete mode 100644 4a-hal-references-boards-cfg/4a-hal-sample1.json delete mode 100644 4a-hal-references-boards-cfg/4a-hal-sample2.json create mode 100644 4a-hal-references-boards-cfg/hal-4a-sample1.json create mode 100644 4a-hal-references-boards-cfg/hal-4a-sample2.json diff --git a/4a-hal-references-boards-cfg/4a-hal-sample1.json b/4a-hal-references-boards-cfg/4a-hal-sample1.json deleted file mode 100644 index a93a4be..0000000 --- a/4a-hal-references-boards-cfg/4a-hal-sample1.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json", - "metadata": { - "uid": "SND_CARD", - "version": "0.9", - "api": "4a-hal-sample1", - "info": "Basic Audio Policy Control for Audio-4a - Sample 1", - "author": "Jonathan Aillet", - "date": "2018-05-18" - }, - "onload": [ - { - "uid": "init-audio-hal", - "info": "Retrieve Active HAL", - "action": "api://4a-hal-manager#ping" - } - ], - "controls": [ - { - "uid": "Master-Volume-Set", - "info": "Set Master Volume", - "privileges": "audio", - "action": "api://4a-hal-manager#ping" - }, - { - "uid": "Master-Volume-Ramp", - "info": "Ramp master Volume", - "privileges": "audio", - "action": "api://4a-hal-manager#ping" - }, - { - "uid": "ping2", - "info": "Ping hal", - "action": "api://4a-hal-manager#ping" - } - ], - "events": [ - { - "uid": "api/status_changed", - "action": "api://4a-hal-manager#ping" - } - ] -} \ No newline at end of file diff --git a/4a-hal-references-boards-cfg/4a-hal-sample2.json b/4a-hal-references-boards-cfg/4a-hal-sample2.json deleted file mode 100644 index 8448b4f..0000000 --- a/4a-hal-references-boards-cfg/4a-hal-sample2.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json", - "metadata": { - "uid": "SND_CARD2", - "version": "0.9", - "api": "4a-hal-sample2", - "info": "Basic Audio Policy Control for Audio-4a - Sample 2", - "author": "Jonathan Aillet", - "date": "2018-05-18" - }, - "onload": [ - { - "uid": "init-audio-hal", - "info": "Retrieve Active HAL", - "action": "api://4a-hal-manager#ping" - } - ], - "controls": [ - { - "uid": "Master-Volume-Set", - "info": "Set Master Volume", - "privileges": "audio", - "action": "api://4a-hal-manager#ping" - }, - { - "uid": "Master-Volume-Ramp", - "info": "Ramp master Volume", - "privileges": "audio", - "action": "api://4a-hal-manager#ping" - }, - { - "uid": "ping2", - "info": "Ping hal", - "action": "api://4a-hal-manager#ping" - } - ], - "events": [ - { - "uid": "api/status_changed", - "action": "api://4a-hal-manager#ping" - } - ] -} \ No newline at end of file diff --git a/4a-hal-references-boards-cfg/hal-4a-sample1.json b/4a-hal-references-boards-cfg/hal-4a-sample1.json new file mode 100644 index 0000000..a93a4be --- /dev/null +++ b/4a-hal-references-boards-cfg/hal-4a-sample1.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json", + "metadata": { + "uid": "SND_CARD", + "version": "0.9", + "api": "4a-hal-sample1", + "info": "Basic Audio Policy Control for Audio-4a - Sample 1", + "author": "Jonathan Aillet", + "date": "2018-05-18" + }, + "onload": [ + { + "uid": "init-audio-hal", + "info": "Retrieve Active HAL", + "action": "api://4a-hal-manager#ping" + } + ], + "controls": [ + { + "uid": "Master-Volume-Set", + "info": "Set Master Volume", + "privileges": "audio", + "action": "api://4a-hal-manager#ping" + }, + { + "uid": "Master-Volume-Ramp", + "info": "Ramp master Volume", + "privileges": "audio", + "action": "api://4a-hal-manager#ping" + }, + { + "uid": "ping2", + "info": "Ping hal", + "action": "api://4a-hal-manager#ping" + } + ], + "events": [ + { + "uid": "api/status_changed", + "action": "api://4a-hal-manager#ping" + } + ] +} \ No newline at end of file diff --git a/4a-hal-references-boards-cfg/hal-4a-sample2.json b/4a-hal-references-boards-cfg/hal-4a-sample2.json new file mode 100644 index 0000000..8448b4f --- /dev/null +++ b/4a-hal-references-boards-cfg/hal-4a-sample2.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json", + "metadata": { + "uid": "SND_CARD2", + "version": "0.9", + "api": "4a-hal-sample2", + "info": "Basic Audio Policy Control for Audio-4a - Sample 2", + "author": "Jonathan Aillet", + "date": "2018-05-18" + }, + "onload": [ + { + "uid": "init-audio-hal", + "info": "Retrieve Active HAL", + "action": "api://4a-hal-manager#ping" + } + ], + "controls": [ + { + "uid": "Master-Volume-Set", + "info": "Set Master Volume", + "privileges": "audio", + "action": "api://4a-hal-manager#ping" + }, + { + "uid": "Master-Volume-Ramp", + "info": "Ramp master Volume", + "privileges": "audio", + "action": "api://4a-hal-manager#ping" + }, + { + "uid": "ping2", + "info": "Ping hal", + "action": "api://4a-hal-manager#ping" + } + ], + "events": [ + { + "uid": "api/status_changed", + "action": "api://4a-hal-manager#ping" + } + ] +} \ No newline at end of file diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c index a862fbd..834d717 100644 --- a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c +++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c @@ -192,9 +192,9 @@ int HalCtlsCreateAllApi(afb_dynapi *apiHandle, struct HalMgrData *HalMgrGlobalDa if(! dirList) dirList = CONTROL_CONFIG_PATH; - configJ = CtlConfigScan(dirList, "4a"); + configJ = CtlConfigScan(dirList, "hal"); if(! configJ) { - AFB_DYNAPI_ERROR(apiHandle, "%s: No 4a*.json config file(s) found in %s ", __func__, dirList); + AFB_DYNAPI_ERROR(apiHandle, "%s: No hal-(binder-middle-name)*.json config file(s) found in %s ", __func__, dirList); return -2; } diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake index b5bc27e..8cb6bb8 100644 --- a/conf.d/cmake/config.cmake +++ b/conf.d/cmake/config.cmake @@ -198,7 +198,7 @@ set(AFB_REMPORT "1234" CACHE PATH "Default binder listening port") # Print a helper message when every thing is finished # ---------------------------------------------------- -set(CLOSING_MESSAGE "Typical binding launch: afb-daemon --port=${AFB_REMPORT} --workdir=${CMAKE_BINARY_DIR}/package --ldpaths=lib --roothttp=htdocs --token=\"${AFB_TOKEN}\" --tracereq=common --verbose") +set(CLOSING_MESSAGE "Typical binding launch: afb-daemon --name=4a --port=${AFB_REMPORT} --workdir=${CMAKE_BINARY_DIR}/package --ldpaths=lib --roothttp=htdocs --token=\"${AFB_TOKEN}\" --tracereq=common --verbose") set(PACKAGE_MESSAGE "Install widget file using in the target : afm-util install ${PROJECT_NAME}.wgt") # Optional schema validator about now only XML, LUA and JSON -- cgit 1.2.3-korg