aboutsummaryrefslogtreecommitdiffstats
path: root/conf.d
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-08-23 21:55:48 +0200
committerFulup Ar Foll <fulup@iot.bzh>2017-08-23 21:55:48 +0200
commitde0a0595316d15c0cb639816fc3c0413541a49d5 (patch)
tree77b797fa5099f59beb4355677431997090517a5f /conf.d
parent38f2492a94d42f2c45d76f81928a94d0184457b1 (diff)
Added sample for synchronous control request and update documentation
to support monitoring.
Diffstat (limited to 'conf.d')
-rw-r--r--conf.d/cmake/config.cmake5
-rw-r--r--conf.d/project/lua.d/onload-daemon-04-oncall.lua10
-rw-r--r--conf.d/project/vscode.d/c_cpp_properties.json (renamed from conf.d/project/.vscode/c_cpp_properties.json)0
3 files changed, 9 insertions, 6 deletions
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake
index fec5082..b97cb7a 100644
--- a/conf.d/cmake/config.cmake
+++ b/conf.d/cmake/config.cmake
@@ -134,7 +134,10 @@ set(COMPILE_OPTIONS
# Print a helper message when every thing is finished
# ----------------------------------------------------
-set(CLOSING_MESSAGE "Debug from ./buid: afb-daemon --port=1234 --ldpaths=. --workdir=. --roothttp=../htdocs --tracereq=common --token='' --verbose")
+if(IS_DIRECTORY $ENV{HOME}/opt/afb-monitoring)
+set(MONITORING_ALIAS "--alias=/monitoring:$ENV{HOME}/opt/afb-monitoring")
+endif()
+set(CLOSING_MESSAGE "Debug from afb-daemon --port=1234 ${MONITORING_ALIAS} --ldpaths=. --workdir=. --roothttp=../htdocs --tracereq=common --token= --verbose ")
set(PACKAGE_MESSAGE "Install widget file using in the target : afm-util install ${PROJECT_NAME}.wgt")
# (BUG!!!) as PKG_CONFIG_PATH does not work [should be an env variable]
diff --git a/conf.d/project/lua.d/onload-daemon-04-oncall.lua b/conf.d/project/lua.d/onload-daemon-04-oncall.lua
index 4e78fd8..b450932 100644
--- a/conf.d/project/lua.d/onload-daemon-04-oncall.lua
+++ b/conf.d/project/lua.d/onload-daemon-04-oncall.lua
@@ -54,17 +54,17 @@ function _Test_Call_Async (request, args)
}
AFB:notice ("Test_Call_Async args=%s cb=Test_Async_CB", args)
- AFB:service("alsacore","ping", "Test_Async_CB", context)
+ AFB:service("monitor","ping", "Test_Async_CB", context)
end
-function _Test_Call_Sync (request, args)
+function _Simple_Monitor_Call (request, args)
- AFB:notice ("Test_Call_Sync args=%s", args)
- local err, response= AFB:servsync ("alsacore","ping", args)
+ AFB:notice ("_Simple_Server_Call args=%s", args)
+ local err, result= AFB:servsync ("monitor","get", args)
if (err) then
AFB:fail ("AFB:service_call_sync fail");
else
- AFB:success (request, response)
+ AFB:success (request, result["response"])
end
end
diff --git a/conf.d/project/.vscode/c_cpp_properties.json b/conf.d/project/vscode.d/c_cpp_properties.json
index 5512cb3..5512cb3 100644
--- a/conf.d/project/.vscode/c_cpp_properties.json
+++ b/conf.d/project/vscode.d/c_cpp_properties.json