mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-23 08:45:48 +08:00
Make the DMR downlink activation less selective.
This commit is contained in:
@@ -22,7 +22,6 @@
|
|||||||
#include <algorithm>
|
#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) :
|
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) :
|
||||||
m_id(id),
|
|
||||||
m_colorCode(colorCode),
|
m_colorCode(colorCode),
|
||||||
m_modem(modem),
|
m_modem(modem),
|
||||||
m_network(network),
|
m_network(network),
|
||||||
@@ -64,25 +63,17 @@ bool CDMRControl::processWakeup(const unsigned char* data)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
unsigned int srcId = csbk.getSrcId();
|
unsigned int srcId = csbk.getSrcId();
|
||||||
unsigned int bsId = csbk.getBSId();
|
|
||||||
|
|
||||||
std::string src = m_lookup->find(srcId);
|
std::string src = m_lookup->find(srcId);
|
||||||
|
|
||||||
bool ret = CDMRAccessControl::validateSrcId(srcId);
|
bool ret = CDMRAccessControl::validateSrcId(srcId);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
LogMessage("Invalid CSBK BS_Dwn_Act received from %s", src.c_str());
|
LogMessage("Invalid Downlink Activate received from %s", src.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bsId == 0xFFFFFFU) {
|
LogMessage("Downlink Activate received from %s", src.c_str());
|
||||||
LogMessage("CSBK BS_Dwn_Act for ANY received from %s", src.c_str());
|
|
||||||
return true;
|
|
||||||
} else if (bsId == m_id) {
|
|
||||||
LogMessage("CSBK BS_Dwn_Act for %u received from %s", bsId, src.c_str());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CDMRControl::writeModemSlot1(unsigned char *data, unsigned int len)
|
bool CDMRControl::writeModemSlot1(unsigned char *data, unsigned int len)
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ public:
|
|||||||
void clock();
|
void clock();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned int m_id;
|
|
||||||
unsigned int m_colorCode;
|
unsigned int m_colorCode;
|
||||||
CModem* m_modem;
|
CModem* m_modem;
|
||||||
CDMRNetwork* m_network;
|
CDMRNetwork* m_network;
|
||||||
|
|||||||
Reference in New Issue
Block a user