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
45e61c83
Commit
45e61c83
authored
Jun 08, 2012
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(uniset-codegen): добавил возможность задать тип double в <variables>
parent
a9b3d12a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+4
-0
testgen.src.xml
Utilities/codegen/tests/testgen.src.xml
+6
-5
libuniset.spec
conf/libuniset.spec
+4
-1
No files found.
Utilities/codegen/ctl-cpp-common.xsl
View file @
45e61c83
...
@@ -433,6 +433,7 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId _te
...
@@ -433,6 +433,7 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId _te
<xsl:if
test=
"normalize-space(@const)!=''"
>
<xsl:if
test=
"normalize-space(@const)!=''"
>
<xsl:if
test=
"normalize-space(@type)='int'"
><xsl:value-of
select=
"normalize-space(@name)"
/>
(0),
</xsl:if>
<xsl:if
test=
"normalize-space(@type)='int'"
><xsl:value-of
select=
"normalize-space(@name)"
/>
(0),
</xsl:if>
<xsl:if
test=
"normalize-space(@type)='float'"
><xsl:value-of
select=
"normalize-space(@name)"
/>
(0),
</xsl:if>
<xsl:if
test=
"normalize-space(@type)='float'"
><xsl:value-of
select=
"normalize-space(@name)"
/>
(0),
</xsl:if>
<xsl:if
test=
"normalize-space(@type)='double'"
><xsl:value-of
select=
"normalize-space(@name)"
/>
(0),
</xsl:if>
<xsl:if
test=
"normalize-space(@type)='bool'"
><xsl:value-of
select=
"normalize-space(@name)"
/>
(false),
</xsl:if>
<xsl:if
test=
"normalize-space(@type)='bool'"
><xsl:value-of
select=
"normalize-space(@name)"
/>
(false),
</xsl:if>
<xsl:if
test=
"normalize-space(@type)='str'"
><xsl:value-of
select=
"normalize-space(@name)"
/>
(""),
</xsl:if>
<xsl:if
test=
"normalize-space(@type)='str'"
><xsl:value-of
select=
"normalize-space(@name)"
/>
(""),
</xsl:if>
</xsl:if>
</xsl:if>
...
@@ -444,6 +445,9 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId _te
...
@@ -444,6 +445,9 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId _te
<xsl:if
test=
"normalize-space(@type)='float'"
>
<xsl:if
test=
"normalize-space(@type)='float'"
>
<xsl:value-of
select=
"normalize-space(@name)"
/>
(atof( init3_str(conf->getArgParam("--
<xsl:value-of
select=
"../@arg_prefix"
/><xsl:value-of
select=
"@name"
/>
"),conf->getProp(cnode,"
<xsl:value-of
select=
"@name"
/>
"),"
<xsl:value-of
select=
"normalize-space(@default)"
/>
").c_str())),
<xsl:value-of
select=
"normalize-space(@name)"
/>
(atof( init3_str(conf->getArgParam("--
<xsl:value-of
select=
"../@arg_prefix"
/><xsl:value-of
select=
"@name"
/>
"),conf->getProp(cnode,"
<xsl:value-of
select=
"@name"
/>
"),"
<xsl:value-of
select=
"normalize-space(@default)"
/>
").c_str())),
</xsl:if>
</xsl:if>
<xsl:if
test=
"normalize-space(@type)='double'"
>
<xsl:value-of
select=
"normalize-space(@name)"
/>
(atof( init3_str(conf->getArgParam("--
<xsl:value-of
select=
"../@arg_prefix"
/><xsl:value-of
select=
"@name"
/>
"),conf->getProp(cnode,"
<xsl:value-of
select=
"@name"
/>
"),"
<xsl:value-of
select=
"normalize-space(@default)"
/>
").c_str())),
</xsl:if>
<xsl:if
test=
"normalize-space(@type)='bool'"
>
<xsl:if
test=
"normalize-space(@type)='bool'"
>
<xsl:value-of
select=
"normalize-space(@name)"
/>
(uni_atoi( init3_str(conf->getArgParam("--
<xsl:value-of
select=
"../@arg_prefix"
/><xsl:value-of
select=
"@name"
/>
"),conf->getProp(cnode,"
<xsl:value-of
select=
"@name"
/>
"),"
<xsl:value-of
select=
"normalize-space(@default)"
/>
"))),
<xsl:value-of
select=
"normalize-space(@name)"
/>
(uni_atoi( init3_str(conf->getArgParam("--
<xsl:value-of
select=
"../@arg_prefix"
/><xsl:value-of
select=
"@name"
/>
"),conf->getProp(cnode,"
<xsl:value-of
select=
"@name"
/>
"),"
<xsl:value-of
select=
"normalize-space(@default)"
/>
"))),
</xsl:if>
</xsl:if>
...
...
Utilities/codegen/tests/testgen.src.xml
View file @
45e61c83
...
@@ -28,15 +28,16 @@
...
@@ -28,15 +28,16 @@
default - значение по умолчанию (может быть не задано)
default - значение по умолчанию (может быть не задано)
no_range_exception=1 - при выходе за границы min или max только писать unideb[WARN].
no_range_exception=1 - при выходе за границы min или max только писать unideb[WARN].
-->
-->
<item
name=
"test_int"
type=
"int"
min=
"0"
comment=
"test int variable"
/>
<item
name=
"test_int"
type=
"int"
min=
"0"
comment=
"test int variable"
const=
"1"
public=
"1"
/>
<item
name=
"test_int2"
type=
"int"
max=
"100"
default=
"110"
no_range_exception=
"1"
/>
<item
name=
"test_int2"
type=
"int"
max=
"100"
default=
"110"
no_range_exception=
"1"
/>
<item
name=
"test_float"
type=
"float"
max=
"100.0"
default=
"50.0"
/>
<item
name=
"test_float"
type=
"float"
max=
"100.0"
default=
"50.0"
/>
<item
name=
"test_bool"
type=
"bool"
/>
<item
name=
"test_double"
type=
"double"
max=
"100.340"
default=
"52.044"
/>
<item
name=
"test_str"
type=
"str"
default1=
"ddd"
/>
<item
name=
"test_bool"
type=
"bool"
private=
"1"
/>
<item
name=
"test_str"
type=
"str"
default=
"ddd"
/>
</variables>
</variables>
<smap>
<smap>
<!-- name - название переменной в конф. файле -->
<!-- name - название переменной в конф. файле -->
<item
name=
"input1_s"
vartype=
"in"
iotype=
"DI"
comment=
"comment for input1"
/>
<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=
"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=
"output1_c"
vartype=
"out"
iotype=
"DO"
omment=
"comment for output1"
no_check_id=
"1"
/>
</smap>
</smap>
...
...
conf/libuniset.spec
View file @
45e61c83
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
Name: libuniset
Name: libuniset
Version: 1.4
Version: 1.4
Release: alt
1
Release: alt
2
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
* Fri Jun 08 2012 Pavel Vainerman <pv@altlinux.ru> 1.4-alt2
- added support type 'double' for uniset-codegen (<variables>)
* Thu May 31 2012 Pavel Vainerman <pv@altlinux.ru> 1.4-alt1
* Thu May 31 2012 Pavel Vainerman <pv@altlinux.ru> 1.4-alt1
- rename unet2 -->unetudp
- rename unet2 -->unetudp
- release version 1.4
- release version 1.4
...
...
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