@@ -88,18 +88,18 @@ int main(int argc, char **argv) {
88
88
(" m,monitor" ,
89
89
" output all incoming and outgoing packets to stdout" )
90
90
(" r,reconnect" ,
91
- " do not terminate if Master disconnects." )
91
+ " do not terminate if the Modbus master disconnects." )
92
92
(" byte-timeout" ,
93
93
" timeout interval in seconds between two consecutive bytes of the same message. "
94
- " In most cases it is sufficient to set teh response timeout. "
94
+ " In most cases it is sufficient to set the response timeout. "
95
95
" Fractional values are possible." ,
96
96
cxxopts::value<double >())
97
97
(" response-timeout" ,
98
98
" set the timeout interval in seconds used to wait for a response. "
99
- " When a byte timeout is set, if elapsed time for the first byte of response is longer than "
100
- " the given timeout, a timeout is detected. "
99
+ " When a byte timeout is set, if the elapsed time for the first byte of response is longer "
100
+ " than the given timeout, a timeout is detected. "
101
101
" When byte timeout is disabled, the full confirmation response must be received before "
102
- " expiration of the response timeout."
102
+ " expiration of the response timeout. "
103
103
" Fractional values are possible." ,
104
104
cxxopts::value<double >())
105
105
#ifdef OS_LINUX
@@ -231,8 +231,9 @@ int main(int argc, char **argv) {
231
231
do {
232
232
// connect client
233
233
std::cerr << " Waiting for Master to establish a connection..." << std::endl;
234
+ std::string client;
234
235
try {
235
- slave->connect_client ();
236
+ client = slave->connect_client ();
236
237
} catch (const std::runtime_error &e) {
237
238
if (!terminate) {
238
239
std::cerr << e.what () << std::endl;
@@ -241,7 +242,7 @@ int main(int argc, char **argv) {
241
242
break ;
242
243
}
243
244
244
- std::cerr << " Master established connection." << std::endl;
245
+ std::cerr << " Master ( " << client << " ) established connection." << std::endl;
245
246
246
247
// ========== MAIN LOOP ========== (handle requests)
247
248
bool connection_closed = false ;
0 commit comments