mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 15:09:23 +08:00
Add UseCOSAsLockout and FM Access Mode parameters.
This commit is contained in:
18
Conf.cpp
18
Conf.cpp
@@ -112,6 +112,7 @@ m_modemNXDNTXLevel(50.0F),
|
|||||||
m_modemPOCSAGTXLevel(50.0F),
|
m_modemPOCSAGTXLevel(50.0F),
|
||||||
m_modemFMTXLevel(50.0F),
|
m_modemFMTXLevel(50.0F),
|
||||||
m_modemRSSIMappingFile(),
|
m_modemRSSIMappingFile(),
|
||||||
|
m_modemUseCOSAsLockout(false),
|
||||||
m_modemTrace(false),
|
m_modemTrace(false),
|
||||||
m_modemDebug(false),
|
m_modemDebug(false),
|
||||||
m_transparentEnabled(false),
|
m_transparentEnabled(false),
|
||||||
@@ -200,7 +201,7 @@ m_fmCTCSSLowThreshold(20U),
|
|||||||
m_fmCTCSSLevel(2.0F),
|
m_fmCTCSSLevel(2.0F),
|
||||||
m_fmKerchunkTime(0U),
|
m_fmKerchunkTime(0U),
|
||||||
m_fmHangTime(7U),
|
m_fmHangTime(7U),
|
||||||
m_fmUseCOS(true),
|
m_fmAccessMode(1U),
|
||||||
m_fmCOSInvert(false),
|
m_fmCOSInvert(false),
|
||||||
m_fmRFAudioBoost(1U),
|
m_fmRFAudioBoost(1U),
|
||||||
m_fmMaxDevLevel(90.0F),
|
m_fmMaxDevLevel(90.0F),
|
||||||
@@ -524,6 +525,8 @@ bool CConf::read()
|
|||||||
m_modemFMTXLevel = float(::atof(value));
|
m_modemFMTXLevel = float(::atof(value));
|
||||||
else if (::strcmp(key, "RSSIMappingFile") == 0)
|
else if (::strcmp(key, "RSSIMappingFile") == 0)
|
||||||
m_modemRSSIMappingFile = value;
|
m_modemRSSIMappingFile = value;
|
||||||
|
else if (::strcmp(key, "UseCOSAsLockout") == 0)
|
||||||
|
m_modemUseCOSAsLockout = ::atoi(value) == 1;
|
||||||
else if (::strcmp(key, "Trace") == 0)
|
else if (::strcmp(key, "Trace") == 0)
|
||||||
m_modemTrace = ::atoi(value) == 1;
|
m_modemTrace = ::atoi(value) == 1;
|
||||||
else if (::strcmp(key, "Debug") == 0)
|
else if (::strcmp(key, "Debug") == 0)
|
||||||
@@ -777,8 +780,8 @@ bool CConf::read()
|
|||||||
m_fmKerchunkTime = (unsigned int)::atoi(value);
|
m_fmKerchunkTime = (unsigned int)::atoi(value);
|
||||||
else if (::strcmp(key, "HangTime") == 0)
|
else if (::strcmp(key, "HangTime") == 0)
|
||||||
m_fmHangTime = (unsigned int)::atoi(value);
|
m_fmHangTime = (unsigned int)::atoi(value);
|
||||||
else if (::strcmp(key, "UseCOS") == 0)
|
else if (::strcmp(key, "AccessMode") == 0)
|
||||||
m_fmUseCOS = ::atoi(value) == 1;
|
m_fmAccessMode = (unsigned int)::atoi(value);
|
||||||
else if (::strcmp(key, "COSInvert") == 0)
|
else if (::strcmp(key, "COSInvert") == 0)
|
||||||
m_fmCOSInvert = ::atoi(value) == 1;
|
m_fmCOSInvert = ::atoi(value) == 1;
|
||||||
else if (::strcmp(key, "RFAudioBoost") == 0)
|
else if (::strcmp(key, "RFAudioBoost") == 0)
|
||||||
@@ -1226,6 +1229,11 @@ std::string CConf::getModemRSSIMappingFile () const
|
|||||||
return m_modemRSSIMappingFile;
|
return m_modemRSSIMappingFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CConf::getModemUseCOSAsLockout() const
|
||||||
|
{
|
||||||
|
return m_modemUseCOSAsLockout;
|
||||||
|
}
|
||||||
|
|
||||||
bool CConf::getModemTrace() const
|
bool CConf::getModemTrace() const
|
||||||
{
|
{
|
||||||
return m_modemTrace;
|
return m_modemTrace;
|
||||||
@@ -1666,9 +1674,9 @@ unsigned int CConf::getFMHangTime() const
|
|||||||
return m_fmHangTime;
|
return m_fmHangTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CConf::getFMUseCOS() const
|
unsigned int CConf::getFMAccessMode() const
|
||||||
{
|
{
|
||||||
return m_fmUseCOS;
|
return m_fmAccessMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CConf::getFMCOSInvert() const
|
bool CConf::getFMCOSInvert() const
|
||||||
|
|||||||
6
Conf.h
6
Conf.h
@@ -92,6 +92,7 @@ public:
|
|||||||
float getModemPOCSAGTXLevel() const;
|
float getModemPOCSAGTXLevel() const;
|
||||||
float getModemFMTXLevel() const;
|
float getModemFMTXLevel() const;
|
||||||
std::string getModemRSSIMappingFile() const;
|
std::string getModemRSSIMappingFile() const;
|
||||||
|
bool getModemUseCOSAsLockout() const;
|
||||||
bool getModemTrace() const;
|
bool getModemTrace() const;
|
||||||
bool getModemDebug() const;
|
bool getModemDebug() const;
|
||||||
|
|
||||||
@@ -198,7 +199,7 @@ public:
|
|||||||
float getFMCTCSSLevel() const;
|
float getFMCTCSSLevel() const;
|
||||||
unsigned int getFMKerchunkTime() const;
|
unsigned int getFMKerchunkTime() const;
|
||||||
unsigned int getFMHangTime() const;
|
unsigned int getFMHangTime() const;
|
||||||
bool getFMUseCOS() const;
|
unsigned int getFMAccessMode() const;
|
||||||
bool getFMCOSInvert() const;
|
bool getFMCOSInvert() const;
|
||||||
unsigned int getFMRFAudioBoost() const;
|
unsigned int getFMRFAudioBoost() const;
|
||||||
float getFMMaxDevLevel() const;
|
float getFMMaxDevLevel() const;
|
||||||
@@ -372,6 +373,7 @@ private:
|
|||||||
float m_modemPOCSAGTXLevel;
|
float m_modemPOCSAGTXLevel;
|
||||||
float m_modemFMTXLevel;
|
float m_modemFMTXLevel;
|
||||||
std::string m_modemRSSIMappingFile;
|
std::string m_modemRSSIMappingFile;
|
||||||
|
bool m_modemUseCOSAsLockout;
|
||||||
bool m_modemTrace;
|
bool m_modemTrace;
|
||||||
bool m_modemDebug;
|
bool m_modemDebug;
|
||||||
|
|
||||||
@@ -469,7 +471,7 @@ private:
|
|||||||
float m_fmCTCSSLevel;
|
float m_fmCTCSSLevel;
|
||||||
unsigned int m_fmKerchunkTime;
|
unsigned int m_fmKerchunkTime;
|
||||||
unsigned int m_fmHangTime;
|
unsigned int m_fmHangTime;
|
||||||
bool m_fmUseCOS;
|
unsigned int m_fmAccessMode;
|
||||||
bool m_fmCOSInvert;
|
bool m_fmCOSInvert;
|
||||||
unsigned int m_fmRFAudioBoost;
|
unsigned int m_fmRFAudioBoost;
|
||||||
float m_fmMaxDevLevel;
|
float m_fmMaxDevLevel;
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ RFLevel=100
|
|||||||
# POCSAGTXLevel=50
|
# POCSAGTXLevel=50
|
||||||
# FMTXLevel=50
|
# FMTXLevel=50
|
||||||
RSSIMappingFile=RSSI.dat
|
RSSIMappingFile=RSSI.dat
|
||||||
|
UseCOSAsLockout=0
|
||||||
Trace=0
|
Trace=0
|
||||||
Debug=0
|
Debug=0
|
||||||
|
|
||||||
@@ -169,7 +170,7 @@ CTCSSThreshold=30
|
|||||||
CTCSSLevel=20
|
CTCSSLevel=20
|
||||||
KerchunkTime=0
|
KerchunkTime=0
|
||||||
HangTime=7
|
HangTime=7
|
||||||
UseCOS=1
|
AccessMode=1
|
||||||
COSInvert=0
|
COSInvert=0
|
||||||
RFAudioBoost=1
|
RFAudioBoost=1
|
||||||
MaxDevLevel=90
|
MaxDevLevel=90
|
||||||
|
|||||||
@@ -1188,6 +1188,7 @@ bool CMMDVMHost::createModem()
|
|||||||
int rxDCOffset = m_conf.getModemRXDCOffset();
|
int rxDCOffset = m_conf.getModemRXDCOffset();
|
||||||
int txDCOffset = m_conf.getModemTXDCOffset();
|
int txDCOffset = m_conf.getModemTXDCOffset();
|
||||||
float rfLevel = m_conf.getModemRFLevel();
|
float rfLevel = m_conf.getModemRFLevel();
|
||||||
|
bool useCOSAsLockout = m_conf.getModemUseCOSAsLockout();
|
||||||
|
|
||||||
LogInfo("Modem Parameters");
|
LogInfo("Modem Parameters");
|
||||||
LogInfo(" Port: %s", port.c_str());
|
LogInfo(" Port: %s", port.c_str());
|
||||||
@@ -1214,8 +1215,9 @@ bool CMMDVMHost::createModem()
|
|||||||
LogInfo(" POCSAG TX Level: %.1f%%", pocsagTXLevel);
|
LogInfo(" POCSAG TX Level: %.1f%%", pocsagTXLevel);
|
||||||
LogInfo(" FM TX Level: %.1f%%", fmTXLevel);
|
LogInfo(" FM TX Level: %.1f%%", fmTXLevel);
|
||||||
LogInfo(" TX Frequency: %uHz (%uHz)", txFrequency, txFrequency + txOffset);
|
LogInfo(" TX Frequency: %uHz (%uHz)", txFrequency, txFrequency + txOffset);
|
||||||
|
LogInfo(" Use COS as Lockout: %s", useCOSAsLockout ? "yes" : "no");
|
||||||
|
|
||||||
m_modem = CModem::createModem(port, m_duplex, rxInvert, txInvert, pttInvert, txDelay, dmrDelay, trace, debug);
|
m_modem = CModem::createModem(port, m_duplex, rxInvert, txInvert, pttInvert, txDelay, dmrDelay, useCOSAsLockout, trace, debug);
|
||||||
m_modem->setSerialParams(protocol, address);
|
m_modem->setSerialParams(protocol, address);
|
||||||
m_modem->setModeParams(m_dstarEnabled, m_dmrEnabled, m_ysfEnabled, m_p25Enabled, m_nxdnEnabled, m_pocsagEnabled, m_fmEnabled);
|
m_modem->setModeParams(m_dstarEnabled, m_dmrEnabled, m_ysfEnabled, m_p25Enabled, m_nxdnEnabled, m_pocsagEnabled, m_fmEnabled);
|
||||||
m_modem->setLevels(rxLevel, cwIdTXLevel, dstarTXLevel, dmrTXLevel, ysfTXLevel, p25TXLevel, nxdnTXLevel, pocsagTXLevel, fmTXLevel);
|
m_modem->setLevels(rxLevel, cwIdTXLevel, dstarTXLevel, dmrTXLevel, ysfTXLevel, p25TXLevel, nxdnTXLevel, pocsagTXLevel, fmTXLevel);
|
||||||
@@ -1251,7 +1253,7 @@ bool CMMDVMHost::createModem()
|
|||||||
float ctcssLevel = m_conf.getFMCTCSSLevel();
|
float ctcssLevel = m_conf.getFMCTCSSLevel();
|
||||||
unsigned int kerchunkTime = m_conf.getFMKerchunkTime();
|
unsigned int kerchunkTime = m_conf.getFMKerchunkTime();
|
||||||
unsigned int hangTime = m_conf.getFMHangTime();
|
unsigned int hangTime = m_conf.getFMHangTime();
|
||||||
bool useCOS = m_conf.getFMUseCOS();
|
unsigned int accessMode = m_conf.getFMAccessMode();
|
||||||
bool cosInvert = m_conf.getFMCOSInvert();
|
bool cosInvert = m_conf.getFMCOSInvert();
|
||||||
unsigned int rfAudioBoost = m_conf.getFMRFAudioBoost();
|
unsigned int rfAudioBoost = m_conf.getFMRFAudioBoost();
|
||||||
float maxDevLevel = m_conf.getFMMaxDevLevel();
|
float maxDevLevel = m_conf.getFMMaxDevLevel();
|
||||||
@@ -1283,7 +1285,7 @@ bool CMMDVMHost::createModem()
|
|||||||
LogInfo(" CTCSS Level: %.1f%%", ctcssLevel);
|
LogInfo(" CTCSS Level: %.1f%%", ctcssLevel);
|
||||||
LogInfo(" Kerchunk Time: %us", kerchunkTime);
|
LogInfo(" Kerchunk Time: %us", kerchunkTime);
|
||||||
LogInfo(" Hang Time: %us", hangTime);
|
LogInfo(" Hang Time: %us", hangTime);
|
||||||
LogInfo(" Use COS: %s", useCOS ? "yes" : "no");
|
LogInfo(" Access Mode: %u", accessMode);
|
||||||
LogInfo(" COS Invert: %s", cosInvert ? "yes" : "no");
|
LogInfo(" COS Invert: %s", cosInvert ? "yes" : "no");
|
||||||
LogInfo(" RF Audio Boost: x%u", rfAudioBoost);
|
LogInfo(" RF Audio Boost: x%u", rfAudioBoost);
|
||||||
LogInfo(" Max. Deviation Level: %.1f%%", maxDevLevel);
|
LogInfo(" Max. Deviation Level: %.1f%%", maxDevLevel);
|
||||||
@@ -1291,7 +1293,7 @@ bool CMMDVMHost::createModem()
|
|||||||
|
|
||||||
m_modem->setFMCallsignParams(callsign, callsignSpeed, callsignFrequency, callsignTime, callsignHoldoff, callsignHighLevel, callsignLowLevel, callsignAtStart, callsignAtEnd, callsignAtLatch);
|
m_modem->setFMCallsignParams(callsign, callsignSpeed, callsignFrequency, callsignTime, callsignHoldoff, callsignHighLevel, callsignLowLevel, callsignAtStart, callsignAtEnd, callsignAtLatch);
|
||||||
m_modem->setFMAckParams(rfAck, ackSpeed, ackFrequency, ackMinTime, ackDelay, ackLevel);
|
m_modem->setFMAckParams(rfAck, ackSpeed, ackFrequency, ackMinTime, ackDelay, ackLevel);
|
||||||
m_modem->setFMMiscParams(timeout, timeoutLevel, ctcssFrequency, ctcssHighThreshold, ctcssLowThreshold, ctcssLevel, kerchunkTime, hangTime, useCOS, cosInvert, rfAudioBoost, maxDevLevel);
|
m_modem->setFMMiscParams(timeout, timeoutLevel, ctcssFrequency, ctcssHighThreshold, ctcssLowThreshold, ctcssLevel, kerchunkTime, hangTime, accessMode, cosInvert, rfAudioBoost, maxDevLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ret = m_modem->open();
|
bool ret = m_modem->open();
|
||||||
|
|||||||
42
Modem.cpp
42
Modem.cpp
@@ -99,7 +99,7 @@ const unsigned int MAX_RESPONSES = 30U;
|
|||||||
const unsigned int BUFFER_LENGTH = 2000U;
|
const unsigned int BUFFER_LENGTH = 2000U;
|
||||||
|
|
||||||
|
|
||||||
CModem::CModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool trace, bool debug) :
|
CModem::CModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool useCOSAsLockout, bool trace, bool debug) :
|
||||||
m_port(port),
|
m_port(port),
|
||||||
m_dmrColorCode(0U),
|
m_dmrColorCode(0U),
|
||||||
m_ysfLoDev(false),
|
m_ysfLoDev(false),
|
||||||
@@ -112,15 +112,17 @@ m_txInvert(txInvert),
|
|||||||
m_pttInvert(pttInvert),
|
m_pttInvert(pttInvert),
|
||||||
m_txDelay(txDelay),
|
m_txDelay(txDelay),
|
||||||
m_dmrDelay(dmrDelay),
|
m_dmrDelay(dmrDelay),
|
||||||
m_rxLevel(0U),
|
m_rxLevel(0.0F),
|
||||||
m_cwIdTXLevel(0U),
|
m_cwIdTXLevel(0.0F),
|
||||||
m_dstarTXLevel(0U),
|
m_dstarTXLevel(0.0F),
|
||||||
m_dmrTXLevel(0U),
|
m_dmrTXLevel(0.0F),
|
||||||
m_ysfTXLevel(0U),
|
m_ysfTXLevel(0.0F),
|
||||||
m_p25TXLevel(0U),
|
m_p25TXLevel(0.0F),
|
||||||
m_nxdnTXLevel(0U),
|
m_nxdnTXLevel(0.0F),
|
||||||
m_pocsagTXLevel(0U),
|
m_pocsagTXLevel(0.0F),
|
||||||
m_fmTXLevel(0U),
|
m_fmTXLevel(0.0F),
|
||||||
|
m_rfLevel(0.0F),
|
||||||
|
m_useCOSAsLockout(useCOSAsLockout),
|
||||||
m_trace(trace),
|
m_trace(trace),
|
||||||
m_debug(debug),
|
m_debug(debug),
|
||||||
m_rxFrequency(0U),
|
m_rxFrequency(0U),
|
||||||
@@ -195,7 +197,7 @@ m_fmCtcssLowThreshold(20U),
|
|||||||
m_fmCtcssLevel(10.0F),
|
m_fmCtcssLevel(10.0F),
|
||||||
m_fmKerchunkTime(0U),
|
m_fmKerchunkTime(0U),
|
||||||
m_fmHangTime(5U),
|
m_fmHangTime(5U),
|
||||||
m_fmUseCOS(true),
|
m_fmAccessMode(1U),
|
||||||
m_fmCOSInvert(false),
|
m_fmCOSInvert(false),
|
||||||
m_fmRFAudioBoost(1U),
|
m_fmRFAudioBoost(1U),
|
||||||
m_fmMaxDevLevel(90.0F)
|
m_fmMaxDevLevel(90.0F)
|
||||||
@@ -1534,6 +1536,8 @@ bool CModem::setConfig()
|
|||||||
buffer[3U] |= 0x08U;
|
buffer[3U] |= 0x08U;
|
||||||
if (m_debug)
|
if (m_debug)
|
||||||
buffer[3U] |= 0x10U;
|
buffer[3U] |= 0x10U;
|
||||||
|
if (m_useCOSAsLockout)
|
||||||
|
buffer[3U] |= 0x20U;
|
||||||
if (!m_duplex)
|
if (!m_duplex)
|
||||||
buffer[3U] |= 0x80U;
|
buffer[3U] |= 0x80U;
|
||||||
|
|
||||||
@@ -1930,7 +1934,7 @@ void CModem::setFMAckParams(const std::string& rfAck, unsigned int ackSpeed, uns
|
|||||||
m_fmAckLevel = ackLevel;
|
m_fmAckLevel = ackLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CModem::setFMMiscParams(unsigned int timeout, float timeoutLevel, float ctcssFrequency, unsigned int ctcssHighThreshold, unsigned int ctcssLowThreshold, float ctcssLevel, unsigned int kerchunkTime, unsigned int hangTime, bool useCOS, bool cosInvert, unsigned int rfAudioBoost, float maxDevLevel)
|
void CModem::setFMMiscParams(unsigned int timeout, float timeoutLevel, float ctcssFrequency, unsigned int ctcssHighThreshold, unsigned int ctcssLowThreshold, float ctcssLevel, unsigned int kerchunkTime, unsigned int hangTime, unsigned int accessMode, bool cosInvert, unsigned int rfAudioBoost, float maxDevLevel)
|
||||||
{
|
{
|
||||||
m_fmTimeout = timeout;
|
m_fmTimeout = timeout;
|
||||||
m_fmTimeoutLevel = timeoutLevel;
|
m_fmTimeoutLevel = timeoutLevel;
|
||||||
@@ -1943,7 +1947,7 @@ void CModem::setFMMiscParams(unsigned int timeout, float timeoutLevel, float ctc
|
|||||||
m_fmKerchunkTime = kerchunkTime;
|
m_fmKerchunkTime = kerchunkTime;
|
||||||
m_fmHangTime = hangTime;
|
m_fmHangTime = hangTime;
|
||||||
|
|
||||||
m_fmUseCOS = useCOS;
|
m_fmAccessMode = accessMode;
|
||||||
m_fmCOSInvert = cosInvert;
|
m_fmCOSInvert = cosInvert;
|
||||||
|
|
||||||
m_fmRFAudioBoost = rfAudioBoost;
|
m_fmRFAudioBoost = rfAudioBoost;
|
||||||
@@ -2084,11 +2088,9 @@ bool CModem::setFMMiscParams()
|
|||||||
buffer[9U] = m_fmKerchunkTime;
|
buffer[9U] = m_fmKerchunkTime;
|
||||||
buffer[10U] = m_fmHangTime;
|
buffer[10U] = m_fmHangTime;
|
||||||
|
|
||||||
buffer[11U] = 0x00U;
|
buffer[11U] = m_fmAccessMode;
|
||||||
if (m_fmUseCOS)
|
|
||||||
buffer[11U] |= 0x01U;
|
|
||||||
if (m_fmCOSInvert)
|
if (m_fmCOSInvert)
|
||||||
buffer[11U] |= 0x02U;
|
buffer[11U] |= 0x80U;
|
||||||
|
|
||||||
buffer[12U] = m_fmRFAudioBoost;
|
buffer[12U] = m_fmRFAudioBoost;
|
||||||
|
|
||||||
@@ -2152,9 +2154,9 @@ void CModem::printDebug()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CModem* CModem::createModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool trace, bool debug){
|
CModem* CModem::createModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool useCOSAsLockout, bool trace, bool debug){
|
||||||
if (port == "NullModem")
|
if (port == "NullModem")
|
||||||
return new CNullModem(port, duplex, rxInvert, txInvert, pttInvert, txDelay, dmrDelay, trace, debug);
|
return new CNullModem(port, duplex, rxInvert, txInvert, pttInvert, txDelay, dmrDelay, useCOSAsLockout, trace, debug);
|
||||||
else
|
else
|
||||||
return new CModem(port, duplex, rxInvert, txInvert, pttInvert, txDelay, dmrDelay, trace, debug);
|
return new CModem(port, duplex, rxInvert, txInvert, pttInvert, txDelay, dmrDelay, useCOSAsLockout, trace, debug);
|
||||||
}
|
}
|
||||||
|
|||||||
9
Modem.h
9
Modem.h
@@ -34,7 +34,7 @@ enum RESP_TYPE_MMDVM {
|
|||||||
|
|
||||||
class CModem {
|
class CModem {
|
||||||
public:
|
public:
|
||||||
CModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool trace, bool debug);
|
CModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool useCOSAsLockout, bool trace, bool debug);
|
||||||
virtual ~CModem();
|
virtual ~CModem();
|
||||||
|
|
||||||
virtual void setSerialParams(const std::string& protocol, unsigned int address);
|
virtual void setSerialParams(const std::string& protocol, unsigned int address);
|
||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
|
|
||||||
virtual void setFMCallsignParams(const std::string& callsign, unsigned int callsignSpeed, unsigned int callsignFrequency, unsigned int callsignTime, unsigned int callsignHoldoff, float callsignHighLevel, float callsignLowLevel, bool callsignAtStart, bool callsignAtEnd, bool callsignAtLatch);
|
virtual void setFMCallsignParams(const std::string& callsign, unsigned int callsignSpeed, unsigned int callsignFrequency, unsigned int callsignTime, unsigned int callsignHoldoff, float callsignHighLevel, float callsignLowLevel, bool callsignAtStart, bool callsignAtEnd, bool callsignAtLatch);
|
||||||
virtual void setFMAckParams(const std::string& rfAck, unsigned int ackSpeed, unsigned int ackFrequency, unsigned int ackMinTime, unsigned int ackDelay, float ackLevel);
|
virtual void setFMAckParams(const std::string& rfAck, unsigned int ackSpeed, unsigned int ackFrequency, unsigned int ackMinTime, unsigned int ackDelay, float ackLevel);
|
||||||
virtual void setFMMiscParams(unsigned int timeout, float timeoutLevel, float ctcssFrequency, unsigned int ctcssHighThreshold, unsigned int ctcssLowThreshold, float ctcssLevel, unsigned int kerchunkTime, unsigned int hangTime, bool useCOS, bool cosInvert, unsigned int rfAudioBoost, float maxDevLevel);
|
virtual void setFMMiscParams(unsigned int timeout, float timeoutLevel, float ctcssFrequency, unsigned int ctcssHighThreshold, unsigned int ctcssLowThreshold, float ctcssLevel, unsigned int kerchunkTime, unsigned int hangTime, unsigned int accessMode, bool cosInvert, unsigned int rfAudioBoost, float maxDevLevel);
|
||||||
|
|
||||||
virtual bool open();
|
virtual bool open();
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ public:
|
|||||||
|
|
||||||
virtual void close();
|
virtual void close();
|
||||||
|
|
||||||
static CModem* createModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool trace, bool debug);
|
static CModem* createModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool useCOSAsLockout, bool trace, bool debug);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_port;
|
std::string m_port;
|
||||||
@@ -138,6 +138,7 @@ private:
|
|||||||
float m_pocsagTXLevel;
|
float m_pocsagTXLevel;
|
||||||
float m_fmTXLevel;
|
float m_fmTXLevel;
|
||||||
float m_rfLevel;
|
float m_rfLevel;
|
||||||
|
bool m_useCOSAsLockout;
|
||||||
bool m_trace;
|
bool m_trace;
|
||||||
bool m_debug;
|
bool m_debug;
|
||||||
unsigned int m_rxFrequency;
|
unsigned int m_rxFrequency;
|
||||||
@@ -213,7 +214,7 @@ private:
|
|||||||
float m_fmCtcssLevel;
|
float m_fmCtcssLevel;
|
||||||
unsigned int m_fmKerchunkTime;
|
unsigned int m_fmKerchunkTime;
|
||||||
unsigned int m_fmHangTime;
|
unsigned int m_fmHangTime;
|
||||||
bool m_fmUseCOS;
|
unsigned int m_fmAccessMode;
|
||||||
bool m_fmCOSInvert;
|
bool m_fmCOSInvert;
|
||||||
unsigned int m_fmRFAudioBoost;
|
unsigned int m_fmRFAudioBoost;
|
||||||
float m_fmMaxDevLevel;
|
float m_fmMaxDevLevel;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2011-2018 by Jonathan Naylor G4KLX
|
* Copyright (C) 2011-2018,2020 by Jonathan Naylor G4KLX
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
#include "NullModem.h"
|
#include "NullModem.h"
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
|
|
||||||
CNullModem::CNullModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool trace, bool debug) :
|
CNullModem::CNullModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool useCOSAsLockout, bool trace, bool debug) :
|
||||||
CModem(port, duplex,rxInvert, txInvert,pttInvert,txDelay, dmrDelay, trace, debug),
|
CModem(port, duplex,rxInvert, txInvert,pttInvert,txDelay, dmrDelay, useCOSAsLockout, trace, debug),
|
||||||
m_hwType(HWT_MMDVM)
|
m_hwType(HWT_MMDVM)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2011-2018 by Jonathan Naylor G4KLX
|
* Copyright (C) 2011-2018,2020 by Jonathan Naylor G4KLX
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
class CNullModem : public CModem {
|
class CNullModem : public CModem {
|
||||||
public:
|
public:
|
||||||
CNullModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool trace, bool debug);
|
CNullModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool useCOSAsLockout, bool trace, bool debug);
|
||||||
virtual ~CNullModem();
|
virtual ~CNullModem();
|
||||||
|
|
||||||
virtual void setSerialParams(const std::string& protocol, unsigned int address){};
|
virtual void setSerialParams(const std::string& protocol, unsigned int address){};
|
||||||
|
|||||||
Reference in New Issue
Block a user