Age | Commit message (Collapse) | Author | Files | Lines |
|
Add back the ini-config and config-parser code that existed
previously, and use it in binding init to over-ride the device
mapping from the controller JSON if /etc/dev-mapping.conf exists.
This restores the documented behavior, and is needed for the
existing AGL demo platform support and soon CI.
Additionally:
- Add code to validate the active_message_set, diagnostic_bus, and
bus device mapping configuration values.
- The above required moving plugin loading before the configuration
callback in the controller configuration, but this change seems
rational in that everything required by the generated plugin code
is already initialized before then, and it makes validating the
configuration possible without adding an extra callback.
- Add logging of the used CAN bus to device mappings at info level
to ease debugging any future issues.
- Tweak the log level of the missing configuration file message to
info from error, since it is a legitimate mode of operation if
relying on the default bus values in the controller JSON.
Bug-AGL: SPEC-3755
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I440f5e0fc85be41f7c4c1f47d824a403525a18f9
|
|
Bug-AGL: SPEC-3129
Change-Id: I41928c5f4c467edb176ad6234c9b775e70035319
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
|
|
Bug-AGL: SPEC-3129
Change-Id: I003a98863b78b49e85638bbb7e9b0d0fbde5a2b7
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
|
|
The space at the end is not expected!
Bug-AGL: SPEC-3115
Change-Id: I8c87e4827dc697d0605131a4f9e7f4720bf7cec4
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
can be called with json value:
- a string matching can id
- an array matching can ids
Change-Id: Ia38728e065348e265613643fc934eb985564b722
Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: Iee28c1216ad5a3a4cdc76bd3edef4f7b5ccf0866
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Separate some define to be in a dedicated header file that will
be installed on the system. Then the low-can-generator could use it
instead of having to copy those defines in the generator code.
Change-Id: I1716c8b20f0811ca4ac1e8f13609f05ad7d24d1f
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I9a46b0b87d56a73fb75fafafb0509ca66bb68dd3
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I8c2fce0f8080f213fda26a054f691ba3ed457bda
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
This commits allows to subscribe message and have all signals
in one frame.
Change-Id: I95de0e46b30be09a47a04754266cb55650eeec31
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
This commit allows to swap only one time a data message.
Change-Id: I566c6ad72e266cd59a4397ab1a5ef423d752cf75
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I93d31768804d4e30994897487e9fd312a56c547b
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
This commit adds message_definition variable to subscribe to
message and not signals. And the function that init rx_filter
for message.
Also patch the error message
Change-Id: I98b0b4dc8fec6ccef6e103fcb8aae136f708aa16
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
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>
|
|
Change-Id: I13a3392aecd8d57fac6f94346c4cf209595775b4
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I0689d62e32b9b60059adc2d4be78fa3b2581441c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
This is an improvment of the bit_position computing. This now operate only
on full bytes to get the position.
Change-Id: Idb4993a3c9922d50d02379139e7cbbe5a2cb501b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I392bff2c1f4062aee186875335786fcda9cc0649
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
This commit allow if the unit is defined to display it
in the json emmits by low-can.
Change-Id: Ia09d4d9614eba6de93292ffab351fa1f4e612b73
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
This commit patch j1939 feature after the update of the
kernel from linux-can-next to mainline.
Now promisc option removes filter of the bind.
The option is now a parameter in the event_filter.
The feature recv_own isn't available, you can't receive
on the same socket an emit frame from you.
Not a big problem because receive and send method use two
different sockets in the implementation.
Change-Id: I5ac410177c1512090827870300b8aa1679477b84
Signed-off-by: Arthur GUYADER <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: Ia79320108e8293d2b7a5beba4f49036999d5ebbb
Signed-off-by: Arthur GUYADER <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
This commit patch function get_id. It was only capable to return
id and id extended. Now it returns also pgn.
Change-Id: If5feb7e2ee3bc5ca33b16620d1b998c95414dda8
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I840fc6cc7e9cfd171b03cac508fedb8ece4b976d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I6f3e84700563fc60e643d770365c98342214bedd
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Adding bit_position and frame manipulation flags
Change-Id: Ibd727a54a33a78b49f2c319b4b70dcda21ea87cb
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Instead of initilizing using a for loop...
Also fixes a wrong watched bit using a bcm socket
Change-Id: Ib65a3da06dbd249c97b8ec11823247120505d545
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
- Fix wrong bit_position swap computed:
Need to multiply then lenght in bytes by 8 to get it for bits.
- Add a continental bit_position function:
This allow to get the correct bit_position using the weird Continental.
bit numbering method where the Frame is read using little endianness
and bit count using a big endianness
- Use define CHAR_BIT instead of hardcoded 8 value
Change-Id: I8d458ab457f80e5fa116af942acfceaaef51b763
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: Ia024b9d87d219f69aac0613d6e14b623e37300a6
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change the flags to be enable if frame use big endian rather than
little
Change-Id: I09ae9c54f1d807da4e740457cf04a001723edb0e
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
This commit fix the wrong bcm ival1 value set because the struct
hasn't been initialized so it use a wrong value that can not be
handled by the socket.
Initialize diagnotstic manager depending on JSON configuration file
This avoid to request engine_speed signal when there isn't any diagnostic_bus
configured in the JSON file.
Change-Id: I98145a6e20c29a644c856d818f104c6bd8069f9f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I8a012285a8d06f3c5778c82e543c944d8fa20e3c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
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>
|
|
Change-Id: Ifdaea3bf0969f15eb70629a92c0293ddeee33491
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Integrate frame layout as a flag instead of a separate boolean
Change-Id: I0fe32fd8a80238006ef89152af25001ecdf018c9
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: Ib3e1df0d3741274336c8806ae82082e33d4d3a92
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
No need to use ini-config now that the config is hold by the controller
JSON configuration file.
Bug-AGL: SPEC-2988
Change-Id: If82d22266fb2d592c140b81cda783ee63f1f13be
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Bug-AGL: SPEC-2988
Change-Id: I81c01a817cd31d577068350d8445a1df2751bff7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Bug-AGL: SPEC-2988
Change-Id: I9a9dec6e577881bbd784bcae1d17ddb244d94599
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Return variable was initialized to 1 instead of 0 and without using J1939
this variable isn't reaffected and so the final test fails.
Bug-AGL: SPEC-2386
Change-Id: I53b7cd757b3b344d66ab18ba9795284105cbcfcc
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Convert byte to hex without forgetting '0's.
ex: Before: '10' -> 'a'
After: '10' -> '0a'
Bug-AGL: SPEC-2991
Change-Id: I7346893eaf83aaa9294e48c20cbffd1a61789b51
Signed-off-by: Corentin Le Gall <corentin.legall@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
This commit fixes the binding initialization by specifying a
preinit function that parse and load the controller configuration
Bug-AGL: SPEC-2988
Change-Id: I040c401fa2818d056a61a2858829bc4db2cffece
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
RPATH as to be used as target property.
Bug-AGL: SPEC-2988
Change-Id: Ifaa66ceafbe7ed5f7de553b14da2dd8c5b1e8f9d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Bug-AGL: SPEC-2988
Change-Id: I8ded9847a5923b3a78afc953551fc6daaf40b355
Signed-off-by: Corentin Le Gall <corentin.legall@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
This commit fixes a problem once a bcm socket has been opened
but the following ioctl failed. Before we still return the socket
number instead of returning a negative value as error.
This resulted in problem because the subscription was considered as valid
and binding was continuing using the closed file descriptor.
Bug-AGL: SPEC-2988
Change-Id: Iaa64e7bb00980cb8c0e7080aca238cfb57d628b6
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
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>
|
|
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>
|
|
Bug-AGL: SPEC-2991
Change-Id: I9ebea118770a9ffe0dd4321408643e76250e3635
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
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>
|
|
- 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>
|
|
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>
|