Combining Serializables

38 views
Skip to first unread message

Aaron Hutton

unread,
Mar 26, 2021, 6:49:41 AM3/26/21
to F´ Community Group
Is it possible for serializables to contain other serializables/header types? Here are two examples.

  1. Assume we have some serializable, Pos, with X/Y F64s. We want to make a serializable that has X/Y/bearing. Is there a way to include a Pos in this new serializable, rather than make independent fields? From my testing, the SerializableAc file is produced correctly, but when I try to use it with a component I get the error: Can only include one level of serializable for dictionaries.
  2. Assume we have the same Pos as before, and we wanted to add the timestamp of the measurement using Fw::Time to it. If I include_header the Time header then the serializable compiles, but when I try to use it with a component I get the error: ERROR: Component include serializables cannot use user-defined types. (which is actually thrown as a string formatting TypeError which I'll submit a PR to fix when I get the chance)
Thanks,
Aaron

Timothy Canham

unread,
Mar 26, 2021, 10:56:55 AM3/26/21
to F´ Community Group
Aaron:

We prevented nested serializables for the ground interfaces (commands, events, telemetry) because the ground system had no easy way to display them in the case of downlink or compose them in the case of uplink commanding. You can nest serializables for internal use (e.g. passing through ports). I think it would be a good thing to allow nested serializables for at least downlink if we can figure out a good way to display them, but we're not there yet.

Reply all
Reply to author
Forward
0 new messages