summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/utils/socketcan-bcm.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-06-20Separation Generator to a dedicated repoRomain Forlot1-101/+0
Change-Id: Id94831651c3266861435272a6e36c7884bef2c45 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-09Migration to AFB Binding V2Romain Forlot1-5/+5
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 Forlot1-0/+3
Change-Id: I9f032cc232e77ce73e889a1656f1ad86cfdec774 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-02Get diag manager's socket into subscription objRomain Forlot1-8/+3
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-01Use UDS PID has key to record subscriptionsRomain Forlot1-1/+6
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-01Reworked subscription to integrate filtering.Romain Forlot1-0/+1
- Creation of an object which old the subscription context (filter, signal) : low_can_subscription_t - Move socket from can_signal_t to this new object. - Adding a member to can_message_t to transport subscription_id to be able to retrieve it with all the context through running. Change-Id: I87be8cd6c3c93a81040357920d8c081a316800c3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-19Added timestamp to received CAN messagesRomain Forlot1-1/+6
and store into frequency_clock_t. Change-Id: If209070298bd9df49297fdcbed554770e1bc0e4a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-10Make non blocking BCM socket.Romain Forlot1-0/+3
Needed because we use systemd event loop that recommend that. Change-Id: Ia3faf35fe80a973f7a7b1c81f6a8adf96705394b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-10Move reading input stream to specialized socket class.Romain Forlot1-0/+24
We always read the same object so how to fill it is the job of specialized class not a generic method can do that. Change-Id: Ia262871cec6b7ed3341eb314d5ed6641b8da61e6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-05Don't destroy socket by default as they will always be open.Romain Forlot1-9/+0
Now derivated class use constructor from base class and we don't destroy socket when a socket object is over since it may be copied before. So closing them is in charge of dev, well me... Change-Id: I0440119017a3e56bb83d0194a6908dc3e2b8f745 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-05Improve log message.Romain Forlot1-1/+1
Change-Id: I91155eda22a172efc88f72243c260480a2d1d4ce Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-03Fix: constructor and include file missing.Romain Forlot1-10/+10
Copy constructors are allowed since socket will never be closed during binding runs. Change-Id: Ie33e4b7e885d45e1ffeb980400df00ae2a97e45d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-05-03Derivate socketcan to multiple child depending upon socket CAN type.Romain Forlot1-0/+73
Use to initialize raw, bcm and later isotp socket. Now we should have, 1 BCM socket by signal to make filter on them. 1 raw socket by devices is kept to use diagnostic manager as is. Change-Id: Icb2daddf67039479f72bc487d53971adc9aba638 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>