comms icon indicating copy to clipboard operation
comms copied to clipboard

added more field access functions

Open RCMast3r opened this issue 1 year ago • 4 comments

the message I am working on describing needed these because I ran out of fields.

Would there be a better way to handle this?

Thanks!

RCMast3r avatar Jul 27 '24 01:07 RCMast3r

I'll add the required functionality soon (within next couple of days). There is a bit of extra work required in addition to the suggested change. I'll introduce the change to the "develop" branch first. It will find its way to master in the next release.

Also, are you manually creating your messages or using commsdsl code generators to do so?

arobenko avatar Jul 27 '24 06:07 arobenko

I am using the commsdsl code generators to handle it:

https://github.com/hytech-racing/vectornav_driver/blob/master/vn_driver_lib_gen.nix

RCMast3r avatar Jul 27 '24 06:07 RCMast3r

I noticed that your message fields are split into some logical grouping. Maybe as a workaround for the the encountered limitation and not to wait until the comms library update is officially released, consider to move these groups into separate global <bundle> fields and reference these bundles as stand-alone message fields:

<fields>
    <bundle name="MyGroup1">
        ....
    </bundle>
    <bundle name="MyGroup2">
        ...
    </bundle>
</fields>

<message ...>
    ...
    <ref field="MyGroup1" />
    <ref field="MyGroup2" />
</message>

It will reduce the actual number of the message members. For the integration code there is going to be some extra field de-reference in the middle before the actual require field is accessed, but for the efficiency of the final binary code such change probably won't have any effect.

arobenko avatar Jul 28 '24 07:07 arobenko

The requested change has been implemented on "develop" branch. Please let me know if it works for you as expected. If it does I'll no an official patch release.

arobenko avatar Jul 28 '24 22:07 arobenko

Officially released in v5.2.6

arobenko avatar Sep 01 '24 03:09 arobenko