convert monitor to Doxygen;

pull/61/head
Bryan Biedenkapp 2 years ago
parent d9c6447563
commit 5159c6f8c7

@ -1,15 +1,21 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/*
* Digital Voice Modem - Host Monitor Software
* GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
/** /**
* Digital Voice Modem - Host Monitor Software * @defgroup monitor Host Monitor Software (dvmmon)
* GPLv2 Open Source. Use is subject to license terms. * @brief Digital Voice Modem - Host Monitor Software
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @details Montior software that connects to the DVM hosts and is a quick TUI for monitoring activity on them.
* * @ingroup monitor
* @package DVM / Host Monitor Software *
* @license GPLv2 License (https://opensource.org/licenses/GPL-2.0) * @file Defines.h
* * @ingroup monitor
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL */
*
*/
#if !defined(__DEFINES_H__) #if !defined(__DEFINES_H__)
#define __DEFINES_H__ #define __DEFINES_H__

@ -1,15 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/*
* Digital Voice Modem - Host Monitor Software
* GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
/** /**
* Digital Voice Modem - Host Monitor Software * @file InhibitSubscriberWnd.h
* GPLv2 Open Source. Use is subject to license terms. * @ingroup monitor
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */
*
* @package DVM / Host Monitor Software
* @license GPLv2 License (https://opensource.org/licenses/GPL-2.0)
*
* Copyright (C) 2023,2024 Bryan Biedenkapp, N2PLL
*
*/
#if !defined(__INHIBIT_SUBSCRIBER_WND_H__) #if !defined(__INHIBIT_SUBSCRIBER_WND_H__)
#define __INHIBIT_SUBSCRIBER_WND_H__ #define __INHIBIT_SUBSCRIBER_WND_H__
@ -20,16 +21,19 @@ using namespace finalcut;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Class Declaration // Class Declaration
// This class implements the inhibit subscriber window.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/**
* @brief This class implements the inhibit subscriber window.
* @ingroup monitor
*/
class HOST_SW_API InhibitSubscriberWnd final : public TransmitWndBase { class HOST_SW_API InhibitSubscriberWnd final : public TransmitWndBase {
public: public:
/// <summary> /**
/// Initializes a new instance of the InhibitSubscriberWnd class. * @brief Initializes a new instance of the InhibitSubscriberWnd class.
/// </summary> * @param channel Channel data.
/// <param name="channel"></param> * @param widget
/// <param name="widget"></param> */
explicit InhibitSubscriberWnd(lookups::VoiceChData channel, FWidget* widget = nullptr) : TransmitWndBase{channel, widget} explicit InhibitSubscriberWnd(lookups::VoiceChData channel, FWidget* widget = nullptr) : TransmitWndBase{channel, widget}
{ {
/* stub */ /* stub */
@ -41,9 +45,9 @@ private:
FLabel m_subscriberLabel{"Subscriber ID: ", this}; FLabel m_subscriberLabel{"Subscriber ID: ", this};
FSpinBox m_subscriber{this}; FSpinBox m_subscriber{this};
/// <summary> /**
/// * @brief Initializes the window layout.
/// </summary> */
void initLayout() override void initLayout() override
{ {
FDialog::setText("Inhibit Subscriber"); FDialog::setText("Inhibit Subscriber");
@ -52,9 +56,9 @@ private:
TransmitWndBase::initLayout(); TransmitWndBase::initLayout();
} }
/// <summary> /**
/// * @brief Initializes window controls.
/// </summary> */
void initControls() override void initControls() override
{ {
TransmitWndBase::initControls(); TransmitWndBase::initControls();
@ -103,9 +107,9 @@ private:
redraw(); redraw();
} }
/// <summary> /**
/// * @brief Helper to transmit.
/// </summary> */
void setTransmit() override void setTransmit() override
{ {
std::string method = PUT_DMR_RID; std::string method = PUT_DMR_RID;

@ -1,15 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/*
* Digital Voice Modem - Host Monitor Software
* GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
/** /**
* Digital Voice Modem - Host Monitor Software * @file LogDisplayWnd.h
* GPLv2 Open Source. Use is subject to license terms. * @ingroup monitor
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */
*
* @package DVM / Host Monitor Software
* @license GPLv2 License (https://opensource.org/licenses/GPL-2.0)
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
#if !defined(__LOG_DISPLAY_WND_H__) #if !defined(__LOG_DISPLAY_WND_H__)
#define __LOG_DISPLAY_WND_H__ #define __LOG_DISPLAY_WND_H__
@ -18,40 +19,53 @@ using namespace finalcut;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Class Declaration // Class Declaration
// This class implements the log display window.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/**
* @brief This class implements the log display window.
* @ingroup monitor
*/
class HOST_SW_API LogDisplayWnd final : public finalcut::FDialog, public std::ostringstream { class HOST_SW_API LogDisplayWnd final : public finalcut::FDialog, public std::ostringstream {
public: public:
/// <summary> /**
/// Initializes a new instance of the LogDisplayWnd class. * @brief Initializes a new instance of the LogDisplayWnd class.
/// </summary> * @param widget
/// <param name="widget"></param> */
explicit LogDisplayWnd(FWidget* widget = nullptr) : FDialog{widget} explicit LogDisplayWnd(FWidget* widget = nullptr) : FDialog{widget}
{ {
m_scrollText.ignorePadding(); m_scrollText.ignorePadding();
m_timerId = addTimer(250); // starts the timer every 250 milliseconds m_timerId = addTimer(250); // starts the timer every 250 milliseconds
} }
/// <summary>Copy constructor.</summary> /**
* @brief Copy constructor.
*/
LogDisplayWnd(const LogDisplayWnd&) = delete; LogDisplayWnd(const LogDisplayWnd&) = delete;
/// <summary>Move constructor.</summary> /**
* @brief Move constructor.
*/
LogDisplayWnd(LogDisplayWnd&&) noexcept = delete; LogDisplayWnd(LogDisplayWnd&&) noexcept = delete;
/// <summary>Finalizes an instance of the LogDisplayWnd class.</summary> /**
* @brief Finalizes an instance of the LogDisplayWnd class.
*/
~LogDisplayWnd() noexcept override = default; ~LogDisplayWnd() noexcept override = default;
/// <summary>Disable copy assignment operator (=).</summary> /**
* @brief Disable copy assignment operator (=).
*/
auto operator= (const LogDisplayWnd&) -> LogDisplayWnd& = delete; auto operator= (const LogDisplayWnd&) -> LogDisplayWnd& = delete;
/// <summary>Disable move assignment operator (=).</summary> /**
* @brief Disable move assignment operator (=).
*/
auto operator= (LogDisplayWnd&&) noexcept -> LogDisplayWnd& = delete; auto operator= (LogDisplayWnd&&) noexcept -> LogDisplayWnd& = delete;
private: private:
FTextView m_scrollText{this}; FTextView m_scrollText{this};
int m_timerId; int m_timerId;
/// <summary> /**
/// * @brief Initializes the window layout.
/// </summary> */
void initLayout() override void initLayout() override
{ {
using namespace std::string_literals; using namespace std::string_literals;
@ -74,9 +88,9 @@ private:
FDialog::initLayout(); FDialog::initLayout();
} }
/// <summary> /**
/// * @brief Adjusts window size.
/// </summary> */
void adjustSize() override void adjustSize() override
{ {
FDialog::adjustSize(); FDialog::adjustSize();
@ -88,19 +102,19 @@ private:
** Event Handlers ** Event Handlers
*/ */
/// <summary> /**
/// * @brief Event that occurs when the window is closed.
/// </summary> * @param e Close Event
/// <param name="e"></param> */
void onClose(FCloseEvent* e) override void onClose(FCloseEvent* e) override
{ {
minimizeWindow(); minimizeWindow();
} }
/// <summary> /**
/// * @brief Event that occurs on interval by timer.
/// </summary> * @param timer Timer Event
/// <param name="timer"></param> */
void onTimer(FTimerEvent* timer) override void onTimer(FTimerEvent* timer) override
{ {
if (timer != nullptr) { if (timer != nullptr) {

@ -1,15 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/*
* Digital Voice Modem - Host Monitor Software
* GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
/** /**
* Digital Voice Modem - Host Monitor Software * @file MonitorApplication.h
* GPLv2 Open Source. Use is subject to license terms. * @ingroup monitor
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */
*
* @package DVM / Host Monitor Software
* @license GPLv2 License (https://opensource.org/licenses/GPL-2.0)
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
#if !defined(__MONITOR_APPLICATION_H__) #if !defined(__MONITOR_APPLICATION_H__)
#define __MONITOR_APPLICATION_H__ #define __MONITOR_APPLICATION_H__
@ -22,25 +23,28 @@ using namespace finalcut;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Class Declaration // Class Declaration
// This class implements the finalcut application.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/**
* @brief This class implements the finalcut application.
* @ingroup monitor
*/
class HOST_SW_API MonitorApplication final : public finalcut::FApplication { class HOST_SW_API MonitorApplication final : public finalcut::FApplication {
public: public:
/// <summary> /**
/// Initializes a new instance of the MonitorApplication class. * @brief Initializes a new instance of the MonitorApplication class.
/// </summary> * @param argc Passed argc.
/// <param name="argc"></param> * @param argv Passed argv.
/// <param name="argv"></param> */
explicit MonitorApplication(const int& argc, char** argv) : FApplication{argc, argv} explicit MonitorApplication(const int& argc, char** argv) : FApplication{argc, argv}
{ {
m_statusRefreshTimer = addTimer(1000); m_statusRefreshTimer = addTimer(1000);
} }
protected: protected:
/// <summary> /**
/// * @brief Process external user events.
/// </summary> */
void processExternalUserEvent() override void processExternalUserEvent() override
{ {
/* stub */ /* stub */
@ -50,10 +54,10 @@ protected:
** Event Handlers ** Event Handlers
*/ */
/// <summary> /**
/// * @brief Event that occurs on interval by timer.
/// </summary> * @param timer Timer Event
/// <param name="timer"></param> */
void onTimer(FTimerEvent* timer) override void onTimer(FTimerEvent* timer) override
{ {
if (timer != nullptr) { if (timer != nullptr) {

@ -1,15 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/** /*
* Digital Voice Modem - Host Monitor Software * Digital Voice Modem - Host Monitor Software
* GPLv2 Open Source. Use is subject to license terms. * GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* @package DVM / Host Monitor Software * Copyright (C) 2023 Bryan Biedenkapp, N2PLL
* @license GPLv2 License (https://opensource.org/licenses/GPL-2.0) *
* */
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
#include "Defines.h" #include "Defines.h"
#include "common/yaml/Yaml.h" #include "common/yaml/Yaml.h"
#include "common/Log.h" #include "common/Log.h"
@ -47,11 +44,8 @@ lookups::IdenTableLookup* g_idenTable = nullptr;
// Global Functions // Global Functions
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/// <summary> /* Helper to print a fatal error message and exit. */
/// Helper to print a fatal error message and exit.
/// </summary>
/// <remarks>This is a variable argument function.</remarks>
/// <param name="msg">Message.</param>
void fatal(const char* msg, ...) void fatal(const char* msg, ...)
{ {
char buffer[400U]; char buffer[400U];
@ -68,11 +62,8 @@ void fatal(const char* msg, ...)
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
/// <summary> /* Helper to pring usage the command line arguments. (And optionally an error.) */
/// Helper to pring usage the command line arguments. (And optionally an error.)
/// </summary>
/// <param name="message">Error message.</param>
/// <param name="arg">Error message arguments.</param>
void usage(const char* message, const char* arg) void usage(const char* message, const char* arg)
{ {
::fprintf(stdout, __PROG_NAME__ " %s (built %s)\r\n", __VER__, __BUILD__); ::fprintf(stdout, __PROG_NAME__ " %s (built %s)\r\n", __VER__, __BUILD__);
@ -103,12 +94,8 @@ void usage(const char* message, const char* arg)
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
/// <summary> /* Helper to validate the command line arguments. */
/// Helper to validate the command line arguments.
/// </summary>
/// <param name="argc">Argument count.</param>
/// <param name="argv">Array of argument strings.</param>
/// <returns>Count of remaining unprocessed arguments.</returns>
int checkArgs(int argc, char* argv[]) int checkArgs(int argc, char* argv[])
{ {
int i, p = 0; int i, p = 0;

@ -1,15 +1,18 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/*
* Digital Voice Modem - Host Monitor Software
* GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
/** /**
* Digital Voice Modem - Host Monitor Software * @file MonitorMain.h
* GPLv2 Open Source. Use is subject to license terms. * @ingroup monitor
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @file MonitorMain.cpp
* * @ingroup monitor
* @package DVM / Host Monitor Software */
* @license GPLv2 License (https://opensource.org/licenses/GPL-2.0)
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
#if !defined(__MONITOR_MAIN_H__) #if !defined(__MONITOR_MAIN_H__)
#define __MONITOR_MAIN_H__ #define __MONITOR_MAIN_H__
@ -32,13 +35,19 @@
// Externs // Externs
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief */
extern std::string g_progExe; extern std::string g_progExe;
/** @brief */
extern std::string g_iniFile; extern std::string g_iniFile;
/** @brief */
extern yaml::Node g_conf; extern yaml::Node g_conf;
/** @brief */
extern bool g_debug; extern bool g_debug;
/** @brief */
extern bool g_hideLoggingWnd; extern bool g_hideLoggingWnd;
/** @brief */
extern lookups::IdenTableLookup* g_idenTable; extern lookups::IdenTableLookup* g_idenTable;
#endif // __MONITOR_MAIN_H__ #endif // __MONITOR_MAIN_H__

@ -1,15 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/*
* Digital Voice Modem - Host Monitor Software
* GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
/** /**
* Digital Voice Modem - Host Monitor Software * @file MonitorMainWnd.h
* GPLv2 Open Source. Use is subject to license terms. * @ingroup monitor
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */
*
* @package DVM / Host Monitor Software
* @license GPLv2 License (https://opensource.org/licenses/GPL-2.0)
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
#if !defined(__MONITOR_WND_H__) #if !defined(__MONITOR_WND_H__)
#define __MONITOR_WND_H__ #define __MONITOR_WND_H__
@ -43,15 +44,18 @@ class HOST_SW_API MonitorApplication;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Class Declaration // Class Declaration
// This class implements the root window control.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/**
* @brief This class implements the root window control.
* @ingroup monitor
*/
class HOST_SW_API MonitorMainWnd final : public finalcut::FWidget { class HOST_SW_API MonitorMainWnd final : public finalcut::FWidget {
public: public:
/// <summary> /**
/// Initializes a new instance of the MonitorMainWnd class. * @brief Initializes a new instance of the MonitorMainWnd class.
/// </summary> * @param widget
/// <param name="widget"></param> */
explicit MonitorMainWnd(FWidget* widget = nullptr) : FWidget{widget} explicit MonitorMainWnd(FWidget* widget = nullptr) : FWidget{widget}
{ {
__InternalOutputStream(m_logWnd); __InternalOutputStream(m_logWnd);
@ -106,7 +110,10 @@ public:
}); });
} }
/// <summary></summary> /**
* @brief Helper to get the currently selected channel.
* @returns lookups::VoiceChData Currently selected channel.
*/
lookups::VoiceChData getSelectedCh() { return m_selectedCh; } lookups::VoiceChData getSelectedCh() { return m_selectedCh; }
private: private:
@ -142,9 +149,9 @@ private:
FStatusKey m_keyF7{FKey::F7, "Inhibit Subscriber", &m_statusBar}; FStatusKey m_keyF7{FKey::F7, "Inhibit Subscriber", &m_statusBar};
FStatusKey m_keyF8{FKey::F8, "Uninhibit Subscriber", &m_statusBar}; FStatusKey m_keyF8{FKey::F8, "Uninhibit Subscriber", &m_statusBar};
/// <summary> /**
/// * @brief Helper to initialize the individual channel display elements.
/// </summary> */
void intializeNodeDisplay() void intializeNodeDisplay()
{ {
const auto& rootWidget = getRootWidget(); const auto& rootWidget = getRootWidget();
@ -226,10 +233,10 @@ private:
** Event Handlers ** Event Handlers
*/ */
/// <summary> /**
/// * @brief Event that occurs on keyboard key press.
/// </summary> * @param e Keyboard Event.
/// <param name="e"></param> */
void onKeyPress(finalcut::FKeyEvent* e) override void onKeyPress(finalcut::FKeyEvent* e) override
{ {
const FKey key = e->key(); const FKey key = e->key();
@ -249,10 +256,10 @@ private:
} }
} }
/// <summary> /**
/// * @brief Event that occurs when the window is shown.
/// </summary> * @param e Show Event
/// <param name="e"></param> */
void onShow(FShowEvent* e) override void onShow(FShowEvent* e) override
{ {
intializeNodeDisplay(); intializeNodeDisplay();
@ -264,10 +271,10 @@ private:
} }
} }
/// <summary> /**
/// * @brief Event that occurs when the window is closed.
/// </summary> * @param e Close Event
/// <param name="e"></param> */
void onClose(FCloseEvent* e) override void onClose(FCloseEvent* e) override
{ {
FApplication::closeConfirmationDialog(this, e); FApplication::closeConfirmationDialog(this, e);

@ -1,15 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/*
* Digital Voice Modem - Host Monitor Software
* GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
/** /**
* Digital Voice Modem - Host Monitor Software * @file NodeStatusWnd.h
* GPLv2 Open Source. Use is subject to license terms. * @ingroup monitor
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */
*
* @package DVM / Host Monitor Software
* @license GPLv2 License (https://opensource.org/licenses/GPL-2.0)
*
* Copyright (C) 2023,2024 Bryan Biedenkapp, N2PLL
*
*/
#if !defined(__NODE_STATUS_WND_H__) #if !defined(__NODE_STATUS_WND_H__)
#define __NODE_STATUS_WND_H__ #define __NODE_STATUS_WND_H__
@ -33,48 +34,82 @@ using namespace finalcut;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Class Declaration // Class Declaration
// This class implements the node status display window.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/**
* @brief This class implements the node status display window.
* @ingroup monitor
*/
class HOST_SW_API NodeStatusWnd final : public finalcut::FDialog { class HOST_SW_API NodeStatusWnd final : public finalcut::FDialog {
public: public:
/// <summary> /**
/// Initializes a new instance of the NodeStatusWnd class. * @brief Initializes a new instance of the NodeStatusWnd class.
/// </summary> * @param widget
/// <param name="widget"></param> */
explicit NodeStatusWnd(FWidget* widget = nullptr) : FDialog{widget} explicit NodeStatusWnd(FWidget* widget = nullptr) : FDialog{widget}
{ {
m_timerId = addTimer(250); // starts the timer every 250 milliseconds m_timerId = addTimer(250); // starts the timer every 250 milliseconds
m_reconnectTimerId = addTimer(15000); // starts the timer every 10 seconds m_reconnectTimerId = addTimer(15000); // starts the timer every 10 seconds
} }
/// <summary>Copy constructor.</summary> /**
* @brief Copy constructor.
*/
NodeStatusWnd(const NodeStatusWnd&) = delete; NodeStatusWnd(const NodeStatusWnd&) = delete;
/// <summary>Move constructor.</summary> /**
* @brief Move constructor.
*/
NodeStatusWnd(NodeStatusWnd&&) noexcept = delete; NodeStatusWnd(NodeStatusWnd&&) noexcept = delete;
/// <summary>Finalizes an instance of the NodeStatusWnd class.</summary> /**
* @brief Finalizes an instance of the NodeStatusWnd class.
*/
~NodeStatusWnd() noexcept override = default; ~NodeStatusWnd() noexcept override = default;
/// <summary>Disable copy assignment operator (=).</summary> /**
* @brief Disable copy assignment operator (=).
*/
auto operator= (const NodeStatusWnd&) -> NodeStatusWnd& = delete; auto operator= (const NodeStatusWnd&) -> NodeStatusWnd& = delete;
/// <summary>Disable move assignment operator (=).</summary> /**
* @brief Disable move assignment operator (=).
*/
auto operator= (NodeStatusWnd&&) noexcept -> NodeStatusWnd& = delete; auto operator= (NodeStatusWnd&&) noexcept -> NodeStatusWnd& = delete;
/// <summary>Disable set X coordinate.</summary> /**
* @brief Disable set X coordinate.
*/
void setX(int, bool = true) override { } void setX(int, bool = true) override { }
/// <summary>Disable set Y coordinate.</summary> /**
* @brief Disable set Y coordinate.
*/
void setY(int, bool = true) override { } void setY(int, bool = true) override { }
/// <summary>Disable set position.</summary> /**
* @brief Disable set position.
*/
void setPos(const FPoint&, bool = true) override { } void setPos(const FPoint&, bool = true) override { }
/// <summary>Gets the channel ID.</summary> /**
* @brief Gets the channel ID.
* @returns uint8_t Channel ID.
*/
uint8_t getChannelId() const { return m_channelId; } uint8_t getChannelId() const { return m_channelId; }
/// <summary>Gets the channel number.</summary> /**
* @brief Gets the channel number.
* @returns uint32_t Channel Number.
*/
uint32_t getChannelNo() const { return m_channelNo; } uint32_t getChannelNo() const { return m_channelNo; }
/// <summary>Gets the channel data.</summary> /**
* @brief Gets the channel data.
* @returns lookups::VoiceChData Channel Data.
*/
lookups::VoiceChData getChData() { return m_chData; } lookups::VoiceChData getChData() { return m_chData; }
/// <summary>Sets the channel data.</summary> /**
* @brief Sets the channel data.
* @param chData Channel Data.
*/
void setChData(lookups::VoiceChData chData) { m_chData = chData; } void setChData(lookups::VoiceChData chData) { m_chData = chData; }
/// <summary>Gets the peer ID.</summary> /**
* @brief Gets the peer ID.
* @param uint32_t Peer ID.
*/
uint32_t getPeerId() const { return m_peerId; } uint32_t getPeerId() const { return m_peerId; }
private: private:
@ -107,9 +142,9 @@ private:
FLabel m_lastSrcLabel{"Last Src: ", this}; FLabel m_lastSrcLabel{"Last Src: ", this};
FLabel m_lastSrc{this}; FLabel m_lastSrc{this};
/// <summary> /**
/// * @brief Initializes the window layout.
/// </summary> */
void initLayout() override void initLayout() override
{ {
FDialog::setMinimumSize(FSize{NODE_STATUS_WIDTH, NODE_STATUS_HEIGHT}); FDialog::setMinimumSize(FSize{NODE_STATUS_WIDTH, NODE_STATUS_HEIGHT});
@ -127,9 +162,9 @@ private:
FDialog::initLayout(); FDialog::initLayout();
} }
/// <summary> /**
/// * @brief Draws the window.
/// </summary> */
void draw() override void draw() override
{ {
FDialog::draw(); FDialog::draw();
@ -150,9 +185,9 @@ private:
finalcut::drawBorder(this, FRect(FPoint{1, 2}, FPoint{NODE_STATUS_WIDTH, NODE_STATUS_HEIGHT})); finalcut::drawBorder(this, FRect(FPoint{1, 2}, FPoint{NODE_STATUS_WIDTH, NODE_STATUS_HEIGHT}));
} }
/// <summary> /**
/// * @brief Initializes window controls.
/// </summary> */
void initControls() void initControls()
{ {
m_modeStr.setGeometry(FPoint(22, 1), FSize(4, 1)); m_modeStr.setGeometry(FPoint(22, 1), FSize(4, 1));
@ -198,9 +233,9 @@ private:
} }
} }
/// <summary> /**
/// * @brief Helper to calculate the Tx/Rx frequencies of a channel.
/// </summary> */
void calculateRxTx() void calculateRxTx()
{ {
IdenTable entry = g_idenTable->find(m_channelId); IdenTable entry = g_idenTable->find(m_channelId);
@ -239,20 +274,20 @@ private:
** Event Handlers ** Event Handlers
*/ */
/// <summary> /**
/// * @brief Event that occurs when the window is raised.
/// </summary> * @param e Event.
/// <param name="e"></param> */
void onWindowRaised(FEvent* e) override void onWindowRaised(FEvent* e) override
{ {
FDialog::onWindowLowered(e); FDialog::onWindowLowered(e);
emitCallback("update-selected"); emitCallback("update-selected");
} }
/// <summary> /**
/// * @brief Event that occurs on interval by timer.
/// </summary> * @param timer Timer Event
/// <param name="timer"></param> */
void onTimer(FTimerEvent* timer) override void onTimer(FTimerEvent* timer) override
{ {
if (timer != nullptr) { if (timer != nullptr) {

@ -1,15 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/*
* Digital Voice Modem - Host Monitor Software
* GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
/** /**
* Digital Voice Modem - Host Monitor Software * @file PageSubscriberWnd.h
* GPLv2 Open Source. Use is subject to license terms. * @ingroup monitor
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */
*
* @package DVM / Host Monitor Software
* @license GPLv2 License (https://opensource.org/licenses/GPL-2.0)
*
* Copyright (C) 2023,2024 Bryan Biedenkapp, N2PLL
*
*/
#if !defined(__PAGE_SUBSCRIBER_WND_H__) #if !defined(__PAGE_SUBSCRIBER_WND_H__)
#define __PAGE_SUBSCRIBER_WND_H__ #define __PAGE_SUBSCRIBER_WND_H__
@ -20,16 +21,19 @@ using namespace finalcut;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Class Declaration // Class Declaration
// This class implements the page subscriber window.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/**
* @brief This class implements the page subscriber window.
* @ingroup monitor
*/
class HOST_SW_API PageSubscriberWnd final : public TransmitWndBase { class HOST_SW_API PageSubscriberWnd final : public TransmitWndBase {
public: public:
/// <summary> /**
/// Initializes a new instance of the PageSubscriberWnd class. * @brief Initializes a new instance of the PageSubscriberWnd class.
/// </summary> * @param channel Channel data.
/// <param name="channel"></param> * @param widget
/// <param name="widget"></param> */
explicit PageSubscriberWnd(lookups::VoiceChData channel, FWidget* widget = nullptr) : TransmitWndBase{channel, widget} explicit PageSubscriberWnd(lookups::VoiceChData channel, FWidget* widget = nullptr) : TransmitWndBase{channel, widget}
{ {
/* stub */ /* stub */
@ -41,9 +45,9 @@ private:
FLabel m_subscriberLabel{"Subscriber ID: ", this}; FLabel m_subscriberLabel{"Subscriber ID: ", this};
FSpinBox m_subscriber{this}; FSpinBox m_subscriber{this};
/// <summary> /**
/// * @brief Initializes the window layout.
/// </summary> */
void initLayout() override void initLayout() override
{ {
FDialog::setText("Page Subscriber"); FDialog::setText("Page Subscriber");
@ -52,9 +56,9 @@ private:
TransmitWndBase::initLayout(); TransmitWndBase::initLayout();
} }
/// <summary> /**
/// * @brief Initializes window controls.
/// </summary> */
void initControls() override void initControls() override
{ {
TransmitWndBase::initControls(); TransmitWndBase::initControls();
@ -103,9 +107,9 @@ private:
redraw(); redraw();
} }
/// <summary> /**
/// * @brief Helper to transmit.
/// </summary> */
void setTransmit() override void setTransmit() override
{ {
std::string method = PUT_DMR_RID; std::string method = PUT_DMR_RID;

@ -1,15 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/*
* Digital Voice Modem - Host Monitor Software
* GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
/** /**
* Digital Voice Modem - Host Monitor Software * @file RadioCheckSubscriberWnd.h
* GPLv2 Open Source. Use is subject to license terms. * @ingroup monitor
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */
*
* @package DVM / Host Monitor Software
* @license GPLv2 License (https://opensource.org/licenses/GPL-2.0)
*
* Copyright (C) 2023,2024 Bryan Biedenkapp, N2PLL
*
*/
#if !defined(__RADIO_CHECK_SUBSCRIBER_WND_H__) #if !defined(__RADIO_CHECK_SUBSCRIBER_WND_H__)
#define __RADIO_CHECK_SUBSCRIBER_WND_H__ #define __RADIO_CHECK_SUBSCRIBER_WND_H__
@ -20,16 +21,19 @@ using namespace finalcut;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Class Declaration // Class Declaration
// This class implements the radio check subscriber window.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/**
* @brief This class implements the radio check subscriber window.
* @ingroup monitor
*/
class HOST_SW_API RadioCheckSubscriberWnd final : public TransmitWndBase { class HOST_SW_API RadioCheckSubscriberWnd final : public TransmitWndBase {
public: public:
/// <summary> /**
/// Initializes a new instance of the RadioCheckSubscriberWnd class. * @brief Initializes a new instance of the RadioCheckSubscriberWnd class.
/// </summary> * @param channel Channel data.
/// <param name="channel"></param> * @param widget
/// <param name="widget"></param> */
explicit RadioCheckSubscriberWnd(lookups::VoiceChData channel, FWidget* widget = nullptr) : TransmitWndBase{channel, widget} explicit RadioCheckSubscriberWnd(lookups::VoiceChData channel, FWidget* widget = nullptr) : TransmitWndBase{channel, widget}
{ {
/* stub */ /* stub */
@ -41,9 +45,9 @@ private:
FLabel m_subscriberLabel{"Subscriber ID: ", this}; FLabel m_subscriberLabel{"Subscriber ID: ", this};
FSpinBox m_subscriber{this}; FSpinBox m_subscriber{this};
/// <summary> /**
/// * @brief Initializes the window layout.
/// </summary> */
void initLayout() override void initLayout() override
{ {
FDialog::setText("Radio Check Subscriber"); FDialog::setText("Radio Check Subscriber");
@ -52,9 +56,9 @@ private:
TransmitWndBase::initLayout(); TransmitWndBase::initLayout();
} }
/// <summary> /**
/// * @brief Initializes window controls.
/// </summary> */
void initControls() override void initControls() override
{ {
TransmitWndBase::initControls(); TransmitWndBase::initControls();
@ -103,9 +107,9 @@ private:
redraw(); redraw();
} }
/// <summary> /**
/// * @brief Helper to transmit.
/// </summary> */
void setTransmit() override void setTransmit() override
{ {
std::string method = PUT_DMR_RID; std::string method = PUT_DMR_RID;

@ -1,15 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/*
* Digital Voice Modem - Host Monitor Software
* GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
/** /**
* Digital Voice Modem - Host Monitor Software * @file SelectedNodeWnd.h
* GPLv2 Open Source. Use is subject to license terms. * @ingroup monitor
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */
*
* @package DVM / Host Monitor Software
* @license GPLv2 License (https://opensource.org/licenses/GPL-2.0)
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
#if !defined(__SELECTED_NODE_WND_H__) #if !defined(__SELECTED_NODE_WND_H__)
#define __SELECTED_NODE_WND_H__ #define __SELECTED_NODE_WND_H__
@ -20,39 +21,61 @@ using namespace finalcut;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Class Declaration // Class Declaration
// This class implements the selected node display window.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/**
* @brief This class implements the selected node display window.
* @ingroup monitor
*/
class HOST_SW_API SelectedNodeWnd final : public finalcut::FDialog { class HOST_SW_API SelectedNodeWnd final : public finalcut::FDialog {
public: public:
/// <summary> /**
/// Initializes a new instance of the SelectedNodeWnd class. * @brief Initializes a new instance of the SelectedNodeWnd class.
/// </summary> * @param widget
/// <param name="widget"></param> */
explicit SelectedNodeWnd(FWidget* widget = nullptr) : FDialog{widget} explicit SelectedNodeWnd(FWidget* widget = nullptr) : FDialog{widget}
{ {
/* stub */ /* stub */
} }
/// <summary>Copy constructor.</summary> /**
* @brief Copy constructor.
*/
SelectedNodeWnd(const SelectedNodeWnd&) = delete; SelectedNodeWnd(const SelectedNodeWnd&) = delete;
/// <summary>Move constructor.</summary> /**
* @brief Move constructor.
*/
SelectedNodeWnd(SelectedNodeWnd&&) noexcept = delete; SelectedNodeWnd(SelectedNodeWnd&&) noexcept = delete;
/// <summary>Finalizes an instance of the SelectedNodeWnd class.</summary> /**
* @brief Finalizes an instance of the SelectedNodeWnd class.
*/
~SelectedNodeWnd() noexcept override = default; ~SelectedNodeWnd() noexcept override = default;
/// <summary>Disable copy assignment operator (=).</summary> /**
* @brief Disable copy assignment operator (=).
*/
auto operator= (const SelectedNodeWnd&) -> SelectedNodeWnd& = delete; auto operator= (const SelectedNodeWnd&) -> SelectedNodeWnd& = delete;
/// <summary>Disable move assignment operator (=).</summary> /**
* @brief Disable move assignment operator (=).
*/
auto operator= (SelectedNodeWnd&&) noexcept -> SelectedNodeWnd& = delete; auto operator= (SelectedNodeWnd&&) noexcept -> SelectedNodeWnd& = delete;
/// <summary>Disable set X coordinate.</summary> /**
* @brief Disable set X coordinate.
*/
void setX(int, bool = true) override { } void setX(int, bool = true) override { }
/// <summary>Disable set Y coordinate.</summary> /**
* @brief Disable set Y coordinate.
*/
void setY(int, bool = true) override { } void setY(int, bool = true) override { }
/// <summary>Disable set position.</summary> /**
* @brief Disable set position.
*/
void setPos(const FPoint&, bool = true) override { } void setPos(const FPoint&, bool = true) override { }
/// <summary></summary> /**
* @brief Helper to set the selected host text.
* @param str Text.
*/
void setSelectedText(std::string str) void setSelectedText(std::string str)
{ {
m_selectedHost.setText(str); m_selectedHost.setText(str);
@ -63,9 +86,9 @@ private:
FLabel m_selectedHostLabel{"Selected Host: ", this}; FLabel m_selectedHostLabel{"Selected Host: ", this};
FLabel m_selectedHost{this}; FLabel m_selectedHost{this};
/// <summary> /**
/// * @brief Initializes the window layout.
/// </summary> */
void initLayout() override void initLayout() override
{ {
std::size_t maxWidth; std::size_t maxWidth;
@ -93,9 +116,9 @@ private:
FDialog::initLayout(); FDialog::initLayout();
} }
/// <summary> /**
/// * @brief Draws the window.
/// </summary> */
void draw() override void draw() override
{ {
setColor(); setColor();

@ -1,15 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/*
* Digital Voice Modem - Host Monitor Software
* GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
/** /**
* Digital Voice Modem - Host Monitor Software * @file TransmitWndBase.h
* GPLv2 Open Source. Use is subject to license terms. * @ingroup monitor
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */
*
* @package DVM / Host Monitor Software
* @license GPLv2 License (https://opensource.org/licenses/GPL-2.0)
*
* Copyright (C) 2023,2024 Bryan Biedenkapp, N2PLL
*
*/
#if !defined(__TRANSMIT_WND_BASE_H__) #if !defined(__TRANSMIT_WND_BASE_H__)
#define __TRANSMIT_WND_BASE_H__ #define __TRANSMIT_WND_BASE_H__
@ -24,16 +25,19 @@ using namespace finalcut;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Class Declaration // Class Declaration
// This class implements the base class for transmit windows.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/**
* @brief This class implements the base class for transmit windows.
* @ingroup monitor
*/
class HOST_SW_API TransmitWndBase : public finalcut::FDialog { class HOST_SW_API TransmitWndBase : public finalcut::FDialog {
public: public:
/// <summary> /**
/// Initializes a new instance of the TransmitWndBase class. * @brief Initializes a new instance of the TransmitWndBase class.
/// </summary> * @param channel Channel data.
/// <param name="channel"></param> * @param widget
/// <param name="widget"></param> */
explicit TransmitWndBase(lookups::VoiceChData channel, FWidget* widget = nullptr) : FDialog{widget}, explicit TransmitWndBase(lookups::VoiceChData channel, FWidget* widget = nullptr) : FDialog{widget},
m_selectedCh(channel) m_selectedCh(channel)
{ {
@ -46,9 +50,9 @@ protected:
uint8_t m_mode = modem::STATE_DMR; uint8_t m_mode = modem::STATE_DMR;
/// <summary> /**
/// * @brief Initializes the window layout.
/// </summary> */
void initLayout() override void initLayout() override
{ {
FDialog::setMinimizable(true); FDialog::setMinimizable(true);
@ -82,9 +86,9 @@ protected:
redraw(); redraw();
} }
/// <summary> /**
/// * @brief Initializes window controls.
/// </summary> */
virtual void initControls() virtual void initControls()
{ {
resizeControls(); resizeControls();
@ -202,9 +206,9 @@ protected:
focusFirstChild(); focusFirstChild();
} }
/// <summary> /**
/// * @brief
/// </summary> */
void resizeControls() void resizeControls()
{ {
// transmit button and close button logic // transmit button and close button logic
@ -215,9 +219,9 @@ protected:
m_closeButton.addCallback("clicked", [&]() { hide(); }); m_closeButton.addCallback("clicked", [&]() { hide(); });
} }
/// <summary> /**
/// * @brief Adjusts window size.
/// </summary> */
void adjustSize() override void adjustSize() override
{ {
FDialog::adjustSize(); FDialog::adjustSize();
@ -227,10 +231,10 @@ protected:
** Event Handlers ** Event Handlers
*/ */
/// <summary> /**
/// * @brief Event that occurs on keyboard key press.
/// </summary> * @param e Keyboard Event.
/// <param name="e"></param> */
void onKeyPress(finalcut::FKeyEvent* e) override void onKeyPress(finalcut::FKeyEvent* e) override
{ {
const auto key = e->key(); const auto key = e->key();
@ -239,19 +243,19 @@ protected:
} }
} }
/// <summary> /**
/// * @brief Event that occurs when the window is closed.
/// </summary> * @param e Close Event
/// <param name="e"></param> */
void onClose(FCloseEvent* e) override void onClose(FCloseEvent* e) override
{ {
hide(); hide();
} }
protected: protected:
/// <summary> /**
/// * @brief Helper to transmit.
/// </summary> */
virtual void setTransmit() virtual void setTransmit()
{ {
/* stub */ /* stub */

@ -1,15 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/*
* Digital Voice Modem - Host Monitor Software
* GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright (C) 2023 Bryan Biedenkapp, N2PLL
*
*/
/** /**
* Digital Voice Modem - Host Monitor Software * @file RadioCheckSubscriberWnd.h
* GPLv2 Open Source. Use is subject to license terms. * @ingroup monitor
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */
*
* @package DVM / Host Monitor Software
* @license GPLv2 License (https://opensource.org/licenses/GPL-2.0)
*
* Copyright (C) 2023,2024 Bryan Biedenkapp, N2PLL
*
*/
#if !defined(__UNINHIBIT_SUBSCRIBER_WND_H__) #if !defined(__UNINHIBIT_SUBSCRIBER_WND_H__)
#define __UNINHIBIT_SUBSCRIBER_WND_H__ #define __UNINHIBIT_SUBSCRIBER_WND_H__
@ -20,16 +21,19 @@ using namespace finalcut;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Class Declaration // Class Declaration
// This class implements the uninhibit subscriber window.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/**
* @brief This class implements the uninhibit subscriber window.
* @ingroup monitor
*/
class HOST_SW_API UninhibitSubscriberWnd final : public TransmitWndBase { class HOST_SW_API UninhibitSubscriberWnd final : public TransmitWndBase {
public: public:
/// <summary> /**
/// Initializes a new instance of the UninhibitSubscriberWnd class. * @brief Initializes a new instance of the UninhibitSubscriberWnd class.
/// </summary> * @param channel Channel data.
/// <param name="channel"></param> * @param widget
/// <param name="widget"></param> */
explicit UninhibitSubscriberWnd(lookups::VoiceChData channel, FWidget* widget = nullptr) : TransmitWndBase{channel, widget} explicit UninhibitSubscriberWnd(lookups::VoiceChData channel, FWidget* widget = nullptr) : TransmitWndBase{channel, widget}
{ {
/* stub */ /* stub */
@ -41,9 +45,9 @@ private:
FLabel m_subscriberLabel{"Subscriber ID: ", this}; FLabel m_subscriberLabel{"Subscriber ID: ", this};
FSpinBox m_subscriber{this}; FSpinBox m_subscriber{this};
/// <summary> /**
/// * @brief Initializes the window layout.
/// </summary> */
void initLayout() override void initLayout() override
{ {
FDialog::setText("Uninhibit Subscriber"); FDialog::setText("Uninhibit Subscriber");
@ -52,9 +56,9 @@ private:
TransmitWndBase::initLayout(); TransmitWndBase::initLayout();
} }
/// <summary> /**
/// * @brief Initializes window controls.
/// </summary> */
void initControls() override void initControls() override
{ {
TransmitWndBase::initControls(); TransmitWndBase::initControls();
@ -103,9 +107,9 @@ private:
redraw(); redraw();
} }
/// <summary> /**
/// * @brief Helper to transmit.
/// </summary> */
void setTransmit() override void setTransmit() override
{ {
std::string method = PUT_DMR_RID; std::string method = PUT_DMR_RID;

Loading…
Cancel
Save

Powered by TurnKey Linux.