OMSimulator icon indicating copy to clipboard operation
OMSimulator copied to clipboard

Enumeration types declared in SystemStructure.ssd must have required attribute "name"

Open arun3688 opened this issue 2 years ago • 0 comments

Description

Enumeration type defined in the connectors must have required attribute name according to the SSP specification. This required attribute gives the name of an enumeration which references into the defined enumerations of a document. The name MUST match the name of an Enumeration entry in the Enumerations XML element of the top-level element of the file

Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ssd:SystemStructureDescription version="1.0" name="Root-System" generationTool="orchideo | easySSP (eXXcellent solutions GmbH)" generationDateAndTime="2023-09-22T14:55:10Z" xmlns:ssc="http://ssp-standard.org/SSP1/SystemStructureCommon" xmlns:ssb="http://ssp-standard.org/SSP1/SystemStructureSignalDictionary" xmlns:ssd="http://ssp-standard.org/SSP1/SystemStructureDescription" xmlns:easySSP="http://xsd.easy-ssp.com/SSPModel" xmlns:ssv="http://ssp-standard.org/SSP1/SystemStructureParameterValues" xmlns:ssm="http://ssp-standard.org/SSP1/SystemStructureParameterMapping">
    <ssd:System name="Root-System">
        <ssd:Connectors>
            <ssd:Connector name="test1" kind="output" description="">
                <ssc:Real/>
                <ssd:ConnectorGeometry x="1.0" y="0.5"/>
            </ssd:Connector>
            <ssd:Connector name="test" kind="input" description="">
                <ssc:Enumeration name="Rotation"/>
                <ssd:ConnectorGeometry x="0.0" y="0.5"/>
            </ssd:Connector>
        </ssd:Connectors>
        <ssd:ParameterBindings>
            <ssd:ParameterBinding>
                <ssd:ParameterValues>
                    <ssv:ParameterSet version="1.0" name="Parameter-Set">
                        <ssv:Parameters/>
                    </ssv:ParameterSet>
                </ssd:ParameterValues>
            </ssd:ParameterBinding>
        </ssd:ParameterBindings>
        <ssd:SystemGeometry x1="-200.0" y1="-200.0" x2="200.0" y2="200.0"/>
    </ssd:System>
    <ssd:Enumerations>
        <ssc:Enumeration name="Rotation" description="Direction of rotation">
            <ssc:Item name="Clockwise" value="0"/>
            <ssc:Item name="Counterclockwise" value="1"/>
        </ssc:Enumeration>
    </ssd:Enumerations>
    <ssd:Annotations>
        <ssc:Annotation type="com.easy-ssp.easy.ssp-model">
            <easySSP:ParameterVariants>
                <easySSP:ParameterVariant name="Parameter-Variant" isBase="true"/>
            </easySSP:ParameterVariants>
        </ssc:Annotation>
    </ssd:Annotations>
</ssd:SystemStructureDescription>

The current version of OMSimulator does not export the enumeration definitions at top level xml and with the xerces validation it reports error as the ssd does not confront to SSP specification.

Solution

The enumeration definitions are available in modeldescription.xml and this should be exported to ssd file.

arun3688 avatar Sep 22 '23 21:09 arun3688