aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-02-17 22:54:49 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-02-24 11:58:06 +0100
commitf5d667014440eb233befbc1ad22fd525723fe7de (patch)
tree0972bc14556f5480149303bff2ce159f2bdae207 /src
parentb51bea6c775007590e03f3dd230b1415c08c914a (diff)
downloaddabmod-f5d667014440eb233befbc1ad22fd525723fe7de.tar.gz
dabmod-f5d667014440eb233befbc1ad22fd525723fe7de.tar.bz2
dabmod-f5d667014440eb233befbc1ad22fd525723fe7de.zip
Move print of startup info to new function
Diffstat (limited to 'src')
-rw-r--r--src/DabMod.cpp31
-rw-r--r--src/Utils.cpp46
-rw-r--r--src/Utils.h2
3 files changed, 45 insertions, 34 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
index a298fbe..0378c97 100644
--- a/src/DabMod.cpp
+++ b/src/DabMod.cpp
@@ -213,36 +213,7 @@ int launch_modulator(int argc, char* argv[])
mod_settings_t mod_settings;
parse_args(argc, argv, mod_settings);
- std::cerr << "ODR-DabMod version " <<
-#if defined(GITVERSION)
- GITVERSION
-#else
- VERSION
-#endif
- << std::endl;
-
- std::cerr << "Compiled with features: " <<
-#if defined(HAVE_ZEROMQ)
- "zeromq " <<
-#endif
-#if defined(HAVE_OUTPUT_UHD)
- "output_uhd " <<
-#endif
-#if defined(HAVE_SOAPYSDR)
- "output_soapysdr " <<
-#endif
-#if defined(__FAST_MATH__)
- "fast-math" <<
-#endif
- "\n";
-
- etiLog.level(info) << "Starting up version " <<
-#if defined(GITVERSION)
- GITVERSION;
-#else
- VERSION;
-#endif
-
+ printStartupInfo();
// When using the FIRFilter, increase the modulator offset pipelining delay
// by the correct amount
diff --git a/src/Utils.cpp b/src/Utils.cpp
index a2ac9f4..5bd93d9 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -89,13 +89,19 @@ void printVersion(void)
{
FILE *out = stderr;
- fprintf(out, "Welcome to %s %s, compiled at %s, %s\n\n",
- PACKAGE, VERSION, __DATE__, __TIME__);
+ fprintf(out, "%s %s, compiled at %s, %s\n\n",
+ PACKAGE,
+#if defined(GITVERSION)
+ GITVERSION
+#else
+ VERSION
+#endif
+ ,__DATE__, __TIME__);
fprintf(out,
" ODR-DabMod is copyright (C) Her Majesty the Queen in Right of Canada,\n"
- " 2009, 2010, 2011, 2012 Communications Research Centre (CRC),\n"
+ " 2005 -- 2012 Communications Research Centre (CRC),\n"
" and\n"
- " Copyright (C) 2014, 2015 Matthias P. Braendli, matthias.braendli@mpb.li\n"
+ " Copyright (C) 2017 Matthias P. Braendli, matthias.braendli@mpb.li\n"
"\n"
" http://opendigitalradio.org\n"
"\n"
@@ -113,7 +119,39 @@ void printVersion(void)
" with ODR-DabMod. If not, see <http://www.gnu.org/licenses/>.\n"
"\n"
);
+}
+void printStartupInfo()
+{
+ std::cerr << "ODR-DabMod version " <<
+#if defined(GITVERSION)
+ GITVERSION
+#else
+ VERSION
+#endif
+ << std::endl;
+
+ std::cerr << "Compiled with features: " <<
+#if defined(HAVE_ZEROMQ)
+ "zeromq " <<
+#endif
+#if defined(HAVE_OUTPUT_UHD)
+ "output_uhd " <<
+#endif
+#if defined(HAVE_SOAPYSDR)
+ "output_soapysdr " <<
+#endif
+#if defined(__FAST_MATH__)
+ "fast-math" <<
+#endif
+ "\n";
+
+ etiLog.level(info) << "Starting up version " <<
+#if defined(GITVERSION)
+ GITVERSION;
+#else
+ VERSION;
+#endif
}
int set_realtime_prio(int prio)
diff --git a/src/Utils.h b/src/Utils.h
index 4631292..8da3a1b 100644
--- a/src/Utils.h
+++ b/src/Utils.h
@@ -41,6 +41,8 @@ void printUsage(const char* progName);
void printVersion(void);
+void printStartupInfo(void);
+
inline long timespecdiff_us(struct timespec& oldTime, struct timespec& time)
{
long tv_sec;