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
1ed98fda
Commit
1ed98fda
authored
Aug 25, 2016
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(codegen): добавил генерирование help (--ObjectName-help).
parent
e1a0c1f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+27
-2
No files found.
Utilities/codegen/ctl-cpp-common.xsl
View file @
1ed98fda
...
@@ -657,7 +657,27 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId _te
...
@@ -657,7 +657,27 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId _te
std::string
<xsl:value-of
select=
"$CLASSNAME"
/>
_SK::help()
std::string
<xsl:value-of
select=
"$CLASSNAME"
/>
_SK::help()
{
{
ostringstream s;
ostringstream s;
// HELP NOT YET!
s
<<
" ************* "
<<
myname
<<
" HELP:"
<<
" ************* "
<<
endl;
s
<<
"Init default values: "
<<
endl;
<xsl:for-each
select=
"//smap/item"
>
s
<<
"--"
<<
argprefix
<<
"
<xsl:value-of
select=
"normalize-space(@name)"
/>
-default val - set default value. Now: "
<<
strval(
<xsl:value-of
select=
"normalize-space(@name)"
/>
)
<<
endl;
</xsl:for-each>
s
<<
endl;
s
<<
"--"
<<
argprefix
<<
"sm-ready-timeout msec - wait SM ready for ask sensors. Now: "
<<
smReadyTimeout
<<
endl;
s
<<
"--"
<<
argprefix
<<
"sm-test-id msec sensor - sensor for test SM ready. Now: "
<<
smTestID
<<
endl;
s
<<
"--"
<<
argprefix
<<
"sleep-msec msec - step period. Now: "
<<
sleep_msec
<<
endl;
s
<<
"--"
<<
argprefix
<<
"activate-timeout msec - activate process timeout. Now: "
<<
activateTimeout
<<
endl;
s
<<
"--"
<<
argprefix
<<
"startup-timeout msec - wait startup timeout. Now: "
<<
ptStartUpTimeout.getInterval()
<<
endl;
s
<<
"--"
<<
argprefix
<<
"force-out [0|1] - 1 - save out-values in SM at each step. Now: "
<<
forceOut
<<
endl;
s
<<
"--"
<<
argprefix
<<
"heartbeat-max num - max value for heartbeat counter. Now: "
<<
maxHeartBeat
<<
endl;
s
<<
"--"
<<
argprefix
<<
"heartbeat-time msec - heartbeat periond. Now: "
<<
ptHeartBeat.getInterval()
<<
endl;
s
<<
endl;
s
<<
"--print-id-list - print ID list"
<<
endl;
s
<<
endl;
s
<<
" ****************************************************************************************** "
<<
endl;
return std::move(s.str());
return std::move(s.str());
}
}
...
@@ -888,7 +908,7 @@ forceOut(false),
...
@@ -888,7 +908,7 @@ forceOut(false),
end_private(false)
end_private(false)
{
{
auto conf = uniset_conf();
auto conf = uniset_conf();
<xsl:call-template
name=
"COMMON-ID-LIST"
/>
<xsl:call-template
name=
"COMMON-ID-LIST"
/>
if( getId() == DefaultObjectId )
if( getId() == DefaultObjectId )
...
@@ -1077,6 +1097,11 @@ end_private(false)
...
@@ -1077,6 +1097,11 @@ end_private(false)
vmonit(maxHeartBeat);
vmonit(maxHeartBeat);
vmonit(activateTimeout);
vmonit(activateTimeout);
vmonit(smReadyTimeout);
vmonit(smReadyTimeout);
// help надо выводить в конце, когда уже все переменные инициализированы по умолчанию
if( UniSetTypes::findArgParam("--" + argprefix + "help",uniset_conf()->getArgc(),uniset_conf()->getArgv()) != -1 )
cout
<<
help()
<<
endl;
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
...
...
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