Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
d412caee
Commit
d412caee
authored
Jun 10, 2012
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(codegen): Добавил проверку корректности iotype указанного в src.xml и configure.xml.
parent
b11489c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+19
-0
libuniset.spec
conf/libuniset.spec
+4
-1
No files found.
Utilities/codegen/ctl-cpp-common.xsl
View file @
d412caee
...
@@ -13,6 +13,15 @@
...
@@ -13,6 +13,15 @@
<xsl:when
test=
"$iotype='AI'"
>
long
</xsl:when>
<xsl:when
test=
"$iotype='AI'"
>
long
</xsl:when>
</xsl:choose>
</xsl:choose>
</xsl:template>
</xsl:template>
<xsl:template
name=
"gettype"
>
<xsl:param
name=
"iotype"
/>
<xsl:choose>
<xsl:when
test=
"$iotype='DO'"
>
UniversalIO::DigitalOutput
</xsl:when>
<xsl:when
test=
"$iotype='DI'"
>
UniversalIO::DigitalInput
</xsl:when>
<xsl:when
test=
"$iotype='AO'"
>
UniversalIO::AnalogOutput
</xsl:when>
<xsl:when
test=
"$iotype='AI'"
>
UniversalIO::AnalogInput
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template
name=
"setprefix"
>
<xsl:template
name=
"setprefix"
>
<xsl:choose>
<xsl:choose>
...
@@ -602,6 +611,16 @@ end_private(false)
...
@@ -602,6 +611,16 @@ end_private(false)
node_
<xsl:value-of
select=
"normalize-space(@name)"
/>
= conf->getLocalNode();
node_
<xsl:value-of
select=
"normalize-space(@name)"
/>
= conf->getLocalNode();
}
}
<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>
)
{
ostringstream err;
err
<<
myname
<<
"(init): Invalid 'iotype' for '
<xsl:value-of
select=
"normalize-space(@name)"
/>
' set '
<xsl:value-of
select=
"normalize-space(@iotype)"
/>
' but "
<<
conf->getProp(cnode,"
<xsl:value-of
select=
"normalize-space(@name)"
/>
")
<<
"='"
<<
conf->getIOType(
<xsl:value-of
select=
"normalize-space(@name)"
/>
)
<<
"'";
throw Exception( err.str() );
}
</xsl:if>
</xsl:for-each>
</xsl:for-each>
<xsl:for-each
select=
"//msgmap/item"
>
<xsl:for-each
select=
"//msgmap/item"
>
...
...
conf/libuniset.spec
View file @
d412caee
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
Name: libuniset
Name: libuniset
Version: 1.4
Version: 1.4
Release: alt
3
Release: alt
4
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
* Sun Jun 10 2012 Pavel Vainerman <pv@altlinux.ru> 1.4-alt4
- (codegen): added validation 'iotype'
* Sun Jun 10 2012 Pavel Vainerman <pv@altlinux.ru> 1.4-alt3
* Sun Jun 10 2012 Pavel Vainerman <pv@altlinux.ru> 1.4-alt3
- (DBServer_MySQL): buffer is added to query
- (DBServer_MySQL): buffer is added to query
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment