Commit 4b35c8a3 authored by Pavel Vainerman's avatar Pavel Vainerman

(modbus slave): убрал упоминание ключика "-t"(timeout). Для Slave

он не имеет смысла.
parent 68a8a5ff
...@@ -22,7 +22,6 @@ static struct option longopts[] = { ...@@ -22,7 +22,6 @@ static struct option longopts[] = {
static void print_help() static void print_help()
{ {
printf("-h|--help - this message\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("[-v|--verbose] - Print all messages to stdout\n");
printf("[-d|--device] dev - use device dev. Default: /dev/ttyS0\n"); printf("[-d|--device] dev - use device dev. Default: /dev/ttyS0\n");
printf("[-a|--myaddr] addr - Modbus address for master. Default: 0x01.\n"); printf("[-a|--myaddr] addr - Modbus address for master. Default: 0x01.\n");
...@@ -42,7 +41,6 @@ int main( int argc, char **argv ) ...@@ -42,7 +41,6 @@ int main( int argc, char **argv )
string dev("/dev/ttyS0"); string dev("/dev/ttyS0");
string speed("38400"); string speed("38400");
ModbusRTU::ModbusAddr myaddr = 0x01; ModbusRTU::ModbusAddr myaddr = 0x01;
int tout = 2000;
DebugStream dlog; DebugStream dlog;
int use485 = 0; int use485 = 0;
int replyVal=-1; int replyVal=-1;
...@@ -67,10 +65,6 @@ int main( int argc, char **argv ) ...@@ -67,10 +65,6 @@ int main( int argc, char **argv )
speed = string(optarg); speed = string(optarg);
break; break;
case 't':
tout = uni_atoi(optarg);
break;
case 'a': case 'a':
myaddr = ModbusRTU::str2mbAddr(optarg); myaddr = ModbusRTU::str2mbAddr(optarg);
break; break;
......
...@@ -23,7 +23,6 @@ static void print_help() ...@@ -23,7 +23,6 @@ static void print_help()
{ {
printf("Example: uniset-mbtcpserver-echo -i localhost -p 2049 -v \n"); printf("Example: uniset-mbtcpserver-echo -i localhost -p 2049 -v \n");
printf("-h|--help - this message\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("[-v|--verbose] - Print all messages to stdout\n");
printf("[-i|--iaddr] ip - Server listen ip. Default 127.0.0.1\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"); printf("[-a|--myaddr] addr - Modbus address for master. Default: 0x01.\n");
...@@ -40,7 +39,6 @@ int main( int argc, char **argv ) ...@@ -40,7 +39,6 @@ int main( int argc, char **argv )
int port = 502; int port = 502;
string iaddr("127.0.0.1"); string iaddr("127.0.0.1");
ModbusRTU::ModbusAddr myaddr = 0x01; ModbusRTU::ModbusAddr myaddr = 0x01;
int tout = 2000;
DebugStream dlog; DebugStream dlog;
bool ignoreAddr = false; bool ignoreAddr = false;
int replyVal=-1; int replyVal=-1;
...@@ -49,7 +47,7 @@ int main( int argc, char **argv ) ...@@ -49,7 +47,7 @@ int main( int argc, char **argv )
try try
{ {
while( (opt = getopt_long(argc, argv, "ht:va:p:i:bxc:",longopts,&optindex)) != -1 ) while( (opt = getopt_long(argc, argv, "hva:p:i:bxc:",longopts,&optindex)) != -1 )
{ {
switch (opt) switch (opt)
{ {
...@@ -65,10 +63,6 @@ int main( int argc, char **argv ) ...@@ -65,10 +63,6 @@ int main( int argc, char **argv )
port = uni_atoi(optarg); port = uni_atoi(optarg);
break; break;
case 't':
tout = uni_atoi(optarg);
break;
case 'a': case 'a':
myaddr = ModbusRTU::str2mbAddr(optarg); myaddr = ModbusRTU::str2mbAddr(optarg);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment