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
4b35c8a3
Commit
4b35c8a3
authored
Oct 29, 2014
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(modbus slave): убрал упоминание ключика "-t"(timeout). Для Slave
он не имеет смысла.
parent
68a8a5ff
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
13 deletions
+1
-13
mbrtuslave.cc
Utilities/MBTester/mbrtuslave.cc
+0
-6
mbtcpserver.cc
Utilities/MBTester/mbtcpserver.cc
+1
-7
No files found.
Utilities/MBTester/mbrtuslave.cc
View file @
4b35c8a3
...
...
@@ -22,7 +22,6 @@ static struct option longopts[] = {
static
void
print_help
()
{
printf
(
"-h|--help - this message
\n
"
);
printf
(
"[-t|--timeout] msec - Timeout. Default: 2000.
\n
"
);
printf
(
"[-v|--verbose] - Print all messages to stdout
\n
"
);
printf
(
"[-d|--device] dev - use device dev. Default: /dev/ttyS0
\n
"
);
printf
(
"[-a|--myaddr] addr - Modbus address for master. Default: 0x01.
\n
"
);
...
...
@@ -42,7 +41,6 @@ int main( int argc, char **argv )
string
dev
(
"/dev/ttyS0"
);
string
speed
(
"38400"
);
ModbusRTU
::
ModbusAddr
myaddr
=
0x01
;
int
tout
=
2000
;
DebugStream
dlog
;
int
use485
=
0
;
int
replyVal
=-
1
;
...
...
@@ -67,10 +65,6 @@ int main( int argc, char **argv )
speed
=
string
(
optarg
);
break
;
case
't'
:
tout
=
uni_atoi
(
optarg
);
break
;
case
'a'
:
myaddr
=
ModbusRTU
::
str2mbAddr
(
optarg
);
break
;
...
...
Utilities/MBTester/mbtcpserver.cc
View file @
4b35c8a3
...
...
@@ -23,7 +23,6 @@ static void print_help()
{
printf
(
"Example: uniset-mbtcpserver-echo -i localhost -p 2049 -v
\n
"
);
printf
(
"-h|--help - this message
\n
"
);
printf
(
"[-t|--timeout] msec - Timeout. Default: 2000.
\n
"
);
printf
(
"[-v|--verbose] - Print all messages to stdout
\n
"
);
printf
(
"[-i|--iaddr] ip - Server listen ip. Default 127.0.0.1
\n
"
);
printf
(
"[-a|--myaddr] addr - Modbus address for master. Default: 0x01.
\n
"
);
...
...
@@ -40,7 +39,6 @@ int main( int argc, char **argv )
int
port
=
502
;
string
iaddr
(
"127.0.0.1"
);
ModbusRTU
::
ModbusAddr
myaddr
=
0x01
;
int
tout
=
2000
;
DebugStream
dlog
;
bool
ignoreAddr
=
false
;
int
replyVal
=-
1
;
...
...
@@ -49,7 +47,7 @@ int main( int argc, char **argv )
try
{
while
(
(
opt
=
getopt_long
(
argc
,
argv
,
"h
t:
va:p:i:bxc:"
,
longopts
,
&
optindex
))
!=
-
1
)
while
(
(
opt
=
getopt_long
(
argc
,
argv
,
"hva:p:i:bxc:"
,
longopts
,
&
optindex
))
!=
-
1
)
{
switch
(
opt
)
{
...
...
@@ -65,10 +63,6 @@ int main( int argc, char **argv )
port
=
uni_atoi
(
optarg
);
break
;
case
't'
:
tout
=
uni_atoi
(
optarg
);
break
;
case
'a'
:
myaddr
=
ModbusRTU
::
str2mbAddr
(
optarg
);
break
;
...
...
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