Skip to content

Commit

Permalink
Fix #60, update to latest schema/blue book changes
Browse files Browse the repository at this point in the history
Incorporate a couple minor schema updates:

- Previous "SafeRangeSet" is just "RangeSet" now
- Addition of a "PresentWhen" tag for container entries

Note this is just to support ingesting XML that use these tags,
it does not (yet) update EdsLib runtime to use them.
  • Loading branch information
jphickey committed Nov 7, 2023
1 parent fd91c41 commit ceed285
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tool/src/seds_tree_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static const char *SEDS_NODETYPE_LOOKUP[SEDS_NODETYPE_MAX] =
[SEDS_NODETYPE_METADATA_VALUE_SET] = "METADATA_VALUE_SET",
[SEDS_NODETYPE_NOMINAL_RANGE_SET] = "NOMINAL_RANGE_SET",
[SEDS_NODETYPE_PARAMETER_ACTIVITY_MAP_SET] = "PARAMETER_ACTIVITY_MAP_SET",
[SEDS_NODETYPE_SAFE_RANGE_SET] = "SAFE_RANGE_SET",
[SEDS_NODETYPE_RANGE_SET] = "RANGE_SET",
[SEDS_NODETYPE_STATE_MACHINE_SET] = "STATE_MACHINE_SET",
[SEDS_NODETYPE_SET_NODE_LAST] = "SET_NODE_LAST",
[SEDS_NODETYPE_COMPONENT] = "COMPONENT",
Expand Down Expand Up @@ -192,6 +192,7 @@ static const char *SEDS_NODETYPE_LOOKUP[SEDS_NODETYPE_MAX] =
[SEDS_NODETYPE_ORED_CONDITIONS] = "ORED_CONDITIONS",
[SEDS_NODETYPE_OVER_ARRAY] = "OVER_ARRAY",
[SEDS_NODETYPE_PARAMETER_ACTIVITY_MAP] = "PARAMETER_ACTIVITY_MAP",
[SEDS_NODETYPE_PRESENT_WHEN] = "PRESENT_WHEN",
[SEDS_NODETYPE_PROVIDED] = "PROVIDED",
[SEDS_NODETYPE_REQUIRED] = "REQUIRED",
[SEDS_NODETYPE_SECOND_OPERAND] = "SECOND_OPERAND",
Expand Down
3 changes: 2 additions & 1 deletion tool/src/seds_tree_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ typedef enum
SEDS_NODETYPE_METADATA_VALUE_SET,
SEDS_NODETYPE_NOMINAL_RANGE_SET,
SEDS_NODETYPE_PARAMETER_ACTIVITY_MAP_SET,
SEDS_NODETYPE_SAFE_RANGE_SET,
SEDS_NODETYPE_RANGE_SET,
SEDS_NODETYPE_STATE_MACHINE_SET,
SEDS_NODETYPE_SET_NODE_LAST, /**< Reserved index marker - not used */

Expand Down Expand Up @@ -216,6 +216,7 @@ typedef enum
SEDS_NODETYPE_ORED_CONDITIONS,
SEDS_NODETYPE_OVER_ARRAY,
SEDS_NODETYPE_PARAMETER_ACTIVITY_MAP,
SEDS_NODETYPE_PRESENT_WHEN,
SEDS_NODETYPE_PROVIDED,
SEDS_NODETYPE_REQUIRED,
SEDS_NODETYPE_SECOND_OPERAND,
Expand Down
3 changes: 2 additions & 1 deletion tool/src/seds_xmlparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,14 @@ static const seds_stringmap_t XML_SEDS_STARTTAG_MAP[] =
{ .tag_name = XML_CHAR_C("Parameter"), .tag_id = SEDS_NODETYPE_PARAMETER },
{ .tag_name = XML_CHAR_C("PolynomialCalibrator"), .tag_id = SEDS_NODETYPE_POLYNOMIAL_CALIBRATOR },
{ .tag_name = XML_CHAR_C("PrecisionRange"), .tag_id = SEDS_NODETYPE_PRECISION_RANGE },
{ .tag_name = XML_CHAR_C("PresentWhen"), .tag_id = SEDS_NODETYPE_PRESENT_WHEN },
{ .tag_name = XML_CHAR_C("ProvidedInterfaceSet"), .tag_id = SEDS_NODETYPE_PROVIDED_INTERFACE_SET },
{ .tag_name = XML_CHAR_C("Provided"), .tag_id = SEDS_NODETYPE_PROVIDED },
{ .tag_name = XML_CHAR_C("RangeConstraint"), .tag_id = SEDS_NODETYPE_RANGE_CONSTRAINT },
{ .tag_name = XML_CHAR_C("RangeSet"), .tag_id = SEDS_NODETYPE_RANGE_SET },
{ .tag_name = XML_CHAR_C("Range"), .tag_id = SEDS_NODETYPE_RANGE },
{ .tag_name = XML_CHAR_C("RequiredInterfaceSet"), .tag_id = SEDS_NODETYPE_REQUIRED_INTERFACE_SET },
{ .tag_name = XML_CHAR_C("Required"), .tag_id = SEDS_NODETYPE_REQUIRED },
{ .tag_name = XML_CHAR_C("SafeRangeSet"), .tag_id = SEDS_NODETYPE_SAFE_RANGE_SET },
{ .tag_name = XML_CHAR_C("SecondOperand"), .tag_id = SEDS_NODETYPE_SECOND_OPERAND },
{ .tag_name = XML_CHAR_C("Semantics"), .tag_id = SEDS_NODETYPE_SEMANTICS },
{ .tag_name = XML_CHAR_C("SemanticsTerm"), .tag_id = SEDS_NODETYPE_SEMANTICS_TERM },
Expand Down

0 comments on commit ceed285

Please sign in to comment.