This driver is more sophisticated than the normal socketCAN driver. Compared
to the normal socketCAN driver, this one contains the linking exception license.
Changes compared to normal socketCAN driver:
- Re-implementation based on driver template
- Error detection works
- Setting up filters works properly
- Optional Support for socketCAN error frames. This currently handles bus-off
and no-ack condition by setting driver into listen-only mode. If you decide
to use this feature have a close look at your own requirements and fit
error handling functions to that.
- Optional support for CAN interface combining (not redundancy!). With this
feature enabled you can have multiple CAN interface represented as one within
CANopenNode stack. By default, all TX messages are sent on all used CAN
interfaces, but the user can change this behaviour inside own app (e.g. check
on wich bus rx-sdo is received and set-up tx-sdo accordingly).
Be aware that no bridging between the interfaces is done!
see https://github.com/CANopenNode/CANopenNode/issues/100
Using this workaround, the struct passed to the callback still doesn't
match the description (only "data" is passed instead of "data" and
"ODdataStorage"), see CO_ODF_arg_t fields description for details.
However, data pointer is a least valid for all object types.
This callback is called when the first heartbeat is received (after BOOTUP)
and when there was a pause between heartbeats (TIMEOUT). This allows
the user to get an event when a bus segment is disconnected and then
reconnected from the server (nodes just start sending heartbeats again
without BOOTUP first).
Added function and changed example code so that NMT boot-up is only started
after receiving LSS switch state global waiting. This also fixes problems
where doing CANopenNode initialization (-> change can HW Filter settings)
lead to missing the LSS switch state global waiting message.
However, now we do not fully comply to the specified sequence in 8.3.1.2
as we do all the startup stuff after switching to LSS waiting. This can't
be split in CANopenNode.
HB emergency was only set but never cleared, so only the first error ever
was reported. We now get an emergency when the first node is missing and
a clear emergency when the last node turns up again.
The same applies for HB Remote Reset, however while clearing this emergency
is required by the CO_Emergency module, it's not required for the network.
Allow LSS configure node to also run in global mode, but only to
set node ID to 255 (0xFF), i.e. to remove configuration.
This way we can easily un-configure all nodes and start all over
with e.g. fastscan.
LSS has two selection modes: global (all nodes) and selective
(just one).
The current implementation defensively refuses to perform some
operations in global mode which are potentially disruptive
(e.g. set node id).
However, reading the node ID and/or LSS identity should not
be dangerous at all since in some cases it might be useful
to just read the identity of a single connected node.
Not quite sure what the behavior with multiple nodes will
be though, since it's theoretically possible to get inconsistent
results by mixing up answers from different nodes.
We would like a simple way to give feedback when LSS
is involved. Particularly, we would like to identify
a node that is not configured (factory settings), or
that is currently being configured.
Implement a special logic, which can be used to override
the standard LED behavior if your device does not have
a dedicated LED. After all, LSS can be seen as a
maintenance mode so it can be acceptable to deviate
from the standard.