summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp
AgeCommit message (Collapse)AuthorFilesLines
2017-06-20Separation Generator to a dedicated repoRomain Forlot1-91/+0
Change-Id: Id94831651c3266861435272a6e36c7884bef2c45 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-09Comments, Cleanup, formatRomain Forlot1-1/+0
Change-Id: I9f032cc232e77ce73e889a1656f1ad86cfdec774 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-02Remove pointer generator that make memory leaks.Romain Forlot1-1/+2
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 Forlot1-5/+0
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-01Fix: Frequency filter doesn't apply on diagnosticRomain Forlot1-1/+1
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-01Rename method to have same everywhereRomain Forlot1-1/+1
Change-Id: I80ceeada376d46f2cfcac259ed86239cc74ea05c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-24Close diagnostic manager socket if there isn't any requestsRomain Forlot1-0/+1
No need to listen diagnostic responses if there isn't any subscriptions. Change-Id: I7fa48dbc3e8fb1847b8186337fe2813625894406 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-23Static code review fixes.Romain Forlot1-1/+1
Several style errors and mistakes mostly on constructor and passing arguments as ref. Change-Id: I2ca921d6aa70b9074392bb7779ade35bebf7bd8d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-22Logical bus name mapped to device name using conf file.Romain Forlot1-1/+2
Store CAN device map without prefixed section name and add methods to get the mapped device name. Change-Id: I03ebc175c67b2251016863b0d69a45a816a81d25 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-19Make and use a single function to read incoming CAN messagesRomain Forlot1-1/+0
Change-Id: I5d3f2a8628ace464ad25989346cc76682c591bd8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-19Cleaning unused code diagnostic parts.Romain Forlot1-9/+0
Change-Id: I5df50557132ebe593818a7aa4644b8a0161c51a5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-19Format renamingRomain Forlot1-6/+5
Change-Id: I40c28f584c444ef806c2adcc55d443a145abb0d2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-19Adding also diagnostic request to systemd event loopRomain Forlot1-0/+3
As for CAN signal, monitoring diagnostic request messages is now handled by systemD io event loop. Socket reading is common for all OBD2 signals and handled by the diagnostic manager. systemd callback function lies in binding callback which in turns call read_socket method of diagnostic manager. Processing is little bit different from classic CAN messages so it is a separate callback function. Lot of cleaning to do now... Change-Id: I4d2ada0beb5d3348736dfdf3c56a7cb875a1c6c7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-19Reworking diagnostic manager to use BCM sockets.Romain Forlot1-3/+7
Use 2 sockets: - TX sockets on active_diagnostic_request class as we need X sockets using the same CAN ID "7DF" with different timing settings - RX socket on diagnostic_manager object as we need to read the same CAN ID and process them the same way, there isn't so much need to split them. Change-Id: I7338fd751a033a1d0e8912ee554e2c72c43961c3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-19FormatRomain Forlot1-1/+0
Change-Id: Idc49593fdc1a039c6a03626115e4156a629e4e65 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-04-14Change directory architecture to use 2 separated projects.Romain Forlot1-0/+99
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>