From 97af96a6ad2934a699f9b9eff9446e855b476e00 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Thu, 4 Jan 2024 23:15:08 -0500 Subject: [PATCH] be verbose in cmake output when enabling various debugs; correct issue with startup messages; --- src/CMakeLists.txt | 23 +++++++++++++++++++++++ src/common/Utils.cpp | 14 -------------- src/common/Utils.h | 9 --------- src/fne/HostFNE.cpp | 4 +++- src/host/Host.cpp | 4 +++- src/host/calibrate/HostCal.cpp | 8 ++++++-- src/host/setup/HostSetup.cpp | 4 +++- src/monitor/MonitorMain.cpp | 6 ++++-- 8 files changed, 42 insertions(+), 30 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4d33b091..fe6adfe5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -165,72 +165,95 @@ option(DEBUG_HTTP_PAYLOAD "" off) option(DEBUG_TRELLIS "" off) if (DEBUG_DMR_PDU_DATA) + message(CHECK_START "DMR PDU Data Debug") add_definitions(-DDEBUG_DMR_PDU_DATA) endif (DEBUG_DMR_PDU_DATA) if (DEBUG_CRC_ADD) + message(CHECK_START "Common CRC Add Debug") add_definitions(-DDEBUG_CRC_ADD) endif (DEBUG_CRC_ADD) if (DEBUG_CRC_CHECK) + message(CHECK_START "Common CRC Check Debug") add_definitions(-DDEBUG_CRC_CHECK) endif (DEBUG_CRC_CHECK) if (DEBUG_RS) + message(CHECK_START "Common Reed-Solomon Debug") add_definitions(-DDEBUG_RS) endif (DEBUG_RS) if (DEBUG_AMBEFEC) + message(CHECK_START "Common AMBE FEC Debug") add_definitions(-DDEBUG_AMBEFEC) endif (DEBUG_AMBEFEC) if (DEBUG_MODEM_CAL) + message(CHECK_START "Host Modem Calibration Debug") add_definitions(-DDEBUG_MODEM_CAL) endif (DEBUG_MODEM_CAL) if (DEBUG_MODEM) + message(CHECK_START "Host Modem Debug") add_definitions(-DDEBUG_MODEM) endif (DEBUG_MODEM) if (DEBUG_NXDN_FACCH1) + message(CHECK_START "NXDN FACCH1 Debug") add_definitions(-DDEBUG_NXDN_FACCH1) endif (DEBUG_NXDN_FACCH1) if (DEBUG_NXDN_SACCH) + message(CHECK_START "NXDN SACCH Debug") add_definitions(-DDEBUG_NXDN_SACCH) endif (DEBUG_NXDN_SACCH) if (DEBUG_NXDN_UDCH) + message(CHECK_START "NXDN UDCH Debug") add_definitions(-DDEBUG_NXDN_UDCH) endif (DEBUG_NXDN_UDCH) if (DEBUG_NXDN_LICH) + message(CHECK_START "NXDN LICH Debug") add_definitions(-DDEBUG_NXDN_LICH) endif (DEBUG_NXDN_LICH) if (DEBUG_NXDN_CAC) + message(CHECK_START "NXDN CAC Debug") add_definitions(-DDEBUG_NXDN_CAC) endif (DEBUG_NXDN_CAC) if (DEBUG_P25_PDU_DATA) + message(CHECK_START "P25 PDU Data Debug") add_definitions(-DDEBUG_P25_PDU_DATA) endif (DEBUG_P25_PDU_DATA) if (DEBUG_P25_HDU) + message(CHECK_START "P25 HDU Debug") add_definitions(-DDEBUG_P25_HDU) endif (DEBUG_P25_HDU) if (DEBUG_P25_LDU1) + message(CHECK_START "P25 LDU1 Debug") add_definitions(-DDEBUG_P25_LDU1) endif (DEBUG_P25_LDU1) if (DEBUG_P25_LDU2) + message(CHECK_START "P25 LDU2 Debug") add_definitions(-DDEBUG_P25_LDU2) endif (DEBUG_P25_LDU2) if (DEBUG_P25_TDULC) + message(CHECK_START "P25 TDULC Debug") add_definitions(-DDEBUG_P25_TDULC) endif (DEBUG_P25_TDULC) if (DEBUG_P25_TSBK) + message(CHECK_START "P25 TSBK Debug") add_definitions(-DDEBUG_P25_TSBK) endif (DEBUG_P25_TSBK) if (FORCE_TSBK_CRC_WARN) + message(CHECK_START "Force TSBK CRC Errors as Warnings") add_definitions(-DFORCE_TSBK_CRC_WARN) endif (FORCE_TSBK_CRC_WARN) if (DEBUG_P25_DFSI) + message(CHECK_START "P25 DFSI Debug") add_definitions(-DDEBUG_P25_DFSI) endif (DEBUG_P25_DFSI) if (DEBUG_RINGBUFFER) + message(CHECK_START "Ringbuffer Debug") add_definitions(-DDEBUG_RINGBUFFER) endif (DEBUG_RINGBUFFER) if (DEBUG_HTTP_PAYLOAD) + message(CHECK_START "HTTP Payload Debug") add_definitions(-DDEBUG_HTTP_PAYLOAD) endif (DEBUG_HTTP_PAYLOAD) if (DEBUG_TRELLIS) + message(CHECK_START "Trellis Encoding Debug") add_definitions(-DDEBUG_TRELLIS) endif (DEBUG_TRELLIS) diff --git a/src/common/Utils.cpp b/src/common/Utils.cpp index 305f8685..a48c7160 100644 --- a/src/common/Utils.cpp +++ b/src/common/Utils.cpp @@ -40,20 +40,6 @@ const uint8_t BITS_TABLE[] = { B6(0), B6(1), B6(1), B6(2) }; -// --------------------------------------------------------------------------- -// Global Functions -// --------------------------------------------------------------------------- - -/// -/// Displays the host version. -/// -void getHostVersion() -{ - LogInfo(__PROG_NAME__ " %s (" DESCR_DMR DESCR_P25 DESCR_NXDN "CW Id, Network) (built %s)", __VER__, __BUILD__); - LogInfo("Copyright (c) 2017-2024 Bryan Biedenkapp, N2PLL and DVMProject (https://github.com/dvmproject) Authors."); - LogInfo("Portions Copyright (c) 2015-2021 by Jonathan Naylor, G4KLX and others"); -} - // --------------------------------------------------------------------------- // Static Class Members // --------------------------------------------------------------------------- diff --git a/src/common/Utils.h b/src/common/Utils.h index 010e6531..33af3ee4 100644 --- a/src/common/Utils.h +++ b/src/common/Utils.h @@ -50,15 +50,6 @@ #define DESCR_NXDN "" #endif -// --------------------------------------------------------------------------- -// Externs -// --------------------------------------------------------------------------- - -extern "C" { - /// Displays the host version. - HOST_SW_API void getHostVersion(); -} - // --------------------------------------------------------------------------- // Class Declaration // Implements various helper utilities. diff --git a/src/fne/HostFNE.cpp b/src/fne/HostFNE.cpp index 6459d3c5..d5dd07a2 100644 --- a/src/fne/HostFNE.cpp +++ b/src/fne/HostFNE.cpp @@ -153,7 +153,9 @@ int HostFNE::run() ::close(STDERR_FILENO); } - getHostVersion(); + ::LogInfo(__PROG_NAME__ " %s (" DESCR_DMR DESCR_P25 DESCR_NXDN "CW Id, Network) (built %s)", __VER__, __BUILD__); + ::LogInfo("Copyright (c) 2017-2024 Bryan Biedenkapp, N2PLL and DVMProject (https://github.com/dvmproject) Authors."); + ::LogInfo("Portions Copyright (c) 2015-2021 by Jonathan Naylor, G4KLX and others"); ::LogInfo(">> Fixed Network Equipment"); // read base parameters from configuration diff --git a/src/host/Host.cpp b/src/host/Host.cpp index 81a89655..44973fd9 100644 --- a/src/host/Host.cpp +++ b/src/host/Host.cpp @@ -224,7 +224,9 @@ int Host::run() ::close(STDERR_FILENO); } - getHostVersion(); + ::LogInfo(__PROG_NAME__ " %s (" DESCR_DMR DESCR_P25 DESCR_NXDN "CW Id, Network) (built %s)", __VER__, __BUILD__); + ::LogInfo("Copyright (c) 2017-2024 Bryan Biedenkapp, N2PLL and DVMProject (https://github.com/dvmproject) Authors."); + ::LogInfo("Portions Copyright (c) 2015-2021 by Jonathan Naylor, G4KLX and others"); ::LogInfo(">> Modem Controller"); // read base parameters from configuration diff --git a/src/host/calibrate/HostCal.cpp b/src/host/calibrate/HostCal.cpp index bdabf908..f2d968f3 100644 --- a/src/host/calibrate/HostCal.cpp +++ b/src/host/calibrate/HostCal.cpp @@ -87,7 +87,9 @@ int HostCal::run(int argc, char **argv) return 1; } - getHostVersion(); + ::LogInfo(__PROG_NAME__ " %s (" DESCR_DMR DESCR_P25 DESCR_NXDN "CW Id, Network) (built %s)", __VER__, __BUILD__); + ::LogInfo("Copyright (c) 2017-2024 Bryan Biedenkapp, N2PLL and DVMProject (https://github.com/dvmproject) Authors."); + ::LogInfo("Portions Copyright (c) 2015-2021 by Jonathan Naylor, G4KLX and others"); ::LogInfo(">> Modem Calibration"); yaml::Node systemConf = m_conf["system"]; @@ -638,7 +640,9 @@ int HostCal::run(int argc, char **argv) printStatus(); break; case 'V': - getHostVersion(); + ::LogInfo(__PROG_NAME__ " %s (" DESCR_DMR DESCR_P25 DESCR_NXDN "CW Id, Network) (built %s)", __VER__, __BUILD__); + ::LogInfo("Copyright (c) 2017-2024 Bryan Biedenkapp, N2PLL and DVMProject (https://github.com/dvmproject) Authors."); + ::LogInfo("Portions Copyright (c) 2015-2021 by Jonathan Naylor, G4KLX and others"); break; case 'v': // bryanb: this actually polls the firmware -- should we do this or just diff --git a/src/host/setup/HostSetup.cpp b/src/host/setup/HostSetup.cpp index e768b1c7..b84edd09 100644 --- a/src/host/setup/HostSetup.cpp +++ b/src/host/setup/HostSetup.cpp @@ -196,7 +196,9 @@ int HostSetup::run(int argc, char** argv) return 1; } - getHostVersion(); + ::LogInfo(__PROG_NAME__ " %s (" DESCR_DMR DESCR_P25 DESCR_NXDN "CW Id, Network) (built %s)", __VER__, __BUILD__); + ::LogInfo("Copyright (c) 2017-2024 Bryan Biedenkapp, N2PLL and DVMProject (https://github.com/dvmproject) Authors."); + ::LogInfo("Portions Copyright (c) 2015-2021 by Jonathan Naylor, G4KLX and others"); ::LogInfo(">> Modem Setup"); // setup the finalcut tui diff --git a/src/monitor/MonitorMain.cpp b/src/monitor/MonitorMain.cpp index de9d8a38..48fee8e3 100644 --- a/src/monitor/MonitorMain.cpp +++ b/src/monitor/MonitorMain.cpp @@ -212,8 +212,10 @@ int main(int argc, char** argv) return 1; } - getHostVersion(); - ::LogInfo(">> Monitor"); + ::LogInfo(__PROG_NAME__ " %s (" DESCR_DMR DESCR_P25 DESCR_NXDN "CW Id, Network) (built %s)", __VER__, __BUILD__); + ::LogInfo("Copyright (c) 2017-2024 Bryan Biedenkapp, N2PLL and DVMProject (https://github.com/dvmproject) Authors."); + ::LogInfo("Portions Copyright (c) 2015-2021 by Jonathan Naylor, G4KLX and others"); + ::LogInfo(">> Host Monitor"); try { ret = yaml::Parse(g_conf, g_iniFile.c_str());