summaryrefslogtreecommitdiffstats
path: root/low-can-binding/can/signals.hpp
AgeCommit message (Collapse)AuthorFilesLines
2020-01-09signal_t : Remove attribute is_big_endianArthur Guyader1-3/+0
It is not used in the actual context. Change-Id: I6334ff9a037cec4f61deea56048b3109ad1362ab Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09decoder: rework how to swap frame layout.Romain Forlot1-4/+0
This also change the bit_position to retrieve the bit word starting from the left or the right of the frame depending on the endianness of the frame layout. Change-Id: I28658e9d46bd35d8ecabeece317331832229384a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2020-01-09decoder: Fix bit_position swappingCorentin Le Gall1-0/+4
-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énier1-3/+14
- 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 Gall1-0/+1
- 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-09All: Make format coherent with the whole projectRomain Forlot1-3/+3
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>
2019-08-30Change signature of decodersArthur Guyader1-4/+2
This commit changes the signature of decoders. It is now necessary to specify the version of the signals so that the low-can-generator generates the associated wrapper and not need to modify the decoder already developed. Bug-AGL : SPEC-2780 Change-Id: I044b1a3a6bacb9fc59bd6d3f77a1dbc437a3aa86 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-30Update bit position and bit size in signalArthur Guyader1-8/+9
It's necessary to change the size of attributes to manage multi packet signal. Bug-AGL : SPEC-2779 Change-Id: If211c218ffa5a2e81ccfb32d3a5eeae0267e8f74 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-08-29Uniform indentation with tabulationArthur Guyader1-4/+4
Bug-AGL : SPEC-2779 Change-Id: I834221ae1a04fdb188062ce1b7251e648c4845de Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
2019-06-27Minor improvementsRomain Forlot1-2/+0
- 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-26Rename some of the classes removing can- prefixRomain Forlot1-0/+177
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>