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
be3c2b3c
Commit
be3c2b3c
authored
Sep 17, 2010
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug:
http://bugs.etersoft.ru/show_bug.cgi?id=6036
(не выставлялись датчики связи)
parent
6349baca
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
6 deletions
+15
-6
start_fg.sh
Utilities/SMonit/start_fg.sh
+1
-1
test.xml
conf/test.xml
+6
-2
MBTCPMaster.cc
extensions/MBTCPMaster/MBTCPMaster.cc
+3
-1
start_fg.sh
extensions/MBTCPMaster/start_fg.sh
+2
-1
RTUExchange.cc
extensions/RTUExchange/RTUExchange.cc
+3
-1
No files found.
Utilities/SMonit/start_fg.sh
View file @
be3c2b3c
#!/bin/sh
uniset-start.sh
-f
./uniset-smonit
--name
TestProc
--confile
test.xml
--unideb-add-levels
system,info,level9
uniset-start.sh
-f
./uniset-smonit
--name
TestProc
--confile
test.xml
--unideb-add-levels
system,info,level9
$*
conf/test.xml
View file @
be3c2b3c
...
...
@@ -62,7 +62,11 @@
<MBMaster1
name=
"MBMaster1"
iaddr=
"127.0.0.1"
addr=
"0x31"
port=
"30000"
levels=
"info,warn,crit"
poll_time=
"200"
reply_timeout=
"60"
/>
>
<DeviceList>
<item
addr=
"0x02"
respondSensor=
"RespondRTU_S"
timeout=
"5000"
invert=
"0"
/>
</DeviceList>
</MBMaster1>
<MBSlave1
name=
"MBSlave1"
dev=
"/dev/ttyS0"
addr=
"0x31"
speed=
"9600"
aftersend-pause=
"0"
levels=
"info,warn,crit"
poll_time=
"200"
reply_timeout=
"60"
...
...
@@ -84,7 +88,7 @@
<RTUExchange
name=
"RTUExchange"
speed=
"38400"
>
<DeviceList>
<item
addr=
"0x0
2"
force_disconnect=
"
1"
speed=
"9600"
respondSensor=
"RespondRTU_S"
timeout=
"5000"
invert=
"0"
/>
<item
addr=
"0x01"
speed=
"9600"
respondSensor=
"RespondRTU_S"
timeout=
"5000"
invert=
"0"
/>
</DeviceList>
</RTUExchange>
...
...
extensions/MBTCPMaster/MBTCPMaster.cc
View file @
be3c2b3c
...
...
@@ -542,7 +542,7 @@ bool MBTCPMaster::pollRTU( RTUDevice* dev, RegMap::iterator& it )
bool
MBTCPMaster
::
RTUDevice
::
checkRespond
()
{
bool
prev
=
resp_state
;
if
(
resp_trTimeout
.
change
(
resp_real
)
)
if
(
resp_trTimeout
.
hi
(
resp_real
)
)
{
if
(
resp_real
)
resp_state
=
true
;
...
...
@@ -557,7 +557,9 @@ bool MBTCPMaster::RTUDevice::checkRespond()
// то возвращаем true, чтобы оно принудительно сохранилось
if
(
!
resp_init
)
{
resp_state
=
resp_real
;
resp_init
=
true
;
prev
=
resp_state
;
return
true
;
}
...
...
extensions/MBTCPMaster/start_fg.sh
View file @
be3c2b3c
...
...
@@ -9,6 +9,7 @@ uniset-start.sh -f ./uniset-mbtcpmaster \
--mbtcp-filter-value
1
\
--mbtcp-gateway-iaddr
127.0.0.1
\
--mbtcp-gateway-port
2048
\
--mbtcp-recv-timeout
5000
--mbtcp-recv-timeout
5000
\
--mbtcp-force-disconnect
1
#--mbtcp-filter-field mbtcp --mbtcp-filter-value 1
extensions/RTUExchange/RTUExchange.cc
View file @
be3c2b3c
...
...
@@ -564,7 +564,7 @@ bool RTUExchange::pollRTU( RTUDevice* dev, RegMap::iterator& it )
bool
RTUExchange
::
RTUDevice
::
checkRespond
()
{
bool
prev
=
resp_state
;
if
(
resp_trTimeout
.
change
(
resp_real
)
)
if
(
resp_trTimeout
.
hi
(
resp_real
)
)
{
if
(
resp_real
)
resp_state
=
true
;
...
...
@@ -579,7 +579,9 @@ bool RTUExchange::RTUDevice::checkRespond()
// то возвращаем true, чтобы оно принудительно сохранилось
if
(
!
resp_init
)
{
resp_state
=
resp_real
;
resp_init
=
true
;
prev
=
resp_state
;
return
true
;
}
...
...
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