Closed adriantirea closed 4 months ago
None of the variables or other information mandated by the layered standard are supposed to supercede the A2L information, unless specifically noted otherwise (e.g. the port if the relevant variables are present and are changeable).
So an implementation shall never rely on the presence/absence or values of any variables to detect TCP or UDP support, as that is fully determined in the A2L file. None of the variables have to be present (for a reason, BTW, consider manual retrofit of FMI-LS-XCP support), yet everything will work as designed as the supported XCP protocols are defined in the A2L, together with all other relevant information.
The variables in question are only there to selectively disable XCP server startup, not to indicate potential support for a protocol.
If the FMU supports both TCP and UDP, but not at the same time. How can the importer know which one will be started if both variables are not present?
Both of them will have to be started by the FMU at startup if the variables are not present; whether the FMU can handle simultaneous connections is up to the FMU, and it will have to handle that at runtime (e.g. by erroring out on secondary connection attempts), just as it has to today...
Thank you for the explanation.
The current fmi-ls-xcp mindset is that usually the UDP and TCP services are offered and are on. If one protocol is not offered by the FMU, the FMU must announce the incapability in the modelDescription.xml by declaring the org.fmi_standard.fmi_ls_xcp.EnableXcpOnTcpIp as constant output with value false.
The mindset I came to the subject is that the XCP services are usually not on and user chooses what to enable.
Just so that are no misunderstandings: The current fmi-ls-xcp mindset should be that the A2L file decides whether XCP is offered at all (rather than direct memory access), and which protocols. Since an FMU does not have to offer any additional variables at all, that can be the sole thing that an importer can rely on - which is also good, as that is the canonical place to find such information absent any FMI-related info at all.
So the FMU does not have to announce anything, as the A2L file already anounces everything. What the FMU can offer beyond what pure A2L allows is selectively enabling services at startup, and/or changing of ports, etc. For all of this the added variables play their role, however they are not to be considered as superceding the A2L information, unless specifically indicated otherwise. I.e. if the FMU offers org.fmi_standard.fmi_ls_xcp.EnableXcpOnTcpIp, but has no XCP section in the A2L, it would still not support XCP (and e.g. having the variable as anything other than a constant false would be likely misleading).
The sentences “If not present” causes me problems if I would be an importer.
How should an importer know if TCP or UDP service will be started when EnableXcpOn[Tcp|Udp]Ip is not present? The fmi-ls-xcp does not say it. Possible answers:
An exporter has no problem. The exporter can play safe and make the situation clear by supplying the TCP variables if the FMU supports TCP and the UDP variables if the FMU supports UDP.
If the FMU supports both TCP and UDP, but not at the same time. How can the importer know which one will be started if both variables are not present?