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

Document SampleInfo #127

Merged

Conversation

willstott101
Copy link
Contributor

I realised I had no idea how to access source_timestamp - once digging learned I could do with using instance_handle too.

I'm not 100% sure about my docs for the *_state attributes - are there more possible values than those in the linked enums? Since those enums are for input really, I might be wrong about it.

@thijsmie
Copy link
Contributor

This looks right to me! It is equivalent with the C SampleInfo. This does touch on one of the items on my list of backwards-compatibility-breaking-changes: I want to change the InstanceState/ViewState/SampleState to not be magic integer constant (combining with the | operator is debatable but interpreting the constants in the debugger is disgusting, give me readable stuff 😇). It is now also too easy to write down illegal masks, InstanceState.Any should be the default etc. Maybe an enum.IntFlag or some custom magic is required. Instance handles should also be objects and not integers.

It is a shame we don't have Intersection types so we could add the sample_info as a proper type hint via an intersection of the datatype and a protocol. If you have ideas there I'd be happy to discuss.

@thijsmie thijsmie merged commit bdad222 into eclipse-cyclonedds:master Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants