Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event-based communication error handling #7

Open
nattgris opened this issue Feb 13, 2020 · 0 comments
Open

Event-based communication error handling #7

nattgris opened this issue Feb 13, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@nattgris
Copy link

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.

@hefloryd hefloryd added the enhancement New feature or request label May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants