aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding/binding
AgeCommit message (Collapse)AuthorFilesLines
2019-12-03all: format typoRomain Forlot1-1/+3
Change-Id: I81c01a817cd31d577068350d8445a1df2751bff7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-12-03init: Improve error message when not finding config fileRomain Forlot1-1/+1
Change-Id: I9a9dec6e577881bbd784bcae1d17ddb244d94599 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-12-03low-can: Fix init failing when using without J1939Romain Forlot1-1/+1
Return variable was initialized to 1 instead of 0 and without using J1939 this variable isn't reaffected and so the final test fails. Change-Id: I53b7cd757b3b344d66ab18ba9795284105cbcfcc Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-12-03apidef: fix no preinit defined.Romain Forlot1-1/+1
This commit fixes the binding initialization by specifying a preinit function that parse and load the controller configuration Change-Id: I040c401fa2818d056a61a2858829bc4db2cffece Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-12-03init: 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. Change-Id: I5c9313817a3f3d423f8934cfab03e2cf20d48af2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-12-03all: formatRomain Forlot2-14/+3
Remove unecessary brackets and replace if possible if...else by ternary operator. Change-Id: Ibe46b83dea976e050b9cd9eb7ee7ab2c33b63905 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-12-03low-can-hat: improve formatRomain Forlot1-2/+2
Weird way test to make test are now fixed to be more readable. Change-Id: I81d716ac3799c4217e720a13d8ba78a46996a2c3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-12-03low-can-cb: Fix add a missing include.Romain Forlot1-0/+1
Since binding separation in 3 parts binding+lib+plugins we got a include missing about find_if function. Change-Id: Iae9ff1a72a06875aec2d0a08d049f4a00bbfecc3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-12-03low-can-cb: improve readabilityRomain Forlot1-10/+6
Just make thing more readable by define variables at the beginning of functions. And directly assign them if possible. Also improve format using the same format than in the rest of the project. Change-Id: I5cc7685b80734d0eb43a29fc06b2a8434f3469fa Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-12-03can-bus: Use configuration from JSON fileRomain Forlot2-1/+11
Use configuration from JSON file instead of the old INI file. Now all configuration files lies within the binding tree. Change-Id: Id986d19751db958ad5cf3b7f2b2c5443d4ceb062 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-12-03message: More explicit define about CAN protocols.Romain Forlot2-9/+9
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. Change-Id: I255fa03029c7d5f90a33448e5e7692d8c249279b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-12-03low-can-cb: Mark the end of the CtlSections arrayRomain Forlot1-1/+4
Change-Id: I433f4f699f3234fc07fcd909cd6b77b84e447ad7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-12-03converter: littles improvements.Romain Forlot1-1/+1
Change-Id: I9198835b96c66c140f8b1d4167828302b9dc4959 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-11-14application: Add dedicated function to set parentsRomain Forlot2-15/+18
Change-Id: Iedd493b9e4043290dae0aa9d1d94a3d9179525ae Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-11-14low-can-cb: Retrieve application from external controller dataRomain Forlot1-5/+4
Change-Id: Iaa55b00539b1435b00fe076918d5eda5eeb5db30 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-11-10hat: Move some binding functions into the hatRomain Forlot2-1/+89
Change-Id: I3a9f616078bc7fa9317995ec4300ee2b61aa4b08 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-11-09binding: add preinit function to load the configRomain Forlot2-69/+85
Make as the others bindings using controller and load its configuration file at preinit step. Change-Id: I344c1982893e47600a0b8cd03542de8069a42d24 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-11-09All: Make format coherent with the whole projectRomain Forlot5-25/+23
Add a space after a comma Change some aligments Change-Id: I5069120f4bbb33742bb4990e2e1f391ec8d5eeb6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-11-09diag-mng: Change way to initialize the diag busRomain Forlot2-3/+1
This was kind of hardcoded and now, it is initialized by a configuration key of the controller configuration JSON file. Change-Id: I6e24c28781c08bd8e99de33f16b5ae10d1a6a9a1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-11-07message_set: typedef long type signatureRomain Forlot1-1/+1
Convert two long types using typedef to get shorter one Change-Id: I9f5612def1bce512516a6e1a45711486368bbc51 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-11-07controller:initialize an empty message_set to fillRomain Forlot2-0/+43
Initialize an empty message_set to fill later when loading the Plugins Add the required method to be able to add a message_set Change-Id: I1dc784648f69832de8681184adaccbf5300f831d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-11-07write: Add feature to build messages and fix some functionsArthur Guyader2-2/+5
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-11-06examples: update examples and can_samplesArthur Guyader1-1/+0
Update of examples for new features (is_fd,is_extended,is_j1939). Bug-AGL: SPEC-2386 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Change-Id: I8c3afbafdde4f5818d73c0e71a3b7e47fb7d8fc6
2019-11-06j1939: don't process signals using same busRomain Forlot1-6/+8
Change-Id: I8733a35e4f9cb3d0f2fce818b55a010fec19dc66 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-11-05all: Format one line 'if' or 'for' statement.Romain Forlot2-93/+26
Change-Id: I58ae7a48de5569c488f9d265946a81f180051ce2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-11-05subscription: Optimizing opening socketsRomain Forlot3-300/+24
Also review some aligment and make more space between bool ops Change-Id: Id1880cbde10cc8deec66a6be163d8a012dbaa0f9 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-11-05can: clean and formatRomain Forlot1-48/+31
Little optimization in create_rx_filter_can function and make format coherent on bit operations. Change-Id: Ic9c53ba4c937604bbf3500ee89c7b5a5dbca7cfd Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-11-20Add steering wheel LIN message signal definitionsicefish_8.99.1icefish/8.99.18.99.1Scott Murray1-995/+248
Add signal definitions for the button status information in the steering wheel demo LIN message. Bug-AGL: SPEC-2951 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Id4909161f8f159858a3d29e310a3b43a787f2d03
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 Guyader3-2/+128
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 Guyader6-22/+25
Bug-AGL : SPEC-2779 Change-Id: Iebcf7492133cd7789d301593ff999b24ae10a054 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-30Change vector to list to allow to remove signal.Arthur Guyader1-8/+24
This commit allows to remove signals. We need that because subscription to an iso tp message needs to be individual. Bug-AGL : SPEC-2779 Change-Id: I1d6410ebfc8ea82d33addf1bb828d9cd810b006a Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-30Add feature ISO TP (multi frames and peer to peer)Arthur Guyader4-43/+382
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 Guyader4-69/+72
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-30Only defined signals can be writtenArthur Guyader1-26/+59
This commits ensure that only known signals could be written using the binding's api. Before that you was able to wrote raw frames on the CAN bus without any checks if this was a known signals to the binding. Bug-AGL : SPEC-2779 Change-Id: Ied6680e926f2a9c221fee31d8fb78d2d39c41132 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-30Update function rx_filter_can for multi frame prevision.Arthur Guyader2-12/+46
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 Guyader2-0/+12
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-29Update function to encode and decode messageArthur Guyader1-1/+1
This commit update encoder and decoder files. This new implementation allows to manage larger signals. Bug-AGL : SPEC-2779 Change-Id: Iec6dfbd279863aa8b8e8f9e3ce951f0c8aa80dae Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-29Uniform indentation with tabulationArthur Guyader3-214/+213
Bug-AGL : SPEC-2779 Change-Id: I834221ae1a04fdb188062ce1b7251e648c4845de Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-13Fix: only one subscription could be madeRomain Forlot2-4/+8
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 Guyader5-48/+202
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 Guyader3-43/+149
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-08-12Update examples and can_samplesArthur Guyader1-48/+1017
Update of examples for new features (is_fd,is_extended,is_j1939). Bug-AGL: SPEC-2386 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Change-Id: I8c3afbafdde4f5818d73c0e71a3b7e47fb7d8fc6
2019-07-03signals.cpp: Make an insensitive string comparisonhalibut_8.0.2halibut_8.0.1halibut_8.0.0halibut_7.99.3halibut/8.0.2halibut/8.0.1halibut/8.0.0halibut/7.99.38.0.28.0.18.0.07.99.3Romain Forlot1-0/+10
When sending a CAN signal make an case-insensitive comparison as it isn't necessary to be strict on that, so case insensitive if fine. Update the documentation accordingly. Bug-AGL: SPEC-2582 Change-Id: I998b64cdd9a381da3da582aeba42ab726fff1259 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-06-27Fix spellinghalibut_7.99.2halibut/7.99.27.99.2Sebastien Douheret1-1/+1
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh> Change-Id: Iea56414f8ccf3d96b2fc67126b066c4032fe86a8
2019-06-27Minor improvementsRomain Forlot2-7/+7
- 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-27Updating application-generated.cpp.Romain Forlot1-514/+396
This commit updates differents application-generated.cpp files with the low-can generator updated with j1939. This commit adds the description of j1939 messages. Bug-AGL: SPEC-2386 Change-Id: I798a7da34c1be3526fec6bc3e424a6b88eaf46ff 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>