Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Either BASIC-STRUCTURE-REF or BASIC-STRUCTURE-SNREF is required for END-OF-PDU-FIELD #88

Merged
merged 4 commits into from
Nov 8, 2022

Conversation

premkumar-masilamani
Copy link
Contributor

Removed the assert statement that expects BASIC-STRUCTURE-REF to be present for all the END-OF-PDU-FIELD.

Sample ODX-D file snippet, with the first field having BASIC-STRUCTURE-REF and the second having BASIC-STRUCTURE-SNREF

            <END-OF-PDU-FIELD ID="id-153db528-e63b-42d8-9c11-7847b8eddebf">
              <SHORT-NAME>DataIdentifierResponseField</SHORT-NAME>
              <LONG-NAME>Data Identifier Response Field</LONG-NAME>
              <BASIC-STRUCTURE-REF ID-REF="id-f155f44d-1fad-4b49-bc56-3ad2a5f63bbf"/>
              <MAX-NUMBER-OF-ITEMS>4</MAX-NUMBER-OF-ITEMS>
              <MIN-NUMBER-OF-ITEMS>1</MIN-NUMBER-OF-ITEMS>
            </END-OF-PDU-FIELD>

            <END-OF-PDU-FIELD ID="id-af7fba3d-9a2a-4b12-88c4-810f529457ca">
              <SHORT-NAME>PeriodicIdentifierRequestField</SHORT-NAME>
              <LONG-NAME>Periodic Identifier Request Field</LONG-NAME>
              <BASIC-STRUCTURE-SNREF SHORT-NAME="PeriodicIdentifierRequestStructure"/>
              <MAX-NUMBER-OF-ITEMS>4</MAX-NUMBER-OF-ITEMS>
              <MIN-NUMBER-OF-ITEMS>1</MIN-NUMBER-OF-ITEMS>
            </END-OF-PDU-FIELD>

Corresponding XSD snippet

                    <xsd:choice maxOccurs="1" minOccurs="1">
                        <xsd:element name="BASIC-STRUCTURE-REF" type="ODXLINK"/>
                        <xsd:element name="BASIC-STRUCTURE-SNREF" type="SNREF"/>
                    </xsd:choice>

@andlaus
Copy link
Collaborator

andlaus commented Nov 8, 2022

thanks. your patch is obviously correct. That said, I'll wait with merging until I've fixed the newly appearing typechecking errors due to mypy 0.99. (PR for this is in the making, it will probably be opened today or tomorrow.)

@andlaus
Copy link
Collaborator

andlaus commented Nov 8, 2022

ok, #89 has been merged. this can now go in as well. Thanks for the catch!

@andlaus andlaus merged commit 413b605 into mercedes-benz:main Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants