apps/agl-service-can-low-level.git
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

7 years agoJustify text
Sebastien Douheret [Wed, 22 Mar 2017 10:32:38 +0000 (11:32 +0100)]
Justify text

7 years agoFix typo
Sebastien Douheret [Wed, 22 Mar 2017 10:15:26 +0000 (11:15 +0100)]
Fix typo

7 years agoPrint status when pdf file has been generated.
Sebastien Douheret [Tue, 21 Mar 2017 08:27:12 +0000 (09:27 +0100)]
Print status when pdf file has been generated.

Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
7 years agoSpecification of defaults available decoder.
Romain Forlot [Wed, 22 Mar 2017 08:29:24 +0000 (08:29 +0000)]
Specification of defaults available decoder.

Change-Id: Ifde336309bd6358ee20bd8c45a06daf5ba3329c0
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agodocs: fix Installation guide
Stephane Desneux [Tue, 21 Mar 2017 22:35:49 +0000 (23:35 +0100)]
docs: fix Installation guide

Change-Id: Ibd16454f0cbc7f2a3e17f8cf0580174de3df87e3
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
7 years agoMake copy to sdcard more reliable
Romain Forlot [Tue, 21 Mar 2017 18:48:26 +0000 (18:48 +0000)]
Make copy to sdcard more reliable

Change-Id: Ia7e9875f6999aa50f386c82945a430db93664254
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding sourcing yocto build env file
Romain Forlot [Tue, 21 Mar 2017 18:07:39 +0000 (18:07 +0000)]
Adding sourcing yocto build env file

Change-Id: I8950fb17cf7431070772379d1b8ce52a0a689fbd
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoReworking execution order to make it more simple.
Romain Forlot [Tue, 21 Mar 2017 18:06:47 +0000 (18:06 +0000)]
Reworking execution order to make it more simple.

Rework clone order as well as directory location to make sure cloning in
separate directory.

Change-Id: I2ac3adecf363af7b702462d4a5af1f2c84220900
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdded a CAUTION mention and fix some commands
Romain Forlot [Tue, 21 Mar 2017 15:40:37 +0000 (15:40 +0000)]
Added a CAUTION mention and fix some commands

Change-Id: I460f73da5efb0e9156b53ba35fef598dc6c46a7d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: use the cmake from SDK instead from docker image
Romain Forlot [Tue, 21 Mar 2017 14:07:51 +0000 (14:07 +0000)]
Fix: use the cmake from SDK instead from docker image

CMake from docker image isn't at the right version, to get one with a more
recent version we have to use the one built for the SDK.
Some cleanup of CMD output uneeded and typo

Change-Id: I8cb30f9b8203f8c4ff1cd771e4773264a9cddc6b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoChange binder to binding in title in use with gitbook
Romain Forlot [Tue, 21 Mar 2017 13:12:26 +0000 (13:12 +0000)]
Change binder to binding in title in use with gitbook

Change-Id: Ia1474c5ae8e88a5a139f26e9da0c5d96898e7499
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoDetail some instructions.
Romain Forlot [Tue, 21 Mar 2017 13:12:03 +0000 (13:12 +0000)]
Detail some instructions.

Some instructions miss some details to get properly executed.

Change-Id: I973a21f31fb685bbd82021101989cbc03764a23f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoTypo
Romain Forlot [Tue, 21 Mar 2017 10:18:46 +0000 (10:18 +0000)]
Typo

Change-Id: Ic820ac312553bd5b8b630ad2d2cbbdcc4bb590f7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMake IoTBZH smaller.
Romain Forlot [Tue, 21 Mar 2017 10:35:44 +0000 (10:35 +0000)]
Make IoTBZH smaller.

Change-Id: I02d94a2a787a55fa890edd20f8b1f92a6ecfe23f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoPath from CANoe db to JSON files using OpenXC utilities.
Romain Forlot [Tue, 21 Mar 2017 10:35:22 +0000 (10:35 +0000)]
Path from CANoe db to JSON files using OpenXC utilities.

Added naming convention description.

Change-Id: Id2524dcde2af3c82f49166f3e662f75580dbc6a1
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Conflicts:
docs/2-Installation.md

7 years agoDocumentation: reviewed and updated
Stephane Desneux [Mon, 20 Mar 2017 18:29:41 +0000 (19:29 +0100)]
Documentation: reviewed and updated

Some fixes:
* document title
* gitbook-plugin-richquotes disabled due to bad rendering
* TOC titles and ordering

Change-Id: I09b133f45a32b179ca4d1e8e13ea3b1e2fdb795b

7 years agoFix comment
Sebastien Douheret [Mon, 20 Mar 2017 16:26:07 +0000 (17:26 +0100)]
Fix comment

7 years agoUse svg instead of png image in cover root svg file
Sebastien Douheret [Mon, 20 Mar 2017 16:25:53 +0000 (17:25 +0100)]
Use svg instead of png image in cover root svg file

Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
7 years agoRemove root cover file cover.xcf, now replace by cove.svg
Sebastien Douheret [Mon, 20 Mar 2017 14:35:09 +0000 (15:35 +0100)]
Remove root cover file cover.xcf, now replace by cove.svg

7 years agoUse bash script to generate doc instead of cmake
Sebastien Douheret [Mon, 20 Mar 2017 14:34:01 +0000 (15:34 +0100)]
Use bash script to generate doc instead of cmake

Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
7 years agoAdd documentation cover
Sebastien Douheret [Mon, 20 Mar 2017 13:52:23 +0000 (14:52 +0100)]
Add documentation cover

7 years agoAdding instructions to monitor CAN traffic.
Romain Forlot [Mon, 20 Mar 2017 13:50:06 +0000 (13:50 +0000)]
Adding instructions to monitor CAN traffic.

Change-Id: I80668eaccb25d8df07025aed3563bfc9d94a1271
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoRename to the standard name Doxygen config file
Romain Forlot [Mon, 20 Mar 2017 13:49:49 +0000 (13:49 +0000)]
Rename to the standard name Doxygen config file

Change-Id: I160f62e0e1ff516fb3ec3333decccceb89872c0d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMore accurate diagram since we do not use OpenXC generator
Romain Forlot [Mon, 20 Mar 2017 13:28:58 +0000 (13:28 +0000)]
More accurate diagram since we do not use OpenXC generator

Change-Id: I06266d4a08f1717978c2c7f14abeab3867fe7b64
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImprove documentation with config generation instructions
Romain Forlot [Mon, 20 Mar 2017 13:28:28 +0000 (13:28 +0000)]
Improve documentation with config generation instructions

Meld can-config-generator instruction in installation documentation
to have an all included documentation about CAN binding.
Fix: set the exact reference about the OBD2<->DB9 cable.

Change-Id: I97f14e8f2deadbea10050a50379bb72629074f6b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdd targets to build documentation with instructions.
Romain Forlot [Mon, 20 Mar 2017 12:44:45 +0000 (12:44 +0000)]
Add targets to build documentation with instructions.

Change-Id: I037ab5d94e17147aba998131e92c1ec920293fa9
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoUse gitbook to manage documentation
Sebastien Douheret [Mon, 20 Mar 2017 10:13:28 +0000 (11:13 +0100)]
Use gitbook to manage documentation

Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
7 years agoUpdate toyota example
Romain Forlot [Mon, 20 Mar 2017 10:10:34 +0000 (10:10 +0000)]
Update toyota example

Change-Id: Ied4f715b486a2d4ef2b5ba4d49bbc339f95bffad
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoSpellchecking and typo
Romain Forlot [Mon, 20 Mar 2017 10:10:18 +0000 (10:10 +0000)]
Spellchecking and typo

Change-Id: I1f1c2cbc68e3c25d827657e2d08822e45a59d275
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMake error goes back to the subscribed clients when unsupported.
Romain Forlot [Mon, 20 Mar 2017 09:11:58 +0000 (09:11 +0000)]
Make error goes back to the subscribed clients when unsupported.

Change-Id: Ic864803c8dffdab3cc9bf5bf281ce032600a732f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: Avoid segfault if diagnostic bus isn't correctly set.
Romain Forlot [Mon, 20 Mar 2017 09:08:12 +0000 (09:08 +0000)]
Fix: Avoid segfault if diagnostic bus isn't correctly set.

There is a segfault when binding configuration doesn't matches configuration
generated. Improve general CAN bus device initialization.

Change-Id: I17ea94ee54841d09ac63a7ffad303a88d99e0173
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix bad handling unsupported OBD2 messages subscription.
Romain Forlot [Sun, 19 Mar 2017 01:47:26 +0000 (02:47 +0100)]
Fix bad handling unsupported OBD2 messages subscription.

Testing supported boolean wrong and gave a null pointer to a function that
doesn't check the pointer validity.

Change-Id: I49e88a68f266546dbd257b0fdade860cead1322d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImprove Toyota examples.
Romain Forlot [Sat, 18 Mar 2017 16:52:34 +0000 (16:52 +0000)]
Improve Toyota examples.

Generate a new version of the configuration generated for Toyota Auris 2010.
Remove the one from src directory. It has to be paste prior to build the binding
once generated.

Change-Id: I0b8e5415df0d0fade70dfa193ad45770c6db38dd
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoadded toyota's exemple.
Loïc Collignon [Fri, 17 Mar 2017 12:23:11 +0000 (13:23 +0100)]
added toyota's exemple.

Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
7 years agoTypo and formating and rework somes sentences.
Romain Forlot [Fri, 17 Mar 2017 11:55:47 +0000 (12:55 +0100)]
Typo and formating and rework somes sentences.

Change-Id: If222728bfc9120065fd56f0877d3736634f6fc52
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoComments fixes, typo and formating.
Romain Forlot [Fri, 17 Mar 2017 11:48:46 +0000 (12:48 +0100)]
Comments fixes, typo and formating.

No more warning when generate the docs and all comments follow the same
formating.

Change-Id: I80d4c5c2d64401c2e53a550c60155680c4f968ce
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agomoved exemples files.
Loïc Collignon [Fri, 17 Mar 2017 11:37:13 +0000 (12:37 +0100)]
moved exemples files.

Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
7 years agoConvert svg to png for the doc
Romain Forlot [Fri, 17 Mar 2017 09:29:26 +0000 (10:29 +0100)]
Convert svg to png for the doc

Change-Id: Ia62cba8da3db425d63c18104d597cd577f9651ab
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding some abstract to the READme.
Romain Forlot [Fri, 17 Mar 2017 09:20:44 +0000 (10:20 +0100)]
Adding some abstract to the READme.

Present the CAN binding architecture.

Change-Id: I7ab2a96e468a57e882a2eca93aedaacdc057794b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImprove READme instructions.
Romain Forlot [Fri, 17 Mar 2017 00:52:40 +0000 (01:52 +0100)]
Improve READme instructions.

Change-Id: I8b507d3e34ed3d34680e6e15b7f97b7e17fc1c4f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoDiagnostic requests will occur depending on their frequency.
Romain Forlot [Thu, 16 Mar 2017 18:25:11 +0000 (19:25 +0100)]
Diagnostic requests will occur depending on their frequency.

Hardcoded offset was for testing purpose, now we can use frequency offset.

Change-Id: I920e61cd8f587ead9c77aec158edb4dee28b927d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoWrong error handling when fire diagnostic request.
Romain Forlot [Thu, 16 Mar 2017 18:23:55 +0000 (19:23 +0100)]
Wrong error handling when fire diagnostic request.

As returned code was negative value the sd_event_source stopped considering
that was an error. If statement was to check that sd_event_set_enabled was
ok, so unref and return wasn't at the right location...

Change-Id: I91cc943c20af80a31b4f66f5714ccef93c0fdbd2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoGenerate a configuration example with diagnostic messages filled too.
Romain Forlot [Thu, 16 Mar 2017 18:11:43 +0000 (19:11 +0100)]
Generate a configuration example with diagnostic messages filled too.

It was filled by hand for the moment.

Change-Id: Ie72cd670bbc9c7a568507290f4bb25019ec58098
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: decoded name will be prefixed as at subscription.
Romain Forlot [Thu, 16 Mar 2017 18:10:38 +0000 (19:10 +0100)]
Fix: decoded name will be prefixed as at subscription.

Reason is that the simple message is used to match a subscribed signals
in the map. So it has to be the same that at the subscription.

Change-Id: Ie9504583948027523a7288b5e4a20707c49b6d59
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoDoxygen base configuration file and logo.
Romain Forlot [Thu, 16 Mar 2017 14:54:56 +0000 (15:54 +0100)]
Doxygen base configuration file and logo.

Change-Id: If1fbbefa386e1e72121ff28fce6f55569129272c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agogitignore update
Romain Forlot [Thu, 16 Mar 2017 14:54:31 +0000 (15:54 +0100)]
gitignore update

Change-Id: I97af1fab19d7d071e7c34d4149ae67442f257690
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoInclude cleaning
Romain Forlot [Thu, 16 Mar 2017 14:54:22 +0000 (15:54 +0100)]
Include cleaning

Change-Id: I5df96540400b833e684001f8fc5fa33ff1892bae
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding missing doxygen comments.
Romain Forlot [Thu, 16 Mar 2017 12:14:02 +0000 (13:14 +0100)]
Adding missing doxygen comments.

Made some cleaning about unused things or obsolete.
Review existing comments, adding missing comments.
Reformat some long long constructor.

Change-Id: Ibae247d1295a7a85b49d0ecee473022755d42b8b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoGenerated cpp file example.
Romain Forlot [Thu, 16 Mar 2017 17:17:16 +0000 (18:17 +0100)]
Generated cpp file example.

Change-Id: I1608db0120a0501af0e4327fe348ef149d90bad4
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoUse index number between objects to set their links.
Romain Forlot [Thu, 16 Mar 2017 17:16:56 +0000 (18:16 +0100)]
Use index number between objects to set their links.

Needed to use generator.

Change-Id: I82b44fa1e53c55e2cd90ae7017906a22b7f0636e
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
7 years agoadded a folder to ignore in .gitignore.
Loïc Collignon [Thu, 16 Mar 2017 09:52:55 +0000 (10:52 +0100)]
added a folder to ignore in .gitignore.

Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
7 years agoImplement check of supported diagnostic PID.
Romain Forlot [Thu, 16 Mar 2017 01:18:00 +0000 (02:18 +0100)]
Implement check of supported diagnostic PID.

Supported boolean member about diagnostic messages is now used. When
a response is received, completed but not successful, then set the diagnostic
message as not supported and clean the request from the queue.

Subscription remains for now, not cool but will be fix soon.

Change-Id: Ia5dc78d4a770f80f144724f4df6eabd2ffd4b8cc
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImprove comments
Romain Forlot [Thu, 16 Mar 2017 00:34:20 +0000 (01:34 +0100)]
Improve comments

Change-Id: I1e43b0aeaff738db11695e77fee23e8c9809f0c1
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMake unsubscription works with diagnostic message too.
Romain Forlot [Thu, 16 Mar 2017 00:34:08 +0000 (01:34 +0100)]
Make unsubscription works with diagnostic message too.

Now unsubscription really make unsubscription and stop polling diagnostic
request.

Change-Id: I31830c7af97506e1231fb5f1244c350520a2df29
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix comments
Romain Forlot [Wed, 15 Mar 2017 23:54:46 +0000 (00:54 +0100)]
Fix comments

Change-Id: Ia838d06885bc95196c5afc3668c0b028cb0f2763
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix diagnostic message name mismatch at decoding.
Romain Forlot [Wed, 15 Mar 2017 23:54:34 +0000 (00:54 +0100)]
Fix diagnostic message name mismatch at decoding.

Retrieve adr name prefixed will add uneeded prefix as it is already present.
At build time of a Diagnostic request from a diagnostic message, this prefix
is added so adr name is already correct.
*adr: active diagnostic request

Change-Id: Ie5c364bf47a28c80290021651941cd37fa26321a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFollow rename operation in CMakeLists.txt
Romain Forlot [Wed, 15 Mar 2017 22:47:21 +0000 (23:47 +0100)]
Follow rename operation in CMakeLists.txt

Rename has been made with filter-branch using utility
git-mv-with-history, so file history follow the rename operation.
This is a commit to fix include and CMake file.

Change-Id: I8542c7def3143854a2008fa069dd3232f2497394
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoSmall fixes
Romain Forlot [Wed, 15 Mar 2017 22:31:23 +0000 (23:31 +0100)]
Small fixes

Align frequency type to float and removed useless code.

Change-Id: I13d9407808c42ece0d3fd761351752ad661e01e0
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFinalization of decoding part of diagnostic messages.
Romain Forlot [Wed, 15 Mar 2017 22:30:37 +0000 (23:30 +0100)]
Finalization of decoding part of diagnostic messages.

Diagnostic request must have a name to be subscribed. Else, we
can't decode or event push for now.

Change-Id: I0901a71da31320d8598e512614437aceb552713d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoRetrieve easily Diagnostic Request PID from an Active Diagnostic Request
Romain Forlot [Wed, 15 Mar 2017 22:20:27 +0000 (23:20 +0100)]
Retrieve easily Diagnostic Request PID from an Active Diagnostic Request

Change-Id: I787cd94b338c458fda0259bd2bcf47a1fa85cc3f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoEase use of openXC structures.
Romain Forlot [Wed, 15 Mar 2017 22:18:33 +0000 (23:18 +0100)]
Ease use of openXC structures.

Add some helpers functions used to check VehicleMessage validity or build
default VehicleMessage struct.

Change-Id: Ia1cca8b4cb3dd70a739d0f2ee9165b72fdac48d4
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoRename class and 1:1 map to JSON description file
Romain Forlot [Wed, 15 Mar 2017 22:16:59 +0000 (23:16 +0100)]
Rename class and 1:1 map to JSON description file

Added decoder and callback member that will be set by generator and taken
at submission to be used later, storing them into an active diagnostic
request instance, when response CAN message comes in.

Change-Id: I9ded05de3bb28ec55e4e007d72d0e1924141a6a6
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMake available decoding OBD2 messages method to be use as callback.
Romain Forlot [Wed, 15 Mar 2017 22:10:46 +0000 (23:10 +0100)]
Make available decoding OBD2 messages method to be use as callback.

Change the method to static 'cause it will be call from outside of the class.

Change-Id: I88dcd845559fac7892cd489cd6e8198c143ee2a8
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoSimplification of checking Diagnostic response.
Romain Forlot [Wed, 15 Mar 2017 22:07:34 +0000 (23:07 +0100)]
Simplification of checking Diagnostic response.

A CAN message will be considered as a Diagnostic response when its
arbitration ID is between standardized 0x7E8 and 0x7EF.
Checking which request belong to that response will done in later methods

Change-Id: I7a093edf44b62a4552b90fe3d8935f94dc677cf4
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImprove memory allocation about Signal states.
Romain Forlot [Wed, 15 Mar 2017 16:58:50 +0000 (17:58 +0100)]
Improve memory allocation about Signal states.

Returning to Signal states map avoiding hole in vector allocation as we did
not know how many state a Signal can takes. So a map may be a better choice
Will see.

Change-Id: Ie3ccdbd31296c5c0ebaefc109e75f2e0cde03756
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoRevert accessing CAN device with a map indexing on dev name
Romain Forlot [Wed, 15 Mar 2017 12:04:42 +0000 (13:04 +0100)]
Revert accessing CAN device with a map indexing on dev name

Main reason for that behavior revert is because of generator that rely
on CAN device name and so we have point on these object by specify the
device name.

Instead of shared pointer between objects, instead binding is based on
device name. With a device name you can get the shared pointer on it using
new static method from can_bus_t object.

Change-Id: I331e0ad8d03c88a15c697d12a9fce3699b0cd962
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoUniformization between get_name() method of signals.
Romain Forlot [Tue, 14 Mar 2017 23:51:38 +0000 (00:51 +0100)]
Uniformization between get_name() method of signals.

can_signal_t and active_diagnostic_message return name
with prefix using this method. If you need without it then
use get_generic_name.

Change-Id: I6b153eb20214049c10619d39fcc65c8641a9e32f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoLittles comments improvments
Romain Forlot [Tue, 14 Mar 2017 23:50:17 +0000 (00:50 +0100)]
Littles comments improvments

Change-Id: Idcc7e5b4dedad8e39eb829b25502d7dea3e5b29a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoChange way to check prefix of signals name.
Romain Forlot [Tue, 14 Mar 2017 23:49:55 +0000 (00:49 +0100)]
Change way to check prefix of signals name.

Change-Id: I9a0726ab41c4801e7a5305731ce78ddd03aff9e1
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImprove shims_logger function to get full details.
Romain Forlot [Tue, 14 Mar 2017 23:48:49 +0000 (00:48 +0100)]
Improve shims_logger function to get full details.

Change-Id: I752db65cb3fbca4d33b932f3a0c597adfaf79903
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoGet recurring requests works.
Romain Forlot [Tue, 14 Mar 2017 23:48:15 +0000 (00:48 +0100)]
Get recurring requests works.

Implements event_loop logic.

Change-Id: Ia5ac32820a0421bbcb69d8b0dd3bea2b7b582444
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoSimplification of diagnostic manager. Delete uneeded vector
Romain Forlot [Tue, 14 Mar 2017 23:47:06 +0000 (00:47 +0100)]
Simplification of diagnostic manager. Delete uneeded vector
Control size manually, don't rely on STL container.

Change-Id: Iede2f9b233c5b8a6dc77c9b146ffc92da8e7a989
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoReturn period without unit conversion.
Romain Forlot [Tue, 14 Mar 2017 23:44:51 +0000 (00:44 +0100)]
Return period without unit conversion.

If conversion must be made then make it at the call
not upstream.

Change-Id: Ief6dee40355c7b39b5e27d0ba3dc02717fadf43b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoSearch signals against name not generic_name. It's made
Romain Forlot [Tue, 14 Mar 2017 23:43:59 +0000 (00:43 +0100)]
Search signals against name not generic_name. It's made
to get able to get difference between classic CAN messages
and diagnostic messages based on name signals prefix.

Change-Id: I696facc58f38150e0457d519dcabffba750a8db3
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoLess control before process the CAN message.
Romain Forlot [Thu, 16 Mar 2017 16:21:48 +0000 (17:21 +0100)]
Less control before process the CAN message.

Change-Id: I341d29d217b2a92652e9985d8c93829e0211bddc
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImplement regular event launching using systemd event loop
Romain Forlot [Thu, 16 Mar 2017 16:20:42 +0000 (17:20 +0100)]
Implement regular event launching using systemd event loop

Regular events is made launch a timerfd event from binder event loop and then
in the event handler, reschedule next launch in the future based upon the
signal frequency.

Change-Id: I0b1e84eb2135474f4bcc5ee256ba513eea4035a6
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImprove logging messages and change string conversion to char
Romain Forlot [Tue, 14 Mar 2017 10:07:59 +0000 (11:07 +0100)]
Improve logging messages and change string conversion to char
for the needed case. They were some inversion between needs of
char variable and string.

Fix: don't add diagnostic request if it is an unsubscrition
operation.

Change-Id: I1acedc413e7c5fe57da86812faf8d3c83d13c405
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMove diagnostic requests scheduling to diagnostic manager
Romain Forlot [Tue, 14 Mar 2017 09:48:07 +0000 (10:48 +0100)]
Move diagnostic requests scheduling to diagnostic manager
while adding the request. It is more logic to make that here
than in the subscription operation.

Change-Id: I19b29bc11c5fb6e5828a0bf189fac1333b0199ed
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: Initialization and entries flow
Romain Forlot [Tue, 14 Mar 2017 09:03:42 +0000 (10:03 +0100)]
Fix: Initialization and entries flow
between diagnostic manager vector.

Change-Id: I9ea196b5dc5bbf2dd4509080a9a58d754fa42b6c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoEnabling recurrent check of diagnostic requests.
Romain Forlot [Tue, 14 Mar 2017 09:01:02 +0000 (10:01 +0100)]
Enabling recurrent check of diagnostic requests.

Change-Id: I16aff65c5ce22faac78e3f1d99ce7b33941c007c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImprove Doxygen comments and formating.
Romain Forlot [Mon, 13 Mar 2017 23:13:57 +0000 (00:13 +0100)]
Improve Doxygen comments and formating.

Change-Id: Ia39e78aca00a49c7cee5e42d26ba1ef2b49d3709
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImprove: DEBUG messages.
Romain Forlot [Mon, 13 Mar 2017 22:11:52 +0000 (23:11 +0100)]
Improve: DEBUG messages.

Change-Id: Ib52f22e7bc5bc5d14edbb31ad6006caee23c4098
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: return before initialization of diagnostic manager.
Romain Forlot [Mon, 13 Mar 2017 22:11:41 +0000 (23:11 +0100)]
Fix: return before initialization of diagnostic manager.

Change-Id: I8485dec1ec5bb5dbea7edf4d9ac3a7d800b567b2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMake decoder systematic use of openxc-utils to build
Romain Forlot [Mon, 13 Mar 2017 22:11:18 +0000 (23:11 +0100)]
Make decoder systematic use of openxc-utils to build
its objects. We don't want random initialization on
boolean value of openxc_DynamicField (has_string, has_numeric...)
else we have a risk that the final decoded and convert into json
object will not be the good one.

Change-Id: If4d69e6ace615fd8e097ba9a04e5482c82b9a7db
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImplement signals states decoder and change map
Romain Forlot [Mon, 13 Mar 2017 22:08:43 +0000 (23:08 +0100)]
Implement signals states decoder and change map
to a vector.

Change-Id: I185724f2966fecac6659d401751da56d2886ed9d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoSearch into generic_name as well as name + prefix, but
Romain Forlot [Mon, 13 Mar 2017 22:07:33 +0000 (23:07 +0100)]
Search into generic_name as well as name + prefix, but
always register generic_name into subscribed_signals.

It will be the output on event and make easier to find
the subscribed signals into the map without prefix.

Change-Id: Iaf0060bedb54003b0c77121afd2bd35d832dba25
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding/Fix classes constructors to make them correspond
Romain Forlot [Mon, 13 Mar 2017 16:46:50 +0000 (17:46 +0100)]
Adding/Fix classes constructors to make them correspond
to the ones generated.

Change-Id: I6b0b778f59ac52fe66e36a327f60ae58550ac271
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoSeparation of classes in the same file.
Romain Forlot [Mon, 13 Mar 2017 16:46:13 +0000 (17:46 +0100)]
Separation of classes in the same file.

Change-Id: Ifc690cc27028659ffaf5a8a2e9caabc1e0718fd4
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMove member from obd2_signals_t class to
Romain Forlot [Mon, 13 Mar 2017 14:03:00 +0000 (15:03 +0100)]
Move member from obd2_signals_t class to
active_diagnostic_request_t (adr)class. It's more logical
to have them here as call about incoming diagnostic CAN
messages are made against adr class not obd2_signal_t that
it's a subset of diagnostic messages.

It's made to handle obd2 requests as well as normal UDS
diagnostic request for constructor proprietary diagnostic
signals.

Change-Id: I96c714640d6ecfa25dfc9942974057c1797eb0e1
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoGet decoding diagnostic request from decoding thread of can_bus_t
Romain Forlot [Mon, 13 Mar 2017 13:58:22 +0000 (14:58 +0100)]
Get decoding diagnostic request from decoding thread of can_bus_t

Decoding divided in 2 subfunctions dedicated to decode either
pure CAN messages or diagnostic (obd2) message. About now,
a diagnostic request has a name then it will be pushed
on the event_queue as a SimpleMessage. Without name full
details of diagnostic response will be pushed as diagnostic
response. This behavior follows the one from OpenXC.

Change-Id: I255f3f6487fa9511ea47c74606014995a7b0f720
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoChange the way to check signal type making prefix_
Romain Forlot [Mon, 13 Mar 2017 08:45:01 +0000 (09:45 +0100)]
Change the way to check signal type making prefix_
attribute as static with a static class method which
will check that the beginning of string argument
matches the prefix.

Change-Id: Idb129c7179391da61447996560957b2791aa9383
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoReordering class method.
Romain Forlot [Mon, 13 Mar 2017 08:20:27 +0000 (09:20 +0100)]
Reordering class method.

Change-Id: I61cca1117a987280383538a0b0e307429bee4fc3
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding instruction to use the binding.
Romain Forlot [Mon, 13 Mar 2017 11:55:31 +0000 (12:55 +0100)]
Adding instruction to use the binding.

Miss an example with an UI or CLI interface.

Change-Id: Ib26fe53f16fbdeb79f79fee15fce20ce3342d210
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: set to microsecond frequency check of diag request
Romain Forlot [Mon, 13 Mar 2017 08:18:34 +0000 (09:18 +0100)]
Fix: set to microsecond frequency check of diag request

Change-Id: I871ff68afd7f398d4c7d3a550c8926c1f7e67cb3
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agofix: test for opened CAN socket.
Romain Forlot [Mon, 13 Mar 2017 08:02:45 +0000 (09:02 +0100)]
fix: test for opened CAN socket.

Change-Id: If9e3a0511c7ccc703817069a56bd38d7e64ebb09
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoKeep subscription to signal simplier without doubling
Romain Forlot [Mon, 13 Mar 2017 07:45:22 +0000 (08:45 +0100)]
Keep subscription to signal simplier without doubling
functions dedicated to different signal type as they
aren't so much difference between.

Change-Id: Ic2090c2d755136183dfc08a9b84efa3388d3747b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>