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
5190121a
Commit
5190121a
authored
Jun 04, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(uniset-codegen): первая версия реалиазции доступа к внутреннему состоянию переменных
parent
6bc465e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
UniSetTypes_i.idl
IDL/UniSetTypes/UniSetTypes_i.idl
+2
-2
TODO
TODO
+3
-2
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+21
-1
No files found.
IDL/UniSetTypes/UniSetTypes_i.idl
View file @
5190121a
...
@@ -59,8 +59,8 @@
...
@@ -59,8 +59,8 @@
ObjectId
id
;
ObjectId
id
;
boolean
connected
;
boolean
connected
;
ObjectId
dbserver
;
ObjectId
dbserver
;
string
host
;
string
<
30
>
host
;
string
port
;
string
<
10
>
port
;
}
;
}
;
/*
!
информация
об
объекте
*/
/*
!
информация
об
объекте
*/
...
...
TODO
View file @
5190121a
...
@@ -49,8 +49,9 @@ SQL:
...
@@ -49,8 +49,9 @@ SQL:
Debug:
Debug:
- в codegen встроить получение состояния всех переменных (dumpIO() + UniSetObject::getInfo())
- в codegen встроить получение состояния всех переменных (dumpIO() + UniSetObject::getInfo()),
- (smonit): выводить того кто поменял датчик..
возможно написать на python утилиту "монитор".
- дописать в codegen документацию по запуску и управлению логами через LogServer
Version 2.5
Version 2.5
...
...
Utilities/codegen/ctl-cpp-common.xsl
View file @
5190121a
...
@@ -169,6 +169,8 @@
...
@@ -169,6 +169,8 @@
void askSensor( UniSetTypes::ObjectId sid, UniversalIO::UIOCommand, UniSetTypes::ObjectId node = UniSetTypes::uniset_conf()->getLocalNode() );
void askSensor( UniSetTypes::ObjectId sid, UniversalIO::UIOCommand, UniSetTypes::ObjectId node = UniSetTypes::uniset_conf()->getLocalNode() );
void updateValues();
void updateValues();
virtual UniSetTypes::SimpleInfo* getInfo() override;
virtual bool setMsg( UniSetTypes::ObjectId code, bool state = true );
virtual bool setMsg( UniSetTypes::ObjectId code, bool state = true );
inline std::shared_ptr
<
DebugStream
>
log(){ return mylog; }
inline std::shared_ptr
<
DebugStream
>
log(){ return mylog; }
...
@@ -409,6 +411,20 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::preSysCommand( const SystemMessage*
...
@@ -409,6 +411,20 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::preSysCommand( const SystemMessage*
sysCommand(_sm);
sysCommand(_sm);
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
UniSetTypes::SimpleInfo*
<xsl:value-of
select=
"$CLASSNAME"
/>
_SK::getInfo()
{
UniSetTypes::SimpleInfo_var i =
<xsl:if
test=
"normalize-space($BASECLASS)=''"
>
UniSetObject::getInfo();
</xsl:if>
ostringstream inf;
inf
<<
i->info
<<
endl;
inf
<<
dumpIO()
<<
endl;
i->info = inf.str().c_str();
return i._retn();
}
// -----------------------------------------------------------------------------
<xsl:if
test=
"normalize-space($TESTMODE)!=''"
>
<xsl:if
test=
"normalize-space($TESTMODE)!=''"
>
bool
<xsl:value-of
select=
"$CLASSNAME"
/>
_SK::checkTestMode()
bool
<xsl:value-of
select=
"$CLASSNAME"
/>
_SK::checkTestMode()
{
{
...
@@ -564,6 +580,7 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId _te
...
@@ -564,6 +580,7 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId _te
// generate timestamp:
<xsl:value-of
select=
"date:date()"
/>
// generate timestamp:
<xsl:value-of
select=
"date:date()"
/>
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
#include
<
memory
>
#include
<
memory
>
#include
<
iomanip
>
#include
<xsl:call-template
name=
"preinclude"
/>
Configuration.h
<xsl:call-template
name=
"postinclude"
/>
#include
<xsl:call-template
name=
"preinclude"
/>
Configuration.h
<xsl:call-template
name=
"postinclude"
/>
#include
<xsl:call-template
name=
"preinclude"
/>
Exceptions.h
<xsl:call-template
name=
"postinclude"
/>
#include
<xsl:call-template
name=
"preinclude"
/>
Exceptions.h
<xsl:call-template
name=
"postinclude"
/>
#include
<xsl:call-template
name=
"preinclude"
/>
ORepHelpers.h
<xsl:call-template
name=
"postinclude"
/>
#include
<xsl:call-template
name=
"preinclude"
/>
ORepHelpers.h
<xsl:call-template
name=
"postinclude"
/>
...
@@ -974,7 +991,10 @@ std::string <xsl:value-of select="$CLASSNAME"/>_SK::dumpIO()
...
@@ -974,7 +991,10 @@ std::string <xsl:value-of select="$CLASSNAME"/>_SK::dumpIO()
ostringstream s;
ostringstream s;
s
<<
myname
<<
": "
<<
endl;
s
<<
myname
<<
": "
<<
endl;
<xsl:for-each
select=
"//smap/item"
>
<xsl:for-each
select=
"//smap/item"
>
s
<<
" "
<<
strval(
<xsl:value-of
select=
"@name"
/>
)
<<
endl;
s
<<
" "
<<
setw(20)
<<
std::right
<<
"
<xsl:call-template
name=
"setprefix"
/><xsl:value-of
select=
"@name"
/>
"
<<
"("
<<
setw(20)
<<
std::left
<<
ORepHelpers::getShortName( uniset_conf()->oind->getMapName(
<xsl:value-of
select=
"@name"
/>
))
<<
")"
<<
std::right
<<
" = "
<<
setw(6)
<<
<xsl:call-template
name=
"setprefix"
/><xsl:value-of
select=
"@name"
/>
<<
endl;
</xsl:for-each>
</xsl:for-each>
return s.str();
return s.str();
}
}
...
...
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