nasa / CCDD

CFS Command and Data Dictionary Tool (CCDDT)
81 stars 31 forks source link

BaseContainers are ignored on XTCE import #82

Closed JBBanks2 closed 4 years ago

JBBanks2 commented 4 years ago

Description

It seems that BaseContainer's are ignored with XTCE import.

Steps to Reproduce

  1. Attempt to import the XTCE provided below
  2. Check the "Parents and Children" tables
Example XTCE (click to expand) ```xml ```

Expected Behavior Foo should extend Bar

Observed Behavior Foo does not extend Bar

Additional Info

Also, if you export Foo and Bar after importing them, the BaseContainer node is no-longer present in the exported XTCE

bawi235 commented 4 years ago

Could you provide an example of what you expect this table to look like after an import?

JBBanks2 commented 4 years ago

Hi bawi235!

I'd expect to see Foo be a child of Bar. Either that or see the fields of Bar prepended to Foo's entry list.

From XTCE Green Book section 4.3.4.9:

A container may extend another container in an object-oriented manner. The child container receives the parent’s EntryList, and that EntryList is exactly prefixed to the front of the child’s EntryList. 

Right now, I don't see an indication of any relationship between Foo (child) and Bar (parent) in the CCDD UI.

bawi235 commented 4 years ago

Will be adding an updated version of CCDDv2 later this week that helps address a problem I am encountering with XTCE imports. Will post an update here when it is available.

bawi235 commented 4 years ago

Version 2.0.23 is out. I was able to import the attached file to achieve, what I think, you are trying to do. Keep in mind that CCDD supports a limited sort of XTCE, tailored for use by the display group who work(ed) the Habitat project. The only guarantee is that CCDD can import its own exported XTCE files. XTCE that's formatted differently won't work. XTCE "features" not already covered in CCDD's XTCE parser will be ignored (or maybe cause odd behavior).


<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<SpaceSystem xmlns="http://www.omg.org/space/xtce" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="jbbanks" shortDescription="jbbanks" xsi:schemaLocation="https://www.omg.org/spec/XTCE/20061101 https://www.omg.org/spec/XTCE/20061101/06-11-06.xsd">

   <SpaceSystem name="Foo" shortDescription="Foo">

      <Header classification="INTERFACE" validationStatus="Working" version="1.0"/>

      <TelemetryMetaData>

         <ParameterTypeSet>

            <IntegerParameterType name="Num_Type" signed="false" sizeInBits="32">

               <UnitSet/>

               <IntegerDataEncoding bitOrder="mostSignificantBitFirst" encoding="unsigned" sizeInBits="32"/>

            </IntegerParameterType>

         </ParameterTypeSet>

         <ParameterSet>

            <Parameter name="Num" parameterTypeRef="Num_Type"/>

         </ParameterSet>

         <ContainerSet>

            <SequenceContainer name="Foo">

               <EntryList>

                  <ParameterRefEntry parameterRef="Num"/>

                  <ContainerRefEntry containerRef="Bar_Bah/Bah"/>

               </EntryList>

            </SequenceContainer>

         </ContainerSet>

      </TelemetryMetaData>

      <SpaceSystem name="Bar" shortDescription="Bar">

         <Header classification="INTERFACE" validationStatus="Working" version="1.0"/>

         <TelemetryMetaData>

            <ParameterTypeSet>

               <IntegerParameterType name="Bah_Type" signed="false" sizeInBits="32">

                  <UnitSet/>

                  <IntegerDataEncoding bitOrder="mostSignificantBitFirst" encoding="unsigned" sizeInBits="32"/>

               </IntegerParameterType>

            </ParameterTypeSet>

            <ParameterSet>

               <Parameter name="Bah" parameterTypeRef="Bah_Type"/>

            </ParameterSet>

            <ContainerSet>

               <SequenceContainer name="Bar">

                  <EntryList>

                     <ParameterRefEntry parameterRef="Bah"/>

                  </EntryList>

               </SequenceContainer>

            </ContainerSet>

         </TelemetryMetaData>

      </SpaceSystem>

      <SpaceSystem name="Bar_Bah" shortDescription="Foo,Bar.Bah">

         <Header classification="INTERFACE" validationStatus="Working" version="1.0"/>

         <TelemetryMetaData>

            <ParameterTypeSet>

               <IntegerParameterType name="Bah_Type" signed="false" sizeInBits="32">

                  <UnitSet/>

                  <IntegerDataEncoding bitOrder="mostSignificantBitFirst" encoding="unsigned" sizeInBits="32"/>

               </IntegerParameterType>

            </ParameterTypeSet>

            <ParameterSet>

               <Parameter name="Bah" parameterTypeRef="Bah_Type"/>

            </ParameterSet>

            <ContainerSet>

               <SequenceContainer name="Bah">

                  <EntryList>

                     <ParameterRefEntry parameterRef="Bah"/>

                  </EntryList>

               </SequenceContainer>

            </ContainerSet>

         </TelemetryMetaData>

      </SpaceSystem>

   </SpaceSystem>

</SpaceSystem>