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
9f8ee6f2
Commit
9f8ee6f2
authored
Jun 05, 2009
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new version
parent
bd74e4e3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
RTUExchange.cc
extentions/RTUExchange/RTUExchange.cc
+12
-2
RTUExchange.h
extentions/RTUExchange/RTUExchange.h
+3
-0
No files found.
extentions/RTUExchange/RTUExchange.cc
View file @
9f8ee6f2
...
...
@@ -17,7 +17,9 @@ initPause(0),
force
(
false
),
force_out
(
false
),
mbregFromID
(
false
),
activated
(
false
)
activated
(
false
),
rs_pre_clean
(
false
),
noQueryOptimization
(
false
)
{
cout
<<
"$Id: RTUExchange.cc,v 1.4 2009/01/23 23:56:54 vpashka Exp $"
<<
endl
;
...
...
@@ -51,6 +53,9 @@ activated(false)
recv_timeout
=
atoi
(
conf
->
getArgParam
(
"--rs-recv-timeout"
,
it
.
getProp
(
"recv_timeout"
)).
c_str
());
rs_pre_clean
=
atoi
(
conf
->
getArgParam
(
"--rs-pre-clean"
,
it
.
getProp
(
"pre_clean"
)).
c_str
());
noQueryOptimization
=
atoi
(
conf
->
getArgParam
(
"--rs-no-query-optimization"
,
it
.
getProp
(
"no_query_optimization"
)).
c_str
());
mbregFromID
=
atoi
(
conf
->
getArgParam
(
"--mbs-reg-from-id"
,
it
.
getProp
(
"reg_from_id"
)).
c_str
());
dlog
[
Debug
::
INFO
]
<<
myname
<<
"(init): mbregFromID="
<<
mbregFromID
<<
endl
;
...
...
@@ -260,8 +265,9 @@ void RTUExchange::poll()
try
{
//#warning For Debug
if
(
rs_pre_clean
)
mb
->
cleanupChannel
();
d
->
rtu
->
poll
(
mb
);
d
->
resp_real
=
true
;
}
...
...
@@ -283,6 +289,7 @@ void RTUExchange::poll()
{
if
(
d
->
dtype
==
RTUExchange
::
dtRTU
||
d
->
dtype
==
RTUExchange
::
dtMTR
)
{
if
(
rs_pre_clean
)
mb
->
cleanupChannel
();
if
(
pollRTU
(
d
,
it
)
)
d
->
resp_real
=
true
;
...
...
@@ -1484,6 +1491,9 @@ std::ostream& operator<<( std::ostream& os, RTUExchange::RegInfo& r )
// -----------------------------------------------------------------------------
void
RTUExchange
::
rtuQueryOptimization
(
RTUDeviceMap
&
m
)
{
if
(
noQueryOptimization
)
return
;
dlog
[
Debug
::
INFO
]
<<
myname
<<
"(rtuQueryOptimization): optimization..."
<<
endl
;
for
(
RTUExchange
::
RTUDeviceMap
::
iterator
it1
=
m
.
begin
();
it1
!=
m
.
end
();
++
it1
)
...
...
extentions/RTUExchange/RTUExchange.h
View file @
9f8ee6f2
...
...
@@ -236,6 +236,9 @@ class RTUExchange:
bool
activated
;
int
activateTimeout
;
bool
rs_pre_clean
;
bool
noQueryOptimization
;
};
// -----------------------------------------------------------------------------
#endif // _RS_EXCHANGE_H_
...
...
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