Commit 434bc9b2 authored by Pavel Vainerman's avatar Pavel Vainerman

(uniset-codegen): добавил возможность задавать параметр force="1"

для vartype="out", для принудительного обновления значения в SM, на каждом шаге.
parent 3e66b477
......@@ -265,7 +265,9 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::updateOutputs( bool _force )
<xsl:if test="normalize-space(../../@msg)!='1'">
<xsl:choose>
<xsl:when test="normalize-space(@vartype)='out'">
<xsl:if test="normalize-space(../../@force)=''">
if( _force || prev_<xsl:call-template name="setprefix"/><xsl:value-of select="../../@name"/> != <xsl:call-template name="setprefix"/><xsl:value-of select="../../@name"/> )
</xsl:if>
{
<xsl:call-template name="setdata"/>
prev_<xsl:call-template name="setprefix"/><xsl:value-of select="../../@name"/> = <xsl:call-template name="setprefix"/><xsl:value-of select="../../@name"/>;
......
......@@ -127,7 +127,9 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::setValue( UniSetTypes::ObjectId _si
void <xsl:value-of select="$CLASSNAME"/>_SK::updateOutputs( bool _force )
{
<xsl:for-each select="//smap/item">
<xsl:if test="normalize-space(@force)=''">
if( _force || prev_<xsl:call-template name="setprefix"/><xsl:value-of select="@name"/> != <xsl:call-template name="setprefix"/><xsl:value-of select="@name"/> )
</xsl:if>
{
<xsl:choose>
<xsl:when test="normalize-space(@vartype)='out'"><xsl:call-template name="setdata"/></xsl:when>
......
......@@ -42,7 +42,9 @@
<item name="input1_s" vartype="in" iotype="DI" comment="comment for input1" smTestID="1"/>
<item name="input2_s" vartype="in" iotype="DI" comment="comment for input2" />
<item name="output1_c" vartype="out" iotype="DO" omment="comment for output1" no_check_id="1"/>
<item name="output2_c" vartype="out" iotype="DO" omment="comment for output2" no_check_id="1" force="1"/>
<item name="loglevel_s" vartype="in" iotype="AI" omment="log level control" loglevel="1"/>
</smap>
<msgmap>
......
......@@ -8,7 +8,7 @@
Name: libuniset
Version: 1.7
Release: alt12
Release: alt13
Summary: UniSet - library for building distributed industrial control systems
......@@ -335,6 +335,9 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Tue Apr 29 2014 Pavel Vainerman <pv@altlinux.ru> 1.7-alt13
- (uniset-codegen): add "force" parameters for vartype="out"
* Thu Apr 24 2014 Pavel Vainerman <pv@altlinux.ru> 1.7-alt12
- remove deprecated Extensions:getHeartBeatTime(). Use conf->getHeartBeatTime()
- rename parameter: "time_msec" --> "msec" for <HeartBeatTime msec=""/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment