apps/low-level-can-service.git
7 years agoAdd 'CAN-binder/libs/openxc-message-format/' from commit 'd9f54f97578429773421abce98d...
Romain Forlot [Tue, 2 May 2017 15:51:38 +0000 (17:51 +0200)]
Add 'CAN-binder/libs/openxc-message-format/' from commit 'd9f54f97578429773421abce98d5f6579717afcc'

git-subtree-dir: CAN-binder/libs/openxc-message-format
git-subtree-mainline: f44a5b1549bc4c8a84d0dedf4a8b1e4220a34f42
git-subtree-split: d9f54f97578429773421abce98d5f6579717afcc

7 years agoAdd 'CAN-binder/libs/isotp-c/' from commit 'ee24440b7c123ab1b0317e57be33e837a1cb51f1'
Romain Forlot [Tue, 2 May 2017 15:51:18 +0000 (17:51 +0200)]
Add 'CAN-binder/libs/isotp-c/' from commit 'ee24440b7c123ab1b0317e57be33e837a1cb51f1'

git-subtree-dir: CAN-binder/libs/isotp-c
git-subtree-mainline: d170c9faeae2cf29c19f3523714ecdf58be73bed
git-subtree-split: ee24440b7c123ab1b0317e57be33e837a1cb51f1

7 years agoAdd 'CAN-binder/libs/bitfield-c/' from commit 'a34745ec93ae0a1d4f1b640dba8fb6702331a8e9'
Romain Forlot [Tue, 2 May 2017 15:50:50 +0000 (17:50 +0200)]
Add 'CAN-binder/libs/bitfield-c/' from commit 'a34745ec93ae0a1d4f1b640dba8fb6702331a8e9'

git-subtree-dir: CAN-binder/libs/bitfield-c
git-subtree-mainline: b6c09cbda2b6b47981d65265184a21223e526d4a
git-subtree-split: a34745ec93ae0a1d4f1b640dba8fb6702331a8e9

7 years agoRemove submodules and use forked libs tree instead
Romain Forlot [Tue, 2 May 2017 15:36:33 +0000 (17:36 +0200)]
Remove submodules and use forked libs tree instead

Change-Id: Icd1ba605357df63f750966cc941190acaa80e35b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImplement AGLBuild script following SPEC-495 from JIRA
Romain Forlot [Tue, 2 May 2017 15:22:58 +0000 (17:22 +0200)]
Implement AGLBuild script following SPEC-495 from JIRA

See: https://jira.automotivelinux.org/browse/SPEC-495
Needed as entry point for Yocto chain build.

Change-Id: Id2d5d68fc0aa32ff9f52d2d176e68ac4de7353e7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoUsing new CMake architecture (again...)
Romain Forlot [Tue, 2 May 2017 15:21:20 +0000 (17:21 +0200)]
Using new CMake architecture (again...)

Following the new CMake template from https://gerrit.automotivelinux.org/gerrit/apps/app-templates
these CMake files use helpers macros from macros.cmake and project configuration config.cmake.

Change-Id: I2297b6ad6c65cd763d1870d5b62564e8795f4317
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: wrong include local header path
Romain Forlot [Tue, 2 May 2017 14:59:41 +0000 (16:59 +0200)]
Fix: wrong include local header path

Change-Id: I1878e26a519a8e2708cfbfd59c6dd95e968d4028
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding HTML5 UI with cpu stat binding
Romain Forlot [Sat, 29 Apr 2017 16:17:08 +0000 (18:17 +0200)]
Adding HTML5 UI with cpu stat binding

Change-Id: Id63b7d338140097a5f2f0943f1b63ee978141829
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: wrong include relative path.
Romain Forlot [Sat, 29 Apr 2017 16:13:59 +0000 (18:13 +0200)]
Fix: wrong include relative path.

Change-Id: I4e6d1ce805d7e7fef66eac177f10fe5f163d79b5
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdapt CMake files to use new capabilities with widget
Romain Forlot [Sat, 29 Apr 2017 16:13:28 +0000 (18:13 +0200)]
Adapt CMake files to use new capabilities with widget

Change-Id: I88a1ef090b7ce40c833c5780f5a481876ff7ea09
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMake a macro and helpers library instead of Big CMake.
Romain Forlot [Sat, 29 Apr 2017 16:12:18 +0000 (18:12 +0200)]
Make a macro and helpers library instead of Big CMake.

Add two macros to handle widget one to populate widget with wanted target
and other to add generic widget files

Change-Id: I030f078906f151fee49fa2c2fada3d94745f9dfd
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoRename as AGLBuild makefile.
Romain Forlot [Fri, 28 Apr 2017 16:05:36 +0000 (18:05 +0200)]
Rename as AGLBuild makefile.

Made as generic script.

Change-Id: I7e73de7badfaade6fad29476275dd69aa523e6c9

7 years agoclean left include file after modification that isn't needed anymore
Romain Forlot [Wed, 26 Apr 2017 22:47:39 +0000 (00:47 +0200)]
clean left include file after modification that isn't needed anymore

Change-Id: Ie63c962cfe191cca71c5927eafa72a3ab69befac
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: write bcm message to socket.
Romain Forlot [Wed, 26 Apr 2017 22:59:40 +0000 (00:59 +0200)]
Fix: write bcm message to socket.

Just allowing message with 1 frame avoiding to handle dynamic sized array...
This close the door for multiplexed msg for now... Let's see later and move on

Change-Id: I3626d4b6634b3f119826603e64713d63e994918e
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoDon't use heavy weapon to get some basic calculation
Romain Forlot [Wed, 26 Apr 2017 22:44:17 +0000 (00:44 +0200)]
Don't use heavy weapon to get some basic calculation

Change-Id: Ibc820dea7efbc2d7a50671ce66804217c6707d56
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: Add notifying decoding thread if there is new messages.
Romain Forlot [Wed, 26 Apr 2017 16:28:12 +0000 (18:28 +0200)]
Fix: Add notifying decoding thread if there is new messages.

Change-Id: If12617ae086d7023ff619799833cd1d4fd0fd413
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoCheck last value before send the event, if no change no event.
Romain Forlot [Wed, 26 Apr 2017 16:27:35 +0000 (18:27 +0200)]
Check last value before send the event, if no change no event.

Adding a boolean parameter similarly of existing function to know if we would send
the event.

Change-Id: I03ee17f656065e556fd2b72b160b140852b68dcc
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoCreate method to handle both CAN frames.
Romain Forlot [Wed, 26 Apr 2017 16:25:33 +0000 (18:25 +0200)]
Create method to handle both CAN frames.

Change-Id: Ie876614266fd2e7089754a8f917d25d316de4c98
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Fix: wrong call since renaming of function to more generic name

Change-Id: I2adebb855bc815ba6ab14a1002b17d9c9fb293fd
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoDoesn't send event if no changes are made for doors signals.
Romain Forlot [Wed, 26 Apr 2017 16:24:43 +0000 (18:24 +0200)]
Doesn't send event if no changes are made for doors signals.

Change-Id: I4e72db1e7b7bc31d7446a4903972687f1ec9d71c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFinish to read stream and fill the destination object.
Romain Forlot [Wed, 26 Apr 2017 16:24:03 +0000 (18:24 +0200)]
Finish to read stream and fill the destination object.

Use AFB log system

Change-Id: I5aa727ce7f9db5b6f18df5957f31f37d9af88d20
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: Reading doesn't update receiving object values
Romain Forlot [Wed, 26 Apr 2017 16:23:10 +0000 (18:23 +0200)]
Fix: Reading doesn't update receiving object values

Wrong signature using const argument with the obj receiving the read

Change-Id: I0c5b8a3c974f0bd140823f8ce88aa2cbd451e543
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoDon't use FD frame with BCM socket. Seems not working...
Romain Forlot [Wed, 26 Apr 2017 13:48:07 +0000 (15:48 +0200)]
Don't use FD frame with BCM socket. Seems not working...

Change-Id: I4f1d5cd489011675cf55914647b57c7332dec1b9
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: correctly count (un)subscribed signals.
Romain Forlot [Wed, 26 Apr 2017 13:46:49 +0000 (15:46 +0200)]
Fix: correctly count (un)subscribed signals.

Can't be 0 subscription so success if greater than 0

Change-Id: Ie4395dbabe4ed85fe939ebdfa9de87e210fa55bc
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMake template from similar writing stream operations.
Romain Forlot [Wed, 26 Apr 2017 13:45:14 +0000 (15:45 +0200)]
Make template from similar writing stream operations.

Change-Id: I33b32418980059b701d2af5b165af536f42d0252
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoSubscribe using BCM RX_SETUP filter capabilities implemented.
Romain Forlot [Tue, 25 Apr 2017 22:21:07 +0000 (00:21 +0200)]
Subscribe using BCM RX_SETUP filter capabilities implemented.

Change-Id: I7462b5d0144987293376dab719d1cf4fa41406f2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoReworked reading CAN devices from BCM socket.
Romain Forlot [Tue, 25 Apr 2017 22:19:18 +0000 (00:19 +0200)]
Reworked reading CAN devices from BCM socket.

Now reading thread hold in can_bus_t object instead of can_bus_dev_t and reading
happens using select().

Change-Id: Ib8cc68c4484679168519f3c0fa485fedd1616c74
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix bit alignment errors...
Romain Forlot [Tue, 25 Apr 2017 18:00:05 +0000 (20:00 +0200)]
Fix bit alignment errors...

Change-Id: Iea1bb66bb3aea8a120e7bbb3b55895682044cf23
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoTypo, rename, format
Romain Forlot [Wed, 26 Apr 2017 22:53:30 +0000 (00:53 +0200)]
Typo, rename, format

Change-Id: I8250ef78f0b540617bd249873250f62ad6361fdf
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoRenaming confusing member "address_" to "index_"
Romain Forlot [Tue, 25 Apr 2017 17:58:08 +0000 (19:58 +0200)]
Renaming confusing member "address_" to "index_"

Change-Id: I0ec6d74e9adb791f8bef44f76c74be8365cdf037
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImplement reading stream for socketcan_t
Romain Forlot [Tue, 25 Apr 2017 17:56:56 +0000 (19:56 +0200)]
Implement reading stream for socketcan_t

Will read a can_message_t object from socket

Change-Id: Ibe3561f9d7bbf4e41b6fd81fa4672bae1c14aca5
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix CMakeFile final message and compile flag
Romain Forlot [Tue, 25 Apr 2017 17:53:49 +0000 (19:53 +0200)]
Fix CMakeFile final message and compile flag

Change-Id: I518794897a4b333fc825b64846fad081308c93e7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding Directive to also clean wgt file with make clean
Romain Forlot [Tue, 25 Apr 2017 17:53:20 +0000 (19:53 +0200)]
Adding Directive to also clean wgt file with make clean

Change-Id: I41b32ea60d9a44e27dbe0a51b58173ff359e0186
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix compilation warning complaining about unset boolean value.
Romain Forlot [Mon, 24 Apr 2017 17:16:50 +0000 (19:16 +0200)]
Fix compilation warning complaining about unset boolean value.

Change-Id: I17e2177f40b8845f78370048ef3c734486b152b3
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMisc: Cleanup, typo, formating and comments update.
Romain Forlot [Mon, 24 Apr 2017 17:16:16 +0000 (19:16 +0200)]
Misc: Cleanup, typo, formating and comments update.

Change-Id: Icac565b9a3a80dc05a1a3470a35e223c8c564347
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoCreate a received job for BCM Socket to handle filtering.
Romain Forlot [Mon, 24 Apr 2017 17:15:07 +0000 (19:15 +0200)]
Create a received job for BCM Socket to handle filtering.

Filter is created using can_signals description and send with appropriate
BCM header structure. This is the simplest way to do, no temporal filtering
for now is available.

Change-Id: Iee49f011ba9316880735d2765c1c23a8b2d3c4d2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoRename and handling write on socket using stream instead of specific method
Romain Forlot [Mon, 24 Apr 2017 17:09:28 +0000 (19:09 +0200)]
Rename and handling write on socket using stream instead of specific method

Created special struct to handle bcm messages with can_frame and canfd_frame.
We can now just send both of them seamlessly.

Change-Id: Ia84e9cf2ab1dd0716cb09f6bb342a208e54f8e06
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: Avoid returning 2 results for 1 signal.
Romain Forlot [Mon, 24 Apr 2017 07:23:17 +0000 (09:23 +0200)]
Fix: Avoid returning 2 results for 1 signal.

Either returning signal with search against generic_name either against name,
not both.

Change-Id: I597718d04c99d098973442b4174e735e813c9b94
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoRework subscription and unsubscriptions operations. More readable.
Romain Forlot [Sat, 22 Apr 2017 15:39:27 +0000 (17:39 +0200)]
Rework subscription and unsubscriptions operations. More readable.

Change-Id: I53101eed16b1faf1e5014826d91e4d64665f2f9f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoUse BCM socket as default cleaning up the old RAW socket code.
Romain Forlot [Sat, 22 Apr 2017 15:38:23 +0000 (17:38 +0200)]
Use BCM socket as default cleaning up the old RAW socket code.

Also use CAN FD frames by default.

Change-Id: I5bad10e537653b1a96c2e3012d38dde8627d3caa
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: opening bcm socket still trying to bind as a RAW socket.
Romain Forlot [Sat, 22 Apr 2017 11:58:26 +0000 (13:58 +0200)]
Fix: opening bcm socket still trying to bind as a RAW socket.

Wrong condition testing making connect and bind happens.

Change-Id: Ic75a74d044e9763fdf42e50f7643b26ffaf5d76d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImprove logging messages
Romain Forlot [Sat, 22 Apr 2017 11:57:41 +0000 (13:57 +0200)]
Improve logging messages

Added for all log messages function name at beginning using __FUNCTION__ macro.

Change-Id: Ia0f476ca81b9f79c6d49b425c0520894c59797ea
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding some comments
Romain Forlot [Fri, 21 Apr 2017 16:20:55 +0000 (18:20 +0200)]
Adding some comments

Change-Id: Ic47e808a0da94f79ca0341d1b4f46a02eef3fe84
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMove all signals search functions into new signals_manager_t object
Romain Forlot [Fri, 21 Apr 2017 16:20:42 +0000 (18:20 +0200)]
Move all signals search functions into new signals_manager_t object

Create a class from signals lookup and find standalone function and gather all
find function into it. There is now only 1 function to find either CAN signals
or diagnostic messages, results are returned using an ad-hoc struct containing
vector of one or the other type pointers.

This object also hold subscribed_signals map with events, so this class is a singleton.

Change-Id: I3584c6a91201e6904edc6aeac0abfa1785bdeccc
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAvoid warning about unmanaged switch case in INI library
Romain Forlot [Fri, 21 Apr 2017 16:13:14 +0000 (18:13 +0200)]
Avoid warning about unmanaged switch case in INI library

Change-Id: Ifdca1581dc5a086a884dbc2dcc17470e5983b4ac
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoDiagnostic messages subscription simplified.
Romain Forlot [Fri, 21 Apr 2017 13:42:48 +0000 (15:42 +0200)]
Diagnostic messages subscription simplified.

Remove useless function.

Change-Id: I6638c3033cfeea643b29c1280d7f5785371cd342
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMake virtual CAN device name as argument
Romain Forlot [Fri, 21 Apr 2017 07:17:31 +0000 (09:17 +0200)]
Make virtual CAN device name as argument

Change-Id: I6ae48b36171fbc038c9a3a8841d9dbadf7686ee3
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdded -std=c++11 to compile option lost in transition.
Romain Forlot [Wed, 12 Apr 2017 07:23:06 +0000 (09:23 +0200)]
Added -std=c++11 to compile option lost in transition.

Change-Id: Ie8728ac2bdb0a4a3712534c4ca7144e9a15ab4d2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoUpdate comments
Romain Forlot [Thu, 20 Apr 2017 15:41:16 +0000 (17:41 +0200)]
Update comments

Change-Id: Ib21f810170308a16462ffe9c174448a86bf791d4
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoRemove timeout socket option.
Romain Forlot [Thu, 20 Apr 2017 15:40:55 +0000 (17:40 +0200)]
Remove timeout socket option.

This will be handle by BCM socket

Change-Id: Ie0348135fcc596ab21727846f3b47751664c9e11
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoSeparate socket configuration and opening
Romain Forlot [Thu, 20 Apr 2017 15:40:06 +0000 (17:40 +0200)]
Separate socket configuration and opening

Change-Id: I94cad718b516f24c5d1833e09df89f03e529f48a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoUse same function to open BCM and RAW CAN sockets
Romain Forlot [Thu, 20 Apr 2017 15:38:01 +0000 (17:38 +0200)]
Use same function to open BCM and RAW CAN sockets

Using one a another socket type is made using a boolean.

Change-Id: I0445c8550f289d1e0020f6496c638bc95e8db443
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoSpecializing socket class to CAN socket operations.
Romain Forlot [Wed, 19 Apr 2017 22:07:37 +0000 (00:07 +0200)]
Specializing socket class to CAN socket operations.

Move all legacy opening RAW CAN socket operation to socket class. Each operations
on a CAN socket has to be simple and made by the socket class.
Simple BCM socket open operation is implemented.
Future will be to open specialized BCM CAN sockets on demand.

Change-Id: If285b97afb9871245ab1f13cd9f0401fbd9adf95
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdded missing default constructor.
Romain Forlot [Wed, 19 Apr 2017 16:33:06 +0000 (18:33 +0200)]
Added missing default constructor.

Change-Id: Ie47171ba633274c31a5e0965919232e91ac74adb
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoC++11 way to initialize using list init.
Romain Forlot [Wed, 19 Apr 2017 16:32:01 +0000 (18:32 +0200)]
C++11 way to initialize using list init.

Change-Id: I0fa96d14d42d1ef80eb0340f48a644c378d4dcbe
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoCleaning include
Romain Forlot [Wed, 19 Apr 2017 16:31:07 +0000 (18:31 +0200)]
Cleaning include

Change-Id: I6f90c87c164bc6ba70ee0889668f54f4972a8610
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFormating
Romain Forlot [Wed, 19 Apr 2017 16:30:46 +0000 (18:30 +0200)]
Formating

Change-Id: Ib67fab1ecd5085e089769e7905cd5ebcd28b9c7c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: temporary variable assigned to a reference leading to exception
Romain Forlot [Wed, 19 Apr 2017 16:30:24 +0000 (18:30 +0200)]
Fix: temporary variable assigned to a reference leading to exception

Change-Id: I6bf86a4c9fe832e4f7df192aca1ef25d79097e9c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoChange INI file parser library.
Romain Forlot [Wed, 19 Apr 2017 16:28:18 +0000 (18:28 +0200)]
Change INI file parser library.

Much simpler but also a bit limitated. Could be change easily in futur if needed

Change-Id: I06f03f093c9206007e3d0c1e86a35d60111be5f8
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImprove REGEX to detects tests files.
Romain Forlot [Tue, 18 Apr 2017 18:32:43 +0000 (20:32 +0200)]
Improve REGEX to detects tests files.

Miss a flag to set regex case-insensitiven, or I did not find it.

Change-Id: I3b743e040e57d80e4f97490feba379533387cf87
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdd known limitation about messages_set total count.
Romain Forlot [Tue, 18 Apr 2017 18:23:51 +0000 (20:23 +0200)]
Add known limitation about messages_set total count.

Change-Id: Ia9626c31f873470f9ecfdeba3c5535b657c65e23
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoUse a system INI configuration file to get devices mapping
Romain Forlot [Tue, 18 Apr 2017 18:23:14 +0000 (20:23 +0200)]
Use a system INI configuration file to get devices mapping

Instead of specifying a JSON configuration file with CAN devices name, it uses
a mapping configuration file that map a high level device names to a real low level names.

File path is to be specified into the generated source code which is /etc/dev-mapping.conf
for now.

Configuration file uses INI file format and is parsed using inih library cpp wrapper.

Change-Id: Ibde104e76cd78a6cc86f6eec4f66c274b7567d43
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: wrong testing command line
Romain Forlot [Fri, 14 Apr 2017 15:23:38 +0000 (17:23 +0200)]
Fix: wrong testing command line

Missing rootdir option else binding can't find its configuration file

Change-Id: I011d326dd27a5eae6f021080f08a82290200cc2c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMake name of virtual CAN device flexible.
Romain Forlot [Fri, 14 Apr 2017 15:07:09 +0000 (17:07 +0200)]
Make name of virtual CAN device flexible.

Change-Id: I9cef3e6c4fa81bb75514e7b9c618494bad00ab6a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: wrong splitting of can_signals
Romain Forlot [Fri, 14 Apr 2017 13:35:40 +0000 (15:35 +0200)]
Fix: wrong splitting of can_signals

Signals were separated by message definitions but it is unneeded and make
signals separated by message_set.

Change-Id: I83cbe687dafc37af0412dc5346837d06be918556
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoChange directory architecture to use 2 separated projects.
Romain Forlot [Fri, 14 Apr 2017 11:24:07 +0000 (13:24 +0200)]
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>
7 years agoCleaning CMAke
Romain Forlot [Fri, 14 Apr 2017 10:09:47 +0000 (12:09 +0200)]
Cleaning CMAke

Change-Id: I4efb09946474fadcf41cf9d04ad0f462ae4d0704
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding C++ compile flags option by default.
Romain Forlot [Fri, 14 Apr 2017 10:09:23 +0000 (12:09 +0200)]
Adding C++ compile flags option by default.

Change-Id: Ia0fe92fa08ed56255028a2a572be076a2a0e8665
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoUpdate CMake logic making external libs global
Romain Forlot [Fri, 14 Apr 2017 07:28:48 +0000 (09:28 +0200)]
Update CMake logic making external libs global

Each external libraries is a target that can be linked to a target project.

Change-Id: I4564eaa1c96c877c42f2a420599e27279f48d378
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix wrong target name variable.
Romain Forlot [Tue, 11 Apr 2017 15:55:57 +0000 (17:55 +0200)]
Fix wrong target name variable.

Change-Id: I946dc9c44ecc6f9976c4accb65fc4b1efb4c7ca3
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdapt CMakeFile including can-config-generator tool.
Romain Forlot [Tue, 11 Apr 2017 15:55:13 +0000 (17:55 +0200)]
Adapt CMakeFile including can-config-generator tool.

Change-Id: I154d3976c0ab91ded20c07c44a1a586a98f3057f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdd 'can-config-generator/' from commit 'b7591d16c2686214d5d8dcc0739a233f15aee5db'
Romain Forlot [Tue, 11 Apr 2017 13:49:47 +0000 (15:49 +0200)]
Add 'can-config-generator/' from commit 'b7591d16c2686214d5d8dcc0739a233f15aee5db'

git-subtree-dir: can-config-generator
git-subtree-mainline: 9e444ade872bc436cf12bc12d03c3a5d51ac0b9e
git-subtree-split: b7591d16c2686214d5d8dcc0739a233f15aee5db

7 years agoRemove boost library dependency.
Romain Forlot [Tue, 11 Apr 2017 13:47:26 +0000 (15:47 +0200)]
Remove boost library dependency.

Use a simple optarg parser.

Change-Id: If0cd9da9db24a7889573e32f6b8ace33702c2c35
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoHandle project new architecture using new CMakeFile
Romain Forlot [Tue, 11 Apr 2017 10:55:23 +0000 (12:55 +0200)]
Handle project new architecture using new CMakeFile

Change-Id: I672a9b49d9d5a3953ba6dccaafbbd738839f64a6
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
# Conflicts:
# low-can-binding/libs/bitfield-c
# low-can-binding/libs/isotp-c
# low-can-binding/libs/openxc-message-format

7 years agoUnsubscribe instead of subscribe if can't adding to recurring request
Romain Forlot [Mon, 3 Apr 2017 22:18:55 +0000 (00:18 +0200)]
Unsubscribe instead of subscribe if can't adding to recurring request

Not useful to get a subscription on an adding error.

Change-Id: I211016a1cbeb9cd5677cd8f8c7a28ccc93ef9a34
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding K2L CAN signals to toyota examples.
Romain Forlot [Mon, 3 Apr 2017 22:17:23 +0000 (00:17 +0200)]
Adding K2L CAN signals to toyota examples.

Change-Id: I147c439217dcc1f0709bd55f670ff1893cc77262
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: make no clients event works with CAN subscription
Romain Forlot [Mon, 3 Apr 2017 22:07:16 +0000 (00:07 +0200)]
Fix: make no clients event works with CAN subscription

Is there is no diagnostic message corresponding then do nothing

Change-Id: Ib6627b3c10b1b7a0a46d41323a6623efe808a015
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdded Citreon sample while traveling to Karlsruhe
Romain Forlot [Sun, 2 Apr 2017 21:49:09 +0000 (23:49 +0200)]
Added Citreon sample while traveling to Karlsruhe

Change-Id: I7a6e5a7a068f205394b01e2b5ce00e59292d2182
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: wrong period operation without unit multiplicator
Romain Forlot [Sun, 2 Apr 2017 21:46:56 +0000 (23:46 +0200)]
Fix: wrong period operation without unit multiplicator

Possible divsion by 0. Don't know if it is good to keep different time unit
instead having one unit for project...

Change-Id: I73cfc1ab72d3420d337f10a9b79bdf305a3a2bc7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoUse by default can0
Romain Forlot [Thu, 30 Mar 2017 15:54:41 +0000 (17:54 +0200)]
Use by default can0

Change-Id: Idc4fd2f2d6d447d6b9e947d5b3129dc564a4bc5c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoCleaning
Romain Forlot [Thu, 30 Mar 2017 15:23:17 +0000 (17:23 +0200)]
Cleaning

Change-Id: I5ef9bad2ef398d3d293c3fc2edc18271042455f4
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoHandle simultaneous subscription to diagnostic messages.
Romain Forlot [Thu, 30 Mar 2017 15:23:02 +0000 (17:23 +0200)]
Handle simultaneous subscription to diagnostic messages.

Delay new recurring requests if there are already existing in flight and
cleanup active request to correctly set in_flight_ flag to false else new
request can't be launched as there is always an old one considered running...

Modify a little bit DEBUG message and cleanup useless code.

Change-Id: I39f865bbc6d00188d3cddd1d81437b9e3ca51269
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoHandle cancel active diag requet when there are no more subscribers
Romain Forlot [Thu, 30 Mar 2017 15:19:59 +0000 (17:19 +0200)]
Handle cancel active diag requet when there are no more subscribers

When push events if there is no more subscribers to that event then call
a function that will cleanup that request from diagnostic manager queue.

Change-Id: I8153701074453444a5bba6f1374401bdf230f7e6
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: unsubscription to diagnostic messages.
Romain Forlot [Thu, 30 Mar 2017 08:24:57 +0000 (10:24 +0200)]
Fix: unsubscription to diagnostic messages.

Unsubscriptions weren't managed anymore since we handle supported flag in
diagnostic messages. Now it's back, unsubscription against appfw is done
as well as canceling recurring active diagnostic request.

Change-Id: I22ebba771646624cb323e72dd7bf21027b6c6ba7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoGet recurring requests suspend proof.
Romain Forlot [Thu, 30 Mar 2017 08:23:04 +0000 (10:23 +0200)]
Get recurring requests suspend proof.

Change to CLOCK_BOOTTIME instead of CLOCK_MONOTONIC

Change-Id: Iaa1a65a80e3aaa8e622ea1e3eb4b6a36b4dcd225
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: Empty every queue before unlock mutex.
Romain Forlot [Thu, 30 Mar 2017 08:22:14 +0000 (10:22 +0200)]
Fix: Empty every queue before unlock mutex.

Make sure that we finish to process every message in queue before refill them
cause' CAN read run faster than decoding and pushing event. So it's a try to get
all message processed.

Change-Id: Idce2bc4d79920adc2bf478177c4e3defed39867b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImprove detail in DEBUG message at recurring request submission
Romain Forlot [Wed, 29 Mar 2017 12:35:29 +0000 (14:35 +0200)]
Improve detail in DEBUG message at recurring request submission

Change-Id: I93d0cbcae8e2cdf1144ffd981c93a109682c1685
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoPort configuration parsing to a separate object.
Romain Forlot [Tue, 28 Mar 2017 15:52:17 +0000 (17:52 +0200)]
Port configuration parsing to a separate object.

Change-Id: If5da63d2fdd498dcb6dde10469acaa91b00e60df
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImprove documentation and added can samples
Romain Forlot [Tue, 28 Mar 2017 13:15:20 +0000 (15:15 +0200)]
Improve documentation and added can samples

This explicit use cases with virtual CAN device or Porter board CAN devices
Also, it add a complete trip with "vehicle.speed" obd2 signal recurring requests.
to be use with canplayer to replay a real car trip.

Change-Id: I66c762fa23ed409c812765d6d82e78138edbd455
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoErase compilation WARNING.
Romain Forlot [Mon, 27 Mar 2017 16:50:24 +0000 (18:50 +0200)]
Erase compilation WARNING.

Useless tests and type cast about numbers.

Change-Id: I6fe13b7dfec8529520730f83e83d2dd3da3a674c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: wrong pointer validity check...
Romain Forlot [Fri, 24 Mar 2017 17:17:58 +0000 (18:17 +0100)]
Fix: wrong pointer validity check...

Change-Id: Ia47159fb18797681fb1dd132be5173e167d8850b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: don't clean recurring request except if forced
Romain Forlot [Fri, 24 Mar 2017 17:17:42 +0000 (18:17 +0100)]
Fix: don't clean recurring request except if forced

Change-Id: I669fc1f0b078e151dfb0cbb17c3d626bb43930d2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: commands typo
Forlot Romain [IoT.bzh] [Fri, 31 Mar 2017 15:55:49 +0000 (17:55 +0200)]
Fix: commands typo

Merge pull request #1 from shogun656/master

7 years agoUpdate README.md
Wesam Haddad [Fri, 31 Mar 2017 14:33:27 +0000 (10:33 -0400)]
Update README.md

was annoying me :)

7 years agoAdded some new OBD2 signals
Romain Forlot [Fri, 31 Mar 2017 08:21:20 +0000 (10:21 +0200)]
Added some new OBD2 signals

Change-Id: Ied85c5acef8e9ce215c01166180fc07d5c5b0dcd
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoComments.
Romain Forlot [Wed, 22 Mar 2017 17:58:12 +0000 (17:58 +0000)]
Comments.

Point to branch v1.0 instead of master

Change-Id: I70b6b0e35dbbdd78840fda893c6028b2e3975afc
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMax in flight requests set to 8
Romain Forlot [Wed, 22 Mar 2017 17:10:30 +0000 (17:10 +0000)]
Max in flight requests set to 8

Change-Id: If2acf83a0f01741c90cab15e10188b2aeffd88b3

7 years agoAdded configuration-generated file to ignored file
Romain Forlot [Wed, 22 Mar 2017 16:44:25 +0000 (16:44 +0000)]
Added configuration-generated file to ignored file

Change-Id: I2a04c0852c2b6c87391cf282c30cbcb669226c1d

7 years agoSend diag request only if not other one with some id running
Romain Forlot [Wed, 22 Mar 2017 16:40:15 +0000 (16:40 +0000)]
Send diag request only if not other one with some id running

Fix: elapsed function return that do not compute elapsed_time at first time
Fix: reworked should_send() to get it work with our scheduling workflow
Reschedule trying to send request if recurring even it is in flight.

Change-Id: Idce54cb9bf62616c891a8a25a6c478f931350bc7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: make sure install execute sequentially
Forlot Romain [IoT.bzh] [Wed, 22 Mar 2017 14:17:25 +0000 (15:17 +0100)]
Fix: make sure install execute sequentially

7 years agoFix cover image (use imagemagick convert).
Sebastien Douheret [Wed, 22 Mar 2017 13:25:13 +0000 (14:25 +0100)]
Fix cover image (use imagemagick convert).

Fix initial svg page size to avoid image distortion,
and generate "real" jpg image using imagemagick convert tool