Merge pull request #533 from maierp/maier_p_ovcm_rx
Config setting for sending OVCM to network (RX)
This commit is contained in:
commit
aa7ae2371c
10
Conf.cpp
10
Conf.cpp
|
@ -147,6 +147,7 @@ m_dmrCallHang(10U),
|
|||
m_dmrTXHang(4U),
|
||||
m_dmrModeHang(10U),
|
||||
m_dmrOVCM(false),
|
||||
m_dmrOVCMRX(false),
|
||||
m_fusionEnabled(false),
|
||||
m_fusionLowDeviation(false),
|
||||
m_fusionRemoteGateway(false),
|
||||
|
@ -594,7 +595,9 @@ bool CConf::read()
|
|||
m_dmrModeHang = (unsigned int)::atoi(value);
|
||||
else if (::strcmp(key, "OVCM") == 0)
|
||||
m_dmrOVCM = ::atoi(value) == 1;
|
||||
} else if (section == SECTION_FUSION) {
|
||||
else if (::strcmp(key, "OVCMRX") == 0)
|
||||
m_dmrOVCMRX = ::atoi(value) == 1;
|
||||
} else if (section == SECTION_FUSION) {
|
||||
if (::strcmp(key, "Enable") == 0)
|
||||
m_fusionEnabled = ::atoi(value) == 1;
|
||||
else if (::strcmp(key, "LowDeviation") == 0)
|
||||
|
@ -1260,6 +1263,11 @@ bool CConf::getDMROVCM() const
|
|||
return m_dmrOVCM;
|
||||
}
|
||||
|
||||
bool CConf::getDMROVCMRX() const
|
||||
{
|
||||
return m_dmrOVCMRX;
|
||||
}
|
||||
|
||||
bool CConf::getFusionEnabled() const
|
||||
{
|
||||
return m_fusionEnabled;
|
||||
|
|
2
Conf.h
2
Conf.h
|
@ -136,6 +136,7 @@ public:
|
|||
unsigned int getDMRTXHang() const;
|
||||
unsigned int getDMRModeHang() const;
|
||||
bool getDMROVCM() const;
|
||||
bool getDMROVCMRX() const;
|
||||
|
||||
// The System Fusion section
|
||||
bool getFusionEnabled() const;
|
||||
|
@ -375,6 +376,7 @@ private:
|
|||
unsigned int m_dmrTXHang;
|
||||
unsigned int m_dmrModeHang;
|
||||
bool m_dmrOVCM;
|
||||
bool m_dmrOVCMRX;
|
||||
|
||||
bool m_fusionEnabled;
|
||||
bool m_fusionLowDeviation;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <cassert>
|
||||
#include <algorithm>
|
||||
|
||||
CDMRControl::CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, bool embeddedLCOnly, bool dumpTAData, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blacklist, const std::vector<unsigned int>& whitelist, const std::vector<unsigned int>& slot1TGWhitelist, const std::vector<unsigned int>& slot2TGWhitelist, unsigned int timeout, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssi, unsigned int jitter, bool ovcm) :
|
||||
CDMRControl::CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, bool embeddedLCOnly, bool dumpTAData, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blacklist, const std::vector<unsigned int>& whitelist, const std::vector<unsigned int>& slot1TGWhitelist, const std::vector<unsigned int>& slot2TGWhitelist, unsigned int timeout, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssi, unsigned int jitter, bool ovcm, bool ovcmRX) :
|
||||
m_colorCode(colorCode),
|
||||
m_modem(modem),
|
||||
m_network(network),
|
||||
|
@ -38,7 +38,7 @@ m_lookup(lookup)
|
|||
// Load black and white lists to DMRAccessControl
|
||||
CDMRAccessControl::init(blacklist, whitelist, slot1TGWhitelist, slot2TGWhitelist, selfOnly, prefixes, id);
|
||||
|
||||
CDMRSlot::init(colorCode, embeddedLCOnly, dumpTAData, callHang, modem, network, display, duplex, m_lookup, rssi, jitter, ovcm);
|
||||
CDMRSlot::init(colorCode, embeddedLCOnly, dumpTAData, callHang, modem, network, display, duplex, m_lookup, rssi, jitter, ovcm, ovcmRX);
|
||||
}
|
||||
|
||||
CDMRControl::~CDMRControl()
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
class CDMRControl {
|
||||
public:
|
||||
CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, bool embeddedLCOnly, bool dumpTAData, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blacklist, const std::vector<unsigned int>& whitelist, const std::vector<unsigned int>& slot1TGWhitelist, const std::vector<unsigned int>& slot2TGWhitelist, unsigned int timeout, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssi, unsigned int jitter, bool ovcm);
|
||||
CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, bool embeddedLCOnly, bool dumpTAData, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blacklist, const std::vector<unsigned int>& whitelist, const std::vector<unsigned int>& slot1TGWhitelist, const std::vector<unsigned int>& slot2TGWhitelist, unsigned int timeout, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssi, unsigned int jitter, bool ovcm, bool ovcmRX);
|
||||
~CDMRControl();
|
||||
|
||||
bool processWakeup(const unsigned char* data);
|
||||
|
|
12
DMRSlot.cpp
12
DMRSlot.cpp
|
@ -44,6 +44,7 @@ bool CDMRSlot::m_duplex = true;
|
|||
CDMRLookup* CDMRSlot::m_lookup = NULL;
|
||||
unsigned int CDMRSlot::m_hangCount = 3U * 17U;
|
||||
bool CDMRSlot::m_ovcm = false;
|
||||
bool CDMRSlot::m_ovcmRX = false;
|
||||
|
||||
CRSSIInterpolator* CDMRSlot::m_rssiMapper = NULL;
|
||||
|
||||
|
@ -1045,7 +1046,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
dmrData.getSrcId(), dmrData.getFLCO() == FLCO_GROUP ? "TG" : "", dmrData.getDstId(),
|
||||
srcId, flco == FLCO_GROUP ? "TG" : "", dstId);
|
||||
|
||||
lc->setOVCM(m_ovcm);
|
||||
lc->setOVCM(m_ovcmRX);
|
||||
m_netLC = lc;
|
||||
|
||||
// The standby LC data
|
||||
|
@ -1119,7 +1120,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
unsigned int dstId = lc->getDstId();
|
||||
unsigned int srcId = lc->getSrcId();
|
||||
|
||||
lc->setOVCM(m_ovcm);
|
||||
lc->setOVCM(m_ovcmRX);
|
||||
m_netLC = lc;
|
||||
|
||||
m_lastFrameValid = false;
|
||||
|
@ -1305,7 +1306,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
unsigned int dstId = lc->getDstId();
|
||||
unsigned int srcId = lc->getSrcId();
|
||||
|
||||
lc->setOVCM(m_ovcm);
|
||||
lc->setOVCM(m_ovcmRX);
|
||||
m_netLC = lc;
|
||||
|
||||
// The standby LC data
|
||||
|
@ -1575,7 +1576,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
return;
|
||||
|
||||
// set the OVCM bit for the supported csbk
|
||||
csbk.setOVCM(m_ovcm);
|
||||
csbk.setOVCM(m_ovcmRX);
|
||||
|
||||
bool gi = csbk.getGI();
|
||||
unsigned int srcId = csbk.getSrcId();
|
||||
|
@ -1881,7 +1882,7 @@ void CDMRSlot::writeQueueNet(const unsigned char *data)
|
|||
m_queue.addData(data, len);
|
||||
}
|
||||
|
||||
void CDMRSlot::init(unsigned int colorCode, bool embeddedLCOnly, bool dumpTAData, unsigned int callHang, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssiMapper, unsigned int jitter, bool ovcm)
|
||||
void CDMRSlot::init(unsigned int colorCode, bool embeddedLCOnly, bool dumpTAData, unsigned int callHang, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssiMapper, unsigned int jitter, bool ovcm, bool ovcmRX)
|
||||
{
|
||||
assert(modem != NULL);
|
||||
assert(display != NULL);
|
||||
|
@ -1898,6 +1899,7 @@ void CDMRSlot::init(unsigned int colorCode, bool embeddedLCOnly, bool dumpTAData
|
|||
m_lookup = lookup;
|
||||
m_hangCount = callHang * 17U;
|
||||
m_ovcm = ovcm;
|
||||
m_ovcmRX = ovcmRX;
|
||||
|
||||
m_rssiMapper = rssiMapper;
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
|
||||
void enable(bool enabled);
|
||||
|
||||
static void init(unsigned int colorCode, bool embeddedLCOnly, bool dumpTAData, unsigned int callHang, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssiMapper, unsigned int jitter, bool ovcm);
|
||||
static void init(unsigned int colorCode, bool embeddedLCOnly, bool dumpTAData, unsigned int callHang, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssiMapper, unsigned int jitter, bool ovcm, bool ovcmRX);
|
||||
|
||||
private:
|
||||
unsigned int m_slotNo;
|
||||
|
@ -124,6 +124,7 @@ private:
|
|||
static CDMRLookup* m_lookup;
|
||||
static unsigned int m_hangCount;
|
||||
static bool m_ovcm;
|
||||
static bool m_ovcmRX;
|
||||
|
||||
static CRSSIInterpolator* m_rssiMapper;
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ CallHang=3
|
|||
TXHang=4
|
||||
# ModeHang=10
|
||||
# OVCM=0
|
||||
# OVCMRX=0
|
||||
|
||||
[System Fusion]
|
||||
Enable=1
|
||||
|
|
|
@ -446,6 +446,7 @@ int CMMDVMHost::run()
|
|||
m_dmrRFModeHang = m_conf.getDMRModeHang();
|
||||
dmrBeacons = m_conf.getDMRBeacons();
|
||||
bool ovcm = m_conf.getDMROVCM();
|
||||
bool ovcmRX = m_conf.getDMROVCMRX();
|
||||
|
||||
if (txHang > m_dmrRFModeHang)
|
||||
txHang = m_dmrRFModeHang;
|
||||
|
@ -479,6 +480,7 @@ int CMMDVMHost::run()
|
|||
LogInfo(" TX Hang: %us", txHang);
|
||||
LogInfo(" Mode Hang: %us", m_dmrRFModeHang);
|
||||
LogInfo(" OVCM: %s", ovcm ? "on" : "off");
|
||||
LogInfo(" OVCMRX: %s", ovcmRX ? "on" : "off");
|
||||
|
||||
switch (dmrBeacons) {
|
||||
case DMR_BEACONS_NETWORK: {
|
||||
|
@ -509,7 +511,7 @@ int CMMDVMHost::run()
|
|||
break;
|
||||
}
|
||||
|
||||
m_dmr = new CDMRControl(id, colorCode, callHang, selfOnly, embeddedLCOnly, dumpTAData, prefixes, blackList, whiteList, slot1TGWhiteList, slot2TGWhiteList, m_timeout, m_modem, m_dmrNetwork, m_display, m_duplex, m_dmrLookup, rssi, jitter, ovcm);
|
||||
m_dmr = new CDMRControl(id, colorCode, callHang, selfOnly, embeddedLCOnly, dumpTAData, prefixes, blackList, whiteList, slot1TGWhiteList, slot2TGWhiteList, m_timeout, m_modem, m_dmrNetwork, m_display, m_duplex, m_dmrLookup, rssi, jitter, ovcm, ovcmRX);
|
||||
|
||||
m_dmrTXTimer.setTimeout(txHang);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue