can-dbc icon indicating copy to clipboard operation
can-dbc copied to clipboard

add is_ext, is_std and get_ext_id and get_std_id to MessageId

Open kistenklaus opened this issue 1 year ago • 1 comments

As already mentioned in other pull requests, utility methods for working with MessageId would be quite nice.

So, here is a very very simple implementation. That doesn't brake backwards compatibility.

kistenklaus avatar Jan 15 '24 18:01 kistenklaus

Thank you for the pull request. It's nice that it does not break compatibility but it's lacking documentation what the relationship/differences between message_id, get_ext_id() and get_std_id() are. The documentation could be based on the description of my pull request https://github.com/marcelbuesing/can-dbc/pull/13.

erzoe avatar Jan 16 '24 09:01 erzoe

Thank you both of you for the contribution, honestly quite hard to decide and I see the up and downsides of #13 vs #14 , I'll go with with #13 as I guess forcing people to deal with that type makes sense even if the price is breaking backwards compatibility. I will add a fn raw() which is still a breaking change but will let people still get the raw value again. I'll also make this part of a new major version to make it clear that it contains breaking changes.

marcelbuesing avatar Feb 06 '24 21:02 marcelbuesing