summaryrefslogtreecommitdiffstats
path: root/src/utils
AgeCommit message (Collapse)AuthorFilesLines
2017-03-17Comments fixes, typo and formating.Romain Forlot4-129/+119
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>
2017-03-16Include cleaningRomain Forlot1-1/+0
Change-Id: I5df96540400b833e684001f8fc5fa33ff1892bae Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Follow rename operation in CMakeLists.txtRomain Forlot2-2/+2
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>
2017-03-16Ease use of openXC structures.Romain Forlot2-0/+29
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>
2017-03-16Rename class and 1:1 map to JSON description fileRomain Forlot1-2/+2
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>
2017-03-16Return period without unit conversion.Romain Forlot1-3/+1
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>
2017-03-16Search signals against name not generic_name. It's madeRomain Forlot1-2/+2
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>
2017-03-16Implement regular event launching using systemd event loopRomain Forlot2-10/+33
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>
2017-03-16Improve Doxygen comments and formating.Romain Forlot2-87/+84
Change-Id: Ia39e78aca00a49c7cee5e42d26ba1ef2b49d3709 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Improve: DEBUG messages.Romain Forlot1-1/+1
Change-Id: Ib52f22e7bc5bc5d14edbb31ad6006caee23c4098 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Search into generic_name as well as name + prefix, butRomain Forlot1-1/+5
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>
2017-03-16Adding/Fix classes constructors to make them correspondRomain Forlot2-1/+2
to the ones generated. Change-Id: I6b0b778f59ac52fe66e36a327f60ae58550ac271 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Get decoding diagnostic request from decoding thread of can_bus_tRomain Forlot2-20/+59
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>
2017-03-16Implemente way to send diagnostic request when subscribed.Romain Forlot2-0/+9
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>
2017-03-16Manage prefix on CAN and OBD2 prefix. Searching signalsRomain Forlot1-2/+2
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>
2017-03-16Instead of a global pointer, config is now a Singleton.Romain Forlot2-6/+6
Change-Id: I0cfc34f330c531ba5f070542a1cb723be4bcc70a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Adding needed function to get some time handle on requestRomain Forlot2-5/+51
for diagnostic at first. Change-Id: I3ab966d6386bad52f68ebdbea723bb7507cfaf2a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Fix: include statement with wrong path.Romain Forlot2-2/+2
And minor fixes. Change-Id: Ica55c0708edd86d0aa37e7117b3c3fad551a0167 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Change FrequencyClock struct to class and rename it.Romain Forlot2-11/+21
Change-Id: I1076ad90e14815f3d0ab71ca9fa359d1d3c1748d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Fix: use of new objects and type conversion missing.Romain Forlot2-6/+6
Change-Id: I583ad536de619fed2be655a493299fe43cc65924 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Fix: include path (where I think to fix them...)Romain Forlot2-5/+5
Change-Id: Ib44693efc9347fc4fdf40a1748725d5191303199 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Fix: used new created classes.Romain Forlot2-4/+4
Change-Id: Ib0188ac952f64b3bc2203c0310a21de380c75854 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Typo and formating.Romain Forlot2-9/+9
Change-Id: I864a2fe7f974b0f2bf5000f55c2dc71ecf32a314 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Change all old struct name to the new class.Romain Forlot1-1/+1
Change-Id: I8aa4430117c401182ef458a06a2aeb08957db1bb Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Fix all doxygen comments about parameters.Romain Forlot2-16/+16
Change-Id: Idbe268d07ebf53a63c9543d9cca94ded34a29731 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Make a global variable to a configuration object.Romain Forlot1-2/+5
With afb interface, it will be the last global variable needed as it regroup all needed stuff to other class and functions. Change-Id: I3d82b6f748ff22a9a975d15ab9df51f63005737f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16added a socket class to wrap the C socket API.Loïc Collignon2-0/+135
Change-Id: Id90c60caba93b65011def0cc01232a7a2d7dbac4 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2017-03-16Beginning of work of get central configuration objectRomain Forlot1-0/+11
that will be used by the binding to access generated elements. It will hold generated structure/objects and make a resume to the binding configuration. Idea is to have an object that can be inherited in the generated code to extend its functionnalities or change some of its behoviors. Change-Id: If2ce5cbe2eb98a74a8e3f13000ee02855674216f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Fix: wrong function signature and get out from classRomain Forlot1-1/+1
temporarly to get compiled project. Change-Id: I7235f503c42a3e31d09094c42882b74e5e809493 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Include file changes, typo and renaming operation.Romain Forlot3-3/+3
Change-Id: I6643333cfcc8bea120496c53f1cd3b8596e33398 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Finalize new directories organization.Romain Forlot1-2/+2
Change include statements and CMakeLists.txt accordingly to the new layout. Change-Id: Ief0821f7f6636b072cf26c7d8d8fcc16fe43ab01 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-03-16Beginning of work on obd2 object andRomain Forlot6-0/+484
files reorganization. Change-Id: Idaa7ad05c45d734ce771506fd6e41f1a09a6ac66 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>