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

Add local CAN resource #1287

Open
1 of 4 tasks
stoupa-cz opened this issue Oct 19, 2023 · 2 comments
Open
1 of 4 tasks

Add local CAN resource #1287

stoupa-cz opened this issue Oct 19, 2023 · 2 comments

Comments

@stoupa-cz
Copy link

The CAN devices are common on our devices. The support for them is limited in labgrid, so let's start with the crucial part -- local can resources:

  • RawCANPort - device specified by the interface name
  • USBCANPort - udev matching (useful for USB-CAN adapters)

The goal is to have NetworkCANPort. It will be discussed in a separate issue.

I don't plan any Driver now, as I don't see a need (and I hope that it is possible to use it this way). Our test infrastructure needs just the interface name at the moment.

The checklist:

  • Initial dirty implementation.
  • Polish and cleanup.
  • Add documenation.
  • Start review process.

I'm playing with it in our fork at https://gitlab.com/vzlu/tools/labgrid/-/tree/tom/add_can_resource.

@Bastian-Krause
Copy link
Member

I'm wondering if you could use the NetworkInterface/RemoteNetworkInterface resources for this?

@stoupa-cz
Copy link
Author

I'm wondering if you could use the NetworkInterface/RemoteNetworkInterface resources for this?

I was also thinking about it. I'm proposing the separate Resource because:

There will probably be new attributes ('speed' at the moment), and the NetworkCANPort will have different bridging similar to ser2net (I will create a new issue to summarize the discussion we had at EOSS2023). There might be a CAN Driver in the future, which should be bound only to the respective resource. I like the SocketCAN abstraction, but on the other hand, I see CAN as a different type of interface with different approaches under the hood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants