port RTP header changes from fnecore for better handling the RTP timestamp; relabel conference FNE to converged FNE; refactor version slightly so that the running DVM host version is properly reported to the FNE and when saved to modem configuration area;

pull/48/head
Bryan Biedenkapp 2 years ago
parent abbe6cd41c
commit cf0d8bb430

@ -103,9 +103,15 @@ typedef unsigned long long ulong64_t;
#endif #endif
#define __PROG_NAME__ "" #define __PROG_NAME__ ""
#define __NET_NAME__ "DVM_DMR_P25"
#define __EXE_NAME__ "" #define __EXE_NAME__ ""
#define __VER__ "D03.60.00 (" __GIT_VER__ ")"
#define VERSION_MAJOR "03"
#define VERSION_MINOR "06"
#define VERSION_REV "A"
#define __NETVER__ "DVM_R" VERSION_MAJOR VERSION_REV VERSION_MINOR
#define __VER__ VERSION_MAJOR "." VERSION_MINOR " (R" VERSION_MAJOR VERSION_REV VERSION_MINOR " " __GIT_VER__ ")"
#define __BUILD__ __DATE__ " " __TIME__ #define __BUILD__ __DATE__ " " __TIME__
#define HOST_SW_API #define HOST_SW_API

@ -7,7 +7,7 @@
* *
*/ */
/* /*
* Copyright (C) 2023 by Bryan Biedenkapp N2PLL * Copyright (C) 2023-2024 by Bryan Biedenkapp N2PLL
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -37,6 +37,7 @@ using namespace network::frame;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
hrc::hrc_t RTPHeader::m_wcStart = hrc::hrc_t(); hrc::hrc_t RTPHeader::m_wcStart = hrc::hrc_t();
uint32_t RTPHeader::m_prevTimestamp = INVALID_TS;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Public Class Members // Public Class Members
@ -112,9 +113,16 @@ void RTPHeader::encode(uint8_t* data)
data[2U] = (m_seq >> 8) & 0xFFU; // Sequence MSB data[2U] = (m_seq >> 8) & 0xFFU; // Sequence MSB
data[3U] = (m_seq >> 0) & 0xFFU; // Sequence LSB data[3U] = (m_seq >> 0) & 0xFFU; // Sequence LSB
uint64_t timeSinceStart = hrc::diffNow(m_wcStart); if (m_prevTimestamp == INVALID_TS) {
uint64_t microSeconds = timeSinceStart * RTP_GENERIC_CLOCK_RATE; uint64_t timeSinceStart = hrc::diffNow(m_wcStart);
m_timestamp = uint32_t(microSeconds / 1000000); uint64_t microSeconds = timeSinceStart * RTP_GENERIC_CLOCK_RATE;
m_timestamp = uint32_t(microSeconds / 1000000);
m_prevTimestamp = m_timestamp;
}
else {
m_timestamp = m_prevTimestamp + (RTP_GENERIC_CLOCK_RATE / 133);
m_prevTimestamp = m_timestamp;
}
__SET_UINT32(m_timestamp, data, 4U); // Timestamp __SET_UINT32(m_timestamp, data, 4U); // Timestamp
__SET_UINT32(m_ssrc, data, 8U); // Synchronization Source Identifier __SET_UINT32(m_ssrc, data, 8U); // Synchronization Source Identifier
@ -126,4 +134,5 @@ void RTPHeader::encode(uint8_t* data)
void RTPHeader::resetStartTime() void RTPHeader::resetStartTime()
{ {
m_wcStart = hrc::hrc_t(); m_wcStart = hrc::hrc_t();
m_prevTimestamp = INVALID_TS;
} }

@ -81,12 +81,13 @@ namespace network
/// <summary>Sequence number for the RTP packet.</summary> /// <summary>Sequence number for the RTP packet.</summary>
__PROPERTY(uint16_t, seq, Sequence); __PROPERTY(uint16_t, seq, Sequence);
/// <summary>RTP packet timestamp.</summary> /// <summary>RTP packet timestamp.</summary>
__READONLY_PROPERTY(uint32_t, timestamp, Timestamp); __PROPERTY(uint32_t, timestamp, Timestamp);
/// <summary>Synchronization Source ID.</summary> /// <summary>Synchronization Source ID.</summary>
__PROPERTY(uint32_t, ssrc, SSRC); __PROPERTY(uint32_t, ssrc, SSRC);
private: private:
static std::chrono::time_point<std::chrono::high_resolution_clock> m_wcStart; static std::chrono::time_point<std::chrono::high_resolution_clock> m_wcStart;
static uint32_t m_prevTimestamp;
std::mt19937 m_random; std::mt19937 m_random;
}; };

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
#/** #/**
#* Digital Voice Modem - Conference FNE Software #* Digital Voice Modem - Converged FNE 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 / Conference FNE Software #* @package DVM / Converged FNE Software
#* #*
#*/ #*/
#/* #/*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
// //
@ -38,7 +38,7 @@
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
#undef __PROG_NAME__ #undef __PROG_NAME__
#define __PROG_NAME__ "Digital Voice Modem (DVM) Conference FNE" #define __PROG_NAME__ "Digital Voice Modem (DVM) Converged FNE"
#undef __EXE_NAME__ #undef __EXE_NAME__
#define __EXE_NAME__ "dvmfne" #define __EXE_NAME__ "dvmfne"

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
// //

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
// //

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -1,9 +1,9 @@
/** /**
* Digital Voice Modem - Conference FNE Software * Digital Voice Modem - Converged FNE 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 / Conference FNE Software * @package DVM / Converged FNE Software
* *
*/ */
/* /*

@ -699,7 +699,7 @@ bool Network::writeConfig()
return false; return false;
} }
const char* software = __NET_NAME__; const char* software = __NETVER__;
json::object config = json::object(); json::object config = json::object();

@ -2011,7 +2011,7 @@ bool HostSetup::writeFlash()
// software signature // software signature
std::string software; std::string software;
software.append(__NET_NAME__ " " __VER__ " (built " __BUILD__ ")"); software.append(__NETVER__ " (built " __BUILD__ ")");
for (uint8_t i = 0; i < software.length(); i++) { for (uint8_t i = 0; i < software.length(); i++) {
buffer[176U + i] = software[i]; buffer[176U + i] = software[i];
} }

@ -193,9 +193,9 @@ void usage(const char* message, const char* arg)
reply += " status Display current settings and operation mode\r\n"; reply += " status Display current settings and operation mode\r\n";
reply += " voice-ch Retrieves the list of configured voice channels\r\n"; reply += " voice-ch Retrieves the list of configured voice channels\r\n";
reply += "\r\n"; reply += "\r\n";
reply += " fne-peerlist Retrieves the list of connected peers (Conference FNE only)\r\n"; reply += " fne-peerlist Retrieves the list of connected peers (Converged FNE only)\r\n";
reply += " fne-tgidlist Retrieves the list of configured TGIDs (Conference FNE only)\r\n"; reply += " fne-tgidlist Retrieves the list of configured TGIDs (Converged FNE only)\r\n";
reply += " fne-force-update Forces the FNE to send list update (Conference FNE only)\r\n"; reply += " fne-force-update Forces the FNE to send list update (Converged FNE only)\r\n";
reply += "\r\n"; reply += "\r\n";
reply += " mdm-mode <mode> Set current mode of host (idle, lockout, dmr, p25, nxdn)\r\n"; reply += " mdm-mode <mode> Set current mode of host (idle, lockout, dmr, p25, nxdn)\r\n";
reply += " mdm-kill Causes the host to quit\r\n"; reply += " mdm-kill Causes the host to quit\r\n";

Loading…
Cancel
Save

Powered by TurnKey Linux.