dronecan / DSDL

DSDL Protocol Description files for DroneCAN
MIT License
22 stars 60 forks source link

Added config get and set message #23

Closed David-OConnor closed 1 year ago

David-OConnor commented 1 year ago

This provides an API for setting configuration items that are common to all nodes, and getting their current configuration state from a node. It is a simple, fixed-size format that is easier to implement and debug than GetSet. This proposal uses byte-aligned, constant-size fields, and groups together important and universal settings.

Reasons why I think this will be easier to use:

Overall, managing GetSet's alignment has nested levels of bit-level, variable-length alignment, which is tricky to implement and debug, given the simple nature of its task. This applies to both serializing and deserializing.

I am open to ideas on data type IDs, fields to add, etc. A notable downside of this proposal is that the format is not very efficient due to byte-level packing, including of fields that have 2 bits. Given this message is expected to be sent infrequently, and is still compact (less than a full legacy frame), I think this is a worthwhile tradeoff.

David-OConnor commented 1 year ago

I have a better understanding of services now; this PR is not necessary.