summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-04-14 13:24:07 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-04-14 13:24:07 +0200
commit49fe0eec8f17698fc5f86d0abe01777af1fb2b23 (patch)
tree356cd3e3261934a3fb90786e1789ee4ad001cbe5
parent044ef27d3667a114964549f89c63ab1ea6655877 (diff)
Change directory architecture to use 2 separated projects.
Each projects, binder and generator, has to be compiled separatly. CAN-binder will host high and low level binding CAN-config-generator only the generator used for low level binding. build.sh script just launch both build in their respective dir. Change-Id: Ic77932660fcca507b23a631d4e4e790f608880ae Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--.gitmodules10
-rw-r--r--CAN-binder/CMakeLists.txt (renamed from CMakeLists.txt)0
-rw-r--r--CAN-binder/Makefile37
-rw-r--r--CAN-binder/can_samples/citroen/citroen_c5_highway_1 (renamed from can_samples/citroen/citroen_c5_highway_1)0
-rw-r--r--CAN-binder/can_samples/citroen/citroen_c5_highway_2 (renamed from can_samples/citroen/citroen_c5_highway_2)0
-rw-r--r--CAN-binder/can_samples/ford/focus/accel (renamed from can_samples/ford/focus/accel)0
-rw-r--r--CAN-binder/can_samples/ford/focus/alldoors_lock (renamed from can_samples/ford/focus/alldoors_lock)0
-rw-r--r--CAN-binder/can_samples/ford/focus/alldoors_open (renamed from can_samples/ford/focus/alldoors_open)0
-rw-r--r--CAN-binder/can_samples/ford/focus/brake (renamed from can_samples/ford/focus/brake)0
-rw-r--r--CAN-binder/can_samples/ford/focus/handbrake (renamed from can_samples/ford/focus/handbrake)0
-rw-r--r--CAN-binder/can_samples/ford/focus/ignition (renamed from can_samples/ford/focus/ignition)0
-rw-r--r--CAN-binder/can_samples/ford/focus/lights (renamed from can_samples/ford/focus/lights)0
-rw-r--r--CAN-binder/can_samples/ford/focus/turnleft (renamed from can_samples/ford/focus/turnleft)0
-rw-r--r--CAN-binder/can_samples/ford/focus/turnright (renamed from can_samples/ford/focus/turnright)0
-rwxr-xr-xCAN-binder/can_samples/init_can.sh (renamed from can_samples/init_can.sh)0
-rwxr-xr-xCAN-binder/can_samples/init_vcan.sh (renamed from can_samples/init_vcan.sh)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/accel (renamed from can_samples/toyota/auris/accel)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/alldoors_lock (renamed from can_samples/toyota/auris/alldoors_lock)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/alldoors_unlock (renamed from can_samples/toyota/auris/alldoors_unlock)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/brake (renamed from can_samples/toyota/auris/brake)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/engineoff (renamed from can_samples/toyota/auris/engineoff)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/handbrake (renamed from can_samples/toyota/auris/handbrake)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/ignition (renamed from can_samples/toyota/auris/ignition)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/keydisengage (renamed from can_samples/toyota/auris/keydisengage)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/keyengage (renamed from can_samples/toyota/auris/keyengage)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/keyin (renamed from can_samples/toyota/auris/keyin)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/keyout (renamed from can_samples/toyota/auris/keyout)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/lights (renamed from can_samples/toyota/auris/lights)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/trip_test_with_obd2_vehicle_speed_requests (renamed from can_samples/toyota/auris/trip_test_with_obd2_vehicle_speed_requests)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/turnleft (renamed from can_samples/toyota/auris/turnleft)0
-rw-r--r--CAN-binder/can_samples/toyota/auris/turnright (renamed from can_samples/toyota/auris/turnright)0
-rw-r--r--CAN-binder/etc/config.cmake (renamed from etc/config.cmake)0
-rw-r--r--CAN-binder/etc/export.map (renamed from etc/export.map)0
-rw-r--r--CAN-binder/examples/basic/generate_example.cpp (renamed from examples/basic/generate_example.cpp)0
-rw-r--r--CAN-binder/examples/basic/handlers.cpp (renamed from can-config-generator/tests/handlers.cpp)0
-rw-r--r--CAN-binder/examples/basic/signals.json (renamed from examples/basic/signals.json)0
-rw-r--r--CAN-binder/examples/toyota/configuration-generated.cpp (renamed from examples/toyota/configuration-generated.cpp)0
-rw-r--r--CAN-binder/examples/toyota/signals.json (renamed from examples/toyota/signals.json)0
-rw-r--r--CAN-binder/libs/CMakeLists.txt (renamed from libs/CMakeLists.txt)0
m---------CAN-binder/libs/bitfield-c (renamed from libs/bitfield-c)0
m---------CAN-binder/libs/isotp-c (renamed from libs/isotp-c)0
m---------CAN-binder/libs/nanopb (renamed from libs/nanopb)0
m---------CAN-binder/libs/openxc-message-format (renamed from libs/openxc-message-format)0
m---------CAN-binder/libs/uds-c (renamed from libs/uds-c)0
-rw-r--r--CAN-binder/low-can-binding/CMakeLists.txt (renamed from low-can-binding/CMakeLists.txt)0
-rw-r--r--CAN-binder/low-can-binding/can/can-bus-dev.cpp (renamed from low-can-binding/can/can-bus-dev.cpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-bus-dev.hpp (renamed from low-can-binding/can/can-bus-dev.hpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-bus.cpp (renamed from low-can-binding/can/can-bus.cpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-bus.hpp (renamed from low-can-binding/can/can-bus.hpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-command.hpp (renamed from low-can-binding/can/can-command.hpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-decoder.cpp (renamed from low-can-binding/can/can-decoder.cpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-decoder.hpp (renamed from low-can-binding/can/can-decoder.hpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-message-definition.cpp (renamed from low-can-binding/can/can-message-definition.cpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-message-definition.hpp (renamed from low-can-binding/can/can-message-definition.hpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-message-set.cpp (renamed from low-can-binding/can/can-message-set.cpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-message-set.hpp (renamed from low-can-binding/can/can-message-set.hpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-message.cpp (renamed from low-can-binding/can/can-message.cpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-message.hpp (renamed from low-can-binding/can/can-message.hpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-signals.cpp (renamed from low-can-binding/can/can-signals.cpp)0
-rw-r--r--CAN-binder/low-can-binding/can/can-signals.hpp (renamed from low-can-binding/can/can-signals.hpp)0
-rw-r--r--CAN-binder/low-can-binding/configuration-generated.cpp (renamed from low-can-binding/configuration-generated.cpp)0
-rw-r--r--CAN-binder/low-can-binding/configuration.cpp (renamed from low-can-binding/configuration.cpp)0
-rw-r--r--CAN-binder/low-can-binding/configuration.hpp (renamed from low-can-binding/configuration.hpp)0
-rw-r--r--CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp (renamed from low-can-binding/diagnostic/active-diagnostic-request.cpp)0
-rw-r--r--CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp (renamed from low-can-binding/diagnostic/active-diagnostic-request.hpp)0
-rw-r--r--CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp (renamed from low-can-binding/diagnostic/diagnostic-manager.cpp)0
-rw-r--r--CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp (renamed from low-can-binding/diagnostic/diagnostic-manager.hpp)0
-rw-r--r--CAN-binder/low-can-binding/diagnostic/diagnostic-message.cpp (renamed from low-can-binding/diagnostic/diagnostic-message.cpp)0
-rw-r--r--CAN-binder/low-can-binding/diagnostic/diagnostic-message.hpp (renamed from low-can-binding/diagnostic/diagnostic-message.hpp)0
-rw-r--r--CAN-binder/low-can-binding/low-can-binding.cpp (renamed from low-can-binding/low-can-binding.cpp)0
-rw-r--r--CAN-binder/low-can-binding/low-can-binding.hpp (renamed from low-can-binding/low-can-binding.hpp)0
-rw-r--r--CAN-binder/low-can-binding/packaging/wgt/config.xml (renamed from low-can-binding/packaging/wgt/config.xml)0
-rw-r--r--CAN-binder/low-can-binding/packaging/wgt/etc/can_buses.json (renamed from low-can-binding/packaging/wgt/etc/can_buses.json)0
-rw-r--r--CAN-binder/low-can-binding/packaging/wgt/icon.png (renamed from low-can-binding/packaging/wgt/icon.png)bin4035 -> 4035 bytes
-rw-r--r--CAN-binder/low-can-binding/utils/config-parser.cpp (renamed from low-can-binding/utils/config-parser.cpp)0
-rw-r--r--CAN-binder/low-can-binding/utils/config-parser.hpp (renamed from low-can-binding/utils/config-parser.hpp)0
-rw-r--r--CAN-binder/low-can-binding/utils/openxc-utils.cpp (renamed from low-can-binding/utils/openxc-utils.cpp)0
-rw-r--r--CAN-binder/low-can-binding/utils/openxc-utils.hpp (renamed from low-can-binding/utils/openxc-utils.hpp)0
-rw-r--r--CAN-binder/low-can-binding/utils/signals.cpp (renamed from low-can-binding/utils/signals.cpp)0
-rw-r--r--CAN-binder/low-can-binding/utils/signals.hpp (renamed from low-can-binding/utils/signals.hpp)0
-rw-r--r--CAN-binder/low-can-binding/utils/socket.cpp (renamed from low-can-binding/utils/socket.cpp)0
-rw-r--r--CAN-binder/low-can-binding/utils/socket.hpp (renamed from low-can-binding/utils/socket.hpp)0
-rw-r--r--CAN-binder/low-can-binding/utils/timer.cpp (renamed from low-can-binding/utils/timer.cpp)0
-rw-r--r--CAN-binder/low-can-binding/utils/timer.hpp (renamed from low-can-binding/utils/timer.hpp)0
-rwxr-xr-xCAN-config-generator/.gitignore (renamed from can-config-generator/.gitignore)0
-rwxr-xr-xCAN-config-generator/3rdparty/json/json.hpp (renamed from can-config-generator/3rdparty/json/json.hpp)0
-rw-r--r--CAN-config-generator/CMakeLists.txt283
-rw-r--r--CAN-config-generator/LICENSE (renamed from can-config-generator/LICENSE)0
-rw-r--r--CAN-config-generator/Makefile37
-rw-r--r--CAN-config-generator/README.md (renamed from can-config-generator/README.md)0
-rwxr-xr-xCAN-config-generator/build.sh (renamed from can-config-generator/build.sh)0
-rw-r--r--CAN-config-generator/can-config-generator.sln (renamed from can-config-generator/can-config-generator.sln)0
-rw-r--r--CAN-config-generator/can-config-generator.vcxproj (renamed from can-config-generator/can-config-generator.vcxproj)0
-rw-r--r--CAN-config-generator/etc/config.cmake79
-rw-r--r--CAN-config-generator/etc/export.map1
-rw-r--r--CAN-config-generator/src/CMakeLists.txt (renamed from can-config-generator/CMakeLists.txt)18
-rw-r--r--CAN-config-generator/src/main.cpp (renamed from can-config-generator/src/main.cpp)0
-rw-r--r--CAN-config-generator/src/main.hpp (renamed from can-config-generator/src/main.hpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/can_bus.cpp (renamed from can-config-generator/src/openxc/can_bus.cpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/can_bus.hpp (renamed from can-config-generator/src/openxc/can_bus.hpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/can_message.cpp (renamed from can-config-generator/src/openxc/can_message.cpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/can_message.hpp (renamed from can-config-generator/src/openxc/can_message.hpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/command.cpp (renamed from can-config-generator/src/openxc/command.cpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/command.hpp (renamed from can-config-generator/src/openxc/command.hpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/diagnostic_message.cpp (renamed from can-config-generator/src/openxc/diagnostic_message.cpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/diagnostic_message.hpp (renamed from can-config-generator/src/openxc/diagnostic_message.hpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/mapping.cpp (renamed from can-config-generator/src/openxc/mapping.cpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/mapping.hpp (renamed from can-config-generator/src/openxc/mapping.hpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/message_set.cpp (renamed from can-config-generator/src/openxc/message_set.cpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/message_set.hpp (renamed from can-config-generator/src/openxc/message_set.hpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/signal.cpp (renamed from can-config-generator/src/openxc/signal.cpp)0
-rwxr-xr-xCAN-config-generator/src/openxc/signal.hpp (renamed from can-config-generator/src/openxc/signal.hpp)0
-rwxr-xr-xCAN-config-generator/tests/basic.json (renamed from can-config-generator/tests/basic.json)0
-rw-r--r--CAN-config-generator/tests/generated.cpp (renamed from can-config-generator/tests/generated.cpp)0
-rw-r--r--CAN-config-generator/tests/handlers.cpp (renamed from examples/basic/handlers.cpp)0
-rwxr-xr-xCAN-config-generator/tests/signals.json (renamed from can-config-generator/tests/signals.json)0
-rw-r--r--README.md18
-rwxr-xr-xbuild.sh82
118 files changed, 469 insertions, 96 deletions
diff --git a/.gitmodules b/.gitmodules
index db4dd122..8441eeac 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,15 +1,15 @@
[submodule "low-can-binding/libs/openxc-message-format"]
- path = libs/openxc-message-format
+ path = CAN-binder/libs/openxc-message-format
url = https://github.com/openxc/openxc-message-format
[submodule "low-can-binding/libs/nanopb"]
- path = libs/nanopb
+ path = CAN-binder/libs/nanopb
url = https://github.com/nanopb/nanopb.git
[submodule "low-can-binding/libs/uds-c"]
- path = libs/uds-c
+ path = CAN-binder/libs/uds-c
url = https://github.com/openxc/uds-c.git
[submodule "low-can-binding/libs/bitfield-c"]
- path = libs/bitfield-c
+ path = CAN-binder/libs/bitfield-c
url = https://github.com/openxc/bitfield-c.git
[submodule "low-can-binding/libs/isotp-c"]
- path = libs/isotp-c
+ path = CAN-binder/libs/isotp-c
url = https://github.com/openxc/isotp-c
diff --git a/CMakeLists.txt b/CAN-binder/CMakeLists.txt
index ec910897..ec910897 100644
--- a/CMakeLists.txt
+++ b/CAN-binder/CMakeLists.txt
diff --git a/CAN-binder/Makefile b/CAN-binder/Makefile
new file mode 100644
index 00000000..658ef325
--- /dev/null
+++ b/CAN-binder/Makefile
@@ -0,0 +1,37 @@
+# Copyright (C) 2015, 2016 "IoT.bzh"
+# Author "Romain Forlot" <romain.forlot@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.
+
+BUILD_DIR := build
+
+.PHONY: all clean mrproper ${BUILD_DIR}/Makefile
+
+all: build package
+
+clean:
+ @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} clean) || echo Nothing to clean
+
+mrproper:
+ rm -rf ${BUILD_DIR}
+
+build: ${BUILD_DIR}/Makefile
+ cmake --build ${BUILD_DIR} --clean-first
+
+
+package:
+ cmake --build ${BUILD_DIR} --target widget
+
+${BUILD_DIR}/Makefile:
+ @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
+ @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake ${CMAKE_OPTS} ..)
diff --git a/can_samples/citroen/citroen_c5_highway_1 b/CAN-binder/can_samples/citroen/citroen_c5_highway_1
index f904932e..f904932e 100644
--- a/can_samples/citroen/citroen_c5_highway_1
+++ b/CAN-binder/can_samples/citroen/citroen_c5_highway_1
diff --git a/can_samples/citroen/citroen_c5_highway_2 b/CAN-binder/can_samples/citroen/citroen_c5_highway_2
index 7aa923a4..7aa923a4 100644
--- a/can_samples/citroen/citroen_c5_highway_2
+++ b/CAN-binder/can_samples/citroen/citroen_c5_highway_2
diff --git a/can_samples/ford/focus/accel b/CAN-binder/can_samples/ford/focus/accel
index 9c63a7b7..9c63a7b7 100644
--- a/can_samples/ford/focus/accel
+++ b/CAN-binder/can_samples/ford/focus/accel
diff --git a/can_samples/ford/focus/alldoors_lock b/CAN-binder/can_samples/ford/focus/alldoors_lock
index d4a3a56e..d4a3a56e 100644
--- a/can_samples/ford/focus/alldoors_lock
+++ b/CAN-binder/can_samples/ford/focus/alldoors_lock
diff --git a/can_samples/ford/focus/alldoors_open b/CAN-binder/can_samples/ford/focus/alldoors_open
index 72552d9e..72552d9e 100644
--- a/can_samples/ford/focus/alldoors_open
+++ b/CAN-binder/can_samples/ford/focus/alldoors_open
diff --git a/can_samples/ford/focus/brake b/CAN-binder/can_samples/ford/focus/brake
index 141ce80c..141ce80c 100644
--- a/can_samples/ford/focus/brake
+++ b/CAN-binder/can_samples/ford/focus/brake
diff --git a/can_samples/ford/focus/handbrake b/CAN-binder/can_samples/ford/focus/handbrake
index 6614e087..6614e087 100644
--- a/can_samples/ford/focus/handbrake
+++ b/CAN-binder/can_samples/ford/focus/handbrake
diff --git a/can_samples/ford/focus/ignition b/CAN-binder/can_samples/ford/focus/ignition
index e33a991f..e33a991f 100644
--- a/can_samples/ford/focus/ignition
+++ b/CAN-binder/can_samples/ford/focus/ignition
diff --git a/can_samples/ford/focus/lights b/CAN-binder/can_samples/ford/focus/lights
index ae7b0368..ae7b0368 100644
--- a/can_samples/ford/focus/lights
+++ b/CAN-binder/can_samples/ford/focus/lights
diff --git a/can_samples/ford/focus/turnleft b/CAN-binder/can_samples/ford/focus/turnleft
index 83b20003..83b20003 100644
--- a/can_samples/ford/focus/turnleft
+++ b/CAN-binder/can_samples/ford/focus/turnleft
diff --git a/can_samples/ford/focus/turnright b/CAN-binder/can_samples/ford/focus/turnright
index f039a4ba..f039a4ba 100644
--- a/can_samples/ford/focus/turnright
+++ b/CAN-binder/can_samples/ford/focus/turnright
diff --git a/can_samples/init_can.sh b/CAN-binder/can_samples/init_can.sh
index a7900343..a7900343 100755
--- a/can_samples/init_can.sh
+++ b/CAN-binder/can_samples/init_can.sh
diff --git a/can_samples/init_vcan.sh b/CAN-binder/can_samples/init_vcan.sh
index 531dd1e1..531dd1e1 100755
--- a/can_samples/init_vcan.sh
+++ b/CAN-binder/can_samples/init_vcan.sh
diff --git a/can_samples/toyota/auris/accel b/CAN-binder/can_samples/toyota/auris/accel
index 9ddd9212..9ddd9212 100644
--- a/can_samples/toyota/auris/accel
+++ b/CAN-binder/can_samples/toyota/auris/accel
diff --git a/can_samples/toyota/auris/alldoors_lock b/CAN-binder/can_samples/toyota/auris/alldoors_lock
index 10705c9b..10705c9b 100644
--- a/can_samples/toyota/auris/alldoors_lock
+++ b/CAN-binder/can_samples/toyota/auris/alldoors_lock
diff --git a/can_samples/toyota/auris/alldoors_unlock b/CAN-binder/can_samples/toyota/auris/alldoors_unlock
index 06260c73..06260c73 100644
--- a/can_samples/toyota/auris/alldoors_unlock
+++ b/CAN-binder/can_samples/toyota/auris/alldoors_unlock
diff --git a/can_samples/toyota/auris/brake b/CAN-binder/can_samples/toyota/auris/brake
index 75704e30..75704e30 100644
--- a/can_samples/toyota/auris/brake
+++ b/CAN-binder/can_samples/toyota/auris/brake
diff --git a/can_samples/toyota/auris/engineoff b/CAN-binder/can_samples/toyota/auris/engineoff
index 67451f0f..67451f0f 100644
--- a/can_samples/toyota/auris/engineoff
+++ b/CAN-binder/can_samples/toyota/auris/engineoff
diff --git a/can_samples/toyota/auris/handbrake b/CAN-binder/can_samples/toyota/auris/handbrake
index 1d939e93..1d939e93 100644
--- a/can_samples/toyota/auris/handbrake
+++ b/CAN-binder/can_samples/toyota/auris/handbrake
diff --git a/can_samples/toyota/auris/ignition b/CAN-binder/can_samples/toyota/auris/ignition
index 7a3209c4..7a3209c4 100644
--- a/can_samples/toyota/auris/ignition
+++ b/CAN-binder/can_samples/toyota/auris/ignition
diff --git a/can_samples/toyota/auris/keydisengage b/CAN-binder/can_samples/toyota/auris/keydisengage
index 2b4e87ad..2b4e87ad 100644
--- a/can_samples/toyota/auris/keydisengage
+++ b/CAN-binder/can_samples/toyota/auris/keydisengage
diff --git a/can_samples/toyota/auris/keyengage b/CAN-binder/can_samples/toyota/auris/keyengage
index 7802370c..7802370c 100644
--- a/can_samples/toyota/auris/keyengage
+++ b/CAN-binder/can_samples/toyota/auris/keyengage
diff --git a/can_samples/toyota/auris/keyin b/CAN-binder/can_samples/toyota/auris/keyin
index c6e0dd94..c6e0dd94 100644
--- a/can_samples/toyota/auris/keyin
+++ b/CAN-binder/can_samples/toyota/auris/keyin
diff --git a/can_samples/toyota/auris/keyout b/CAN-binder/can_samples/toyota/auris/keyout
index 633943f7..633943f7 100644
--- a/can_samples/toyota/auris/keyout
+++ b/CAN-binder/can_samples/toyota/auris/keyout
diff --git a/can_samples/toyota/auris/lights b/CAN-binder/can_samples/toyota/auris/lights
index fc476cd7..fc476cd7 100644
--- a/can_samples/toyota/auris/lights
+++ b/CAN-binder/can_samples/toyota/auris/lights
diff --git a/can_samples/toyota/auris/trip_test_with_obd2_vehicle_speed_requests b/CAN-binder/can_samples/toyota/auris/trip_test_with_obd2_vehicle_speed_requests
index b2585120..b2585120 100644
--- a/can_samples/toyota/auris/trip_test_with_obd2_vehicle_speed_requests
+++ b/CAN-binder/can_samples/toyota/auris/trip_test_with_obd2_vehicle_speed_requests
diff --git a/can_samples/toyota/auris/turnleft b/CAN-binder/can_samples/toyota/auris/turnleft
index b82a7c39..b82a7c39 100644
--- a/can_samples/toyota/auris/turnleft
+++ b/CAN-binder/can_samples/toyota/auris/turnleft
diff --git a/can_samples/toyota/auris/turnright b/CAN-binder/can_samples/toyota/auris/turnright
index f9192e47..f9192e47 100644
--- a/can_samples/toyota/auris/turnright
+++ b/CAN-binder/can_samples/toyota/auris/turnright
diff --git a/etc/config.cmake b/CAN-binder/etc/config.cmake
index 4b910d25..4b910d25 100644
--- a/etc/config.cmake
+++ b/CAN-binder/etc/config.cmake
diff --git a/etc/export.map b/CAN-binder/etc/export.map
index 52c1b4aa..52c1b4aa 100644
--- a/etc/export.map
+++ b/CAN-binder/etc/export.map
diff --git a/examples/basic/generate_example.cpp b/CAN-binder/examples/basic/generate_example.cpp
index 24b01df1..24b01df1 100644
--- a/examples/basic/generate_example.cpp
+++ b/CAN-binder/examples/basic/generate_example.cpp
diff --git a/can-config-generator/tests/handlers.cpp b/CAN-binder/examples/basic/handlers.cpp
index 4316f15f..4316f15f 100644
--- a/can-config-generator/tests/handlers.cpp
+++ b/CAN-binder/examples/basic/handlers.cpp
diff --git a/examples/basic/signals.json b/CAN-binder/examples/basic/signals.json
index 8d9a2d24..8d9a2d24 100644
--- a/examples/basic/signals.json
+++ b/CAN-binder/examples/basic/signals.json
diff --git a/examples/toyota/configuration-generated.cpp b/CAN-binder/examples/toyota/configuration-generated.cpp
index 4ffc9022..4ffc9022 100644
--- a/examples/toyota/configuration-generated.cpp
+++ b/CAN-binder/examples/toyota/configuration-generated.cpp
diff --git a/examples/toyota/signals.json b/CAN-binder/examples/toyota/signals.json
index e6260c1a..e6260c1a 100644
--- a/examples/toyota/signals.json
+++ b/CAN-binder/examples/toyota/signals.json
diff --git a/libs/CMakeLists.txt b/CAN-binder/libs/CMakeLists.txt
index cd29ea83..cd29ea83 100644
--- a/libs/CMakeLists.txt
+++ b/CAN-binder/libs/CMakeLists.txt
diff --git a/libs/bitfield-c b/CAN-binder/libs/bitfield-c
-Subproject a34745ec93ae0a1d4f1b640dba8fb6702331a8e
+Subproject a34745ec93ae0a1d4f1b640dba8fb6702331a8e
diff --git a/libs/isotp-c b/CAN-binder/libs/isotp-c
-Subproject ee24440b7c123ab1b0317e57be33e837a1cb51f
+Subproject ee24440b7c123ab1b0317e57be33e837a1cb51f
diff --git a/libs/nanopb b/CAN-binder/libs/nanopb
-Subproject 651bdc45f2180b17c132470ff1a3a515dbffaa7
+Subproject 651bdc45f2180b17c132470ff1a3a515dbffaa7
diff --git a/libs/openxc-message-format b/CAN-binder/libs/openxc-message-format
-Subproject d9f54f97578429773421abce98d5f6579717afc
+Subproject d9f54f97578429773421abce98d5f6579717afc
diff --git a/libs/uds-c b/CAN-binder/libs/uds-c
-Subproject ca20db3dd978871bbb9f01f3c862b510c03d1dc
+Subproject ca20db3dd978871bbb9f01f3c862b510c03d1dc
diff --git a/low-can-binding/CMakeLists.txt b/CAN-binder/low-can-binding/CMakeLists.txt
index a1768abb..a1768abb 100644
--- a/low-can-binding/CMakeLists.txt
+++ b/CAN-binder/low-can-binding/CMakeLists.txt
diff --git a/low-can-binding/can/can-bus-dev.cpp b/CAN-binder/low-can-binding/can/can-bus-dev.cpp
index fb76498f..fb76498f 100644
--- a/low-can-binding/can/can-bus-dev.cpp
+++ b/CAN-binder/low-can-binding/can/can-bus-dev.cpp
diff --git a/low-can-binding/can/can-bus-dev.hpp b/CAN-binder/low-can-binding/can/can-bus-dev.hpp
index a612e7d8..a612e7d8 100644
--- a/low-can-binding/can/can-bus-dev.hpp
+++ b/CAN-binder/low-can-binding/can/can-bus-dev.hpp
diff --git a/low-can-binding/can/can-bus.cpp b/CAN-binder/low-can-binding/can/can-bus.cpp
index 33f58fd9..33f58fd9 100644
--- a/low-can-binding/can/can-bus.cpp
+++ b/CAN-binder/low-can-binding/can/can-bus.cpp
diff --git a/low-can-binding/can/can-bus.hpp b/CAN-binder/low-can-binding/can/can-bus.hpp
index eb474769..eb474769 100644
--- a/low-can-binding/can/can-bus.hpp
+++ b/CAN-binder/low-can-binding/can/can-bus.hpp
diff --git a/low-can-binding/can/can-command.hpp b/CAN-binder/low-can-binding/can/can-command.hpp
index 4cf20cb5..4cf20cb5 100644
--- a/low-can-binding/can/can-command.hpp
+++ b/CAN-binder/low-can-binding/can/can-command.hpp
diff --git a/low-can-binding/can/can-decoder.cpp b/CAN-binder/low-can-binding/can/can-decoder.cpp
index 8843059d..8843059d 100644
--- a/low-can-binding/can/can-decoder.cpp
+++ b/CAN-binder/low-can-binding/can/can-decoder.cpp
diff --git a/low-can-binding/can/can-decoder.hpp b/CAN-binder/low-can-binding/can/can-decoder.hpp
index ebe1de20..ebe1de20 100644
--- a/low-can-binding/can/can-decoder.hpp
+++ b/CAN-binder/low-can-binding/can/can-decoder.hpp
diff --git a/low-can-binding/can/can-message-definition.cpp b/CAN-binder/low-can-binding/can/can-message-definition.cpp
index 206d0b0c..206d0b0c 100644
--- a/low-can-binding/can/can-message-definition.cpp
+++ b/CAN-binder/low-can-binding/can/can-message-definition.cpp
diff --git a/low-can-binding/can/can-message-definition.hpp b/CAN-binder/low-can-binding/can/can-message-definition.hpp
index 98cb2c5d..98cb2c5d 100644
--- a/low-can-binding/can/can-message-definition.hpp
+++ b/CAN-binder/low-can-binding/can/can-message-definition.hpp
diff --git a/low-can-binding/can/can-message-set.cpp b/CAN-binder/low-can-binding/can/can-message-set.cpp
index a9f8cf23..a9f8cf23 100644
--- a/low-can-binding/can/can-message-set.cpp
+++ b/CAN-binder/low-can-binding/can/can-message-set.cpp
diff --git a/low-can-binding/can/can-message-set.hpp b/CAN-binder/low-can-binding/can/can-message-set.hpp
index 94e2d8d5..94e2d8d5 100644
--- a/low-can-binding/can/can-message-set.hpp
+++ b/CAN-binder/low-can-binding/can/can-message-set.hpp
diff --git a/low-can-binding/can/can-message.cpp b/CAN-binder/low-can-binding/can/can-message.cpp
index f61de67e..f61de67e 100644
--- a/low-can-binding/can/can-message.cpp
+++ b/CAN-binder/low-can-binding/can/can-message.cpp
diff --git a/low-can-binding/can/can-message.hpp b/CAN-binder/low-can-binding/can/can-message.hpp
index 6fe03172..6fe03172 100644
--- a/low-can-binding/can/can-message.hpp
+++ b/CAN-binder/low-can-binding/can/can-message.hpp
diff --git a/low-can-binding/can/can-signals.cpp b/CAN-binder/low-can-binding/can/can-signals.cpp
index 6211fa1d..6211fa1d 100644
--- a/low-can-binding/can/can-signals.cpp
+++ b/CAN-binder/low-can-binding/can/can-signals.cpp
diff --git a/low-can-binding/can/can-signals.hpp b/CAN-binder/low-can-binding/can/can-signals.hpp
index 34ebeebd..34ebeebd 100644
--- a/low-can-binding/can/can-signals.hpp
+++ b/CAN-binder/low-can-binding/can/can-signals.hpp
diff --git a/low-can-binding/configuration-generated.cpp b/CAN-binder/low-can-binding/configuration-generated.cpp
index 2e965703..2e965703 100644
--- a/low-can-binding/configuration-generated.cpp
+++ b/CAN-binder/low-can-binding/configuration-generated.cpp
diff --git a/low-can-binding/configuration.cpp b/CAN-binder/low-can-binding/configuration.cpp
index 8a50cbc4..8a50cbc4 100644
--- a/low-can-binding/configuration.cpp
+++ b/CAN-binder/low-can-binding/configuration.cpp
diff --git a/low-can-binding/configuration.hpp b/CAN-binder/low-can-binding/configuration.hpp
index 017b148d..017b148d 100644
--- a/low-can-binding/configuration.hpp
+++ b/CAN-binder/low-can-binding/configuration.hpp
diff --git a/low-can-binding/diagnostic/active-diagnostic-request.cpp b/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp
index 7ddf1d51..7ddf1d51 100644
--- a/low-can-binding/diagnostic/active-diagnostic-request.cpp
+++ b/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp
diff --git a/low-can-binding/diagnostic/active-diagnostic-request.hpp b/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp
index 247eeb17..247eeb17 100644
--- a/low-can-binding/diagnostic/active-diagnostic-request.hpp
+++ b/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp
diff --git a/low-can-binding/diagnostic/diagnostic-manager.cpp b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp
index e3a78d0f..e3a78d0f 100644
--- a/low-can-binding/diagnostic/diagnostic-manager.cpp
+++ b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp
diff --git a/low-can-binding/diagnostic/diagnostic-manager.hpp b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp
index 3edb2b12..3edb2b12 100644
--- a/low-can-binding/diagnostic/diagnostic-manager.hpp
+++ b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp
diff --git a/low-can-binding/diagnostic/diagnostic-message.cpp b/CAN-binder/low-can-binding/diagnostic/diagnostic-message.cpp
index 6f615574..6f615574 100644
--- a/low-can-binding/diagnostic/diagnostic-message.cpp
+++ b/CAN-binder/low-can-binding/diagnostic/diagnostic-message.cpp
diff --git a/low-can-binding/diagnostic/diagnostic-message.hpp b/CAN-binder/low-can-binding/diagnostic/diagnostic-message.hpp
index 064904d2..064904d2 100644
--- a/low-can-binding/diagnostic/diagnostic-message.hpp
+++ b/CAN-binder/low-can-binding/diagnostic/diagnostic-message.hpp
diff --git a/low-can-binding/low-can-binding.cpp b/CAN-binder/low-can-binding/low-can-binding.cpp
index 07b3f1ea..07b3f1ea 100644
--- a/low-can-binding/low-can-binding.cpp
+++ b/CAN-binder/low-can-binding/low-can-binding.cpp
diff --git a/low-can-binding/low-can-binding.hpp b/CAN-binder/low-can-binding/low-can-binding.hpp
index ed5741d8..ed5741d8 100644
--- a/low-can-binding/low-can-binding.hpp
+++ b/CAN-binder/low-can-binding/low-can-binding.hpp
diff --git a/low-can-binding/packaging/wgt/config.xml b/CAN-binder/low-can-binding/packaging/wgt/config.xml
index d735ce2b..d735ce2b 100644
--- a/low-can-binding/packaging/wgt/config.xml
+++ b/CAN-binder/low-can-binding/packaging/wgt/config.xml
diff --git a/low-can-binding/packaging/wgt/etc/can_buses.json b/CAN-binder/low-can-binding/packaging/wgt/etc/can_buses.json
index c4292df2..c4292df2 100644
--- a/low-can-binding/packaging/wgt/etc/can_buses.json
+++ b/CAN-binder/low-can-binding/packaging/wgt/etc/can_buses.json
diff --git a/low-can-binding/packaging/wgt/icon.png b/CAN-binder/low-can-binding/packaging/wgt/icon.png
index 9bd6a6e4..9bd6a6e4 100644
--- a/low-can-binding/packaging/wgt/icon.png
+++ b/CAN-binder/low-can-binding/packaging/wgt/icon.png
Binary files differ
diff --git a/low-can-binding/utils/config-parser.cpp b/CAN-binder/low-can-binding/utils/config-parser.cpp
index e73b0f94..e73b0f94 100644
--- a/low-can-binding/utils/config-parser.cpp
+++ b/CAN-binder/low-can-binding/utils/config-parser.cpp
diff --git a/low-can-binding/utils/config-parser.hpp b/CAN-binder/low-can-binding/utils/config-parser.hpp
index e6bd9d22..e6bd9d22 100644
--- a/low-can-binding/utils/config-parser.hpp
+++ b/CAN-binder/low-can-binding/utils/config-parser.hpp
diff --git a/low-can-binding/utils/openxc-utils.cpp b/CAN-binder/low-can-binding/utils/openxc-utils.cpp
index 52b49d29..52b49d29 100644
--- a/low-can-binding/utils/openxc-utils.cpp
+++ b/CAN-binder/low-can-binding/utils/openxc-utils.cpp
diff --git a/low-can-binding/utils/openxc-utils.hpp b/CAN-binder/low-can-binding/utils/openxc-utils.hpp
index d36b359b..d36b359b 100644
--- a/low-can-binding/utils/openxc-utils.hpp
+++ b/CAN-binder/low-can-binding/utils/openxc-utils.hpp
diff --git a/low-can-binding/utils/signals.cpp b/CAN-binder/low-can-binding/utils/signals.cpp
index 2e14a98f..2e14a98f 100644
--- a/low-can-binding/utils/signals.cpp
+++ b/CAN-binder/low-can-binding/utils/signals.cpp
diff --git a/low-can-binding/utils/signals.hpp b/CAN-binder/low-can-binding/utils/signals.hpp
index e9417569..e9417569 100644
--- a/low-can-binding/utils/signals.hpp
+++ b/CAN-binder/low-can-binding/utils/signals.hpp
diff --git a/low-can-binding/utils/socket.cpp b/CAN-binder/low-can-binding/utils/socket.cpp
index e75e27f2..e75e27f2 100644
--- a/low-can-binding/utils/socket.cpp
+++ b/CAN-binder/low-can-binding/utils/socket.cpp
diff --git a/low-can-binding/utils/socket.hpp b/CAN-binder/low-can-binding/utils/socket.hpp
index b42eee6a..b42eee6a 100644
--- a/low-can-binding/utils/socket.hpp
+++ b/CAN-binder/low-can-binding/utils/socket.hpp
diff --git a/low-can-binding/utils/timer.cpp b/CAN-binder/low-can-binding/utils/timer.cpp
index a35a3e9f..a35a3e9f 100644
--- a/low-can-binding/utils/timer.cpp
+++ b/CAN-binder/low-can-binding/utils/timer.cpp
diff --git a/low-can-binding/utils/timer.hpp b/CAN-binder/low-can-binding/utils/timer.hpp
index f5659044..f5659044 100644
--- a/low-can-binding/utils/timer.hpp
+++ b/CAN-binder/low-can-binding/utils/timer.hpp
diff --git a/can-config-generator/.gitignore b/CAN-config-generator/.gitignore
index 1d264557..1d264557 100755
--- a/can-config-generator/.gitignore
+++ b/CAN-config-generator/.gitignore
diff --git a/can-config-generator/3rdparty/json/json.hpp b/CAN-config-generator/3rdparty/json/json.hpp
index 6dfc1831..6dfc1831 100755
--- a/can-config-generator/3rdparty/json/json.hpp
+++ b/CAN-config-generator/3rdparty/json/json.hpp
diff --git a/CAN-config-generator/CMakeLists.txt b/CAN-config-generator/CMakeLists.txt
new file mode 100644
index 00000000..ec910897
--- /dev/null
+++ b/CAN-config-generator/CMakeLists.txt
@@ -0,0 +1,283 @@
+###########################################################################
+# Copyright 2015, 2016, 2017 IoT.bzh
+#
+# author: Fulup Ar Foll <fulup@iot.bzh>
+# contrib: Romain Forlot <romain.forlot@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.
+###########################################################################
+
+
+#--------------------------------------------------------------------------
+# WARNING:
+# Do not change this cmake template
+# Customise your preferences in "./etc/config.cmake"
+#--------------------------------------------------------------------------
+
+
+# Generic useful macro
+# -----------------------
+macro(PROJECT_TARGET_ADD TARGET_NAME)
+ set(PROJECT_TARGETS ${PROJECT_TARGETS} ${TARGET_NAME} CACHE INTERNAL PROJECT_TARGETS)
+ set(TARGET_NAME ${TARGET_NAME})
+endmacro(PROJECT_TARGET_ADD)
+
+macro(defstr name value)
+ add_definitions(-D${name}=${value})
+endmacro(defstr)
+
+macro(setc name value)
+ if(NOT DEFINED ${name})
+ set(${name} ${value})
+ endif(NOT DEFINED ${name})
+endmacro(setc)
+
+# Dumb macro to add each directory under a path. Make sure we grab all header files!
+macro(fill_include_dir path)
+ file(GLOB_RECURSE dirlist LIST_DIRECTORIES true "${path}/*")
+ foreach(filename ${dirlist})
+ if(IS_DIRECTORY ${filename})
+ include_directories(${filename})
+ endif(IS_DIRECTORY ${filename})
+ endforeach()
+endmacro(fill_include_dir)
+
+# Helper function to retrieve source files from a library repo.
+function(find_source_files path)
+ file(GLOB_RECURSE filelist "${path}/*.[cpx]")
+ foreach(filename ${filelist})
+ if(NOT ${filename} MATCHES ".*(test|example|sample).*")
+ string(APPEND sources "${filename};")
+ endif(NOT ${filename} MATCHES ".*(test|example|sample).*")
+ endforeach()
+ set(sources_files ${sources} PARENT_SCOPE)
+endfunction(find_source_files)
+
+# WGT packaging function. TYPE can be HTML5, NATIVE, HTML5-HYBRID or BINDING
+macro(build_widget type)
+ message(STATUS "Creation of ${TARGET_NAME}.wgt package for AppFW")
+
+ configure_file(${PROJECT_WGT_DIR}/config.xml config.xml)
+
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_WGT_DIR}/etc")
+ file(GLOB conf_files "${PROJECT_WGT_DIR}/etc/*")
+ foreach(filename ${conf_files})
+ STRING(REGEX REPLACE "^.*/(.*)$" "\\1" shortname ${filename})
+ message(STATUS "Copying config file ${shortname}")
+ configure_file(${filename} ${shortname})
+ endforeach()
+ endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_WGT_DIR}/etc")
+
+ # Include HTML5 files to be packaged
+ if(${type} STREQUAL "HTML5")
+ file(GLOB_RECURSE HTML5FILES app/*)
+
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/gulpfile.js")
+ set(HTML5FILES ${HTML5FILES} "${CMAKE_CURRENT_SOURCE_DIR}/gulpfile.js")
+ endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/gulpfile.js")
+
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/bower.json")
+ set(HTML5FILES ${HTML5FILES} "${CMAKE_CURRENT_SOURCE_DIR}/bower.json")
+ endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/bower.json")
+
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/package.json")
+ set(HTML5FILES ${HTML5FILES} "${CMAKE_CURRENT_SOURCE_DIR}/package.json")
+ endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/package.json")
+ endif(${type} STREQUAL "HTML5")
+
+ if(${type} STREQUAL "HTML5")
+ add_custom_command(
+ OUTPUT ${TARGET_NAME}.wgt
+ DEPENDS ${HTML5FILES} ${PROJECT_WGT_DIR}/config.xml
+ COMMAND rm -rf package
+ COMMAND mkdir -p package/lib package/htdocs package/etc package/bin
+ COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && gulp widget-config-prod
+ COMMAND cp -a dist.prod/* ${CMAKE_CURRENT_BINARY_DIR}/package/htdocs
+ )
+ endif(${type} STREQUAL "HTML5")
+
+ if(${type} STREQUAL "HTML5-HYBRID")
+ add_custom_command(
+ OUTPUT ${TARGET_NAME}.wgt
+ DEPENDS ${HTML5FILES} ${PROJECT_WGT_DIR}/config.xml
+ COMMAND rm -rf package
+ COMMAND mkdir -p package/lib package/htdocs package/etc package/bin
+ COMMAND cp ${TARGET_NAME}.so package/lib
+ )
+ endif(${type} STREQUAL "HTML5-HYBRID")
+
+ if(${type} STREQUAL "BINDING")
+ add_custom_command(
+ OUTPUT ${TARGET_NAME}.wgt
+ DEPENDS ${PROJECT_WGT_DIR}/config.xml
+ COMMAND rm -rf package
+ COMMAND mkdir -p package/lib package/htdocs package/etc package/bin
+ COMMAND cp ${TARGET_NAME}.so package/lib
+ )
+ endif(${type} STREQUAL "BINDING")
+
+ if(${type} STREQUAL "NATIVE")
+ add_custom_command(
+ OUTPUT ${TARGET_NAME}.wgt
+ DEPENDS ${PROJECT_WGT_DIR}/config.xml
+ COMMAND rm -rf package
+ COMMAND mkdir -p package/lib package/htdocs package/etc package/bin
+ COMMAND cp ${TARGET_NAME} package/bin
+ )
+ endif(${type} STREQUAL "NATIVE")
+
+ add_custom_command(
+ OUTPUT ${TARGET_NAME}.wgt
+ COMMAND cp config.xml package/
+ COMMAND cp ${conf_files} package/etc
+ COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/packaging/wgt/${PROJECT_ICON} package/icon.png
+ COMMAND wgtpkg-pack -f -o ${TARGET_NAME}.wgt package
+ APPEND
+ )
+ add_custom_target(widget ALL DEPENDS ${TARGET_NAME}.wgt)
+endmacro()
+
+CMAKE_MINIMUM_REQUIRED(VERSION 3.3)
+setc(CMAKE_BUILD_TYPE Debug)
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+set(CMP0048 1)
+
+# Compiler selection should append before project definition
+# -----------------------------------------------------------
+foreach (GCC_VERSION "6" "5")
+ execute_process(COMMAND gcc-${GCC_VERSION} -dumpversion RESULT_VARIABLE GCCRC OUTPUT_QUIET ERROR_QUIET)
+ if(GCCRC EQUAL 0)
+ set(CMAKE_C_COMPILER "gcc-${GCC_VERSION}")
+ set(CMAKE_CXX_COMPILER "g++-${GCC_VERSION}")
+ set(CMAKE_C_VERSION ${GCC_VERSION})
+ break()
+ endif(GCCRC EQUAL 0)
+endforeach(GCC_VERSION)
+
+# Include project configuration
+# ------------------------------
+include(${CMAKE_CURRENT_SOURCE_DIR}/etc/config.cmake)
+project(${NAME} VERSION ${VERSION})
+setc(PROJECT_PRETTY_NAME "${PRETTY_NAME}")
+setc(PROJECT_DESCRIPTION "${DESCRIPTION}")
+setc(PROJECT_WGT_DIR "packaging/wgt")
+setc(PROJECT_LIBDIR "libs")
+setc(PROJECT_RESOURCES "data")
+
+message(STATUS "")
+message(STATUS "Project=${PROJECT_NAME}/${VERSION}[${PRETTY_NAME} ${DESCRIPTION}]")
+message(STATUS "")
+message(STATUS "gcc/g++ version-${CMAKE_C_VERSION}.x selected")
+
+INCLUDE(FindPkgConfig)
+INCLUDE(CheckIncludeFiles)
+INCLUDE(CheckLibraryExists)
+INCLUDE(GNUInstallDirs)
+
+# Default compilation options
+############################################################################
+link_libraries(-Wl,--as-needed -Wl,--gc-sections)
+add_compile_options(-Wall -Wextra -Wconversion)
+add_compile_options(-Wno-unused-parameter) # frankly not using a parameter does it care?
+add_compile_options(-Wno-sign-compare -Wno-sign-conversion)
+add_compile_options(-Werror=maybe-uninitialized)
+add_compile_options(-Werror=implicit-function-declaration)
+add_compile_options(-ffunction-sections -fdata-sections)
+add_compile_options(-fPIC)
+add_compile_options(-g)
+
+setc(CMAKE_C_FLAGS_PROFILING "-g -O2 -pg -Wp,-U_FORTIFY_SOURCE")
+setc(CMAKE_C_FLAGS_DEBUG "-g -O2 -ggdb -Wp,-U_FORTIFY_SOURCE")
+setc(CMAKE_C_FLAGS_RELEASE "-O2")
+setc(CMAKE_C_FLAGS_CCOV "-g -O2 --coverage")
+
+set(CMAKE_CXX_FLAGS_PROFILING "-g -O0 -std=c++11 -pg -Wp,-U_FORTIFY_SOURCE")
+set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -std=c++11 -ggdb -Wp,-U_FORTIFY_SOURCE")
+set(CMAKE_CXX_FLAGS_RELEASE "-g -O2 -std=c++11")
+set(CMAKE_CXX_FLAGS_CCOV "-g -O2 -std=c++11 --coverage")
+
+setc(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/Install")
+
+# (BUG!!!) as PKG_CONFIG_PATH does not work [should be en env variable]
+setc(PKG_CONFIG_USE_CMAKE_PREFIX_PATH 1)
+
+# Loop on required package and add options
+foreach (PKG_CONFIG ${PKG_REQUIRED_LIST})
+ PKG_CHECK_MODULES(${PKG_CONFIG} REQUIRED ${PKG_CONFIG})
+
+ INCLUDE_DIRECTORIES(${${PKG_CONFIG}_INCLUDE_DIRS})
+ list (APPEND link_libraries ${${PKG_CONFIG}_LIBRARIES})
+ add_compile_options (${${PKG_CONFIG}_CFLAGS})
+endforeach(PKG_CONFIG)
+
+# Optional LibEfence Malloc debug library
+IF(CMAKE_BUILD_TYPE MATCHES DEBUG)
+CHECK_LIBRARY_EXISTS(efence malloc "" HAVE_LIBEFENCE)
+IF(HAVE_LIBEFENCE)
+ MESSAGE(STATUS "Linking with ElectricFence for debugging purposes...")
+ SET(libefence_LIBRARIES "-lefence")
+ list (APPEND link_libraries libefence_LIBRARIES})
+ENDIF(HAVE_LIBEFENCE)
+ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG)
+
+# set default include directories
+#INCLUDE_DIRECTORIES(${EXTRA_INCLUDE_DIRS})
+# Brutal but efficace:
+fill_include_dir(${CMAKE_CURRENT_SOURCE_DIR})
+
+# If no install dir try to guest some smart default
+if(BINDINGS_INSTALL_PREFIX)
+ set(BINDINGS_INSTALL_DIR ${BINDINGS_INSTALL_PREFIX}/${PROJECT_NAME})
+else()
+ set(BINDINGS_INSTALL_DIR ${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME})
+endif()
+
+# Default Linkflag
+if(NOT BINDINGS_LINK_FLAG)
+ set(BINDINGS_LINK_FLAG "-Wl,--version-script=${CMAKE_SOURCE_DIR}/etc/export.map")
+endif()
+
+# Bindings to compile
+# --------------------
+file(GLOB filelist "*")
+foreach(filename ${filelist})
+if(EXISTS "${filename}/CMakeLists.txt")
+ add_subdirectory(${filename})
+endif(EXISTS "${filename}/CMakeLists.txt")
+endforeach()
+
+# Add a dummy target to enable global dependency order
+# -----------------------------------------------------
+if(EXTRA_DEPENDENCIES_ORDER)
+ set(DEPENDENCIES_TARGET ${PROJECT_NAME}_extra_dependencies)
+ add_custom_target(${DEPENDENCIES_TARGET} ALL
+ DEPENDS ${EXTRA_DEPENDENCY_ORDER}
+ )
+endif()
+
+# Cmake does not maintain targets list before 3.7
+# -------------------------------------------------
+if(${CMAKE_VERSION} VERSION_LESS 3.7)
+ set(GLOBAL_TARGET_LIST ${PROJECT_TARGETS})
+else()
+ get_property(GLOBAL_TARGET_LIST GLOBAL PROPERTY GlobalTargetList)
+endif()
+
+# Print developer helper message when everything is done
+# -------------------------------------------------------
+if(CLOSING_MESSAGE AND GLOBAL_TARGET_LIST)
+ add_custom_target(${PROJECT_NAME}_done ALL
+ DEPENDS ${DEPENDENCIES_TARGET} ${GLOBAL_TARGET_LIST}
+ COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "++ ${CLOSING_MESSAGE}"
+ )
+endif()
diff --git a/can-config-generator/LICENSE b/CAN-config-generator/LICENSE
index 8dada3ed..8dada3ed 100644
--- a/can-config-generator/LICENSE
+++ b/CAN-config-generator/LICENSE
diff --git a/CAN-config-generator/Makefile b/CAN-config-generator/Makefile
new file mode 100644
index 00000000..658ef325
--- /dev/null
+++ b/CAN-config-generator/Makefile
@@ -0,0 +1,37 @@
+# Copyright (C) 2015, 2016 "IoT.bzh"
+# Author "Romain Forlot" <romain.forlot@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.
+
+BUILD_DIR := build
+
+.PHONY: all clean mrproper ${BUILD_DIR}/Makefile
+
+all: build package
+
+clean:
+ @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} clean) || echo Nothing to clean
+
+mrproper:
+ rm -rf ${BUILD_DIR}
+
+build: ${BUILD_DIR}/Makefile
+ cmake --build ${BUILD_DIR} --clean-first
+
+
+package:
+ cmake --build ${BUILD_DIR} --target widget
+
+${BUILD_DIR}/Makefile:
+ @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
+ @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake ${CMAKE_OPTS} ..)
diff --git a/can-config-generator/README.md b/CAN-config-generator/README.md
index d4127b8a..d4127b8a 100644
--- a/can-config-generator/README.md
+++ b/CAN-config-generator/README.md
diff --git a/can-config-generator/build.sh b/CAN-config-generator/build.sh
index b6d9216a..b6d9216a 100755
--- a/can-config-generator/build.sh
+++ b/CAN-config-generator/build.sh
diff --git a/can-config-generator/can-config-generator.sln b/CAN-config-generator/can-config-generator.sln
index aa58f4a2..aa58f4a2 100644
--- a/can-config-generator/can-config-generator.sln
+++ b/CAN-config-generator/can-config-generator.sln
diff --git a/can-config-generator/can-config-generator.vcxproj b/CAN-config-generator/can-config-generator.vcxproj
index f51296a5..f51296a5 100644
--- a/can-config-generator/can-config-generator.vcxproj
+++ b/CAN-config-generator/can-config-generator.vcxproj
diff --git a/CAN-config-generator/etc/config.cmake b/CAN-config-generator/etc/config.cmake
new file mode 100644
index 00000000..1819daab
--- /dev/null
+++ b/CAN-config-generator/etc/config.cmake
@@ -0,0 +1,79 @@
+###########################################################################
+# 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.
+###########################################################################
+
+# Project Info
+# ------------------
+set(NAME can-config-generator)
+set(VERSION "1.0")
+set(PRETTY_NAME "CAN configuration generator")
+set(DESCRIPTION "Generator that convert JSON file following OpenXC spec to configuration-generated.cpp file for the low level CAN binding.")
+set(URL "https://github.com/iotbzh/CAN_signaling")
+set(PROJECT_ICON "icon.png")
+
+# Compilation Mode (DEBUG, RELEASE)
+# ----------------------------------
+setc(CMAKE_BUILD_TYPE "DEBUG")
+
+# PKG_CONFIG required packages
+# -----------------------------
+set (PKG_REQUIRED_LIST
+ json-c
+ libsystemd
+ afb-daemon
+)
+
+# Static constante definition
+# -----------------------------
+add_compile_options(-D_REENTRANT)
+add_compile_options(-DPB_FIELD_16BIT)
+
+# LANG Specific compile flags set for all build types
+set(CMAKE_C_FLAGS "")
+set(CMAKE_CXX_FLAGS "-std=c++11")
+
+# Print a helper message when every thing is finished
+setc(CLOSING_MESSAGE "Test with: ./can-config-generator -m ../tests/basic.json -o configuration-generated.cpp")
+# ----------------------------------------------------
+
+# (BUG!!!) as PKG_CONFIG_PATH does not work [should be an env variable]
+# ---------------------------------------------------------------------
+setc(CMAKE_INSTALL_PREFIX ${HOME}/opt)
+setc(CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/lib64/pkgconfig ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
+setc(LD_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib)
+
+# Optional dependencies order
+# ---------------------------
+set(EXTRA_DEPENDENCIES_ORDER can-config-generator low-can-binding)
+
+# Optional Extra global include path
+# -----------------------------------
+#set(EXTRA_INCLUDE_DIRS inc_dir1 inc_dir2 ...)
+
+# Optional extra libraries
+# -------------------------
+#set(EXTRA_LINK_LIBRARIES)
+
+# Optional force binding installation
+# ------------------------------------
+# set(BINDINGS_INSTALL_PREFIX DestinationPath )
+
+# Optional force binding Linking flag
+# ------------------------------------
+# set(BINDINGS_LINK_FLAG LinkOptions )
+
+
diff --git a/CAN-config-generator/etc/export.map b/CAN-config-generator/etc/export.map
new file mode 100644
index 00000000..52c1b4aa
--- /dev/null
+++ b/CAN-config-generator/etc/export.map
@@ -0,0 +1 @@
+{ global: afbBindingV1*; local: *; };
diff --git a/can-config-generator/CMakeLists.txt b/CAN-config-generator/src/CMakeLists.txt
index 0892d2af..39ceba1e 100644
--- a/can-config-generator/CMakeLists.txt
+++ b/CAN-config-generator/src/CMakeLists.txt
@@ -22,14 +22,14 @@ PROJECT_TARGET_ADD(can-config-generator)
# Define project Targets
add_executable(can-config-generator
- src/main.cpp
- src/openxc/message_set.cpp
- src/openxc/can_bus.cpp
- src/openxc/can_message.cpp
- src/openxc/command.cpp
- src/openxc/diagnostic_message.cpp
- src/openxc/mapping.cpp
- src/openxc/signal.cpp)
+ main.cpp
+ openxc/message_set.cpp
+ openxc/can_bus.cpp
+ openxc/can_message.cpp
+ openxc/command.cpp
+ openxc/diagnostic_message.cpp
+ openxc/mapping.cpp
+ openxc/signal.cpp)
# Library dependencies (include updates automatically)
TARGET_LINK_LIBRARIES(can-config-generator
@@ -38,4 +38,4 @@ PROJECT_TARGET_ADD(can-config-generator)
# installation directory
INSTALL(TARGETS can-config-generator
- RUNTIME DESTINATION ${BINDINGS_INSTALL_DIR}) \ No newline at end of file
+RUNTIME DESTINATION ${BINDINGS_INSTALL_DIR})
diff --git a/can-config-generator/src/main.cpp b/CAN-config-generator/src/main.cpp
index cfefed84..cfefed84 100644
--- a/can-config-generator/src/main.cpp
+++ b/CAN-config-generator/src/main.cpp
diff --git a/can-config-generator/src/main.hpp b/CAN-config-generator/src/main.hpp
index cf08e1a4..cf08e1a4 100644
--- a/can-config-generator/src/main.hpp
+++ b/CAN-config-generator/src/main.hpp
diff --git a/can-config-generator/src/openxc/can_bus.cpp b/CAN-config-generator/src/openxc/can_bus.cpp
index 0a968a9e..0a968a9e 100755
--- a/can-config-generator/src/openxc/can_bus.cpp
+++ b/CAN-config-generator/src/openxc/can_bus.cpp
diff --git a/can-config-generator/src/openxc/can_bus.hpp b/CAN-config-generator/src/openxc/can_bus.hpp
index 74e1273f..74e1273f 100755
--- a/can-config-generator/src/openxc/can_bus.hpp
+++ b/CAN-config-generator/src/openxc/can_bus.hpp
diff --git a/can-config-generator/src/openxc/can_message.cpp b/CAN-config-generator/src/openxc/can_message.cpp
index fab5a85f..fab5a85f 100755
--- a/can-config-generator/src/openxc/can_message.cpp
+++ b/CAN-config-generator/src/openxc/can_message.cpp
diff --git a/can-config-generator/src/openxc/can_message.hpp b/CAN-config-generator/src/openxc/can_message.hpp
index 3f7b0181..3f7b0181 100755
--- a/can-config-generator/src/openxc/can_message.hpp
+++ b/CAN-config-generator/src/openxc/can_message.hpp
diff --git a/can-config-generator/src/openxc/command.cpp b/CAN-config-generator/src/openxc/command.cpp
index 4cc0682f..4cc0682f 100755
--- a/can-config-generator/src/openxc/command.cpp
+++ b/CAN-config-generator/src/openxc/command.cpp
diff --git a/can-config-generator/src/openxc/command.hpp b/CAN-config-generator/src/openxc/command.hpp
index 2c052266..2c052266 100755
--- a/can-config-generator/src/openxc/command.hpp
+++ b/CAN-config-generator/src/openxc/command.hpp
diff --git a/can-config-generator/src/openxc/diagnostic_message.cpp b/CAN-config-generator/src/openxc/diagnostic_message.cpp
index 3881abef..3881abef 100755
--- a/can-config-generator/src/openxc/diagnostic_message.cpp
+++ b/CAN-config-generator/src/openxc/diagnostic_message.cpp
diff --git a/can-config-generator/src/openxc/diagnostic_message.hpp b/CAN-config-generator/src/openxc/diagnostic_message.hpp
index 1ceba1bd..1ceba1bd 100755
--- a/can-config-generator/src/openxc/diagnostic_message.hpp
+++ b/CAN-config-generator/src/openxc/diagnostic_message.hpp
diff --git a/can-config-generator/src/openxc/mapping.cpp b/CAN-config-generator/src/openxc/mapping.cpp
index 74d5c94e..74d5c94e 100755
--- a/can-config-generator/src/openxc/mapping.cpp
+++ b/CAN-config-generator/src/openxc/mapping.cpp
diff --git a/can-config-generator/src/openxc/mapping.hpp b/CAN-config-generator/src/openxc/mapping.hpp
index 30895cba..30895cba 100755
--- a/can-config-generator/src/openxc/mapping.hpp
+++ b/CAN-config-generator/src/openxc/mapping.hpp
diff --git a/can-config-generator/src/openxc/message_set.cpp b/CAN-config-generator/src/openxc/message_set.cpp
index c47c45f8..c47c45f8 100755
--- a/can-config-generator/src/openxc/message_set.cpp
+++ b/CAN-config-generator/src/openxc/message_set.cpp
diff --git a/can-config-generator/src/openxc/message_set.hpp b/CAN-config-generator/src/openxc/message_set.hpp
index 935817ee..935817ee 100755
--- a/can-config-generator/src/openxc/message_set.hpp
+++ b/CAN-config-generator/src/openxc/message_set.hpp
diff --git a/can-config-generator/src/openxc/signal.cpp b/CAN-config-generator/src/openxc/signal.cpp
index 6c3ff82a..6c3ff82a 100755
--- a/can-config-generator/src/openxc/signal.cpp
+++ b/CAN-config-generator/src/openxc/signal.cpp
diff --git a/can-config-generator/src/openxc/signal.hpp b/CAN-config-generator/src/openxc/signal.hpp
index 64dba75e..64dba75e 100755
--- a/can-config-generator/src/openxc/signal.hpp
+++ b/CAN-config-generator/src/openxc/signal.hpp
diff --git a/can-config-generator/tests/basic.json b/CAN-config-generator/tests/basic.json
index 32cd1b45..32cd1b45 100755
--- a/can-config-generator/tests/basic.json
+++ b/CAN-config-generator/tests/basic.json
diff --git a/can-config-generator/tests/generated.cpp b/CAN-config-generator/tests/generated.cpp
index e8bb5c93..e8bb5c93 100644
--- a/can-config-generator/tests/generated.cpp
+++ b/CAN-config-generator/tests/generated.cpp
diff --git a/examples/basic/handlers.cpp b/CAN-config-generator/tests/handlers.cpp
index 4316f15f..4316f15f 100644
--- a/examples/basic/handlers.cpp
+++ b/CAN-config-generator/tests/handlers.cpp
diff --git a/can-config-generator/tests/signals.json b/CAN-config-generator/tests/signals.json
index 648427a9..648427a9 100755
--- a/can-config-generator/tests/signals.json
+++ b/CAN-config-generator/tests/signals.json
diff --git a/README.md b/README.md
index cbe951ba..a608363b 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,23 @@
-# Low level CAN signaling binder
+# CAN signaling binder
-Low level CAN bus binder, based upon OpenXC vi-firmware project.
+CAN bus binder, based upon OpenXC vi-firmware project.
+
+There are 2 separated projects here, one with the CAN-binder that is installed
+on an AGL target and the CAN config generator used to generate a source file for
+the low level binding.
Full document can be found under `docs` directory.
+# Fast build procedure
+
+Just use build.sh script:
+
+```bash
+./build.sh
+```
+
+This will build both projects under build directory for each of them.
+
# Generate documentation
## Prerequisites
diff --git a/build.sh b/build.sh
index 9496f009..64bd7f5e 100755
--- a/build.sh
+++ b/build.sh
@@ -1,82 +1,4 @@
#!/bin/bash
-function build {
- echo "ACTION: build"
- source ~/agl/sdk/porter/environment*
- if [ ! -d "$1/$2" ]; then
- echo "INFO: build dir ($1/$2) doesn't exist, created it!"
- mkdir -p "$1/$2"
- fi
- pushd "$1/$2"
- #cd "$1/$2"
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=$3 $1
- make
- popd
-}
-
-function clean {
- echo "ACTION: clean"
- if [ -d "$1/$2" ]; then
- rm -vrf "$1/$2"
- fi
-}
-
-function rebuild {
- clean $1 $2
- build $1 $2 $3
-}
-
-function printhelp {
- echo "Usage: build.sh <action> <subdir> [config]"
- echo " action: can be one of the following"
- echo " build: build this project."
- echo " rebuild: rebuild this project."
- echo " clean: clean the previous build."
- echo " install: install the build result."
- echo " subdir: the subdir into which the build is done."
- echo " config: can be Debug or Release. Ignored if the action is 'clean'."
-}
-
-function checkparams {
- if [ "$#" -ne "$(($1+1))" ]; then
- echo "ERROR: Wrong number of parameters, expected $1 but got $(($#-1))"
- printhelp
- exit 1
- fi
-}
-
-function main {
- CURRENT_DIR=$( dirname "$(readlink -f "$0")" )
- echo "Current script: $CURRENT_DIR"
-
- if [ "$#" -lt "1" ]; then
- echo "ERROR: At least <action> must be specified!"
- exit 1
- fi
-
- case "$1" in
- "build")
- checkparams 3 $*
- build $CURRENT_DIR $2 $3
- ;;
- "rebuild")
- checkparams 3 $*
- rebuild $CURRENT_DIR $2 $3
- ;;
- "clean")
- checkparams 2 $*
- clean $CURRENT_DIR $2
- ;;
- "install")
- checkparams 3 $*
- echo "ERROR: Not implemented yet!"
- ;;
- *)
- echo "ERROR: Unknown action '$3'!"
- exit 1
- ;;
- esac
-}
-
-main $*
-
+cd CAN-config-generator && make build && cd -
+cd CAN-binder && make build && cd -