aboutsummaryrefslogtreecommitdiffstats
path: root/src/Utils.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-04-16 10:15:25 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-04-16 10:15:25 +0200
commit5e08ec5d0d71857b21536221f6fda9c936afa7e0 (patch)
tree6492bc3d1315aa285ad0424e0f71a8de7bee5f4c /src/Utils.cpp
parenta878abd2aa41f530a558ee83639832d907a24029 (diff)
downloaddabmod-5e08ec5d0d71857b21536221f6fda9c936afa7e0.tar.gz
dabmod-5e08ec5d0d71857b21536221f6fda9c936afa7e0.tar.bz2
dabmod-5e08ec5d0d71857b21536221f6fda9c936afa7e0.zip
Do not compile useless files for easydabv3
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r--src/Utils.cpp36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 4d97359..50af4fb 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -62,12 +62,14 @@ static void printHeader()
"SSE " <<
#endif
"\n";
+
+#if defined(BUILD_FOR_EASYDABV3)
+ std::cerr << " This is a build for the EasyDABv3 board" << std::endl;
+#endif
}
void printUsage(const char* progName)
{
- printHeader();
-
FILE* out = stderr;
fprintf(out, "Usage with configuration file:\n");
fprintf(out, "\t%s config_file.ini\n\n", progName);
@@ -75,19 +77,25 @@ void printUsage(const char* progName)
fprintf(out, "Usage with command line options:\n");
fprintf(out, "\t%s"
" input"
+#if defined(BUILD_FOR_EASYDABV3)
+ " -f filename -F format"
+#else
" (-f filename -F format | -u uhddevice -F frequency)"
+#endif
+ " [-o offset]"
+#if !defined(BUILD_FOR_EASYDABV3)
"\n\t"
" [-G txgain]"
- " [-o offset]"
" [-T filter_taps_file]"
" [-a gain]"
" [-c clockrate]"
"\n\t"
" [-g gainMode]"
- " [-h]"
- " [-l]"
" [-m dabMode]"
" [-r samplingRate]"
+#endif
+ " [-l]"
+ " [-h]"
"\n", progName);
fprintf(out, "Where:\n");
fprintf(out, "input: ETI input filename (default: stdin), or\n");
@@ -96,35 +104,35 @@ void printUsage(const char* progName)
fprintf(out, " udp://:port for EDI input.\n");
fprintf(out, "-f name: Use file output with given filename. (use /dev/stdout for standard output)\n");
fprintf(out, "-F format: Set the output format (see doc/example.ini for formats) for the file output.\n");
- fprintf(out, "-u device: Use UHD output with given device string. (use "" for default device)\n");
- fprintf(out, "-F frequency: Set the transmit frequency when using UHD output. (mandatory option when using UHD)\n");
- fprintf(out, "-G txgain: Set the transmit gain for the UHD driver (default: 0)\n");
- fprintf(out, "-o: (UHD only) Set the timestamp offset added to the timestamp in the ETI. The offset is a double.\n");
+ fprintf(out, "-o: Set the timestamp offset added to the timestamp in the ETI. The offset is a double.\n");
fprintf(out, " Specifying this option has two implications: It enables synchronous transmission,\n"
" requiring an external REFCLK and PPS signal and frames that do not contain a valid timestamp\n"
" get muted.\n\n");
+#if !defined(BUILD_FOR_EASYDABV3)
+ fprintf(out, "-u device: Use UHD output with given device string. (use "" for default device)\n");
+ fprintf(out, "-F frequency: Set the transmit frequency when using UHD output. (mandatory option when using UHD)\n");
+ fprintf(out, "-G txgain: Set the transmit gain for the UHD driver (default: 0)\n");
fprintf(out, "-T taps_file: Enable filtering before the output, using the specified file containing the filter taps.\n");
fprintf(out, " Use 'default' as taps_file to use the internal taps.\n");
fprintf(out, "-a gain: Apply digital amplitude gain.\n");
fprintf(out, "-c rate: Set the DAC clock rate and enable Cic Equalisation.\n");
fprintf(out, "-g gainmode: Set computation gain mode: fix, max or var\n");
- fprintf(out, "-h: Print this help.\n");
- fprintf(out, "-l: Loop file when reach end of file.\n");
fprintf(out, "-m mode: Set DAB mode: (0: auto, 1-4: force).\n");
fprintf(out, "-r rate: Set output sampling rate (default: 2048000).\n\n");
+#endif
+ fprintf(out, "-l: Loop file when reach end of file.\n");
+ fprintf(out, "-h: Print this help.\n");
}
void printVersion(void)
{
- printHeader();
-
FILE *out = stderr;
fprintf(out,
" ODR-DabMod is copyright (C) Her Majesty the Queen in Right of Canada,\n"
" 2005 -- 2012 Communications Research Centre (CRC),\n"
" and\n"
- " Copyright (C) 2017 Matthias P. Braendli, matthias.braendli@mpb.li\n"
+ " Copyright (C) 2018 Matthias P. Braendli, matthias.braendli@mpb.li\n"
"\n"
" http://opendigitalradio.org\n"
"\n"