Multiple IDs for the same telemetry packet #1412
-
Hello, we are currently using COSMOS for many projects, and we have noticed one limitation that is forcing us to use workarounds for the telemetry packet definitions. We have telemetry packets that have the same structure and are basically the same telemetry packet, but with different IDs. This is because we have primary and secondary boards that send the same packet with the only change being the ID (0 or 1, for example). By defining 2 packets (one for primary and one for secondary), we can't use the existing cosmos widgets (since each widget corresponds to 1 packet) We have solved this issue by using custom widgets that are listening to both packets and updating the value whenever 1 of the 2 packets is received. However, it would be very handy if we could define 2 values to a packet ID item instead of 1. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
you could create packets with the same defs and use multiple id's per |
Beta Was this translation helpful? Give feedback.
-
@thesamprice is correct. You can define overlapping ID items (same offset and size) but with different values. Just make sure to set TLM_UNIQUE_ID_MODE in the target’s target.txt file to indicate it should use the slower identification method. |
Beta Was this translation helpful? Give feedback.
-
This is a good use of the LATEST packet. If you have the same mnemonic across multiple packets, you can get the most recent value across packets by specifying the packet_name as LATEST. This works in screens too. ie. tlm("INST LATEST TEMP1") |
Beta Was this translation helpful? Give feedback.
-
LATEST is documented here: https://cosmosc2.com/docs/v4/scripting-best-practices#getting-the-most-recent-value-of-a-telemetry-point-from-multiple-packets |
Beta Was this translation helpful? Give feedback.
This is a good use of the LATEST packet. If you have the same mnemonic across multiple packets, you can get the most recent value across packets by specifying the packet_name as LATEST. This works in screens too. ie. tlm("INST LATEST TEMP1")