take care for different types of output variables in analogfunctions
This commit is contained in:
parent
285d5b8636
commit
9d56b6ca86
|
|
@ -1011,7 +1011,16 @@ static inline double _d0_vt(double arg) { (void) arg; return (1.380650
|
|||
<admst:apply-templates select="." match="v2c:converttype"/><admst:text format=" %s"/>
|
||||
</admst:join>)
|
||||
<admst:text format="\n{\n"/>
|
||||
<admst:text format="double $function=0.0;\n"/>
|
||||
<!-- for all output declared variables -->
|
||||
<admst:for-each select="variable[output='yes']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:apply-templates select="." match="v2c:converttype"/>
|
||||
<admst:text format=" %s"/>
|
||||
<admst:if test="[type='integer']">=0</admst:if>
|
||||
<admst:if test="[type='real']">=0.0</admst:if>
|
||||
<admst:text format=";\n"/>
|
||||
</admst:for-each>
|
||||
<!-- for all local declared variables -->
|
||||
<admst:for-each select="variable[input='no' and output='no']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:apply-templates select="." match="v2c:converttype"/>
|
||||
|
|
@ -1033,12 +1042,26 @@ double $(module)_d_$(function) (<admst:join select="variable[input='yes']" separ
|
|||
<admst:apply-templates select="." match="v2c:converttype"/><admst:text format=" d_%s"/>
|
||||
</admst:join>)
|
||||
<admst:text format="\n{\n"/>
|
||||
<admst:text format="double $function=0.0;\n"/>
|
||||
<admst:for-each select="$globalanalogfunction/variable[input='yes']">
|
||||
<!-- for all output declared variables -->
|
||||
<admst:for-each select="variable[output='yes']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:variable name="ddx" select="%s"/>
|
||||
<admst:text format="double $(function)_$(ddx)=0.0;\n"/>
|
||||
<admst:variable name="name" select="%s"/>
|
||||
<admst:apply-templates select="." match="v2c:converttype"/>
|
||||
<admst:text format=" $(name)"/>
|
||||
<admst:if test="[type='integer']">=0</admst:if>
|
||||
<admst:if test="[type='real']">=0.0</admst:if>
|
||||
<admst:text format=";\n"/>
|
||||
<admst:for-each select="$globalanalogfunction/variable[input='yes']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:variable name="ddx" select="%s"/>
|
||||
<admst:apply-templates select="." match="v2c:converttype"/>
|
||||
<admst:text format=" $(name)_$(ddx)"/>
|
||||
<admst:if test="[type='integer']">=0</admst:if>
|
||||
<admst:if test="[type='real']">=0.0</admst:if>
|
||||
<admst:text format=";\n"/>
|
||||
</admst:for-each>
|
||||
</admst:for-each>
|
||||
<!-- for all local declared variables -->
|
||||
<admst:for-each select="variable[input='no' and output='no']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:variable name="name" select="%s"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue