8000 Event-based communication error handling · Issue #7 · rtlabs-com/c-open · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Event-based communication error handling #7
Open
@nattgris

Description

@nattgris

Currently, communication errors are polled for in the CO_JOB_PERIODIC context by calling co_emcy_handle_can_state(). To avoid the need for periodic polling (see #6), the drivers could send events on errors, just like RX is handled.

For embedded controllers they most likely provide the ability to interrupt on error flags.

SocketCAN on linux can be told to send error events through the regular RX path, see https://www.kernel.org/doc/html/latest/networking/can.html#raw-socket-option-can-raw-err-filter for details.

If some platform doesn't support it, there's always the option to fall back to a separate polling thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0