nasa / CCDD

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

Importing XTCE Issues #66

Closed bbrisnehan closed 4 years ago

bbrisnehan commented 5 years ago

I am trying to import command and telemetry into CCDD from an XTCE file. I have successfully validated the file using the XTCE 1.1 schema (XTCE 1.1). The following XTCE imports without error (though not the same command specifications):

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

applicationID functionCode
e392889 CCDD Version: 1.5.27 (7-16-2019) Date: Tue Aug 13 13:34:26 MDT 2019 Project: Trial Host: localhost:5432 Endianess: big
Example Test Command 1 Example Test Command Container Example Test Command 2 Example Test Command 3 0 2 0 2 ` This XTCE imports with errors: ` applicationID functionCode
e392889 CCDD Version: 1.5.27 (7-16-2019) Date: Tue Aug 13 13:34:26 MDT 2019 Project: Trial Host: localhost:5432 Endianess: big
Example Test Command 1 Example Test Command Container Example Test Command 2 Example Test Command 3 0 2 0 ` When running CCDD Version Version 1.5.27: 1. When abstract is implemented, it returns: *Duplicate Table(s)* Ignored the following duplicate table definitioin(s): CFS_CMD (file: error.xtce) If both abstract commands in the file include the token then it brings in TestArgument1 and TestArgument2. 2. When BaseMetaCommand is implemented without an empty 'ArgumentAssignmentList' underneath, it returns: *CCDD Error* An unanticipated error occurred; cause 'null' Error trace: CcddXTCEHanler: importCommandTable() line 1498 CcddXTCEHanler: unbuildSpaceSystems() line 1146 CcddXTCEHanler: importFromFile() line 687 CcddFileIOHandler: importFile() line 1044 CcddFileIOHandler: execute() line 846 CcddBackgroundCommand: doInBackground() line 144 CcddBackgroundCommand: doInBackground() line 1 The implementation with an empty 'ArgumentAssignmentList' underneath (while working with the import tool) appears to fail validation when checked against the XTCE 1.1 schema. 3. When the DynamicValue is implemented, it returns: *CCDD Error* An unanticipated error occurred; cause 'null' Error trace: CcddXTCEHanler: processArgumentReference() line 2367 CcddXTCEHanler: importCommandTable() line 1606 CcddXTCEHanler: unbuildSpaceSystems() line 1146 CcddFileIOHandler: importFromFile() line 687 CcddFileIOHandler: importFile() line 1044 CcddFileIOHandler: execute() line 846 CcddBackgroundCommand: doInBackground() line 144 CcddBackgroundCommand: doInBackground() line 1
KevinMcCluney commented 5 years ago

Versions 1.5.30 and 2.0.5 have been upload; these take care of the unexpected null errors.

The abstract parameter is only used when with a SequenceContainer to denote a telemetry or command header table. In your example 'abstract' is with the MetaCommand tag.

The DynamicValue tag is ignored. If you can provide how these would be used I can see about implementing it.

bbrisnehan commented 5 years ago

I've asked around and it sounds like the 'abstract' was used in MetaCommands in an effort to allow inheritance (without direct use). From your response it sounds like those should be placed in SequenceContainers.

For DynamicValue, as one example, each mission can change the length of time field (CCSDS_TIME_SIZE) in the CCSDS telemetry secondary header. Rather than hardcode it, we setup a parameter to use as a reference for the ending index for all telemetry.

KevinMcCluney commented 5 years ago

In the example XTCE example you provided above the DynamicValue doesn't have a value to extract that I can see. Am I missing something?

bbrisnehan commented 5 years ago

I apologize, I had to remove any/all proprietary information and was more conservative to avoid providing too much information. These are the formats that we tend to implement:

`

<LinearAdjustment intercept="-1"/>

`

`

<LinearAdjustment slope="1" intercept="-1"/>

`

`

`

Let me know if this clarifies or additional insight is needed. Thank you for your help.

bbrisnehan commented 5 years ago

I was working through making all of my abstract MetaCommands into abstract CommandContainers/SequenceContainers. I was facing issues with ArgumentRefEntry in a CommandContainer, and began looking around. In my search I found these two presentations:

https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20100015491.pdf https://www.astro.umd.edu/~eshaya/XTCE/XTCE_Tutorial.ppt

Slide 60 - 61 of the first deck and Slide 23 of the second deck are what I'm trying to achieve with an abstract MetaCommand. Is this supported?

bawi235 commented 4 years ago

Is this still an active issue?

bbrisnehan commented 4 years ago

Issue is still open and no further comments made here, so yes I believe so.

bawi235 commented 4 years ago

I attempted to import both of the files you listed above using version 1.5.38 of CCDD and both imported without error. I would suggest trying this version yourself to see if it works as you expect. 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).