diff options
author | Arthur Guyader <arthur.guyader@iot.bzh> | 2019-11-07 14:16:16 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2020-01-09 10:43:00 +0100 |
commit | 8b3af0fccba13e4098590322975bbd475d3d4f9e (patch) | |
tree | 29333136c9bca78a421697c048fd5379b062da88 /conf.d | |
parent | 4e1db7198dc91adce159abbea60667400569d38c (diff) |
controller: Prepare project ot use the Controller
Initialize an empty message_set to fill later when loading the Plugins
Add the required method to be able to add a message_set
Bug-AGL: SPEC-2988
Change-Id: I1dc784648f69832de8681184adaccbf5300f831d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'conf.d')
-rw-r--r-- | conf.d/CMakeLists.txt | 22 | ||||
-rw-r--r-- | conf.d/cmake/00-default-osconfig.cmake | 1 | ||||
-rw-r--r-- | conf.d/cmake/00-suse-config.cmake | 2 | ||||
-rw-r--r-- | conf.d/cmake/01-debian-config.cmake | 1 | ||||
-rw-r--r-- | conf.d/cmake/01-ubuntu-config.cmake | 1 | ||||
-rw-r--r-- | conf.d/cmake/config.cmake | 10 | ||||
-rw-r--r-- | conf.d/project/CMakeLists.txt | 22 | ||||
-rw-r--r-- | conf.d/project/etc/CMakeLists.txt | 31 | ||||
-rw-r--r-- | conf.d/project/etc/control-low-can.json | 30 |
9 files changed, 119 insertions, 1 deletions
diff --git a/conf.d/CMakeLists.txt b/conf.d/CMakeLists.txt new file mode 100644 index 00000000..28a06096 --- /dev/null +++ b/conf.d/CMakeLists.txt @@ -0,0 +1,22 @@ +########################################################################### +# Copyright 2015, 2016, 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. +########################################################################### + + +# Include any directory not starting with _ +# ----------------------------------------------------- +PROJECT_SUBDIRS_ADD(${PROJECT_SRC_DIR_PATTERN}) diff --git a/conf.d/cmake/00-default-osconfig.cmake b/conf.d/cmake/00-default-osconfig.cmake new file mode 100644 index 00000000..a2b9325c --- /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/00-suse-config.cmake b/conf.d/cmake/00-suse-config.cmake new file mode 100644 index 00000000..8c8303ba --- /dev/null +++ b/conf.d/cmake/00-suse-config.cmake @@ -0,0 +1,2 @@ +add_definitions(-DSUSE_LUA_INCDIR) +list(APPEND PKG_REQUIRED_LIST lua>=5.3) diff --git a/conf.d/cmake/01-debian-config.cmake b/conf.d/cmake/01-debian-config.cmake new file mode 100644 index 00000000..0e5a695e --- /dev/null +++ b/conf.d/cmake/01-debian-config.cmake @@ -0,0 +1 @@ +list(APPEND PKG_REQUIRED_LIST lua53-c++>=5.3) diff --git a/conf.d/cmake/01-ubuntu-config.cmake b/conf.d/cmake/01-ubuntu-config.cmake new file mode 100644 index 00000000..0e5a695e --- /dev/null +++ b/conf.d/cmake/01-ubuntu-config.cmake @@ -0,0 +1 @@ +list(APPEND PKG_REQUIRED_LIST lua53-c++>=5.3) diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake index 0f678433..d7d5f43e 100644 --- a/conf.d/cmake/config.cmake +++ b/conf.d/cmake/config.cmake @@ -38,7 +38,7 @@ set(PROJECT_CMAKE_CONF_DIR "conf.d") # Compilation Mode (DEBUG, RELEASE) # ---------------------------------- -set(BUILD_TYPE "RELEASE" CACHE STRING "Default Build variant chosen. (Overwritten by cli if given)") +set(BUILD_TYPE "DEBUG" CACHE STRING "Default Build variant chosen. (Overwritten by cli if given)") # Activate J1939 # Need module in kernel @@ -100,6 +100,7 @@ set (PKG_REQUIRED_LIST libsystemd>=222 afb-daemon afb-helpers + appcontroller ) # Prefix path where will be installed the files @@ -216,6 +217,13 @@ set(AFB_REMPORT "1234" CACHE STRING "Default binder listening port") 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(PACKAGE_MESSAGE "Install widget file using in the target : afm-util install ${PROJECT_NAME}.wgt") + +# Add Controller config +add_definitions(-DCONTROL_PLUGIN_PATH="${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/lib/plugins:${CMAKE_BINARY_DIR}/package/lib/plugins:${CMAKE_BINARY_DIR}/package/var:${CMAKE_BINARY_DIR}/package-test") +add_definitions(-DCONTROL_CONFIG_PATH="${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/etc:${CMAKE_BINARY_DIR}/package/etc:${CMAKE_BINARY_DIR}/package-test/") + + + # Optional schema validator about now only XML, LUA and JSON # are supported #------------------------------------------------------------ diff --git a/conf.d/project/CMakeLists.txt b/conf.d/project/CMakeLists.txt new file mode 100644 index 00000000..28a06096 --- /dev/null +++ b/conf.d/project/CMakeLists.txt @@ -0,0 +1,22 @@ +########################################################################### +# Copyright 2015, 2016, 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. +########################################################################### + + +# Include any directory not starting with _ +# ----------------------------------------------------- +PROJECT_SUBDIRS_ADD(${PROJECT_SRC_DIR_PATTERN}) diff --git a/conf.d/project/etc/CMakeLists.txt b/conf.d/project/etc/CMakeLists.txt new file mode 100644 index 00000000..2b1d84ee --- /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(low-can-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/control-low-can.json b/conf.d/project/etc/control-low-can.json new file mode 100644 index 00000000..3dbdf18b --- /dev/null +++ b/conf.d/project/etc/control-low-can.json @@ -0,0 +1,30 @@ +{ + "$schema": "", + "metadata": { + "uid": "Low Can", + "version": "1.0", + "api": "low-can", + "info": "Low can Configuration" + }, + "config": { + "active_message_set": 0, + "diagnostic_bus": "hs" + }, + "plugins": [ + { + "uid": "agl-callbacks", + "info": "AGL signals", + "libs": "agl-signals.ctlso" + }, + { + "uid": "j1939-callbacks", + "info": "J1939 signals", + "libs": "j1939-signals.ctlso" + }, + { + "uid": "nmea2000-callbacks", + "info": "NMEA2000 Signals", + "libs": "nmea2000-signals.ctlso" + } + ] +} |