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
1e5aeae9
Commit
1e5aeae9
authored
Aug 02, 2009
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fixes in ModbusSlave
parent
349c6f51
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
10 deletions
+11
-10
libuniset.spec
conf/libuniset.spec
+1
-1
MBSlave.cc
extensions/ModbusSlave/MBSlave.cc
+5
-5
start_tcp_fg.sh
extensions/ModbusSlave/start_tcp_fg.sh
+4
-3
ModbusTypes.h
include/modbus/ModbusTypes.h
+1
-1
No files found.
conf/libuniset.spec
View file @
1e5aeae9
...
...
@@ -3,7 +3,7 @@
Name: libuniset
Version: 0.96
Release: eter3
3
Release: eter3
4
Summary: UniSet - library for building distributed industrial control systems
...
...
extensions/ModbusSlave/MBSlave.cc
View file @
1e5aeae9
...
...
@@ -821,8 +821,8 @@ ModbusRTU::mbErrCode MBSlave::readOutputRegisters( ModbusRTU::ReadOutputMessage&
if
(
reply
.
count
<
query
.
count
)
{
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(read
OutputRegisters): . "
<<
" "
<<
query
.
count
<<
"
"
<<
reply
.
count
<<
endl
;
<<
"(read
InputRegisters): query.count="
<<
query
.
count
<<
" > reply.count=
"
<<
reply
.
count
<<
endl
;
}
pingOK
=
true
;
...
...
@@ -830,7 +830,7 @@ ModbusRTU::mbErrCode MBSlave::readOutputRegisters( ModbusRTU::ReadOutputMessage&
}
catch
(
UniSetTypes
::
NameNotFound
&
ex
)
{
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(
write
OutputRegisters): "
<<
ex
<<
endl
;
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(
read
OutputRegisters): "
<<
ex
<<
endl
;
return
ModbusRTU
::
erBadDataAddress
;
}
catch
(
Exception
&
ex
)
...
...
@@ -1071,8 +1071,8 @@ mbErrCode MBSlave::readInputRegisters( ReadInputMessage& query,
if
(
reply
.
count
<
query
.
count
)
{
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(read
OutputRegisters): . "
<<
" "
<<
query
.
count
<<
"
"
<<
reply
.
count
<<
endl
;
<<
"(read
InputRegisters): query.count="
<<
query
.
count
<<
" > reply.count=
"
<<
reply
.
count
<<
endl
;
}
pingOK
=
true
;
...
...
extensions/ModbusSlave/start_tcp_fg.sh
View file @
1e5aeae9
#!/bin/sh
uniset-start.sh
-f
./uniset-mbslave
--mbs-name
MBSlave1
--confile
test
.xml
--dlog-add-levels
info,crit,warn
\
--mbs-
type
TCP
--mbs-inet-addr
127.0.0.1
--mbs-inet-port
2048
\
--mbs-
filter-field
rs
--mbs-filter-value
1
uniset-start.sh
-f
./uniset-mbslave
--mbs-name
MBSlave1
--confile
configure
.xml
--dlog-add-levels
info,crit,warn
\
--mbs-
name
MBSlave1
\
--mbs-
type
TCP
--mbs-inet-addr
127.0.0.1
--mbs-inet-port
2048
--mbs-reg-from-id
1
--mbs-my-addr
0x0
1
# --mbs-force 1
#--mbs-reg-from-id 1 \
\ No newline at end of file
include/modbus/ModbusTypes.h
View file @
1e5aeae9
...
...
@@ -52,7 +52,7 @@ namespace ModbusRTU
enum
{
/*! (c ޣ ) */
MAXLENPACKET
=
251
,
/*!< 255
- header(2) - CRC(2) */
MAXLENPACKET
=
508
,
/*!< 512
- header(2) - CRC(2) */
BroadcastAddr
=
255
/*!< */
};
...
...
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