aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-06-09Update documentationRomain Forlot2-132/+107
Change-Id: Ieea8476f65433ebd41da2ca992b9984310eb6c5f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-09Migration to AFB Binding V2Romain Forlot12-82/+72
No more binder interface needed to use logging macros and others stuff like make_event or any other calls Change-Id: Iaee60697373bc8a0e67518e924b36b5389533e68 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-09Comments, Cleanup, formatRomain Forlot16-127/+139
Change-Id: I9f032cc232e77ce73e889a1656f1ad86cfdec774 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-07Cleanup include and prepare to switch binding v2Romain Forlot5-21/+1
Change-Id: I032e8ec32c3ff5b2464f2802dd93683752316049 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-07Fix: read 2 times for 1 incoming CAN frame.Romain Forlot1-2/+2
Change-Id: I7be7b5e704b3cb081e1dbd73a6ba7f88a2bbc62f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-07Possible uninitialized variable returned.Romain Forlot1-1/+2
Change-Id: Id6ffed520aa238304afdddcd37a64e93002196aa Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-07Add some useful DEBUG information for read framesRomain Forlot1-2/+3
Change-Id: I026111942b4b8486b46f56d5fc92fcebde4dc91f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-07Fix: invalid CAN frame read leads to an exceptionRomain Forlot1-2/+4
The frame is reported like before but ignored now. Change-Id: I8314cdb5fa99d950023bf881c72daea2ef9bb935 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-07Improve reliability on multi-threading.Romain Forlot4-61/+54
- Limits call to signals_manager and subscribed signals map - Unlock and lock mutex in the right order to avoid possible dead locks. Change-Id: Ifb152af833ad8bdde5dc4fc3a27b1a7c27046523 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-07Fix: exception unsubscribe all at startRomain Forlot1-1/+1
When unsubscribing but no diagnostic subscription made there is an exception when cleaning empty requests vector. Change-Id: I40bdd01969fd1a1c6fecb0a438c46d0df584de83 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-07Fix: c++11 detected and not applied from configRomain Forlot3-3/+5
Change-Id: Iedf1f88e142a3f579ada3794b1f0f8813105d880 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-07Fix: unsubscribe from 1 app remove diagnostic reqRomain Forlot1-2/+0
Let the function on_no_client do the cleaning of the remaining active diagnostic requests. Change-Id: I6fc2477d53200e3475f62cd453804827172a99c0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-07Separate low_can_subscription class from callbacksRomain Forlot7-276/+299
Change-Id: I682cacca1af53f898ac4c428f823562c50e7cce4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-06Update signals.json and generated files.Romain Forlot2-42/+77
Adding fake windows signals, Fix wrong bit_position about doors (not fake signal) In fact all signals are fake except of doors signals and OBD2 diagnostic messages. Change-Id: Ia5877bb9720b11b0ff3593788d3e79324b0fa44e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-06Update generator at latest low level bindingRomain Forlot2-12/+31
- renaming configuration to application - make message_set as a vector of shared_ptr - Setting up object parent in graphs at application object instanciation Change-Id: Ib33103d5cebbd9381375d2832582a25ae0f9f199 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-06Remove demo UI from the projectRomain Forlot27-2188/+0
Low level CAN binding is a standalone service that doesn't have to be delivered with an UI. Change-Id: Ic3995704a63b56f21168e2e9da8e45b3117a0f41 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-02Let the thread to be managed outside the binding.Romain Forlot1-4/+2
Change-Id: Ib905a3e0ea58a32761c4dda4a391c1d7b311c12a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-02C++ coding styleRomain Forlot2-2/+2
No changes on the object so it is a const method... Change-Id: I55b50d0d6fc0dd120f58ca56b6a68172353a5ef5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-02Remove pointer generator that make memory leaks.Romain Forlot6-29/+10
Only have 1 place where to generate a pointer from a DiagnosticRequest is in low-can-cb.cpp when subscribing. Else now using reference instead of raw pointer. Change-Id: I7fd2f3d30afa90017b945e6b711922036123b6d3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-02Get diag manager's socket into subscription objRomain Forlot7-198/+240
Subscription index map is the socket ID which implies the following: - All diagnostic messages subscriptions are stored into a vector holding diagnostic_message and there is 1 socket for all like the diag manager did. - Reworked workflow to open a BCM socket and adding an RX filter more flexible. - Separated methods to handle on_no_clients event. - Cleaning diagnostic manager code to remove all unneeded stuff now. - Embed diagnostic response in VehicleMessage decoded message to be able transmits the PID in event push thread. This is needed by to correctly handle case when there is no clients subscribed to an AFB event. Else we can't find the diagnostic message to remove from low_can_subscription vector. Change-Id: Iab13fd556cda3c69827bcd67f3a23a03cb6a2cf2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-02Update submodule.Romain Forlot1-0/+0
Change-Id: I2f8bc5bbe7325b50c62a40d1f081b5bf771179c8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-02Fix: Handle several subscriptions to a signalRomain Forlot1-26/+46
Change-Id: I460bae0056761f6468ca4dc55a594f1529d53c83 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-02Adding accessor to diagnostic msg shared ptr.Romain Forlot2-0/+6
Change-Id: I9d32239b3ebd762ab3a337fc734d504ee8dc8c5f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-02Change way to validate a subscription objectRomain Forlot1-1/+1
Better to check validity of 2 differents type of signals used and checks that its event is valid. Change-Id: I1435bbe81a43fd80eae049d43b5e37fc8f893074 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Fix warning compileRomain Forlot1-3/+6
Change-Id: Id0f088f030c0a23b4347c4886a3d756538cbb651 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Implement minimum and maximum subscription filtersRomain Forlot1-2/+6
Change-Id: I6b027cdb37e425e185b8d2278ae775f857ff96bc Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Better handling of duplicate non recurring requestRomain Forlot1-1/+2
Change-Id: Ib6015d5dac66751622f3e287429475b6b708c3d5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Methods to ease access to DynamicField membersRomain Forlot2-0/+23
Change-Id: I8974827340e3faf60a511900cbdcf117ce43fb53 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Close socket by default when destroying objectRomain Forlot1-1/+4
As socket is back to only movable, only one copy of a socket can be present at a time, so when the object is destroyed we have to close the socket too. Change-Id: Id64bb53919ce7c24476c26ba9a8520affa3f6273 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Delete pointer and content, possible memory leakRomain Forlot1-0/+5
Change-Id: I21e65bcaaa444c03bbc634f1d437e6ff363623b6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Initializing all struct by default to avoid errorsRomain Forlot1-1/+3
Change-Id: I54eab7da7e5819f633a5612abe46d44550068aab Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01FormatRomain Forlot1-0/+1
Change-Id: Ibbd48a1c0fe0e7567cbf3f5f1c6919e542883924 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Left over renaming variableRomain Forlot3-8/+7
Following change from configuration_t to application_t some variable name doesn't correspond now : conf -> app Change-Id: I56c3a83113777a43af9024a9bc9b53f705b60b0f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Fix: Frequency filter doesn't apply on diagnosticRomain Forlot2-6/+6
As socket isn't managed by low_can_susbcription yet, create_rx_filter was just using signal frequency setting. Now, it take the frequency asked in argument if provided. Change-Id: If44458b2b0e34df44337670dd9a5b2b58324bfbe Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01CleaningRomain Forlot1-13/+10
Change-Id: I73e9acf8b3a28db2134cf1f4bcb1b2aa7fd224fc Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Use UDS PID has key to record subscriptionsRomain Forlot2-2/+9
can_signal_t use socket number but has for OBD2 diagnostic request there is only 1 socket to listen all response then we use PID has key to find the subscription later on the processing. Change-Id: I5f0554e1a4ac43e1046d9b7b7f9bb00d3a753562 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Simplify processing eventRomain Forlot5-23/+36
Set afb_event into subscription object then there is no more std::pair used t access it, better use a method from low_can_subscription_t class Change-Id: Ic0772d97c18ca8899821cf3ce175166bbe0be660 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01FormatRomain Forlot1-1/+0
Change-Id: Ib3f8f0c8cbffaf7b5d1acb8c4541526dad03a9c9 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Fix: segfault subscribing diagnostic messagesRomain Forlot2-7/+7
Wrong object used when subscribing. Change-Id: I356c8cedc57191268ce3ea1838999fbe03472ae2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Fix: get signal name no matter type of signal.Romain Forlot3-14/+19
One method to return name depending upon which type it is, can or diagnostic. Change-Id: I1e96f88654e14316d3afe527fa6fa0d8ddbf410d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Using isnan to define frequency.Romain Forlot1-1/+1
Change-Id: Iba93089dc982644898540b286892c436229f38d2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Missing pragma once...Romain Forlot1-0/+2
Change-Id: I3088089af5a817ed68ef0276869a01d7323e6ae7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Implement method to filter messages before pushingRomain Forlot2-36/+42
Change-Id: I94223ebead4a011a1fb56ed0c3676c433e01319b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Split function to call 1 function by signal types.Romain Forlot1-19/+31
From signals found process each vector into a separated function Change-Id: I0c622508eb98a7284606b4f75c825ba48e3fe227 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Rename method to have same everywhereRomain Forlot2-3/+3
Change-Id: I80ceeada376d46f2cfcac259ed86239cc74ea05c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Fix diagnostic message subscription.Romain Forlot2-2/+11
Change-Id: I490ee639e5d524a142e2fbbd928725b7268178aa Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Adding windows CAN signals.Romain Forlot1-1/+77
These signals is not the reals ones. Change-Id: I5f30fcab09f22488a8085f44eb22a97b67214339 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01YouCompleteMe extra configuration file for IDERomain Forlot1-0/+12
Change-Id: I915cfefcbeadeda56c949a405dc3194edf1faf99 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Use default signal frequency if no filter providedRomain Forlot1-1/+4
Change-Id: I60bc1cdd62a75b539684032bbb58c38256149944 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-01Retrieve signal last value and timestamp at once.Romain Forlot4-0/+13
Change-Id: I8401030ece94b5e397b6d2b71b29ff4e435d1486 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>