Re: Issue with the base container

31 views
Skip to first unread message
Message has been deleted

fabia...@spaceapplications.com

unread,
Jul 8, 2025, 4:08:23 AMJul 8
to yamcs
I don't know how you came to this XML, there is no attribute "bitOffset" specified in the XTCE XSD.
ParameterRefEntry allows a sub-element "LocationInContainerInBits".

On Tuesday, 8 July 2025 at 09:50:23 UTC+2 Mm wrote:
Hello all,

I want the parameter CAN_FRAME_TYPE to be used as a restriction field, and for it to appear in all children packets at bit offset 89, however I tried doing it multiple times and it keeps showing at offset 0 no matter what. Does anyone know how I can fix that?

Here is my xml code:

 <ContainerSet>

            <SequenceContainer name="BaseCANContainer" sizeInBits="104">

<EntryList>

<ParameterRefEntry parameterRef="CAN_FRAME_TYPE" bitOffset="89"/>

</EntryList>

</SequenceContainer>


            <SequenceContainer name="CAN_Request_Packet" sizeInBits="104">

                <BaseContainer containerRef="BaseCANContainer">

                    <RestrictionCriteria>

                        <ComparisonList>

                            <Comparison parameterRef="CAN_FRAME_TYPE" value="18" comparisonOperator="=="/>

                        </ComparisonList>

                    </RestrictionCriteria>

                </BaseContainer>

                <EntryList>

                    <ParameterRefEntry parameterRef="CAN_LEN" bitOffset="0"/>

                    <ParameterRefEntry parameterRef="Velocity_req" bitOffset="8"/>

                    <ParameterRefEntry parameterRef="Latitude_req" bitOffset="24"/>

                    <ParameterRefEntry parameterRef="Longitude_req" bitOffset="40"/>

                    <ParameterRefEntry parameterRef="Position_req" bitOffset="56"/>

                    <ParameterRefEntry parameterRef="CAN_KV_CH" bitOffset="72"/>

                    <ParameterRefEntry parameterRef="CAN_DST_ID" bitOffset="75"/>

                    <ParameterRefEntry parameterRef="CAN_SRC_ID" bitOffset="82"/>

                    <ParameterRefEntry parameterRef="CAN_SUB_FRAME_TYPE" bitOffset="94"/>

                    <ParameterRefEntry parameterRef="CAN_TASK_ID" bitOffset="101"/>

                </EntryList>

            </SequenceContainer>


            <SequenceContainer name="CAN_Packet" sizeInBits="104">

                <BaseContainer containerRef="BaseCANContainer">

                    <RestrictionCriteria>

                        <ComparisonList>

                            <Comparison parameterRef="CAN_FRAME_TYPE" value="18" comparisonOperator="!="/>

                        </ComparisonList>

                    </RestrictionCriteria>

                </BaseContainer>

                <EntryList>

                    <ParameterRefEntry parameterRef="CAN_LEN" bitOffset="0"/>

                    <ParameterRefEntry parameterRef="CAN_DATA" bitOffset="8"/>

                    <ParameterRefEntry parameterRef="CAN_KV_CH" bitOffset="72"/>

                    <ParameterRefEntry parameterRef="CAN_DST_ID" bitOffset="75"/>

                    <ParameterRefEntry parameterRef="CAN_SRC_ID" bitOffset="82"/>

                    <ParameterRefEntry parameterRef="CAN_SUB_FRAME_TYPE" bitOffset="94"/>

                    <ParameterRefEntry parameterRef="CAN_TASK_ID" bitOffset="101"/>

                </EntryList>

            </SequenceContainer>

        </ContainerSet>

    </TelemetryMetaData>


Message has been deleted

fabia...@spaceapplications.com

unread,
Jul 8, 2025, 8:25:10 AMJul 8
to yamcs
You're specifying that CAN_FRAME_TYPE starts at bit offset 89, whereas your packet has a size of 104 bits. Do all the entries (including CAN_FRAME_TYPE) really fit into the remaining 15 bits?

On Tuesday, 8 July 2025 at 12:06:01 UTC+2 Mm wrote:
It's my first time working with xml and I'm pretty sure I'm doing something wrong, I would appreciate some help.

I get the following error: org.yamcs.mdb.XtceProcessingException: Could not extract parameter /myproject/CAN_DATA from container /myproject/CAN_Packet at position 102 because it falls beyond the end of the container. Container size in bits: 104


Updated xml:

        <ContainerSet>

            <SequenceContainer name="BaseCANContainer" sizeInBits="104">

<EntryList>

<ParameterRefEntry parameterRef="CAN_FRAME_TYPE">

<LocationInContainerInBits>

<FixedValue>89</FixedValue>

</LocationInContainerInBits>

</ParameterRefEntry>

</EntryList>

</SequenceContainer>


            <SequenceContainer name="CAN_Request_Packet" sizeInBits="104">

<EntryList>

<ParameterRefEntry parameterRef = "CAN_LEN" />

<ParameterRefEntry parameterRef = "Velocity_req" />

<ParameterRefEntry parameterRef = "Longitude_req" />

<ParameterRefEntry parameterRef = "Latitude_req" />

<ParameterRefEntry parameterRef = "Position_req" />

<ParameterRefEntry parameterRef = "CAN_KV_CH" />

<ParameterRefEntry parameterRef = "CAN_DST_ID" />

<ParameterRefEntry parameterRef = "CAN_SRC_ID" />

<ParameterRefEntry parameterRef = "CAN_SUB_FRAME_TYPE" />

<ParameterRefEntry parameterRef = "CAN_TASK_ID" />

</EntryList>

                <BaseContainer containerRef="BaseCANContainer">

                    <RestrictionCriteria>

                        <ComparisonList>

                            <Comparison value = "18" parameterRef="CAN_FRAME_TYPE"/>

                        </ComparisonList>

                    </RestrictionCriteria>

                </BaseContainer> 

            </SequenceContainer>

 <SequenceContainer name="CAN_Packet" sizeInBits="104">

               <EntryList>

<ParameterRefEntry parameterRef = "CAN_LEN" />

<ParameterRefEntry parameterRef = "CAN_DATA"/>

<ParameterRefEntry parameterRef = "CAN_KV_CH" />

<ParameterRefEntry parameterRef = "CAN_DST_ID" />

<ParameterRefEntry parameterRef = "CAN_SRC_ID" />

<ParameterRefEntry parameterRef = "CAN_SUB_FRAME_TYPE" />

<ParameterRefEntry parameterRef = "CAN_TASK_ID" />

</EntryList>

                <BaseContainer containerRef="BaseCANContainer">

                    <RestrictionCriteria>

                        <ComparisonList>

                            <Comparison parameterRef="CAN_FRAME_TYPE" value="18" comparisonOperator="!="/>

                        </ComparisonList>

                    </RestrictionCriteria>

                </BaseContainer> 

            </SequenceContainer>

        </ContainerSet>


Message has been deleted

fabia...@spaceapplications.com

unread,
Jul 9, 2025, 4:35:42 AMJul 9
to yamcs
If you look at the XTCE XSD, the LocationInContainerInBits field allows an attribute "referenceLocation", which defaults to "previousEntry". Probably you may be more interested in "containerStart" (or a combination).
(note: "containerEnd" and "nextEntry" are not supported by Yamcs)

On Wednesday, 9 July 2025 at 00:03:52 UTC+2 Mm wrote:

Just to clarify what I’m trying to do:

I want my packets to follow a specific structure where the Frame_Type is not the first field. Instead, it should appear later in the packet, specifically at **bit offset 89**. I understand that Yamcs is trying to fit the rest of the parameters in the remaining 15 bits but that's not what I'm trying to achieve.

The structure I want is:

.. (bit 0)

.. (bit 8)

.. (bit 72)

.. (bit 75)

.. (bit 82)

FRAME_TYPE (bit 89) ← this is the identifier

.. (bit 94)

.. (bit 101)

Assume the dots are parameters.

I’m using Frame Type as the restriction field to match different containers (e.g. value = 18 for request packets). The problem is that I don't know how to stop Yamcs from placing it as the start of the packet. Am I misunderstanding how XTCE container inheritance and location work here? How can I keep Frame Type at bit offset 89 while still using it in the restriction criteria, and ensure the correct container is used when decoding telemetry?

Thanks,

Mm

unread,
Jul 10, 2025, 2:47:27 AMJul 10
to yamcs
Thank you, that works.
Reply all
Reply to author
Forward
0 new messages