Combining Serializables

瀏覽次數:37 次
跳到第一則未讀訊息

Aaron Hutton

未讀,
2021年3月26日 清晨6:49:412021/3/26
收件者: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

未讀,
2021年3月26日 上午10:56:552021/3/26
收件者: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.

回覆所有人
回覆作者
轉寄
0 則新訊息