Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CanInterface: add set_can_params method to set multiple parameters#66

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

Urist-McGit
Copy link

This new method allows to set multiple CAN-specific parameters at once instead of over multiple netlink messages.

This is also required for some more obscure devices which might not accept some parameter configurations split over multiple netlink messages.

This new method allows to set multiple CAN-specific parameters at onceinstead of over multiple netlink messages.This is also required for some more obscure devices which might notaccept some parameter configurations split over multiple netlinkmessages.
@fpagliughi
Copy link
Collaborator

This does seem like a good idea - to be able to set multiple parameters in a single call. But I'm wondering about maintaining another data structure so similar toInterfaceCanParams. Maybe, but I'm not totally convinced. Should we consider one structure and use a read/modify/write pattern similar to other Linux kernel API's? Or consider another way to structure the data? Shouldn't we also have a builder (pattern) for the parameters to be set?

But if we do go with what you suggest - a separate struct of all optional, settable parameters,

  • Did we get all of them?
  • Don't we want a matching getter?
  • Shouldn't we be able to initialize fromInterfaceCanParams?
  • Should we reconsider the name?SetCanParams reads like a verb. And these are specifically the interface parameters. So,SettableInterfaceCanParams? Although thatis a bit long.

Copy link
Collaborator

@fpagliughifpagliughi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'll merge the data struct with the existingInterfaceCanParams, but otherwise looking good.

@fpagliughifpagliughi merged commite0d7760 intosocketcan-rs:masterAug 3, 2024
@poeschel
Copy link
Contributor

I wonder what happened here,@fpagliughi. You say in above comment, you merge with the existingInterfaceCanParams but in the repository I see the other approach with a newSetCanParams struct. Did you change your mind?
If not and you want theInterfaceCanParams approach, I have a commit ready for you to pick uphere.

@fpagliughi
Copy link
Collaborator

Thedevelop branch. I was on the road without any CANbus hardware, and I want to test it before promoting it tomaster. Apologies for the confusion.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fpagliughifpagliughifpagliughi approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@Urist-McGit@fpagliughi@poeschel

[8]ページ先頭

©2009-2025 Movatter.jp