Do not remove DG-ID information for use in new servers
Please remove reset to zero or setting of DG-ID because is not necessary. There are many reflectors that use DG-ID to change communication between TGs or rooms.
This commit is contained in:
parent
3e6d5d5a7f
commit
01d8fe1a58
1 changed files with 0 additions and 61 deletions
|
@ -32,8 +32,6 @@ m_display(display),
|
||||||
m_duplex(duplex),
|
m_duplex(duplex),
|
||||||
m_lowDeviation(lowDeviation),
|
m_lowDeviation(lowDeviation),
|
||||||
m_remoteGateway(remoteGateway),
|
m_remoteGateway(remoteGateway),
|
||||||
m_dgIdEnabled(false),
|
|
||||||
m_dgIdValue(0U),
|
|
||||||
m_queue(5000U, "YSF Control"),
|
m_queue(5000U, "YSF Control"),
|
||||||
m_rfState(RS_RF_LISTENING),
|
m_rfState(RS_RF_LISTENING),
|
||||||
m_netState(RS_NET_IDLE),
|
m_netState(RS_NET_IDLE),
|
||||||
|
@ -100,12 +98,6 @@ CYSFControl::~CYSFControl()
|
||||||
delete[] m_selfCallsign;
|
delete[] m_selfCallsign;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CYSFControl::setDGId(bool on, unsigned char value)
|
|
||||||
{
|
|
||||||
m_dgIdEnabled = on;
|
|
||||||
m_dgIdValue = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CYSFControl::writeModem(unsigned char *data, unsigned int len)
|
bool CYSFControl::writeModem(unsigned char *data, unsigned int len)
|
||||||
{
|
{
|
||||||
assert(data != NULL);
|
assert(data != NULL);
|
||||||
|
@ -167,13 +159,6 @@ bool CYSFControl::writeModem(unsigned char *data, unsigned int len)
|
||||||
if (valid)
|
if (valid)
|
||||||
m_lastFICH = fich;
|
m_lastFICH = fich;
|
||||||
|
|
||||||
// Validate the DG-ID value if enabled
|
|
||||||
if (m_dgIdEnabled) {
|
|
||||||
unsigned char value = m_lastFICH.getDGId();
|
|
||||||
if (value != m_dgIdValue)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef notdef
|
#ifdef notdef
|
||||||
// Stop repeater packets coming through, unless we're acting as a remote gateway
|
// Stop repeater packets coming through, unless we're acting as a remote gateway
|
||||||
if (m_remoteGateway) {
|
if (m_remoteGateway) {
|
||||||
|
@ -258,8 +243,6 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data)
|
||||||
|
|
||||||
CYSFFICH fich = m_lastFICH;
|
CYSFFICH fich = m_lastFICH;
|
||||||
|
|
||||||
// Remove any DG-ID information
|
|
||||||
fich.setDGId(0U);
|
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
|
||||||
data[0U] = TAG_DATA;
|
data[0U] = TAG_DATA;
|
||||||
|
@ -272,8 +255,6 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (m_duplex) {
|
if (m_duplex) {
|
||||||
// Add the DG-ID information.
|
|
||||||
fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U);
|
|
||||||
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
||||||
fich.setDev(m_lowDeviation);
|
fich.setDev(m_lowDeviation);
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
@ -299,8 +280,6 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data)
|
||||||
|
|
||||||
CYSFFICH fich = m_lastFICH;
|
CYSFFICH fich = m_lastFICH;
|
||||||
|
|
||||||
// Remove any DG-ID information
|
|
||||||
fich.setDGId(0U);
|
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
|
||||||
data[0U] = TAG_EOT;
|
data[0U] = TAG_EOT;
|
||||||
|
@ -313,8 +292,6 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (m_duplex) {
|
if (m_duplex) {
|
||||||
// Add the DG-ID information.
|
|
||||||
fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U);
|
|
||||||
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
||||||
fich.setDev(m_lowDeviation);
|
fich.setDev(m_lowDeviation);
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
@ -355,8 +332,6 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data)
|
||||||
LogDebug("YSF, V Mode 3, seq %u, AMBE FEC %u/720 (%.1f%%)", m_rfFrames % 128, errors, float(errors) / 7.2F);
|
LogDebug("YSF, V Mode 3, seq %u, AMBE FEC %u/720 (%.1f%%)", m_rfFrames % 128, errors, float(errors) / 7.2F);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove any DG-ID information
|
|
||||||
fich.setDGId(0U);
|
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
|
||||||
data[0U] = TAG_DATA;
|
data[0U] = TAG_DATA;
|
||||||
|
@ -365,8 +340,6 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data)
|
||||||
writeNetwork(data, m_rfFrames % 128U);
|
writeNetwork(data, m_rfFrames % 128U);
|
||||||
|
|
||||||
if (m_duplex) {
|
if (m_duplex) {
|
||||||
// Add the DG-ID information.
|
|
||||||
fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U);
|
|
||||||
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
||||||
fich.setDev(m_lowDeviation);
|
fich.setDev(m_lowDeviation);
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
@ -435,8 +408,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data)
|
||||||
|
|
||||||
CYSFFICH fich = m_lastFICH;
|
CYSFFICH fich = m_lastFICH;
|
||||||
|
|
||||||
// Remove any DG-ID information
|
|
||||||
fich.setDGId(0U);
|
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
|
||||||
data[0U] = TAG_DATA;
|
data[0U] = TAG_DATA;
|
||||||
|
@ -449,8 +420,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (m_duplex) {
|
if (m_duplex) {
|
||||||
// Add the DG-ID information.
|
|
||||||
fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U);
|
|
||||||
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
||||||
fich.setDev(m_lowDeviation);
|
fich.setDev(m_lowDeviation);
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
@ -476,8 +445,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data)
|
||||||
|
|
||||||
CYSFFICH fich = m_lastFICH;
|
CYSFFICH fich = m_lastFICH;
|
||||||
|
|
||||||
// Remove any DG-ID information
|
|
||||||
fich.setDGId(0U);
|
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
|
||||||
data[0U] = TAG_EOT;
|
data[0U] = TAG_EOT;
|
||||||
|
@ -490,8 +457,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (m_duplex) {
|
if (m_duplex) {
|
||||||
// Add the DG-ID information.
|
|
||||||
fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U);
|
|
||||||
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
||||||
fich.setDev(m_lowDeviation);
|
fich.setDev(m_lowDeviation);
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
@ -552,8 +517,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data)
|
||||||
|
|
||||||
CYSFFICH fich = m_lastFICH;
|
CYSFFICH fich = m_lastFICH;
|
||||||
|
|
||||||
// Remove any DG-ID information
|
|
||||||
fich.setDGId(0U);
|
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
|
||||||
data[0U] = TAG_DATA;
|
data[0U] = TAG_DATA;
|
||||||
|
@ -562,8 +525,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data)
|
||||||
writeNetwork(data, m_rfFrames % 128U);
|
writeNetwork(data, m_rfFrames % 128U);
|
||||||
|
|
||||||
if (m_duplex) {
|
if (m_duplex) {
|
||||||
// Add the DG-ID information.
|
|
||||||
fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U);
|
|
||||||
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
||||||
fich.setDev(m_lowDeviation);
|
fich.setDev(m_lowDeviation);
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
@ -642,7 +603,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data)
|
||||||
|
|
||||||
CYSFFICH fich = m_lastFICH;
|
CYSFFICH fich = m_lastFICH;
|
||||||
fich.setFI(YSF_FI_HEADER);
|
fich.setFI(YSF_FI_HEADER);
|
||||||
fich.setDGId(0U);
|
|
||||||
fich.encode(buffer + 2U);
|
fich.encode(buffer + 2U);
|
||||||
|
|
||||||
unsigned char csd1[20U], csd2[20U];
|
unsigned char csd1[20U], csd2[20U];
|
||||||
|
@ -663,8 +623,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data)
|
||||||
writeNetwork(buffer, m_rfFrames % 128U);
|
writeNetwork(buffer, m_rfFrames % 128U);
|
||||||
|
|
||||||
if (m_duplex) {
|
if (m_duplex) {
|
||||||
// Add the DG-ID information.
|
|
||||||
fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U);
|
|
||||||
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
||||||
fich.setDev(m_lowDeviation);
|
fich.setDev(m_lowDeviation);
|
||||||
fich.encode(buffer + 2U);
|
fich.encode(buffer + 2U);
|
||||||
|
@ -682,8 +640,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data)
|
||||||
|
|
||||||
fich = m_lastFICH;
|
fich = m_lastFICH;
|
||||||
|
|
||||||
// Remove any DG-ID information
|
|
||||||
fich.setDGId(0U);
|
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
|
||||||
data[0U] = TAG_DATA;
|
data[0U] = TAG_DATA;
|
||||||
|
@ -692,8 +648,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data)
|
||||||
writeNetwork(data, m_rfFrames % 128U);
|
writeNetwork(data, m_rfFrames % 128U);
|
||||||
|
|
||||||
if (m_duplex) {
|
if (m_duplex) {
|
||||||
// Add the DG-ID information.
|
|
||||||
fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U);
|
|
||||||
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
||||||
fich.setDev(m_lowDeviation);
|
fich.setDev(m_lowDeviation);
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
@ -759,8 +713,6 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data)
|
||||||
|
|
||||||
CYSFFICH fich = m_lastFICH;
|
CYSFFICH fich = m_lastFICH;
|
||||||
|
|
||||||
// Remove any DG-ID information
|
|
||||||
fich.setDGId(0U);
|
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
|
||||||
data[0U] = TAG_DATA;
|
data[0U] = TAG_DATA;
|
||||||
|
@ -773,8 +725,6 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (m_duplex) {
|
if (m_duplex) {
|
||||||
// Add the DG-ID information.
|
|
||||||
fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U);
|
|
||||||
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
||||||
fich.setDev(m_lowDeviation);
|
fich.setDev(m_lowDeviation);
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
@ -800,8 +750,6 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data)
|
||||||
|
|
||||||
CYSFFICH fich = m_lastFICH;
|
CYSFFICH fich = m_lastFICH;
|
||||||
|
|
||||||
// Remove any DG-ID information
|
|
||||||
fich.setDGId(0U);
|
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
|
||||||
data[0U] = TAG_EOT;
|
data[0U] = TAG_EOT;
|
||||||
|
@ -814,8 +762,6 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (m_duplex) {
|
if (m_duplex) {
|
||||||
// Add the DG-ID information.
|
|
||||||
fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U);
|
|
||||||
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
||||||
fich.setDev(m_lowDeviation);
|
fich.setDev(m_lowDeviation);
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
@ -852,8 +798,6 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data)
|
||||||
|
|
||||||
CYSFFICH fich = m_lastFICH;
|
CYSFFICH fich = m_lastFICH;
|
||||||
|
|
||||||
// Remove any DG-ID information
|
|
||||||
fich.setDGId(0U);
|
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
|
||||||
data[0U] = TAG_DATA;
|
data[0U] = TAG_DATA;
|
||||||
|
@ -862,8 +806,6 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data)
|
||||||
writeNetwork(data, m_rfFrames % 128U);
|
writeNetwork(data, m_rfFrames % 128U);
|
||||||
|
|
||||||
if (m_duplex) {
|
if (m_duplex) {
|
||||||
// Add the DG-ID information.
|
|
||||||
fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U);
|
|
||||||
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY);
|
||||||
fich.setDev(m_lowDeviation);
|
fich.setDev(m_lowDeviation);
|
||||||
fich.encode(data + 2U);
|
fich.encode(data + 2U);
|
||||||
|
@ -1004,9 +946,6 @@ void CYSFControl::writeNetwork()
|
||||||
::memcpy(m_netDest, "ALL ", YSF_CALLSIGN_LENGTH);
|
::memcpy(m_netDest, "ALL ", YSF_CALLSIGN_LENGTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the DG-ID information.
|
|
||||||
fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U);
|
|
||||||
|
|
||||||
if (m_remoteGateway) {
|
if (m_remoteGateway) {
|
||||||
fich.setVoIP(false);
|
fich.setVoIP(false);
|
||||||
fich.setMR(YSF_MR_DIRECT);
|
fich.setMR(YSF_MR_DIRECT);
|
||||||
|
|
Loading…
Reference in a new issue