summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-01-09all: formatRomain Forlot4-45/+30
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-09decoder/encoder: typoRomain Forlot2-2/+2
Bug-AGL: SPEC-2991 Change-Id: I9ebea118770a9ffe0dd4321408643e76250e3635 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09converter: Use unsigned int whenever it's possibleRomain Forlot2-3/+9
Use unsigned int whenever it is possible instead of uint32_t. This let the compiler decide the type. We do not need to use uint32_t explicitly for the converter. Bug-AGL: SPEC-2988 Change-Id: Ic2af875e7435668928c454df76e59c5c43b08407 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09bitfield-c: use unsigned int instead of uint8_tRomain Forlot14-131/+131
Use unsigned int instead of uint8_t upon destination and source array length. This is needed to handle gathered multi-frames message data which could be greater than 1 simple messages. Bug-AGL: SPEC-2988 Change-Id: I107bff383c2d0771dbc2a30770ec5c195b1c22ac Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09decoder/encoder: simplification of code.Romain Forlot2-120/+36
- Useless tests removed - Bit operation changed to more readable ones - Handle correctly mask to decode signal on 1 byte or in-between bytes more clearly. - using static_cast now instead of C casting method. - Avoid manual vector initialization and using default constructors instead. - Avoid using intermediate variables when this isn't necessary. Bug-AGL: SPEC-2988 Change-Id: I049d65f460109772b57df7572bdac8e6500242e0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09encoder: use switch case to handle CAN protocolsRomain Forlot1-31/+37
Better using switch case than if...else. This would be more extendable and readable. Bug-AGL: SPEC-2988 Change-Id: I5fb03531ad77441bcb7d1620bdb07d82aa6a4eb4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09message: Correctly detect extended CAN id.Romain Forlot1-3/+1
Previous test was always true. This fix the wrong test and then add the EFF flag correctly on messages using extended CAN id. Bug-AGL: SPEC-2988 Change-Id: I69686fd3d5a39ea3a0d1980b4bfa88fe36fb7fe5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09socket: Raise an error if open function failed.Romain Forlot2-0/+5
The socket opening wasn't tested and we fails later on another function using the wrongly opened socket. This would not happens anymore. Bug-AGL: SPEC-2988 Change-Id: I9b30bd9fc13b99277cbef6f7aeaddadc57ad0b18 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09low-can-hat: improve formatRomain Forlot1-2/+2
Weird way test to make test are now fixed to be more readable. Bug-AGL: SPEC-2988 Change-Id: I81d716ac3799c4217e720a13d8ba78a46996a2c3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09low-can-cb: improve readabilityRomain Forlot1-11/+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. Bug-AGL: SPEC-2932 Change-Id: I5cc7685b80734d0eb43a29fc06b2a8434f3469fa Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09can-bus: Use configuration from JSON fileRomain Forlot8-139/+42
Use configuration from JSON file instead of the old INI file. Now all configuration files lies within the binding tree. Bug-AGL: SPEC-2988 Change-Id: Id986d19751db958ad5cf3b7f2b2c5443d4ceb062 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09fix: missing include to find find_if functionRomain Forlot1-0/+1
Change-Id: I099b951011442ffaebf75a319236a39553999a41 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09message: More explicit define about CAN protocols.Romain Forlot4-13/+13
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-09decoder: fix left behind characterRomain Forlot1-1/+1
Bug-AGL: SPEC-2988 Change-Id: I28cf984024356925469b4971b993718276d1240f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09low-can-cb: Mark the end of the CtlSections arrayRomain Forlot1-1/+4
Bug-AGL: SPEC-2988 Change-Id: I433f4f699f3234fc07fcd909cd6b77b84e447ad7 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-09examples: Update using new GeneratorRomain Forlot10-329/+520
New generator including new signals capabilities: - sign - big_endian frame - default length Bug-AGL: SPEC-2988 Change-Id: Icf2e4dd7ef880a73527103c90a8063cf3d042e41 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09plugins: Use agl-vcar plugin by defaultRomain Forlot4-755/+745
Bug-AGL: SPEC-2988 Change-Id: I8935210e4cc2ec290a809bc1bfece4c36d367cda Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09cmake: cleaning and set RPATH for bindingRomain Forlot3-70/+61
Cleaning and set RPATH to find the low-can library Change-Id: I6e68a61bbeca385433028a716b9ac6d5e7f28769 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09decoder: Fix bit_position swappingCorentin Le Gall4-1/+25
-Added an attribute to signals that tells if the bit_position has been swapped. -Test if bit_size and bit_position gives an "out of range" data Bug-AGL: SPEC-3022 Change-Id: I589565ca923ec807da2d4f0db7c4c92fb737b579 Signed-off-by: Corentin Le Gall <corentin.legall@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09sign: handle decode methods sign from can valueClément Bénier5-35/+132
- add enumeration that represents the way of encoding: enum sign_t { UNSIGNED = 0, SIGN_BIT = 1, ONES_COMPLEMENT = 2, TWOS_COMPLEMENT = 3, SIGN_BIT_EXTERN = 4 }; - the function handle_sign allows to transform value if negative and return the sign of the value in order to be multiplied at the end ot the parcing Bug-AGL: SPEC-3021 Change-Id: I5766a286488170d930422474b4c4f3a8578ca726 Signed-off-by: Clément Bénier <clement.benier@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09can: Add big endian CAN frame layout handleCorentin Le Gall7-7/+57
- can-decoder.cpp: translate_signal() : Tests "frame_layout_is_little". If false the signal's bit position is changed to fit the layout. - message-definition.cpp: Added the new attribute "frame_layout_is_little" and its getter. - signals.cpp: Added a setter to the bit_position attribute. - converter.cpp: Added a methode to convert a big endian bit_position to a right (little endian) bit_position. Bug-AGL: SPEC-2988 Change-Id: I004c9069eb00f389564927cd12d1b30470c3a59d Signed-off-by: Corentin Le Gall <corentin.legall@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09application: Add dedicated function to set parentsRomain Forlot2-15/+18
Bug-AGL: SPEC-2988 Change-Id: Iedd493b9e4043290dae0aa9d1d94a3d9179525ae Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09low-can-cb: Retrieve application from external controller dataRomain Forlot1-5/+4
Bug-AGL: SPEC-2988 Change-Id: Iaa55b00539b1435b00fe076918d5eda5eeb5db30 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09examples: updatesRomain Forlot9-42/+66780
Bug-AGL: SPEC-2988 Change-Id: I9c71038690d301e513f736a3405c3367f64fdbda Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09test: Update tests with new transportRomain Forlot3-25/+25
Bug-AGL: SPEC-2386 Change-Id: I3a0e4ea451f9e01fc13b7498b9eb20e81548ce5d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09doc: Update documentationRomain Forlot3-11/+11
Bug-AGL: SPEC-2988 Change-Id: Ifbeb00ef74d7a83db66808ae59dc9422b2e8593a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09can_message: add missing signature due to conflictRomain Forlot1-4/+3
Bug-AGL: SPEC-2988 Change-Id: Ib705ae7c500bb9d3abc863053943298c87896bd2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09hat: Move some binding functions into the hatRomain Forlot2-1/+89
This is needed to move using a splitted binding/library model to have plugins linked to the lib as well as the binding to get there symbols Bug-AGL: SPEC-2988 Change-Id: I3a9f616078bc7fa9317995ec4300ee2b61aa4b08 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09binding: add preinit function to load the configRomain Forlot6-82/+100
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 Forlot21-94/+94
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-09all: Copyright updateRomain Forlot14-14/+14
Bug-AGL: SPEC-2988 Change-Id: I9794c48d0f7567cc3fdc7dff21b4fcee47296514 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09message_set: typedef long type signatureRomain Forlot3-5/+5
Convert two long types using typedef to get shorter one Bug-AGL: SPEC-2988 Change-Id: I9f5612def1bce512516a6e1a45711486368bbc51 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09controller: Prepare project ot use the ControllerArthur Guyader19-868/+1000
Initialize an empty message_set to fill later when loading the Plugins Add the required method to be able to add a message_set Bug-AGL: SPEC-2988 Change-Id: I1dc784648f69832de8681184adaccbf5300f831d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-08j1939: don't process signals using same busRomain Forlot1-6/+8
Bug-AGL: SPEC-2991 Change-Id: I8733a35e4f9cb3d0f2fce818b55a010fec19dc66 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-08all: Format one line 'if' or 'for' statement.Romain Forlot13-209/+65
Bug-AGL: SPEC-2988 Change-Id: Ic3b9670a2ce9e982220c54f3632f690ee4eea686 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-08app-generated: update for generated steering wheelRomain Forlot1-276/+2
Change-Id: I8af34595e4ea4d72af726c6c5db3ac05dda85bf2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-08subscription: Optimizing opening socketsRomain Forlot2-30/+22
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-08socketcan-j1939: format how to define_opt()Romain Forlot1-7/+4
Bug-AGL: SPEC-2932 Change-Id: Ifec401451dc541b71dc2f98d25f5c953f1bcf532 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>
2020-01-08can: Fix receiving and sending extended CAN framesRomain Forlot1-2/+4
Bug-AGL: SPEC-2779 Change-Id: I672450b51b46082b6a913bef2d6e27d64c49e6fc Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-08can: Remove extended flagsRomain Forlot3-13/+9
It doesn't matters to know whether or not a can signal is using standard or extended CAN ID because this could be retrieved using bit mask on the CAN ID when receiving and sending. Bug-AGL: SPEC-2988 Change-Id: Id96c576045bf087df51beb011742ad631336f814 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-08cmake: Remove build warningsRomain Forlot1-1/+0
Remove unused flag with C++. Bug-AGL: SPEC-2988 Change-Id: I85376914f64b9dfe9015a6439185ad6a53cdb117 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-08j1939: Following kernel updatesRomain Forlot2-2/+2
Compatatibility for latest kernel/glibc version See: https://github.com/torvalds/linux/commit/0768e17073dc527ccd18ed5f96ce85f9985e9115 Follow j1939 integration in the kernel which remove SO_J1939_RECV_OWN Bug-AGL: SPEC-2932 Change-Id: Id01e92330582da299af675676987cd667272e2c5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-12-06Change example message 0x3D9 back to non-FDicefish_8.99.4icefish_8.99.3icefish_8.99.2icefish/8.99.4icefish/8.99.3icefish/8.99.28.99.48.99.38.99.2Scott Murray3-3/+3
Update agl-vcar example definition to change message 0x3D9 back to regular CAN so it will be usable on non-FD capable hardware again. Bug-AGL: SPEC-3012 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I74064c5a8f4111f8f774104d27b86c8f15451539 (cherry picked from commit 12e75ea716e1b5054be0228e2859e14a11be622a)
2019-12-05Fix filter bitmask generationScott Murray1-1/+1
Fix filter bitmask generation in encoder_t::encode_data; the mask bits need to be left-aligned in each byte, not right-aligned. Bug-AGL: SPEC-3013 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ie084f81e3d8c06e69b5bb7562055187395099ac7
2019-12-03Update steering wheel LIN message definitionScott Murray3-2/+6
The steering wheel LIN message does not work in low-can after it has been updated to include commit "Update function rx_filter_can for multi frame prevision." (59bffa4 in master, a41ee0d in halibut), due to the length value now being required in the message definition. The length has been added to the definition for agl-vcar and the application-generated.cpp files regenerated. As well, the new J1939 and FD flags have been added to the message definition for consistency. Bug-AGL: SPEC-2951 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ice079268827dfbb2bf2c79b6c5e897dcab8fc433
2019-11-20Add steering wheel LIN message signal definitionsicefish_8.99.1icefish/8.99.18.99.1Scott Murray3-1036/+856
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-10refactor(config.xml.in):Replace required api with required bindingnextLi Xiaoming1-1/+1
Appfw docs: "required-api local": OBSOLETE SINCE FF (AGL6), PROVIDED FOR COMPATIBILITY.Use the feature urn:AGL:widget:required-binding instead. Bug-AGL: SPEC-2781 Change-Id: I9627f1c59d89f9687c09a41a3bedf1c56bb90f59 Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
2019-09-09Update documentationArthur Guyader1-1/+1
Bug-AGL : SPEC-2779 Change-Id: I461f7e32322faba7e822791ff2e3851039e03548 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>