summaryrefslogtreecommitdiffstats
path: root/conf.d
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-05-24 15:48:18 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-07-10 23:59:54 +0200
commit197d9acab4fb5097d3dce56227c2096abdc075bd (patch)
tree6da888c3fa96ccd070939958a4297f140e75b660 /conf.d
parent1ed3d346f61d9115fccb33d3047be783a7dd7f7a (diff)
Convert binding to use the controller
Change-Id: Iae15b07ee768584d7a1a958fb7e119bca65c29e4 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'conf.d')
-rw-r--r--conf.d/CMakeLists.txt20
m---------conf.d/app-templates0
-rw-r--r--conf.d/cmake/00-debian-osconfig.cmake1
-rw-r--r--conf.d/cmake/00-default-osconfig.cmake1
-rw-r--r--conf.d/cmake/config.cmake20
-rw-r--r--conf.d/project/CMakeLists.txt20
-rw-r--r--conf.d/project/etc/CMakeLists.txt31
-rw-r--r--conf.d/project/etc/xds-config.json27
-rw-r--r--conf.d/wgt/config.xml.in4
9 files changed, 114 insertions, 10 deletions
diff --git a/conf.d/CMakeLists.txt b/conf.d/CMakeLists.txt
new file mode 100644
index 0000000..3beb009
--- /dev/null
+++ b/conf.d/CMakeLists.txt
@@ -0,0 +1,20 @@
+###########################################################################
+# Copyright 2015, 2016, 2017 IoT.bzh
+#
+# author: Fulup Ar Foll <rfulup@iot.bzh>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###########################################################################
+
+# This component should be included as a submodule and wont compile as standalone
+project_subdirs_add()
diff --git a/conf.d/app-templates b/conf.d/app-templates
-Subproject a3c312ece0a77310a9d8ecde1dd0f1267646f4f
+Subproject e400fb3543217ccd4e2b2a67b018bc947f09bd2
diff --git a/conf.d/cmake/00-debian-osconfig.cmake b/conf.d/cmake/00-debian-osconfig.cmake
new file mode 100644
index 0000000..2ce0ad3
--- /dev/null
+++ b/conf.d/cmake/00-debian-osconfig.cmake
@@ -0,0 +1 @@
+list(APPEND PKG_REQUIRED_LIST lua-5.3>=5.3)
diff --git a/conf.d/cmake/00-default-osconfig.cmake b/conf.d/cmake/00-default-osconfig.cmake
new file mode 100644
index 0000000..a2b9325
--- /dev/null
+++ b/conf.d/cmake/00-default-osconfig.cmake
@@ -0,0 +1 @@
+list(APPEND PKG_REQUIRED_LIST lua>=5.3)
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake
index face63f..8ffa90d 100644
--- a/conf.d/cmake/config.cmake
+++ b/conf.d/cmake/config.cmake
@@ -18,9 +18,8 @@
# Project Info
# ------------------
-set(PROJECT_NAME xds-service)
-set(PROJECT_VERSION "1.0")
-set(PROJECT_PRETTY_NAME "XDS collector service for AGL")
+set(PROJECT_NAME xds)
+set(PROJECT_PRETTY_NAME "XDS collector Service")
set(PROJECT_DESCRIPTION "Provide an AGL XDS collector Binding")
set(PROJECT_URL "https://github.com/iotbzh/agl-service-xds")
set(PROJECT_ICON "icon.png")
@@ -37,9 +36,6 @@ set(PROJECT_APP_TEMPLATES_DIR "conf.d/app-templates")
# but used and must be built and linked.
# set(PROJECT_LIBDIR "libs")
-# Where are stored data for your application. Pictures, static resources must be placed in that folder.
-# set(PROJECT_RESOURCES "data")
-
# Which directories inspect to find CMakeLists.txt target files
# set(PROJECT_SRC_DIR_PATTERN "*")
@@ -48,6 +44,9 @@ set(PROJECT_APP_TEMPLATES_DIR "conf.d/app-templates")
set(CMAKE_BUILD_TYPE "DEBUG")
#set(USE_EFENCE 1)
+# Helpers Submodule parameters
+set(AFB_HELPERS_QTWSCLIENT OFF CACHE BOOL "Adds QT5 WebSocket helpers from submodule")
+
# Kernel selection if needed. You can choose between a
# mandatory version to impose a minimal version.
# Or check Kernel minimal version and just print a Warning
@@ -83,7 +82,6 @@ set(CMAKE_INSTALL_PREFIX $ENV{HOME}/opt)
# Customize link option
# -----------------------------
#list(APPEND link_libraries -an-option)
-list(APPEND link_libraries afb-helpers)
# Compilation options definition
# Use CMake generator expressions to specify only for a specific language
@@ -127,6 +125,12 @@ list(APPEND link_libraries afb-helpers)
# -O2
# CACHE STRING "Compilation flags for RELEASE build type.")
+set(CONTROL_SUPPORT_LUA 1)
+add_definitions(-DCONTROL_PLUGIN_PATH="${CMAKE_BINARY_DIR}/package/lib/plugins:${CMAKE_BINARY_DIR}/package/var:${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/lib/plugins")
+add_definitions(-DCONTROL_CONFIG_PATH="${CMAKE_BINARY_DIR}/package/etc:${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/etc")
+add_definitions(-DCTL_PLUGIN_MAGIC=1286576532)
+add_definitions(-DUSE_API_DYN=1)
+
# (BUG!!!) as PKG_CONFIG_PATH does not work [should be an env variable]
# ---------------------------------------------------------------------
set(CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/lib64/pkgconfig ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
@@ -193,7 +197,7 @@ set(AFB_REMPORT "5678" 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}\" --verbose --ws-client=unix:/tmp/supervisor --ws-client=unix:/tmp/harvester")
+set(CLOSING_MESSAGE "Typical binding launch: afb-daemon --port=${AFB_REMPORT} --name=afb-xds --workdir=${CMAKE_BINARY_DIR}/package --ldpaths=lib --roothttp=htdocs --token=\"${AFB_TOKEN}\" --verbose --ws-client=unix:/tmp/supervisor --ws-client=unix:/tmp/harvester")
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
diff --git a/conf.d/project/CMakeLists.txt b/conf.d/project/CMakeLists.txt
new file mode 100644
index 0000000..3beb009
--- /dev/null
+++ b/conf.d/project/CMakeLists.txt
@@ -0,0 +1,20 @@
+###########################################################################
+# Copyright 2015, 2016, 2017 IoT.bzh
+#
+# author: Fulup Ar Foll <rfulup@iot.bzh>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###########################################################################
+
+# This component should be included as a submodule and wont compile as standalone
+project_subdirs_add()
diff --git a/conf.d/project/etc/CMakeLists.txt b/conf.d/project/etc/CMakeLists.txt
new file mode 100644
index 0000000..2b1e2cf
--- /dev/null
+++ b/conf.d/project/etc/CMakeLists.txt
@@ -0,0 +1,31 @@
+###########################################################################
+# Copyright 2017 IoT.bzh
+#
+# author: Fulup Ar Foll <fulup@iot.bzh>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###########################################################################
+
+##################################################
+# Control Policy Config file
+##################################################
+PROJECT_TARGET_ADD(xds-config)
+
+ file(GLOB CONF_FILES "*.json")
+
+ add_input_files("${CONF_FILES}")
+
+ SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
+ LABELS "BINDING-CONFIG"
+ OUTPUT_NAME ${TARGET_NAME}
+ )
diff --git a/conf.d/project/etc/xds-config.json b/conf.d/project/etc/xds-config.json
new file mode 100644
index 0000000..3646d3f
--- /dev/null
+++ b/conf.d/project/etc/xds-config.json
@@ -0,0 +1,27 @@
+{
+ "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json",
+ "metadata": {
+ "uid": "XDS",
+ "version": "1.0",
+ "api": "xds",
+ "info": "XDS Data collection binding"
+ },
+ "plugins": [{
+ "uid": "supervisor",
+ "info": "Plugin to handle interface with supervisor",
+ "spath": "lib/plugins",
+ "libs": "supervisor.ctlso"
+ }],
+
+ "onload": [],
+
+ "controls": [{
+ "uid": "list",
+ "action": "plugin://supervisor#list"
+ },
+ {
+ "uid": "trace",
+ "action": "plugin://supervisor#trace"
+ }
+ ]
+}
diff --git a/conf.d/wgt/config.xml.in b/conf.d/wgt/config.xml.in
index 7824795..7dab6c0 100644
--- a/conf.d/wgt/config.xml.in
+++ b/conf.d/wgt/config.xml.in
@@ -7,10 +7,10 @@
<author>@PROJECT_AUTHOR@ &lt;@PROJECT_AUTHOR_MAIL@&gt;</author>
<license>@PROJECT_LICENSE@</license>
<feature name="urn:AGL:widget:provided-api">
- <param name="xds-service" value="ws" />
+ <param name="xds" value="ws" />
</feature>
<feature name="urn:AGL:widget:required-api">
- <param name="lib/afb-xds-service.so" value="local" />
+ <param name="lib/afb-xds.so" value="local" />
<param name="harvester" value="ws" />
<param name="supervisor" value="ws" />
</feature>