summaryrefslogtreecommitdiffstats
path: root/low-can-binding/binding/low-can-subscription.cpp
AgeCommit message (Collapse)AuthorFilesLines
2020-01-09init: Fix wrong diagnostic bus name returned.Romain Forlot1-1/+1
We use the bus name which isn't correct because it isn't the device name. Bug-AGL: SPEC-2988 Change-Id: I5c9313817a3f3d423f8934cfab03e2cf20d48af2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09all: formatRomain Forlot1-7/+2
Remove unecessary brackets and replace if possible if...else by ternary operator. Bug-AGL: SPEC-2991 Change-Id: Ibe46b83dea976e050b9cd9eb7ee7ab2c33b63905 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09message: More explicit define about CAN protocols.Romain Forlot1-3/+3
Change a bit CAN binding define about used protocol. There was a mistake about BCM define which isn't a protocol at all but a maner to filter and retrieve CAN message through SocketCAN. Also FD_FRAME was using the same name than SocketCAN which isn't a good idea, better to distinguis both of them. Bug-AGL: SPEC-2988 Change-Id: I255fa03029c7d5f90a33448e5e7692d8c249279b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09converter: littles improvements.Romain Forlot1-1/+1
Bug-AGL: SPEC-2988 Change-Id: I9198835b96c66c140f8b1d4167828302b9dc4959 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09binding: add preinit function to load the configRomain Forlot1-1/+1
Make as the others bindings using controller and load its configuration file at preinit step. diagnostic-manager: Change way to initialize the diag bus This was kind of hardcoded and now, it is initialized by a configuration key of the controller configuration JSON file. Bug-AGL: SPEC-2988 Change-Id: I344c1982893e47600a0b8cd03542de8069a42d24 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09All: Make format coherent with the whole projectRomain Forlot1-4/+4
Add a space after a comma Change some aligments Bug-AGL: SPEC-2988 Change-Id: I5069120f4bbb33742bb4990e2e1f391ec8d5eeb6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-08all: Format one line 'if' or 'for' statement.Romain Forlot1-18/+8
Bug-AGL: SPEC-2988 Change-Id: Ic3b9670a2ce9e982220c54f3632f690ee4eea686 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-08subscription: Optimizing opening socketsRomain Forlot1-19/+11
Also review some aligment and make more space between bool ops Bug-AGL: SPEC-2988 Change-Id: I613f294a630caf48eea7bb0c7b9c36b07cbacfbf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-08can: clean and formatRomain Forlot1-48/+31
Little optimization in create_rx_filter_can function and make format coherent on bit operations. Bug-AGL: SPEC-2988 Change-Id: Ic9c53ba4c937604bbf3500ee89c7b5a5dbca7cfd Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-09-09Update documentationArthur Guyader1-1/+1
Bug-AGL : SPEC-2779 Change-Id: I461f7e32322faba7e822791ff2e3851039e03548 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-30Remove file socketcan-j1939 that was not removed beforeArthur Guyader1-0/+125
Bug-AGL : SPEC-2780 Change-Id: I4ddf9389faffebe0334b0004b69bb7336277c29d Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-30Remove in function rx_filter_can, the variable val was not usedArthur Guyader1-1/+0
Bug-AGL : SPEC-2780 Change-Id: Ifce6e67fd55699d088952b0f722694d211ec7398 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-30Add some typedef to reduce the size of the linesArthur Guyader1-1/+1
Bug-AGL : SPEC-2779 Change-Id: Iebcf7492133cd7789d301593ff999b24ae10a054 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-30Add feature ISO TP (multi frames and peer to peer)Arthur Guyader1-6/+108
This commit adds the ISO TP feature. The ISO TP protocol allows to communicate between two ECU. The protocol allows multi packets management. Bug-AGL : SPEC-2779 Change-Id: Ic222615b547f28e926930e6c1dea2c0265055afd Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-30Replace all enum types with masksArthur Guyader1-22/+27
This commit allows to change all enum types by masks. Now to implement new protocol you don't need to add more attribute in class. All can be contained in the flags field. Bug-AGL : SPEC-2779 Change-Id: I814d0052139be5d5efefc9ff1b4b558f46b85e90 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-30Update function tx_send for multi frame previsionArthur Guyader1-7/+30
Bug-AGL : SPEC-2779 Change-Id: Ib0b04fe3648c5b83c23327431e21161b6b2489b6 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-30Update function rx_filter_can for multi frame prevision.Arthur Guyader1-11/+45
This commit updates the functions rx_filter_can to anticipate the development of the multi-frame. Bug-AGL : SPEC-2779 Change-Id: I5f67cf84e5d3e47c75c588f8776ead92eb6c3c8e Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-30Add function remove last bcm frameArthur Guyader1-0/+11
This commit creates the function remove_last_bcm_frame. This function removes the last bcm frame of the subscription. Bug-AGL : SPEC-2779 Change-Id: I5bb6f07a8d677c4aa882549fc1950f00a0b1da04 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-30Add many frames in a subscription in the function tx_send.Arthur Guyader1-3/+6
This commit convert the message to a vector of canfd_frame. If there are several canfd frames then we add all of them to the subscription. Bug-AGL : SPEC-2779 Change-Id: I876aaf5ab7fed2fedb79367f77b987ba4745cdfc Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-13Fix: only one subscription could be madeRomain Forlot1-2/+7
Only one subscription could be made and then only one subscriber could receive associated events. As the relationship between events and subscriber is not 1-1 but 1-N, so this was the mistake. Now 1 event is created for N subscriber where before there was 1 event for 1 subscriber and subsequent subscribers could not receive same events than the ones already subscribed. Bug-AGL: SPEC-2726 Change-Id: I4e4a80ac9f9b6b4c6b006108ee55f355a7c1e377 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-08-12Integrate the J1939 features : address claiming and write.Arthur Guyader1-34/+85
This commit allows to write J1939 messages and add the management of the address claiming. Bug-AGL: SPEC-2386 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Change-Id: I1bb95a7ba6f6ebe463319c3972d9d46897181d51
2019-08-12Add feature to build messages and fix some functionsArthur Guyader1-13/+14
Allows to build a message (J1939,BCM) with a signal and a value. Bug-AGL: SPEC-2386 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Change-Id: Iadca13a927ff83f713f39da441c88356695a1285
2019-06-27Minor improvementsRomain Forlot1-5/+5
- Remove now unused forward declaration of active_diagnostic_request_t - Factorize calling the signals_manager at binding initialization. - retab... Bug-AGL: SPEC-2386 Change-Id: I418fddd80ef8b856c198dc697760a6edf0918012 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-06-26Small fixes (include and pointer)Romain Forlot1-1/+2
Bug-AGL: SPEC-2386 Change-Id: I3a622b9d236283aff479f187451cd86557a9aba7 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-06-26Modify function to open socket j1939Romain Forlot1-16/+54
The function open_socket has been modified to open a j1939 socket with a filter Bug-AGL: SPEC-2386 Change-Id: Ieed5c1d14efdb469f5a7b831c9e8a950e04e9d42 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-06-26Rename some of the classes removing can- prefixRomain Forlot1-20/+20
This commit renames files and classes : - can_message_definition_t -> message_definition_t - can_message_set_t -> message_set_t - can_signals_t -> signals_t This prepares the implementation of j1939 protocol. Bug-AGL: SPEC-2386 Change-Id: Ie3ee4f25c236c861b92eb12a56fa03a5a9afffbb Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-06-26Change can_message_t class usage for new j1939Romain Forlot1-44/+89
This commit transforms the class can_message_t as the base class and creates two derived classes: j1939_message_t and can_message_t. Bug-AGL: SPEC-2386 Change-Id: I6d3afd8e4f5abff2cd0ec4e9910bd52a2893de76 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-06-26Use subscription's sockets as shared_ptrRomain Forlot1-9/+9
This change is made to leverage C++ to read and write the different socket classes depending on CAN protocol used. Bug-AGL: SPEC-2386 Change-Id: I5e25e271fc82e9627f836aeb43b2af5ef25db83a Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-06-26Implement a new socket type CAN for j1939 protocolArthur Guyader1-3/+3
This commit implements a new socket class for the j1939 protocol and prepares the bases classes by modifying the write and read methods. Bug-AGL: SPEC-2386 Change-Id: I16ba493418a4bb37a0262b61a2a2629be6ab5051 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-14Simpler handling of binding subscriptionsRomain Forlot1-2/+363
Don't use a child class for subscription, only use one because there isn't other different subscriptions type to be implemented about now and if so then we could split again. Remove functions no longer useful and move afb events and afb subscriptions part to low-can-subscription Change-Id: Ie3e4255961ac557465098cdb48730098a950461a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Migration to binding v3Romain Forlot1-2/+2
Change-Id: I0bcccb15200064bd7d83edbf06c1e7202069189a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-01-02Make low-can use afb-genskel by defaultRomain Forlot1-2/+0
Cleaning header file inclusion Change-Id: Ic0dd9637ecd491692bd4b8b39e9602e85498c0a9 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-07-21Implements new verbs to write on CAN busRomain Forlot1-273/+0
This will open a new BCM socket not dedicated to a subscription use to that mean. Change-Id: Idf353015f731e32d6eb7c7856bd73167c66e790f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-06-20Separation Generator to a dedicated repoRomain Forlot1-0/+306
Change-Id: Id94831651c3266861435272a6e36c7884bef2c45 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>