Skip to content

Commit

Permalink
Put abstract parameter back in Ultra packet definition; removed Conta…
Browse files Browse the repository at this point in the history
…inerSet from testing criteria to allow for parameters to be defined within them
  • Loading branch information
bourque committed Oct 11, 2023
1 parent b838944 commit cc179e4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
28 changes: 13 additions & 15 deletions imap_processing/tests/test_decom.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,16 @@ def test_ccsds_header(xtce_document):
("SRC_SEQ_CTR", "UINT14"),
("PKT_LEN", "UINT16"),
]
header_container_set = (
'<xtce:SequenceContainer name="CCSDSPacket">'
" <xtce:EntryList>"
' <xtce:ParameterRefEntry parameterRef="VERSION" />'
' <xtce:ParameterRefEntry parameterRef="TYPE" />'
' <xtce:ParameterRefEntry parameterRef="SEC_HDR_FLG" />'
' <xtce:ParameterRefEntry parameterRef="PKT_APID" />'
' <xtce:ParameterRefEntry parameterRef="SEQ_FLGS" />'
' <xtce:ParameterRefEntry parameterRef="SRC_SEQ_CTR" />'
' <xtce:ParameterRefEntry parameterRef="PKT_LEN" />'
" </xtce:EntryList>"
"</xtce:SequenceContainer>"
header_entry_list = (
"<xtce:EntryList>"
' <xtce:ParameterRefEntry parameterRef="VERSION" />'
' <xtce:ParameterRefEntry parameterRef="TYPE" />'
' <xtce:ParameterRefEntry parameterRef="SEC_HDR_FLG" />'
' <xtce:ParameterRefEntry parameterRef="PKT_APID" />'
' <xtce:ParameterRefEntry parameterRef="SEQ_FLGS" />'
' <xtce:ParameterRefEntry parameterRef="SRC_SEQ_CTR" />'
' <xtce:ParameterRefEntry parameterRef="PKT_LEN" />'
"</xtce:EntryList>"
)

# Read in the XTCE document
Expand All @@ -59,8 +57,8 @@ def test_ccsds_header(xtce_document):

# Check that the header is defined as a SequenceContainer in the XTCE file
# First remove discrepancies in whitespace, tabs, and newlines
header_container_set = (
header_container_set.replace(" ", "").replace("\t", "").replace("\n", "")
header_entry_list = (
header_entry_list.replace(" ", "").replace("\t", "").replace("\n", "")
)
document = document.replace(" ", "").replace("\t", "").replace("\n", "")
assert header_container_set in document
assert header_entry_list in document
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
<!-- End metadata -->
<xtce:ContainerSet>
<!--CCSDS Header Elements-->
<xtce:SequenceContainer name="CCSDSPacket">
<xtce:SequenceContainer name="CCSDSPacket" abstract="true">
<xtce:EntryList>
<xtce:ParameterRefEntry parameterRef="VERSION" />
<xtce:ParameterRefEntry parameterRef="TYPE" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
</xtce:ParameterSet>
<!-- End metadata -->
<xtce:ContainerSet>
<xtce:SequenceContainer name="CCSDSPacket">
<xtce:SequenceContainer name="CCSDSPacket" abstract="true">
<xtce:EntryList>
<xtce:ParameterRefEntry parameterRef="VERSION" />
<xtce:ParameterRefEntry parameterRef="TYPE" />
Expand Down

0 comments on commit cc179e4

Please sign in to comment.