#2043 closed defect (fixed)
NFSCodeDependency fails on Modelica_DeviceDrivers
Reported by: | Martin Sjölund | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.0 |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: |
Description
NFSCodeDependency fails on:
loadModel(Modelica_DeviceDrivers);getErrorString(); instantiateModel(Modelica_DeviceDrivers.Blocks.Examples.TestSerialPackager_UDP);getErrorString();
No error message indicates what goes wrong.
Library: https://www.modelica.org/libraries/modelica_devicedrivers
Note: Remove package.order files and rename 2 file to make the package parse
From the forums
Change History (4)
comment:1 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 3 comment:2 by , 12 years ago
The extends should be legal in an external object, I think (because extending from icons usually only add annotations; no elements). Or is that a major problem?
comment:3 by , 12 years ago
Replying to sjoelund.se:
The extends should be legal in an external object, I think (because extending from icons usually only add annotations; no elements). Or is that a major problem?
I'm not sure what kind of problems can occur with external objects, but the specification is pretty clear that an external object is not allowed to contain any other elements than the three given. And the spec says that extends clauses are elements, so in this case I just follow the spec and forbid them.
The library is not correct. The class Packaging.SerialPackager extends from ExternalObject, but it also extends from Utilities.Icons.PackagerIcon as well as having ~20 functions besides the constructor and destructor. The specification states:
So this class, which is used by the example, is a very illegal external object. The dependency analysis didn't handle this gracefully though, the external object checking didn't handle extends clauses. I have fixed this in r15038, so now you get an error instead: