Closed bruno-luca closed 2 years ago
Hi, it seems that both TelemetryPacket and DiagnosticPacket have the same BaseContainer configuration.
For Yamcs to be able to distinguish how to decode incoming binary, it needs another criteria. For example you could use a different APID for each packet type. Your sender script will need to be able to set the appropriate APID field in the primary CCSDS header.
Something like this:
<SequenceContainer name="TelemetryPacket">
<EntryList>
<ParameterRefEntry parameterRef="gps_lat" />
<!-- ... -->
</EntryList>
<BaseContainer containerRef="CCSDSPacket">
<RestrictionCriteria>
<ComparisonList>
<Comparison value="0" parameterRef="CCSDS_Packet_ID/Version" />
<Comparison value="TM" parameterRef="CCSDS_Packet_ID/Type" />
<Comparison value="100" parameterRef="CCSDS_Packet_ID/APID" />
</ComparisonList>
</RestrictionCriteria>
</BaseContainer>
</SequenceContainer>
<SequenceContainer name="DiagnosticPacket">
<EntryList>
<ParameterRefEntry parameterRef="cpu_temp" />
<!-- ... -->
</EntryList>
<BaseContainer containerRef="CCSDSPacket">
<RestrictionCriteria>
<ComparisonList>
<Comparison value="0" parameterRef="CCSDS_Packet_ID/Version" />
<Comparison value="TM" parameterRef="CCSDS_Packet_ID/Type" />
<Comparison value="101" parameterRef="CCSDS_Packet_ID/APID" />
</ComparisonList>
</RestrictionCriteria>
</BaseContainer>
</SequenceContainer>
There's some other solutions like using a custom type field discriminator in an intermediate container. But APID seems decent if you're not using it for other purposes.
Thanks! It worked fro me!
Hi! I'm new to Yamcs but i find it extremely powerful. I'm having some trouble while implementing some features in my project. Let me explain what i want to do:
I have a python script that read from 2 CSV files some diagnostic information and some telemetry information. This data is packed into two differents CCSDS packets using SpacePyLibrary, and then those packets are sequentially sent to the same Yamcs DataLink via UDP.
I have specifiedn in
src/main/yamcs/mdb/xtce.xml
my own parameters, as follow:This is the python script reading from file and sending to Yamcs:
when i send the first packet, it also changes some diagnostic parameters, that should not be modified by that packet. Following there is a screenshot of my parameters status after the first packet has been sent. As you can see telemetry field contained in the packet have been modified correctly, but also some diagnostic field, like cpu status, has been changed from the first packet while those should just be modified from the second one.
The same happen when the second packet is sent. Diagnostic parameters are modified correctly, but some telemetry fields (such as gyroscope states) get modified too:
How can i tell Yamcs only to update field that are present in the packet received?