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
cd2cef2f
Commit
cd2cef2f
authored
Dec 19, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(codegen): добавлен вывод информации о текущих таймерах.
parent
00911199
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+11
-0
LT_Object.h
include/LT_Object.h
+2
-0
LT_Object.cc
src/Various/LT_Object.cc
+9
-2
No files found.
Utilities/codegen/ctl-cpp-common.xsl
View file @
cd2cef2f
...
@@ -447,6 +447,17 @@ UniSetTypes::SimpleInfo* <xsl:value-of select="$CLASSNAME"/>_SK::getInfo( CORBA:
...
@@ -447,6 +447,17 @@ UniSetTypes::SimpleInfo* <xsl:value-of select="$CLASSNAME"/>_SK::getInfo( CORBA:
inf
<<
"LogServer: "
<<
logserv_host
<<
":"
<<
logserv_port
<<
endl;
inf
<<
"LogServer: "
<<
logserv_host
<<
":"
<<
logserv_port
<<
endl;
inf
<<
dumpIO()
<<
endl;
inf
<<
dumpIO()
<<
endl;
inf
<<
endl;
inf
<<
endl;
auto timers = getTimersList();
inf
<<
"Timers["
<<
timers.size()
<<
"]:"
<<
endl;
for( const auto
&
t: timers )
{
inf
<<
" "
<<
"["
<<
t.id
<<
"]: msec="
<<
setw(6)
<<
t.tmr.getInterval()
<<
" timeleft="
<<
setw(6)
<<
t.curTimeMS
<<
" tick="
<<
setw(3)
<<
( t.curTick>=0 ? t.curTick : -1 )
<<
endl;
}
inf
<<
endl;
inf
<<
vmon.pretty_str()
<<
endl;
inf
<<
vmon.pretty_str()
<<
endl;
inf
<<
endl;
inf
<<
endl;
inf
<<
getMonitInfo()
<<
endl;
inf
<<
getMonitInfo()
<<
endl;
...
...
include/LT_Object.h
View file @
cd2cef2f
...
@@ -193,6 +193,8 @@ class LT_Object
...
@@ -193,6 +193,8 @@ class LT_Object
timeout_t
sleepTime
;
/*!< текущее время ожидания */
timeout_t
sleepTime
;
/*!< текущее время ожидания */
TimersList
getTimersList
();
private
:
private
:
TimersList
tlst
;
TimersList
tlst
;
/*! замок для блокирования совместного доступа к cписку таймеров */
/*! замок для блокирования совместного доступа к cписку таймеров */
...
...
src/Various/LT_Object.cc
View file @
cd2cef2f
...
@@ -34,8 +34,8 @@ using namespace UniSetTypes;
...
@@ -34,8 +34,8 @@ using namespace UniSetTypes;
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
LT_Object
::
LT_Object
()
:
LT_Object
::
LT_Object
()
:
lstMutex
(
"LT_Object::lstMutex"
),
sleepTime
(
UniSetTimer
::
WaitUpTime
),
sleepTime
(
UniSetTimer
::
WaitUpTime
)
lstMutex
(
"LT_Object::lstMutex"
)
{
{
tmLast
.
setTiming
(
UniSetTimer
::
WaitUpTime
);
tmLast
.
setTiming
(
UniSetTimer
::
WaitUpTime
);
}
}
...
@@ -154,6 +154,13 @@ timeout_t LT_Object::getTimeLeft(TimerId timerid)
...
@@ -154,6 +154,13 @@ timeout_t LT_Object::getTimeLeft(TimerId timerid)
return
0
;
return
0
;
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
LT_Object
::
TimersList
LT_Object
::
getTimersList
()
{
uniset_rwmutex_rlock
l
(
lstMutex
);
TimersList
lst
(
tlst
);
return
std
::
move
(
lst
);
}
// ------------------------------------------------------------------------------------------
timeout_t
LT_Object
::
askTimer
(
UniSetTypes
::
TimerId
timerid
,
timeout_t
timeMS
,
clock_t
ticks
,
UniSetTypes
::
Message
::
Priority
p
)
timeout_t
LT_Object
::
askTimer
(
UniSetTypes
::
TimerId
timerid
,
timeout_t
timeMS
,
clock_t
ticks
,
UniSetTypes
::
Message
::
Priority
p
)
{
{
...
...
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