Commit bc41ee1e authored by Pavel Vainerman's avatar Pavel Vainerman

(codegen): Исправил ошибку с проверкой iotype. Теперь для датчиков у которых…

(codegen): Исправил ошибку с проверкой iotype. Теперь для датчиков у которых стоит no_check_id="1" iotype тоже не проверяется..
parent cce90892
...@@ -602,15 +602,6 @@ end_private(false) ...@@ -602,15 +602,6 @@ end_private(false)
<xsl:if test="normalize-space(@no_check_id)!='1'"> <xsl:if test="normalize-space(@no_check_id)!='1'">
if( <xsl:value-of select="normalize-space(@name)"/> == UniSetTypes::DefaultObjectId ) if( <xsl:value-of select="normalize-space(@name)"/> == UniSetTypes::DefaultObjectId )
throw Exception( myname + ": Not found ID for (<xsl:value-of select="@name"/>) " + conf->getProp(cnode,"<xsl:value-of select="@name"/>") ); throw Exception( myname + ": Not found ID for (<xsl:value-of select="@name"/>) " + conf->getProp(cnode,"<xsl:value-of select="@name"/>") );
</xsl:if>
if( node_<xsl:value-of select="normalize-space(@name)"/> == UniSetTypes::DefaultObjectId )
{
if( !conf->getProp(cnode,"node_<xsl:value-of select="normalize-space(@name)"/>").empty() )
throw Exception( myname + ": Not found NodeID for (node='node_<xsl:value-of select="normalize-space(@name)"/>') " + conf->getProp(cnode,"node_<xsl:value-of select="normalize-space(@name)"/>") );
node_<xsl:value-of select="normalize-space(@name)"/> = conf->getLocalNode();
}
<xsl:if test="normalize-space(@no_check_iotype)!='1'"> <xsl:if test="normalize-space(@no_check_iotype)!='1'">
if( conf->getIOType( <xsl:value-of select="normalize-space(@name)"/> ) != <xsl:call-template name="gettype"><xsl:with-param name="iotype" select="@iotype"/></xsl:call-template> ) if( conf->getIOType( <xsl:value-of select="normalize-space(@name)"/> ) != <xsl:call-template name="gettype"><xsl:with-param name="iotype" select="@iotype"/></xsl:call-template> )
...@@ -621,6 +612,17 @@ end_private(false) ...@@ -621,6 +612,17 @@ end_private(false)
throw Exception( err.str() ); throw Exception( err.str() );
} }
</xsl:if> </xsl:if>
</xsl:if>
if( node_<xsl:value-of select="normalize-space(@name)"/> == UniSetTypes::DefaultObjectId )
{
<xsl:if test="normalize-space(@no_check_id)!='1'">
if( !conf->getProp(cnode,"node_<xsl:value-of select="normalize-space(@name)"/>").empty() )
throw Exception( myname + ": Not found NodeID for (node='node_<xsl:value-of select="normalize-space(@name)"/>') " + conf->getProp(cnode,"node_<xsl:value-of select="normalize-space(@name)"/>") );
</xsl:if>
node_<xsl:value-of select="normalize-space(@name)"/> = conf->getLocalNode();
}
</xsl:for-each> </xsl:for-each>
<xsl:for-each select="//msgmap/item"> <xsl:for-each select="//msgmap/item">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Name: libuniset Name: libuniset
Version: 1.4 Version: 1.4
Release: alt4 Release: alt5
Summary: UniSet - library for building distributed industrial control systems Summary: UniSet - library for building distributed industrial control systems
License: GPL License: GPL
Group: Development/C++ Group: Development/C++
...@@ -213,6 +213,9 @@ rm -f %buildroot%_libdir/*.la ...@@ -213,6 +213,9 @@ rm -f %buildroot%_libdir/*.la
%changelog %changelog
* Thu Jun 14 2012 Pavel Vainerman <pv@altlinux.ru> 1.4-alt5
- (codegen): fixed bug in validation 'iotype'
* Sun Jun 10 2012 Pavel Vainerman <pv@altlinux.ru> 1.4-alt4 * Sun Jun 10 2012 Pavel Vainerman <pv@altlinux.ru> 1.4-alt4
- (codegen): added validation 'iotype' - (codegen): added validation 'iotype'
......
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