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

Instance (keyed data types) support #6

Open
willstott101 opened this issue Jan 5, 2023 · 1 comment
Open

Instance (keyed data types) support #6

willstott101 opened this issue Jan 5, 2023 · 1 comment

Comments

@willstott101
Copy link

willstott101 commented Jan 5, 2023

I notice there are no references to register_instance in this library. Are instances (and instance handles) supported by this wrapper currently? Specifically "deleting" a sample from the DDS data space (dispose_instance_handle).

I notice in dds_derive we have:

fn is_key(field : &Field) -> bool {
    for attr in &field.attrs {
        if let Some(ident) = attr.path.get_ident() {
            if ident == "topic_key" || ident == "topic_key_enum"{
                return true
            }
        } 
    }
    false
}

implying that they might be supported for well-known field names only. If that's the case, is there any way to customize serialized field names? Which is relevant for hashed autoid field names

@sjames
Copy link
Owner

sjames commented Jan 29, 2023

Hi @willstott101,
Instances are only supported for known field names. The the key-hash is generated according to how CDDS expects it when a type has keys.

Reader instances are not supported. I still have to figure out how to support this while using the custom topic API that CDDS exposes. (see https://github.com/sjames/cyclonedds-rs/blob/master/src/serdes.rs)

I would love to hear your thoughts on how the user API could look like.

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

No branches or pull requests

2 participants