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
26d5e356
Commit
26d5e356
authored
May 13, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(ModbusMaster): исправление "ошибки" с нестабильностью связи и периодическим
возникновением timeout (thank`s ilap@etersoft.ru)
parent
1f2ce030
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
libuniset.spec
conf/libuniset.spec
+4
-1
ModbusTCPMaster.cc
src/Communications/Modbus/ModbusTCPMaster.cc
+11
-3
No files found.
conf/libuniset.spec
View file @
26d5e356
...
...
@@ -8,7 +8,7 @@
Name: libuniset
Version: 1.8
Release: alt
5
Release: alt
6
Summary: UniSet - library for building distributed industrial control systems
License: GPL
...
...
@@ -339,6 +339,9 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
%changelog
* Wed May 13 2015 Pavel Vainerman <pv@altlinux.ru> 1.8-alt6
- ModbusMaster: fixed bug: unstable timeout...( thank`s ilyap@etersoft.ru)
* Thu Mar 19 2015 Pavel Vainerman <pv@altlinux.ru> 1.8-alt5
- unetudp: fxied critial bug in "switching channels" (thank`s Alexey Surov)
...
...
src/Communications/Modbus/ModbusTCPMaster.cc
View file @
26d5e356
...
...
@@ -197,9 +197,17 @@ mbErrCode ModbusTCPMaster::query( ModbusAddr addr, ModbusMessage& msg,
}
//
// timeout = ptTimeout.getLeft(timeout);
// в tcp ответе задержек уже не должно быть..
mbErrCode
res
=
recv
(
addr
,
msg
.
func
,
reply
,
1
);
//timeout);
timeout
=
ptTimeout
.
getLeft
(
timeout
);
if
(
timeout
<=
0
)
{
if
(
dlog
.
debugging
(
Debug
::
WARN
)
)
dlog
[
Debug
::
WARN
]
<<
"(ModbusTCPMaster::query): processing reply timeout.."
<<
endl
;
return
erTimeOut
;
// return erHardwareError;
}
mbErrCode
res
=
recv
(
addr
,
msg
.
func
,
reply
,
timeout
);
if
(
force_disconnect
)
{
...
...
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