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
00c63f2c
Commit
00c63f2c
authored
Nov 18, 2011
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(ModbusMaster): исправлена ошибка в предыдущем коммите
parent
e83a017b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
7 deletions
+6
-7
test.xml
conf/test.xml
+3
-3
MBTCPMaster.cc
extensions/ModbusMaster/MBTCPMaster.cc
+1
-2
RTUExchange.cc
extensions/ModbusMaster/RTUExchange.cc
+1
-1
start_fg_mbtcp.sh
extensions/ModbusMaster/start_fg_mbtcp.sh
+1
-1
No files found.
conf/test.xml
View file @
00c63f2c
...
...
@@ -105,7 +105,7 @@
<sensors
name=
"Sensors"
>
<item
db_ignore=
"1"
default=
"1"
iotype=
"DI"
name=
"Input1_S"
priority=
"Medium"
textname=
"Команда 1"
/>
<item
iotype=
"DI"
mbaddr=
"0x01"
mbfunc=
"0x04"
mbreg=
"0x02"
mbtype=
"rtu"
name=
"Input2_S"
priority=
"Medium"
rs=
"2"
textname=
"Команда 2"
/>
<item
iotype=
"DI"
mbtcp=
"1"
name=
"Input3_S"
priority=
"Medium"
tcp_mbaddr=
"0x02"
tcp_mbfunc=
"0x03"
tcp_mbreg=
"0x02"
tcp_mbtype=
"rtu"
tcp_preinit=
"1"
textname=
"Команда 3"
/>
<item
iotype=
"DI"
mbtcp=
"1"
name=
"Input3_S"
priority=
"Medium"
mbtcp_mbaddr=
"0x02"
mbtcp_mbfunc=
"0x03"
mbtcp_mbreg=
"0x02"
mbtcp_mbtype=
"rtu"
mb
tcp_preinit=
"1"
textname=
"Команда 3"
/>
<item
iotype=
"DI"
mbaddr=
"0x02"
mbfunc=
"0x04"
mbreg=
"0x02"
mbtype=
"rtu"
name=
"Input4_S"
priority=
"Medium"
rs=
"2"
textname=
"Команда 4"
/>
<item
iotype=
"DI"
name=
"Input5_S"
priority=
"Medium"
textname=
"Команда 5"
udp=
"2"
/>
<item
iotype=
"DI"
name=
"Input6_S"
priority=
"Medium"
textname=
"Команда 6"
udp=
"2"
>
...
...
@@ -141,8 +141,8 @@
<item
default=
"65536045"
iotype=
"AI"
mb_vtype=
"F2"
mbaddr=
"0x01"
mbreg=
"0x17"
mbtcp=
"2"
mbtype=
"rtu"
name=
"MB3_AS"
priority=
"Medium"
textname=
"Analog input"
/>
<item
iotype=
"AI"
name=
"IOTestMode_AS"
priority=
"Medium"
textname=
"testmode for IOControl"
/>
<item
name=
"imitator_performance1"
precision=
"6"
textname=
"Производительность танка 1"
iotype=
"AI"
rs=
"mbslave"
mbreg=
"43"
mb_vtype=
"I2"
/>
<item
name=
"performance1"
precision=
"6"
noprecision=
"1"
textname=
"Производительность танка 1"
iotype=
"AI"
rs=
"mbmaster"
tcp_vtype=
"I2"
tcp_mbtype=
"rtu"
tcp_mbaddr=
"1"
tcp_mbreg=
"43"
tcp_mbfunc=
"0x04"
/>
<item
name=
"performance1"
precision=
"6"
noprecision=
"1"
textname=
"Производительность танка 1"
iotype=
"AI"
rs=
"mbmaster"
mbtcp_vtype=
"I2"
mb
tcp_mbtype=
"rtu"
mbtcp_mbaddr=
"1"
mbtcp_mbreg=
"43"
mb
tcp_mbfunc=
"0x04"
/>
<item
iotype=
"DI"
name=
"Message1"
priority=
"Medium"
textname=
"Текст сообщения 1"
/>
<item
iotype=
"AI"
name=
"MB1_Mode_AS"
priority=
"Medium"
textname=
"ModbusExchange Mode"
/>
</sensors>
...
...
extensions/ModbusMaster/MBTCPMaster.cc
View file @
00c63f2c
...
...
@@ -20,7 +20,6 @@ pollThread(0)
if
(
objId
==
DefaultObjectId
)
throw
UniSetTypes
::
SystemError
(
"(MBTCPMaster): objId=-1?!! Use --"
+
prefix
+
"-name"
);
// префикс для "свойств" - по умолчанию
prop_prefix
=
"tcp_"
;
// если задано поле для "фильтрации"
...
...
@@ -35,7 +34,7 @@ pollThread(0)
if
(
!
v
.
empty
()
)
prop_prefix
=
v
;
// если параметр всё-таки указан, считаем, что это попытка задать "пустой" префикс
else
if
(
findArgParam
(
p
,
conf
->
getArgc
(),
conf
->
getArgv
())
!=
-
1
);
else
if
(
findArgParam
(
p
,
conf
->
getArgc
(),
conf
->
getArgv
())
!=
-
1
)
prop_prefix
=
""
;
}
...
...
extensions/ModbusMaster/RTUExchange.cc
View file @
00c63f2c
...
...
@@ -34,7 +34,7 @@ rs_pre_clean(false)
if
(
!
v
.
empty
()
)
prop_prefix
=
v
;
// если параметр всё-таки указан, считаем, что это попытка задать "пустой" префикс
else
if
(
findArgParam
(
p
,
conf
->
getArgc
(),
conf
->
getArgv
())
!=
-
1
);
else
if
(
findArgParam
(
p
,
conf
->
getArgc
(),
conf
->
getArgv
())
!=
-
1
)
prop_prefix
=
""
;
}
...
...
extensions/ModbusMaster/start_fg_mbtcp.sh
View file @
00c63f2c
...
...
@@ -13,6 +13,6 @@
--mbtcp-force-disconnect
1
\
--mbtcp-polltime
5000
\
--mbtcp-exchange-mode-id
MB1_Mode_AS
\
--mbtcp-set-prop-prefix
tcp_
#
--mbtcp-set-prop-prefix tcp_
#--mbtcp-filter-field mbtcp --mbtcp-filter-value 1
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