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
2f34b787
Commit
2f34b787
authored
Apr 30, 2017
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(IOC): рефакторинг функции getInfo(), добавил возможность получения
статистики по конкретному заказчику
parent
604c1732
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
3 deletions
+25
-3
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+6
-0
UObject_SK.h
extensions/include/UObject_SK.h
+1
-1
UObject_SK.cc
extensions/lib/UObject_SK.cc
+7
-1
IONotifyController.h
include/IONotifyController.h
+11
-1
IONotifyController.cc
src/Processes/IONotifyController.cc
+0
-0
No files found.
Utilities/codegen/ctl-cpp-common.xsl
View file @
2f34b787
...
...
@@ -588,6 +588,12 @@ uniset::SimpleInfo* <xsl:value-of select="$CLASSNAME"/>_SK::getInfo( const char*
inf
<<
"LogServer: NONE"
<<
endl;
<xsl:if
test=
"normalize-space($STAT)='1'"
>
size_t smCount = 0;
for( const auto
&
s: smStat )
smCount += s.second;
inf
<<
"smCount="
<<
smCount
<<
endl;
inf
<<
"statistics: "
<<
endl
<<
" processingMessageCatchCount: "
<<
processingMessageCatchCount
<<
endl;
...
...
extensions/include/UObject_SK.h
View file @
2f34b787
...
...
@@ -8,7 +8,7 @@
ВСЕ ВАШИ ИЗМЕНЕНИЯ БУДУТ ПОТЕРЯНЫ.
*/
// --------------------------------------------------------------------------
// generate timestamp: 2017-04-
29
+03:00
// generate timestamp: 2017-04-
30
+03:00
// -----------------------------------------------------------------------------
#ifndef UObject_SK_H_
#define UObject_SK_H_
...
...
extensions/lib/UObject_SK.cc
View file @
2f34b787
...
...
@@ -11,7 +11,7 @@
ВСЕ ВАШИ ИЗМЕНЕНИЯ БУДУТ ПОТЕРЯНЫ.
*/
// --------------------------------------------------------------------------
// generate timestamp: 2017-04-
29
+03:00
// generate timestamp: 2017-04-
30
+03:00
// -----------------------------------------------------------------------------
#include <memory>
#include <iomanip>
...
...
@@ -525,6 +525,12 @@ uniset::SimpleInfo* UObject_SK::getInfo( const char* userparam )
inf
<<
"LogServer: NONE"
<<
endl
;
size_t
smCount
=
0
;
for
(
const
auto
&
s
:
smStat
)
smCount
+=
s
.
second
;
inf
<<
"smCount="
<<
smCount
<<
endl
;
inf
<<
"statistics: "
<<
endl
<<
" processingMessageCatchCount: "
<<
processingMessageCatchCount
<<
endl
;
...
...
include/IONotifyController.h
View file @
2f34b787
...
...
@@ -293,7 +293,11 @@ namespace uniset
virtual
void
checkThreshold
(
IOController
::
IOStateList
::
iterator
&
li
,
const
uniset
::
ObjectId
sid
,
bool
send_msg
=
true
);
//! поиск информации о пороговом датчике
ThresholdExtList
::
iterator
findThreshold
(
const
uniset
::
ObjectId
sid
,
const
uniset
::
ThresholdId
tid
);
ThresholdInfoExt
*
findThreshold
(
AskThresholdMap
&
tmap
,
const
uniset
::
ObjectId
sid
,
const
uniset
::
ThresholdId
tid
);
// обновление статистики
bool
updateThresholdStat
(
AskThresholdMap
&
tmap
,
uniset
::
ObjectId
sid
,
uniset
::
ThresholdId
tid
,
const
uniset
::
ConsumerInfo
&
ci
,
size_t
stat_smCount
);
bool
updateSensorStat
(
IOController
::
IOStateList
::
iterator
&
it
,
const
uniset
::
ConsumerInfo
&
ci
,
size_t
stat_smCount
);
/*! сохранение списка заказчиков
По умолчанию делает dump, если объявлен dumper.
...
...
@@ -331,6 +335,12 @@ namespace uniset
Poco
::
JSON
::
Object
::
Ptr
getConsumers
(
uniset
::
ObjectId
sid
,
ConsumerListInfo
&
clist
,
bool
ifNotEmpty
=
true
);
#endif
// статистика
void
showStatisticsForConsumer
(
std
::
ostringstream
&
inf
,
const
std
::
string
&
consumer
);
void
showStatisticsForLostConsumers
(
std
::
ostringstream
&
inf
);
void
showStatisticsForConsusmers
(
std
::
ostringstream
&
inf
);
void
showStatisticsForConsumersWithLostEvent
(
std
::
ostringstream
&
inf
);
private
:
friend
class
NCRestorer
;
...
...
src/Processes/IONotifyController.cc
View file @
2f34b787
This diff is collapsed.
Click to expand it.
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