Opened 13 years ago
Last modified 13 years ago
#1684 closed defect (fixed)
cannot use Modelica.Mechanics.MultiBody.Frames.from_nxz in algorithm section
Reported by: | Christoph Höger | Owned by: | Christoph Höger |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | trunk | |
Keywords: | Cc: | Christoph Höger, |
Description
The following model will produce fault c-code in omc release 1.8.0 (r10974)
{{model Foo}}
{{ import Modelica.Mechanics.MultiBody.Frames;}}
{{ }}
{{ Frames.Orientation o;}}
{{ algorithm}}
{{ o := Frames.from_nxz({1,0,0}, {0,0,1});}}
{{end Foo;{{
}}}}
This one will not:
{{model Foo}}
{{ import Modelica.Mechanics.MultiBody.Frames;}}
{{ }}
{{ Frames.Orientation o = }}{{Frames.from_nxz({1,0,0}, {0,0,1});}}
{{end Foo;{{
}}}}
Change History (2)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Fixed in r11052. Testcase added as testsuite/libraries/msl31/simulate/Modelica.Mechanics.MultiBody.Frames.mos
Note:
See TracTickets
for help on using tickets.
$Po
is a record, but its reference is not generated in _Foo.h. The problem is of course that the data layout is struct(real_array,real_array) which cannot be copied directly.Assignments to records should become an assignment of each component in succession.