apps/low-level-can-service.git
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>
7 years agoDefault value about thread state set at false.
Romain Forlot [Sun, 12 Mar 2017 23:04:37 +0000 (00:04 +0100)]
Default value about thread state set at false.

Change-Id: I1934aa4d9a9d945a32d8e369cf0f36b1e06d3f34
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoChange configuration location into an etc directory.
Romain Forlot [Sun, 12 Mar 2017 23:01:41 +0000 (00:01 +0100)]
Change configuration location into an etc directory.

Change-Id: I4648f2eb203f37844bfb8deb2527f93b4852e82c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: wrong location to make the increment because we use
Romain Forlot [Sun, 12 Mar 2017 22:26:25 +0000 (23:26 +0100)]
Fix: wrong location to make the increment because we use
the device after so... This was total crap !

Change-Id: I9bb43c3f75c613a5927f342b3c574871c0eb65bb
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix CMakeLists file to get isotp correctly linked and adding
Romain Forlot [Sun, 12 Mar 2017 21:42:15 +0000 (22:42 +0100)]
Fix CMakeLists file to get isotp correctly linked and adding
missing libssytemd

Change-Id: Id065ff16a7f582ba1cf88423c75bf4c11fb026d9
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMissing include header and code reordering and cleaning.
Romain Forlot [Sun, 12 Mar 2017 18:52:05 +0000 (19:52 +0100)]
Missing include header and code reordering and cleaning.

Change-Id: I37b2b2b439bb72d2230d606b9ddd52c3eb08ea8f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoChange method returned value. Needed with send_request()
Romain Forlot [Sun, 12 Mar 2017 18:51:38 +0000 (19:51 +0100)]
Change method returned value. Needed with send_request()
method to retrieve the active_diagnostic_request.

Change-Id: Icfba704e40be211021dc81ec18fa3602d736afdb
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoImplemente way to send diagnostic request when subscribed.
Romain Forlot [Sun, 12 Mar 2017 18:48:21 +0000 (19:48 +0100)]
Implemente way to send diagnostic request when subscribed.

When subscribed, the signal is added to recurring request list
of diagnostic manager and an event is added to the systemd
event loop with timer set using frequency parameter from the
requested signal.

Change-Id: I4d604c498047d7744c090b7f03fce0f2b427fd01
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoUse of signals prefix to be able to distinguish type of
Romain Forlot [Sun, 12 Mar 2017 18:44:07 +0000 (19:44 +0100)]
Use of signals prefix to be able to distinguish type of
messages to be processed.

For now, processing prefix is hardcoded but idea is to
process them dynamically if possible. To be studied.

Change-Id: Iac0c96228fc5f53e3c637e54350188ff3de6d57f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMake diagnostic manager initialization processus.
Romain Forlot [Sun, 12 Mar 2017 18:38:49 +0000 (19:38 +0100)]
Make diagnostic manager initialization processus.

It is initiliazed with by default the first CAN bus
device in the CAN bus device list from CAN bus manager.

The object is instancied at configuration_t object first
invokation and after all CAN buses has been initialized then
the diag manager is initialized too.

Change-Id: I4894f2c62f575676c34efec3608b97de8c5326e1
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding diagnostic_messages from diagnostic.json file
Romain Forlot [Sun, 12 Mar 2017 18:24:54 +0000 (19:24 +0100)]
Adding diagnostic_messages from diagnostic.json file
from openxc example. The json is now a mixed example
between CAN messages and diagnostic messages.

Change-Id: I94ed5ac7d48e1fb1bb42b3df00d953d45ee0fc7d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoWe doesn't modify member once getted, we can use const return
Romain Forlot [Fri, 10 Mar 2017 15:08:06 +0000 (16:08 +0100)]
We doesn't modify member once getted, we can use const return
and const method.

Change-Id: I0f7465af74b1c9a546af45a0d1eea33c93537e0c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoManage prefix on CAN and OBD2 prefix. Searching signals
Romain Forlot [Fri, 10 Mar 2017 14:53:27 +0000 (15:53 +0100)]
Manage prefix on CAN and OBD2 prefix. Searching signals
is made on generic_name (without prefix) and returned
vector of string is filled with name with prefix. Then
you can process on them based upon their name differently.

OBD2 signals will generated recurring request on diagnostic
manager and decoding will not be handled the same way too.

Change-Id: I2c5239ef49661941a0a748debe0bd536b2954b3a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoRemove uneeded define as it was already present in uds.h
Romain Forlot [Fri, 10 Mar 2017 14:15:30 +0000 (15:15 +0100)]
Remove uneeded define as it was already present in uds.h

Change-Id: I04091b35ec072e9c19f5af0689ed89db0d5070bd
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoInstead of a global pointer, config is now a Singleton.
Romain Forlot [Fri, 10 Mar 2017 14:14:56 +0000 (15:14 +0100)]
Instead of a global pointer, config is now a Singleton.

Change-Id: I0cfc34f330c531ba5f070542a1cb723be4bcc70a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAlso initialize the id_ renamed address_ member. This member
Romain Forlot [Fri, 10 Mar 2017 14:14:05 +0000 (15:14 +0100)]
Also initialize the id_ renamed address_ member. This member
is mapped to the address node from json

Change-Id: Ied13067723552c2396337a9f85fe5e1418ba8caf
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoKeep raw pointer for now as we have to move them around vector.
Romain Forlot [Fri, 10 Mar 2017 12:09:19 +0000 (13:09 +0100)]
Keep raw pointer for now as we have to move them around vector.

Change-Id: I8a518540b54552d60c6fd1054a0fc41dda5400b4
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agofixed the build script when rebuild action is triggered.
Loïc Collignon [Fri, 10 Mar 2017 09:16:05 +0000 (10:16 +0100)]
fixed the build script when rebuild action is triggered.

Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
7 years agoFinalize the class active_diag... to get it compile.
Romain Forlot [Fri, 10 Mar 2017 09:11:44 +0000 (10:11 +0100)]
Finalize the class active_diag... to get it compile.
Fix subsequents bugs into the other depending class
diagnostic manager

Change-Id: I8920c489fc15a61a36ff29d58aab59c2e6388f85
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoChange also where wgt file is since we build into a subdirectory
Romain Forlot [Fri, 10 Mar 2017 01:09:23 +0000 (02:09 +0100)]
Change also where wgt file is since we build into a subdirectory

Change-Id: I8cf568292035f1e8fd73d41ed91d5bd7d9d7c512
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding requests to diagnostic manager implemented.
Romain Forlot [Fri, 10 Mar 2017 01:06:57 +0000 (02:06 +0100)]
Adding requests to diagnostic manager implemented.

Needed overload of operator and constructor set for
active_diagnostic_message_t class. Without we can't make
the basic operation needed by the manager.
Get rid of original raw pointer on "entry" which avoid some
tests.

It miss the acceptance filters implementations for now.

Change-Id: I1ca61ff843c13255af6d9a60ce72a8b8bc9d1c18
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding needed getter for diagnostic manager. Useful
Romain Forlot [Fri, 10 Mar 2017 01:03:02 +0000 (02:03 +0100)]
Adding needed getter for diagnostic manager. Useful
to determine if both object use the same CAN bus device

Change-Id: I97dbf807198a420c305c8fbbd2cb4bfcdda4c294
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdding needed function to get some time handle on request
Romain Forlot [Fri, 10 Mar 2017 01:02:00 +0000 (02:02 +0100)]
Adding needed function to get some time handle on request
for diagnostic at first.

Change-Id: I3ab966d6386bad52f68ebdbea723bb7507cfaf2a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoadd a helper script to build, can be use by VS2017.
Loïc Collignon [Thu, 9 Mar 2017 20:08:57 +0000 (21:08 +0100)]
add a helper script to build, can be use by VS2017.

Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
7 years agoadd VS2017 files to .gitignore
Loïc Collignon [Thu, 9 Mar 2017 20:08:11 +0000 (21:08 +0100)]
add VS2017 files to .gitignore

Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
7 years agoFix: include statement with wrong path.
Romain Forlot [Thu, 9 Mar 2017 15:56:56 +0000 (16:56 +0100)]
Fix: include statement with wrong path.
And minor fixes.

Change-Id: Ica55c0708edd86d0aa37e7117b3c3fad551a0167
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdded constructor to get vector initialized with default
Romain Forlot [Thu, 9 Mar 2017 15:11:43 +0000 (16:11 +0100)]
Added constructor to get vector initialized with default
objects initialized that can be grabed after at runtime.

Don't know the impact on performance for now about maximum
limit.

Change-Id: I220614d479b8254ae0efda66380e96434bcbfbb2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoseparation to a new file of can_message_set_t
Loïc Collignon [Thu, 9 Mar 2017 15:28:33 +0000 (16:28 +0100)]
separation to a new file of can_message_set_t

Change-Id: If21021d8905d40d443d4432faeb38f8a3275697c
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
7 years agoChange FrequencyClock struct to class and rename it.
Romain Forlot [Thu, 9 Mar 2017 15:01:08 +0000 (16:01 +0100)]
Change FrequencyClock struct to class and rename it.

Change-Id: I1076ad90e14815f3d0ab71ca9fa359d1d3c1748d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agofixed CMakeLists.txt
Loïc Collignon [Thu, 9 Mar 2017 13:32:55 +0000 (14:32 +0100)]
fixed CMakeLists.txt

Change-Id: I62069f71b53a7a0e2131ca92834a9a85995308a7
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
7 years agoFix: wrong tested variable for socket.
Romain Forlot [Thu, 9 Mar 2017 12:07:57 +0000 (13:07 +0100)]
Fix: wrong tested variable for socket.

Change-Id: Ice2325441474f1a075140e13dfffa0261106dff7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoC Header first
Romain Forlot [Thu, 9 Mar 2017 12:07:16 +0000 (13:07 +0100)]
C Header first

Change-Id: Ief8c66e99c689a362b645ad3b918d8b342ada59a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdd necessary to be able to initialize diagnostic manager shims.
Romain Forlot [Thu, 9 Mar 2017 12:06:56 +0000 (13:06 +0100)]
Add necessary to be able to initialize diagnostic manager shims.
We have to conform to functions signatures from isotp-c
 to have it working.

Change-Id: I429def66f54e53277e87aa99e66292cdb47c1c5f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoReorder to fix warning at compilation
Romain Forlot [Thu, 9 Mar 2017 12:03:13 +0000 (13:03 +0100)]
Reorder to fix warning at compilation

Change-Id: I1e558720318d9251ddfbbf6bb66a0461aef98e4c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoChanging to a raw pointer can_bus_dev member and add
Romain Forlot [Thu, 9 Mar 2017 10:57:35 +0000 (11:57 +0100)]
Changing to a raw pointer can_bus_dev member and add
a default constructor.

It is needed to initialize configuration_t correctly as
it allocate a diagnostic manager but do not initialize it
unless it is needed later. There is no need to initialize it
if we do not send and receive diagnostic requests.

Change-Id: I3d52d1ea92454e7b065479a2f0dd54a291ddd991
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: wrong signature due to reference discarding "const".
Romain Forlot [Thu, 9 Mar 2017 09:43:30 +0000 (10:43 +0100)]
Fix: wrong signature due to reference discarding "const".

Change-Id: I7dada9d01eb8619c3807647b6df378dd147bb7fb
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: bugs in class due to the wrapping of C socket
Romain Forlot [Thu, 9 Mar 2017 09:42:20 +0000 (10:42 +0100)]
Fix: bugs in class due to the wrapping of C socket
into a class.

Added missing include and adjust methods signature.

Change-Id: Id016b452e0b641a14482c288e4713acae941ee1d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: use of new objects and type conversion missing.
Romain Forlot [Thu, 9 Mar 2017 09:16:45 +0000 (10:16 +0100)]
Fix: use of new objects and type conversion missing.

Change-Id: I583ad536de619fed2be655a493299fe43cc65924
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFormat
Romain Forlot [Thu, 9 Mar 2017 09:16:14 +0000 (10:16 +0100)]
Format

Change-Id: Ie9159b039e468e511b497884816453093048aa80
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdded new cpp files.
Romain Forlot [Thu, 9 Mar 2017 09:15:41 +0000 (10:15 +0100)]
Added new cpp files.

Change-Id: I7f8b524a1279267f0ebd94eef6ef72e2875a47f6
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agotypo
Romain Forlot [Thu, 9 Mar 2017 01:36:10 +0000 (02:36 +0100)]
typo

Change-Id: I62d9e858409b464dd69ebfae76ca73097fae560e
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: include path (where I think to fix them...)
Romain Forlot [Thu, 9 Mar 2017 01:35:28 +0000 (02:35 +0100)]
Fix: include path (where I think to fix them...)

Change-Id: Ib44693efc9347fc4fdf40a1748725d5191303199
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: missed method declaration
Romain Forlot [Thu, 9 Mar 2017 01:34:58 +0000 (02:34 +0100)]
Fix: missed method declaration

Change-Id: If44be94dfd847089d494088d33f7b6c7f5d9098e
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoBetter use a reference
Romain Forlot [Thu, 9 Mar 2017 01:34:38 +0000 (02:34 +0100)]
Better use a reference

Change-Id: Ie060009315c99919271ac706fdc1ab384e3d7218
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoRespect the signature requested by uds-c lib.
Romain Forlot [Thu, 9 Mar 2017 01:34:18 +0000 (02:34 +0100)]
Respect the signature requested by uds-c lib.

Change-Id: I7d7a96b45323f698e884c4db289370eec199d990
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMove some functions to configuration class.
Romain Forlot [Thu, 9 Mar 2017 01:33:19 +0000 (02:33 +0100)]
Move some functions to configuration class.

Change-Id: I87b1b6961206ae3848cf6aca367698218fe1523e
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoCreate getter/setter needed for can_signal_t class.
Romain Forlot [Thu, 9 Mar 2017 01:32:25 +0000 (02:32 +0100)]
Create getter/setter needed for can_signal_t class.

Change-Id: I8253fcbe7edb6673d9f6bcf85d6109800a4cf6e8
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: used new created classes.
Romain Forlot [Thu, 9 Mar 2017 01:28:27 +0000 (02:28 +0100)]
Fix: used new created classes.

Change-Id: Ib0188ac952f64b3bc2203c0310a21de380c75854
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAdded a static method to get used by Diagnostic manager
Romain Forlot [Thu, 9 Mar 2017 01:26:48 +0000 (02:26 +0100)]
Added a static method to get used by Diagnostic manager
that respect the requested signature.

Change-Id: Id10215597d65ecaf280fe6252d78bc74a306958e
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: wrong socket variable called.
Romain Forlot [Thu, 9 Mar 2017 01:26:05 +0000 (02:26 +0100)]
Fix: wrong socket variable called.

Change-Id: Ib09b084e7202d184abf73cf92fea4afbcf4acf47
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoTypo and formating.
Romain Forlot [Thu, 9 Mar 2017 01:25:46 +0000 (02:25 +0100)]
Typo and formating.

Change-Id: I864a2fe7f974b0f2bf5000f55c2dc71ecf32a314
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoConstructor making mandatory to pass a can_bus_dev_t
Romain Forlot [Wed, 8 Mar 2017 23:50:47 +0000 (00:50 +0100)]
Constructor making mandatory to pass a can_bus_dev_t
instance to initialize it as it is reference.

Change-Id: I0261a5e2fdca5a84fd736d7ceae837ff9156b935
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoMisplaced test of rtr_flag bool and length assignation
Romain Forlot [Wed, 8 Mar 2017 23:46:58 +0000 (00:46 +0100)]
Misplaced test of rtr_flag bool and length assignation
Mini simplification of the method... More incoming.

Change-Id: I2e7c2c5226e33265591acc6c8bbbe5f5f670db18
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoFix: method to allocate a new can_message_t object
Romain Forlot [Wed, 8 Mar 2017 23:43:18 +0000 (00:43 +0100)]
Fix: method to allocate a new can_message_t object
from a canfd_frame. A new constructor added ad-hoc.

Change-Id: Id6b909666105da0c4885351db9291aa430d138f0
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoAgain change enum name and add "_t" suffix to get
Romain Forlot [Wed, 8 Mar 2017 22:59:58 +0000 (23:59 +0100)]
Again change enum name and add "_t" suffix to get
syntax coloration into IDE...

Neat, isn't it !

Change-Id: Ieee2618336be80ddf97ccaa29bc83098a6463c56
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoUse the new created class and their respectives
Romain Forlot [Wed, 8 Mar 2017 22:56:49 +0000 (23:56 +0100)]
Use the new created class and their respectives
methods to get their attributes.

Change-Id: Ib96031388356541615cd2c428d3ad1a73c79e215
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoUse static method now as they are all static. No need
Romain Forlot [Wed, 8 Mar 2017 22:49:12 +0000 (23:49 +0100)]
Use static method now as they are all static. No need
to instanciate an object to decode now.

Change-Id: Id9bf378642ad66b7b4f39d909678ecc5ebb756cc
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoChange all old struct name to the new class.
Romain Forlot [Wed, 8 Mar 2017 22:48:34 +0000 (23:48 +0100)]
Change all old struct name to the new class.

Change-Id: I8aa4430117c401182ef458a06a2aeb08957db1bb
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoForward declaration needed instead of include the
Romain Forlot [Wed, 8 Mar 2017 22:46:59 +0000 (23:46 +0100)]
Forward declaration needed instead of include the
whole file. Lighter.

Change-Id: I14af5868679e5c65bda9a4395b040cc28af04059
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agoChange CanMessageFormat name to make it
Romain Forlot [Wed, 8 Mar 2017 22:29:08 +0000 (23:29 +0100)]
Change CanMessageFormat name to make it
 as the other type.

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