Merge branch 'master' into dmr_beacons

This commit is contained in:
Jonathan Naylor 2019-11-13 08:41:11 +00:00
commit b38ba239a8
8 changed files with 41404 additions and 4659 deletions

View file

@ -146,7 +146,7 @@ m_dmrSlot2TGWhiteList(),
m_dmrCallHang(10U), m_dmrCallHang(10U),
m_dmrTXHang(4U), m_dmrTXHang(4U),
m_dmrModeHang(10U), m_dmrModeHang(10U),
m_dmrOVCM(true), m_dmrOVCM(false),
m_fusionEnabled(false), m_fusionEnabled(false),
m_fusionLowDeviation(false), m_fusionLowDeviation(false),
m_fusionRemoteGateway(false), m_fusionRemoteGateway(false),

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
* Copyright (C) 2019 by Patrick Maier DK5MP
* *
* 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
@ -149,6 +150,29 @@ unsigned char CDMRCSBK::getFID() const
return m_FID; return m_FID;
} }
bool CDMRCSBK::getOVCM() const
{
bool bOVCM = false;
// Service options informations are only available in
// "Unit to Unit Voice Service Request CSBK" and
// "Unit to Unit Voice Service Answer Response CSBK"
if ((m_CSBKO == CSBKO_UUVREQ) || (m_CSBKO == CSBKO_UUANSRSP))
bOVCM = (m_data[2U] & 0x04U) == 0x04U;
return bOVCM;
}
void CDMRCSBK::setOVCM(bool ovcm)
{
// Set OVCM only in CSBKs having the service options information
if ((m_CSBKO == CSBKO_UUVREQ) || (m_CSBKO == CSBKO_UUANSRSP)) {
if (ovcm)
m_data[2U] |= 0x04U;
else
m_data[2U] &= 0xFBU;
}
}
bool CDMRCSBK::getGI() const bool CDMRCSBK::getGI() const
{ {
return m_GI; return m_GI;

View file

@ -45,6 +45,10 @@ public:
CSBKO getCSBKO() const; CSBKO getCSBKO() const;
unsigned char getFID() const; unsigned char getFID() const;
// Set/Get the OVCM bit in the supported CSBKs
bool getOVCM() const;
void setOVCM(bool ovcm);
// For BS Dwn Act // For BS Dwn Act
unsigned int getBSId() const; unsigned int getBSId() const;

42048
DMRIds.dat

File diff suppressed because it is too large Load diff

View file

@ -43,7 +43,7 @@ CDisplay* CDMRSlot::m_display = NULL;
bool CDMRSlot::m_duplex = true; bool CDMRSlot::m_duplex = true;
CDMRLookup* CDMRSlot::m_lookup = NULL; CDMRLookup* CDMRSlot::m_lookup = NULL;
unsigned int CDMRSlot::m_hangCount = 3U * 17U; unsigned int CDMRSlot::m_hangCount = 3U * 17U;
bool CDMRSlot::m_ovcm = true; bool CDMRSlot::m_ovcm = false;
CRSSIInterpolator* CDMRSlot::m_rssiMapper = NULL; CRSSIInterpolator* CDMRSlot::m_rssiMapper = NULL;
@ -437,6 +437,9 @@ bool CDMRSlot::writeModem(unsigned char *data, unsigned int len)
if (csbko == CSBKO_BSDWNACT) if (csbko == CSBKO_BSDWNACT)
return false; return false;
// set the OVCM bit for the supported csbk
csbk.setOVCM(m_ovcm);
bool gi = csbk.getGI(); bool gi = csbk.getGI();
unsigned int srcId = csbk.getSrcId(); unsigned int srcId = csbk.getSrcId();
unsigned int dstId = csbk.getDstId(); unsigned int dstId = csbk.getDstId();
@ -1571,6 +1574,9 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
if (csbko == CSBKO_BSDWNACT) if (csbko == CSBKO_BSDWNACT)
return; return;
// set the OVCM bit for the supported csbk
csbk.setOVCM(m_ovcm);
bool gi = csbk.getGI(); bool gi = csbk.getGI();
unsigned int srcId = csbk.getSrcId(); unsigned int srcId = csbk.getSrcId();
unsigned int dstId = csbk.getDstId(); unsigned int dstId = csbk.getDstId();

View file

@ -72,7 +72,7 @@ bool CDMRTA::decodeTA()
unsigned int TAformat = (talkerAlias[0] >> 6U) & 0x03U; unsigned int TAformat = (talkerAlias[0] >> 6U) & 0x03U;
unsigned int TAsize = (talkerAlias[0] >> 1U) & 0x1FU; unsigned int TAsize = (talkerAlias[0] >> 1U) & 0x1FU;
::strncpy(m_TA, "(could not decode)", sizeof(m_TA)); ::memcpy(m_TA, "(could not decode)", sizeof(m_TA));
switch (TAformat) { switch (TAformat) {
case 0U: // 7 bit case 0U: // 7 bit
@ -96,7 +96,7 @@ bool CDMRTA::decodeTA()
case 1U: // ISO 8 bit case 1U: // ISO 8 bit
case 2U: // UTF8 case 2U: // UTF8
::strncpy(m_TA, (char*)talkerAlias + 1U, sizeof(m_TA)); ::memcpy(m_TA, talkerAlias + 1U, sizeof(m_TA));
break; break;
case 3U: // UTF16 poor man's conversion case 3U: // UTF16 poor man's conversion
@ -117,9 +117,9 @@ bool CDMRTA::decodeTA()
if (TAlen > TAsize) { if (TAlen > TAsize) {
if (TAlen < 29U) if (TAlen < 29U)
strcat(m_TA," ?"); strcat(m_TA, " ?");
else else
strcpy(m_TA + 28U," ?"); strcpy(m_TA + 28U, " ?");
} }
return TAlen >= TAsize; return TAlen >= TAsize;

View file

@ -107,7 +107,7 @@ DumpTAData=1
CallHang=3 CallHang=3
TXHang=4 TXHang=4
# ModeHang=10 # ModeHang=10
OVCM=1 # OVCM=0
[System Fusion] [System Fusion]
Enable=1 Enable=1

3967
NXDN.csv

File diff suppressed because it is too large Load diff