summaryrefslogtreecommitdiffstats
path: root/low-can-binding/can/can-encoder.hpp
AgeCommit message (Collapse)AuthorFilesLines
2019-08-29Update function to encode and decode messageArthur Guyader1-5/+4
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-12Add feature to build messages and fix some functionsArthur Guyader1-0/+7
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-26Rename some of the classes removing can- prefixRomain Forlot1-6/+6
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-1/+1
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>
2018-12-14CAN FD implementationRomain Forlot1-1/+1
Add a flag to CAN message definitions which set the message as using FD protocol if true. Use a new generated file with the new FD flag field on the message definitions. Change BCM socket "struct" using an union to store the CAN frames either using the FD struct or the classic non FD struct. A BCM socket can only one frame type once configured. Use as much as possible the "struct canfd_frame" in the binding and only make a difference before writing or reading the socket. From a memory point of view both struct are identical and only the last member differ and could hold more data with messages of 64 bytes long. So the canfd_frame is compatible with the can_frame and can be differentiated by a flag set in the can_id member. Remove now unused code processing can_frame. Keep the diagnostic manager using the classic CAN frame. Set the maximum number of frames that a BCM socket can handle to 257. Bug-AGL: SPEC-1980 Change-Id: Ifcc041281ea6745fc25cbd384743761f4446f489 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-07-21Fix: encoding value method has wrong signature.Romain Forlot1-1/+1
Change-Id: I227c721f782eef85f83db9ffdb7cc0e180d17da4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-07-21Be able to write raw frame & encode value to sentRomain Forlot1-0/+33
Check whether the argument is a raw frame or a Signal + Value to encode then send. 1 new class to handle encoding part of a value as well as a new method for can_signal_t which return index of a map from its value. Change-Id: I288d2aeec28ce74c9ca35750db18557c9251e1df Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>