|
|
@ -242,7 +242,7 @@ int CDGIdGateway::run()
|
|
|
|
std::string locator = calculateLocator();
|
|
|
|
std::string locator = calculateLocator();
|
|
|
|
unsigned int id = m_conf.getId();
|
|
|
|
unsigned int id = m_conf.getId();
|
|
|
|
|
|
|
|
|
|
|
|
dgIdNetwork[dgid] = new CFCSNetwork(name, local, m_callsign, rxFrequency, txFrequency, locator, id, debug);
|
|
|
|
dgIdNetwork[dgid] = new CFCSNetwork(name, local, m_callsign, rxFrequency, txFrequency, locator, id, statc, debug);
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VD_MODE1 | DT_VD_MODE2 | DT_VOICE_FR_MODE | DT_DATA_FR_MODE;
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VD_MODE1 | DT_VD_MODE2 | DT_VOICE_FR_MODE | DT_DATA_FR_MODE;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
@ -255,7 +255,7 @@ int CDGIdGateway::run()
|
|
|
|
|
|
|
|
|
|
|
|
CYSFReflector* reflector = reflectors->findByName(name);
|
|
|
|
CYSFReflector* reflector = reflectors->findByName(name);
|
|
|
|
if (reflector != NULL) {
|
|
|
|
if (reflector != NULL) {
|
|
|
|
dgIdNetwork[dgid] = new CYSFNetwork(local, reflector->m_name, reflector->m_addr, reflector->m_addrLen, m_callsign, debug);
|
|
|
|
dgIdNetwork[dgid] = new CYSFNetwork(local, reflector->m_name, reflector->m_addr, reflector->m_addrLen, m_callsign, statc, debug);
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VD_MODE1 | DT_VD_MODE2 | DT_VOICE_FR_MODE | DT_DATA_FR_MODE;
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VD_MODE1 | DT_VD_MODE2 | DT_VOICE_FR_MODE | DT_DATA_FR_MODE;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
@ -276,7 +276,7 @@ int CDGIdGateway::run()
|
|
|
|
|
|
|
|
|
|
|
|
CYSFReflector* reflector = reflectors->findByName(name);
|
|
|
|
CYSFReflector* reflector = reflectors->findByName(name);
|
|
|
|
if (reflector != NULL) {
|
|
|
|
if (reflector != NULL) {
|
|
|
|
dgIdNetwork[dgid] = new CYCSNetwork(local, reflector->m_name, reflector->m_addr, reflector->m_addrLen, m_callsign, rxFrequency, txFrequency, locator, description, id, (*it)->m_netDGId, debug);
|
|
|
|
dgIdNetwork[dgid] = new CYCSNetwork(local, reflector->m_name, reflector->m_addr, reflector->m_addrLen, m_callsign, rxFrequency, txFrequency, locator, description, id, (*it)->m_netDGId, statc, debug);
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VD_MODE1 | DT_VD_MODE2 | DT_VOICE_FR_MODE | DT_DATA_FR_MODE;
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VD_MODE1 | DT_VD_MODE2 | DT_VOICE_FR_MODE | DT_DATA_FR_MODE;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
@ -323,7 +323,7 @@ int CDGIdGateway::run()
|
|
|
|
sockaddr_storage addr;
|
|
|
|
sockaddr_storage addr;
|
|
|
|
unsigned int addrLen;
|
|
|
|
unsigned int addrLen;
|
|
|
|
if (CUDPSocket::lookup((*it)->m_address, (*it)->m_port, addr, addrLen) == 0) {
|
|
|
|
if (CUDPSocket::lookup((*it)->m_address, (*it)->m_port, addr, addrLen) == 0) {
|
|
|
|
dgIdNetwork[dgid] = new CYSFNetwork(local, "PARROT", addr, addrLen, m_callsign, debug);
|
|
|
|
dgIdNetwork[dgid] = new CYSFNetwork(local, "PARROT", addr, addrLen, m_callsign, statc, debug);
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VD_MODE1 | DT_VD_MODE2 | DT_VOICE_FR_MODE | DT_DATA_FR_MODE;
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VD_MODE1 | DT_VD_MODE2 | DT_VOICE_FR_MODE | DT_DATA_FR_MODE;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
@ -339,7 +339,7 @@ int CDGIdGateway::run()
|
|
|
|
sockaddr_storage addr;
|
|
|
|
sockaddr_storage addr;
|
|
|
|
unsigned int addrLen;
|
|
|
|
unsigned int addrLen;
|
|
|
|
if (CUDPSocket::lookup((*it)->m_address, (*it)->m_port, addr, addrLen) == 0) {
|
|
|
|
if (CUDPSocket::lookup((*it)->m_address, (*it)->m_port, addr, addrLen) == 0) {
|
|
|
|
dgIdNetwork[dgid] = new CYSFNetwork(local, "YSF2DMR", addr, addrLen, m_callsign, debug);
|
|
|
|
dgIdNetwork[dgid] = new CYSFNetwork(local, "YSF2DMR", addr, addrLen, m_callsign, statc, debug);
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VD_MODE1 | DT_VD_MODE2;
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VD_MODE1 | DT_VD_MODE2;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
@ -355,7 +355,7 @@ int CDGIdGateway::run()
|
|
|
|
sockaddr_storage addr;
|
|
|
|
sockaddr_storage addr;
|
|
|
|
unsigned int addrLen;
|
|
|
|
unsigned int addrLen;
|
|
|
|
if (CUDPSocket::lookup((*it)->m_address, (*it)->m_port, addr, addrLen) == 0) {
|
|
|
|
if (CUDPSocket::lookup((*it)->m_address, (*it)->m_port, addr, addrLen) == 0) {
|
|
|
|
dgIdNetwork[dgid] = new CYSFNetwork(local, "YSF2NXDN", addr, addrLen, m_callsign, debug);
|
|
|
|
dgIdNetwork[dgid] = new CYSFNetwork(local, "YSF2NXDN", addr, addrLen, m_callsign, statc, debug);
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VD_MODE1 | DT_VD_MODE2;
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VD_MODE1 | DT_VD_MODE2;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
@ -371,7 +371,7 @@ int CDGIdGateway::run()
|
|
|
|
sockaddr_storage addr;
|
|
|
|
sockaddr_storage addr;
|
|
|
|
unsigned int addrLen;
|
|
|
|
unsigned int addrLen;
|
|
|
|
if (CUDPSocket::lookup((*it)->m_address, (*it)->m_port, addr, addrLen) == 0) {
|
|
|
|
if (CUDPSocket::lookup((*it)->m_address, (*it)->m_port, addr, addrLen) == 0) {
|
|
|
|
dgIdNetwork[dgid] = new CYSFNetwork(local, "YSF2P25", addr, addrLen, m_callsign, debug);
|
|
|
|
dgIdNetwork[dgid] = new CYSFNetwork(local, "YSF2P25", addr, addrLen, m_callsign, statc, debug);
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VOICE_FR_MODE;
|
|
|
|
dgIdNetwork[dgid]->m_modes = DT_VOICE_FR_MODE;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_static = statc;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
|
dgIdNetwork[dgid]->m_rfHangTime = rfHangTime;
|
|
|
@ -416,7 +416,6 @@ int CDGIdGateway::run()
|
|
|
|
memset(buffer, 0U, 200U);
|
|
|
|
memset(buffer, 0U, 200U);
|
|
|
|
|
|
|
|
|
|
|
|
if (rptNetwork.read(0U, buffer) > 0U) {
|
|
|
|
if (rptNetwork.read(0U, buffer) > 0U) {
|
|
|
|
if (::memcmp(buffer + 0U, "YSFD", 4U) == 0) {
|
|
|
|
|
|
|
|
CYSFFICH fich;
|
|
|
|
CYSFFICH fich;
|
|
|
|
bool valid = fich.decode(buffer + 35U);
|
|
|
|
bool valid = fich.decode(buffer + 35U);
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
@ -474,13 +473,11 @@ int CDGIdGateway::run()
|
|
|
|
bleepTimer.start();
|
|
|
|
bleepTimer.start();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (unsigned int i = 1U; i < 100U; i++) {
|
|
|
|
for (unsigned int i = 1U; i < 100U; i++) {
|
|
|
|
if (dgIdNetwork[i] != NULL) {
|
|
|
|
if (dgIdNetwork[i] != NULL) {
|
|
|
|
unsigned int len = dgIdNetwork[i]->read(i, buffer);
|
|
|
|
unsigned int len = dgIdNetwork[i]->read(i, buffer);
|
|
|
|
if (len > 0U && (i == currentDGId || currentDGId == 0U)) {
|
|
|
|
if (len > 0U && (i == currentDGId || currentDGId == 0U)) {
|
|
|
|
if (::memcmp(buffer + 0U, "YSFD", 4U) == 0) {
|
|
|
|
|
|
|
|
CYSFFICH fich;
|
|
|
|
CYSFFICH fich;
|
|
|
|
bool valid = fich.decode(buffer + 35U);
|
|
|
|
bool valid = fich.decode(buffer + 35U);
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
@ -503,7 +500,6 @@ int CDGIdGateway::run()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int ms = stopWatch.elapsed();
|
|
|
|
unsigned int ms = stopWatch.elapsed();
|
|
|
|
stopWatch.start();
|
|
|
|
stopWatch.start();
|
|
|
@ -547,7 +543,10 @@ int CDGIdGateway::run()
|
|
|
|
|
|
|
|
|
|
|
|
if (dgIdNetwork[currentDGId] != NULL) {
|
|
|
|
if (dgIdNetwork[currentDGId] != NULL) {
|
|
|
|
DGID_STATUS netState = dgIdNetwork[currentDGId]->getStatus();
|
|
|
|
DGID_STATUS netState = dgIdNetwork[currentDGId]->getStatus();
|
|
|
|
if (fromRF && state != DS_LINKED && netState == DS_LINKED)
|
|
|
|
bool statc = dgIdNetwork[currentDGId]->m_static;
|
|
|
|
|
|
|
|
if (fromRF && state != DS_LINKED && netState != DS_LINKED && statc)
|
|
|
|
|
|
|
|
nPips = 3U;
|
|
|
|
|
|
|
|
else if (fromRF && state != DS_LINKED && netState == DS_LINKED)
|
|
|
|
nPips = 1U;
|
|
|
|
nPips = 1U;
|
|
|
|
else if (fromRF && state == DS_LINKED && netState != DS_LINKED)
|
|
|
|
else if (fromRF && state == DS_LINKED && netState != DS_LINKED)
|
|
|
|
nPips = 3U;
|
|
|
|
nPips = 3U;
|
|
|
|