-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into logging-config
- Loading branch information
Showing
16 changed files
with
172 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,11 @@ | ||
/autom4te.cache | ||
/config.cache | ||
/config.h | ||
/config.status | ||
/.settings/ | ||
/src/.deps/ | ||
/src/*.o | ||
/src/mbusd | ||
/doc/mbusd.8 | ||
Makefile | ||
/.settings | ||
*.log | ||
*.in~ | ||
systemd-units/[email protected] | ||
*.conf | ||
*.pyc | ||
CMakeCache.txt | ||
CMakeFiles | ||
CPackConfig.cmake | ||
CPackSourceConfig.cmake | ||
cmake_install.cmake | ||
.idea | ||
*~ | ||
/.idea | ||
/.vscode | ||
.project | ||
.cproject | ||
build | ||
.pydevproject | ||
/build | ||
build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright (c) 2002-2003, 2013-2022 Victor Antonovich ([email protected]) | ||
Copyright (c) 2002-2003, 2013-2023 Victor Antonovich ([email protected]) | ||
Copyright (c) 2011 Andrew Denysenko <[email protected]> | ||
All rights reserved. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,52 +114,60 @@ void | |
usage(char *exename) | ||
{ | ||
cfg_init(); | ||
printf("%s-%s Copyright (C) 2002-2003, 2011, 2013-2022 Victor Antonovich <[email protected]>, " | ||
printf("%s-%s Copyright (C) 2002-2003, 2011, 2013-2023 Victor Antonovich <[email protected]>, " | ||
"Andrew Denysenko <[email protected]>\n\n" | ||
"Usage: %s [-h] [-d] " | ||
#ifdef LOG | ||
"[-L logfile] [-v level] " | ||
#endif | ||
"[-c cfgfile] \n" | ||
" [-p device] [-s speed] [-m mode]\n" | ||
" [-p device] [-s speed] [-m mode]" | ||
#ifdef HAVE_TIOCRS485 | ||
" [-S]" | ||
#endif | ||
"\n" | ||
#ifdef TRXCTL | ||
" [-t] [-y sysfsfile] [-Y sysfsfile]\n" | ||
" [-t] [-r] [-y sysfsfile] [-Y sysfsfile]\n" | ||
#endif | ||
" [-A address] [-P port] [-C maxconn] [-N retries]\n" | ||
" [-R pause] [-W wait] [-T timeout] [-b]\n\n" | ||
"Options:\n" | ||
" -h : this help\n" | ||
" -d : don't daemonize\n" | ||
#ifdef LOG | ||
" -L logfile : set log file name (default %s%s, \n" | ||
" -L logfile : set log file name (default is %s%s, \n" | ||
" '-' for logging to STDOUT only)\n" | ||
#ifdef DEBUG | ||
" -v level : set log level (0-9, default %d, 0 - errors only)\n" | ||
" -v level : set log level (0-9, default is %d, 0 - errors only)\n" | ||
#else | ||
" -v level : set log level (0-2, default %d, 0 - errors only)\n" | ||
#endif | ||
#endif | ||
" -c cfgfile : read configuration from cfgfile\n" | ||
" -p device : set serial port device name (default %s)\n" | ||
" -s speed : set serial port speed (default %d)\n" | ||
" -m mode : set serial port mode (default %s)\n" | ||
" -A address : set TCP server address to bind (default %s)\n" | ||
" -P port : set TCP server port number (default %d)\n" | ||
" -p device : set serial port device name (default is %s)\n" | ||
" -s speed : set serial port speed (default is %d)\n" | ||
" -m mode : set serial port mode (default is %s)\n" | ||
#ifdef HAVE_TIOCRS485 | ||
" -S : enable Linux RS-485 support for given serial port device\n" | ||
#endif | ||
" -A address : set TCP server address to bind (default is %s)\n" | ||
" -P port : set TCP server port number (default is %d)\n" | ||
#ifdef TRXCTL | ||
" -t : enable RTS RS-485 data direction control using RTS\n" | ||
" -t : enable RTS RS-485 data direction control using RTS, active transmit\n" | ||
" -r : enable RTS RS-485 data direction control using RTS, active receive\n" | ||
" -y : enable RTS RS-485 data direction control using sysfs file, active transmit\n" | ||
" -Y : enable RTS RS-485 data direction control using sysfs file, active receive\n" | ||
#endif | ||
" -C maxconn : set maximum number of simultaneous TCP connections\n" | ||
" (1-%d, default %d)\n" | ||
" (1-%d, default is %d)\n" | ||
" -N retries : set maximum number of request retries\n" | ||
" (0-%d, default %d, 0 - without retries)\n" | ||
" (0-%d, default is %d, 0 disables retrying)\n" | ||
" -R pause : set pause between requests in milliseconds\n" | ||
" (1-%d, default %lu)\n" | ||
" (1-%d, default is %lu)\n" | ||
" -W wait : set response wait time in milliseconds\n" | ||
" (1-%d, default %lu)\n" | ||
" (1-%d, default is %lu)\n" | ||
" -T timeout : set connection timeout value in seconds\n" | ||
" (0-%d, default %d, 0 - no timeout)\n" | ||
" (0-%d, default is %d, 0 disables timeout)\n" | ||
" -b : enable reply on broadcast" | ||
"\n", PACKAGE, VERSION, exename, | ||
#ifdef LOG | ||
|
@@ -197,6 +205,9 @@ main(int argc, char *argv[]) | |
#ifdef TRXCTL | ||
"ty:Y:" | ||
#endif | ||
#ifdef HAVE_TIOCRS485 | ||
"S" | ||
#endif | ||
#ifdef LOG | ||
"v:L:" | ||
#endif | ||
|
@@ -223,16 +234,24 @@ main(int argc, char *argv[]) | |
break; | ||
#ifdef TRXCTL | ||
case 't': | ||
cfg.trxcntl = TRX_RTS; | ||
cfg.trxcntl = TRX_RTS_1; | ||
break; | ||
case 'r': | ||
cfg.trxcntl = TRX_RTS_0; | ||
break; | ||
case 'y': | ||
cfg.trxcntl = TRX_SYSFS_1; | ||
strncpy(cfg.trxcntl_file, optarg, INTBUFSIZE); | ||
break; | ||
break; | ||
case 'Y': | ||
cfg.trxcntl = TRX_SYSFS_0; | ||
strncpy(cfg.trxcntl_file, optarg, INTBUFSIZE); | ||
break; | ||
break; | ||
#endif | ||
#ifdef HAVE_TIOCRS485 | ||
case 'S': | ||
cfg.rs485 = TRUE; | ||
break; | ||
#endif | ||
#ifdef LOG | ||
case 'v': | ||
|
Oops, something went wrong.