Opened 8 years ago
Closed 8 years ago
#4066 closed defect (fixed)
multiple external function calls for multiple outputs
Reported by: | Volker Waurich | Owned by: | Volker Waurich |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Code Generation | Version: | |
Keywords: | Cc: | Martin Sjölund, Adrian Pop, Willi Braun, Bernhard Thiele, Per Östlund |
Description
Hi,
In
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.UnpackUnsignedInteger
you will find the equation:
(y,dummy) = Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.Internal.DummyFunctions.integerBitUnpack( pkgIn.pkg, bitOffset, width, pkgIn.dummy);
Since the function has 2 outputs, we generate 2 equations. One solves the variable y
and another one dummy
each by calling the external function. Unfortunately, the external function integerBitUnpack
is meant to be called only one time since it gets byte pacakges of a message and if we call it too often, the message does not fit in the buffer.
Can any of the c-runtime developers give me a hint on how to solve this issue in a practicable way?
Thanks.
Change History (4)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Ok. I will try to use Algorithm-codegeneration for this. Before, I have to change BackendDAECreate.lower2 to generate only 1 equation instead of 2.
comment:4 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Simple solution: Only generate 1 equation (just like an algorithm block)