DEV: help output added

This commit is contained in:
Christos Houtouridis 2019-10-06 17:07:09 +03:00
parent 2a53273fba
commit cfb52ee609
2 changed files with 14 additions and 3 deletions

2
.gitignore vendored
View File

@ -4,4 +4,4 @@ Doc/*
*Debug
*Release
*bin

View File

@ -74,7 +74,16 @@ int parse_args (settings_t *s, int argc, char const *argv[]) {
case 's': s->sendTimeout.tv_sec = atoi (optarg); break;
case 'w': s->me = atoi (optarg); break;
case 't': s->trackTime = true; break;
case 'h': printf ("This will be the help text\n"); break;
case 'h':
printf ("Syntax:\nrtes_final [-t] [-v num] [-i num] [-p num] [-s num] [-w num]\n\n");
printf ("-v, --outlevel num: Change the verbosity of the program, num can be 0, 1 or 2\n");
printf ("-i, --interval sec: Set the interval of the seeker in [sec]\n");
printf ("-p, --pingtimeout sec: Set the ping timeout in [sec]\n");
printf ("-s, --sendtimeout sec: Set the connect/send timeout in [sec]\n");
printf ("-w, --who AEM: Select the AEM of the device\n");
printf ("-t, --tracktime: Enables time tracking in statistics\n");
printf ("-h, --help: Print this and exit\n");
exit(1);
case ':':
default:
case '?':
@ -86,7 +95,9 @@ int parse_args (settings_t *s, int argc, char const *argv[]) {
return 0;
}
/*!
* Main function
*/
int main (int argc, char const *argv[]) {
// get command line arguments