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

- created example for ModelVariables in modelDescription.xml #17

Closed
wants to merge 1 commit into from

Conversation

PenndorfT
Copy link

This is an example how I interpret the required configuration if an internal XCP slave. The XML schema requires a different kind of start value configuration for simple types (Boolean, UInt16) and strings. According to https://github.com/modelica/fmi-standard/blob/main/schema/fmi3Variable.xsd#L331 it is not enforced that exact one start value is given (minOccurs="0" maxOccurs="unbounded"). This should be described in the layered standard as an obligation of the importer.
I will take this a todo for me in addition to referring to the example in the document.

@PenndorfT
Copy link
Author

When reading table 21, section 2.4.7 of the FMI standard I think the Start tag can also be left out. In this case the FMU implementation sets 127.0.0.1 as default. Comparing with the given example for the array of string parameters there it seems there must be a check for a scalar variable that can have a start value.

@PenndorfT
Copy link
Author

PenndorfT commented May 10, 2023

I have tried the following example with fmpy 0.3.15

    <String name="org.fmi-standard.fmi-ls-xcp.ListenIpAddress"
            valueReference="2"
            causality="structuralParameter"
            variability="fixed"
            description="IP address where the XCP slave listens for XCP protocol commands.">
        <Dimension start="6"/>
        <Start value="127.0.0.1"/>
        <Start value="127.0.0.2"/>
    </String>

It's accepted by the generic fmpy importer and should be rejected by the fmi-ls-xcp implementation of the importer.

@pmai
Copy link
Collaborator

pmai commented May 10, 2023

Structural Parameters must always have a start value, so the Start element for the address is mandatory. The number of start values provided is determined by the dimensions of the variable, which for a scalar means exactly one value. This is defined by the base standard, so the XCP LS might at most want to point out that the required variables are to be scalar, i.e. not arrays.

@PTaeuberDS
Copy link
Collaborator

I agree with Pierre. @PenndorfT Is that fine for you and can you change this in the document?

@PenndorfT
Copy link
Author

Obsolete after discussions in #19 and #20

@PenndorfT PenndorfT closed this May 24, 2023
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.

3 participants