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
5770e892
Commit
5770e892
authored
Jun 05, 2013
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(modbus): добавил параметр --xxx-aftersend-pause для возможности задать
паузу после посылки запроса.
parent
f0086a26
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
1 deletion
+13
-1
TODO
TODO
+1
-0
libuniset.spec
conf/libuniset.spec
+4
-1
MBExchange.cc
extensions/ModbusMaster/MBExchange.cc
+3
-0
MBExchange.h
extensions/ModbusMaster/MBExchange.h
+2
-0
MBTCPMaster.cc
extensions/ModbusMaster/MBTCPMaster.cc
+2
-0
RTUExchange.cc
extensions/ModbusMaster/RTUExchange.cc
+1
-0
No files found.
TODO
View file @
5770e892
...
...
@@ -29,6 +29,7 @@ iocontrol:
- добавить ещё один вид сигналов (настройку) "работа по переднему фронту".
Т.е. сигнал меняет своё состояние по изменению входного (типа для кнопок без фиксации). "trigger"(обрабатывать после jar_delay)
Version 2.0
============
- отказаться от функций getState,setState,saveState,saveValue и оставить только getValue/setValue.
...
...
conf/libuniset.spec
View file @
5770e892
...
...
@@ -7,7 +7,7 @@
Name: libuniset
Version: 1.6
Release: alt
9
Release: alt
10
Summary: UniSet - library for building distributed industrial control systems
...
...
@@ -319,6 +319,9 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Wed Jun 05 2013 Pavel Vainerman <pv@altlinux.ru> 1.6-alt10
- add for ModbusMaster (RTU|TCP) --xxx--aftersend-pause
* Tue May 14 2013 Pavel Vainerman <pv@altlinux.ru> 1.6-alt9
- add for Modbus (RTU|TCP) exchange --xxx-reopen-timeout msec. (eterbug #9296)
...
...
extensions/ModbusMaster/MBExchange.cc
View file @
5770e892
...
...
@@ -68,6 +68,9 @@ pollActivated(false)
tout
=
conf
->
getArgPInt
(
"--"
+
prefix
+
"-reopen-timeout"
,
it
.
getProp
(
"reopen_timeout"
),
10000
);
ptReopen
.
setTiming
(
tout
);
aftersend_pause
=
conf
->
getArgPInt
(
"--"
+
prefix
+
"-aftersend-pause"
,
it
.
getProp
(
"aftersend_pause"
),
0
);
noQueryOptimization
=
conf
->
getArgInt
(
"--"
+
prefix
+
"-no-query-optimization"
,
it
.
getProp
(
"no_query_optimization"
));
mbregFromID
=
conf
->
getArgInt
(
"--"
+
prefix
+
"-reg-from-id"
,
it
.
getProp
(
"reg_from_id"
));
...
...
extensions/ModbusMaster/MBExchange.h
View file @
5770e892
...
...
@@ -314,6 +314,8 @@ class MBExchange:
bool
pollActivated
;
int
recv_timeout
;
int
aftersend_pause
;
PassiveTimer
ptReopen
;
/*!< таймер для переоткрытия соединения */
Trigger
trReopen
;
...
...
extensions/ModbusMaster/MBTCPMaster.cc
View file @
5770e892
...
...
@@ -103,6 +103,8 @@ ModbusClient* MBTCPMaster::initMB( bool reopen )
mbtcp
->
setTimeout
(
recv_timeout
);
mbtcp
->
setSleepPause
(
sleepPause_usec
);
mbtcp
->
setAfterSendPause
(
aftersend_pause
);
dlog
[
Debug
::
INFO
]
<<
myname
<<
"(init): ipaddr="
<<
iaddr
<<
" port="
<<
port
<<
endl
;
...
...
extensions/ModbusMaster/RTUExchange.cc
View file @
5770e892
...
...
@@ -128,6 +128,7 @@ ModbusClient* RTUExchange::initMB( bool reopen )
mbrtu
->
setTimeout
(
recv_timeout
);
mbrtu
->
setSleepPause
(
sleepPause_usec
);
mbrtu
->
setAfterSendPause
(
aftersend_pause
);
dlog
[
Debug
::
INFO
]
<<
myname
<<
"(init): dev="
<<
devname
<<
" speed="
<<
ComPort
::
getSpeed
(
mbrtu
->
getSpeed
()
)
<<
endl
;
}
...
...
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