1
0
Fork 0

Merge remote-tracking branch 'g4klx/master'

ycs232-kbc
Andy CA6JAU 7 years ago
commit e2c75323be

@ -77,6 +77,7 @@ m_ysfNetworkParrotPort(0U),
m_ysfNetworkYSF2DMRAddress("127.0.0.1"),
m_ysfNetworkYSF2DMRPort(0U),
m_fcsNetworkEnabled(false),
m_fcsNetworkEntries(),
m_fcsNetworkPort(0U)
{
}
@ -215,7 +216,19 @@ bool CConf::read()
} else if (section == SECTION_FCS_NETWORK) {
if (::strcmp(key, "Enable") == 0)
m_fcsNetworkEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "Port") == 0)
else if (::strcmp(key, "Entry") == 0) {
char* p1 = ::strtok(value, ",");
char* p2 = ::strtok(NULL, "\r\n");
if (p1 != NULL && p2 != NULL) {
if (::strlen(p1) > 0U && ::strlen(p2) > 0U) {
for (unsigned int i = 0U; p1[i] != 0; i++)
p1[i] = ::toupper(p1[i]);
std::string name = std::string(p1);
std::string desc = std::string(p2);
m_fcsNetworkEntries.push_back(std::make_pair(name, desc));
}
}
} else if (::strcmp(key, "Port") == 0)
m_fcsNetworkPort = (unsigned int)::atoi(value);
}
}
@ -415,6 +428,11 @@ bool CConf::getFCSNetworkEnabled() const
return m_fcsNetworkEnabled;
}
std::vector<std::pair<std::string, std::string>> CConf::getFCSNetworkEntries() const
{
return m_fcsNetworkEntries;
}
unsigned int CConf::getFCSNetworkPort() const
{
return m_fcsNetworkPort;

@ -81,6 +81,7 @@ public:
// The FCS Network section
bool getFCSNetworkEnabled() const;
std::vector<std::pair<std::string, std::string>> getFCSNetworkEntries() const;
unsigned int getFCSNetworkPort() const;
private:
@ -129,6 +130,7 @@ private:
unsigned int m_ysfNetworkYSF2DMRPort;
bool m_fcsNetworkEnabled;
std::vector<std::pair<std::string, std::string>> m_fcsNetworkEntries;
unsigned int m_fcsNetworkPort;
};

@ -19,6 +19,6 @@
#if !defined(VERSION_H)
#define VERSION_H
const char* VERSION = "20180228";
const char* VERSION = "20180315";
#endif

@ -157,6 +157,11 @@ void CWiresX::setYSF2DMR(const std::string& address, unsigned int port)
m_reflectors.setYSF2DMR(address, port);
}
void CWiresX::addFCSRoom(const std::pair<std::string, std::string>& entry)
{
m_reflectors.addFCSRoom(entry);
}
bool CWiresX::start()
{
m_reflectors.reload();
@ -288,7 +293,14 @@ WX_STATUS CWiresX::processConnect(const unsigned char* source, const unsigned ch
m_status = WXSI_CONNECT;
m_timer.start();
return WXS_CONNECT_YSF;
switch (m_reflector->m_type) {
case YT_YSF:
return WXS_CONNECT_YSF;
case YT_FCS:
return WXS_CONNECT_FCS;
default:
return WXS_NONE;
}
}
void CWiresX::processConnect(CYSFReflector* reflector)

@ -49,6 +49,7 @@ public:
void setInfo(const std::string& name, unsigned int txFrequency, unsigned int rxFrequency);
void setParrot(const std::string& address, unsigned int port);
void setYSF2DMR(const std::string& address, unsigned int port);
void addFCSRoom(const std::pair<std::string, std::string>& entry);
bool start();

@ -457,16 +457,18 @@ void CYSFGateway::createWiresX(CYSFNetwork* rptNetwork)
std::string address = m_conf.getYSFNetworkParrotAddress();
unsigned int port = m_conf.getYSFNetworkParrotPort();
if (port > 0U)
m_wiresX->setParrot(address, port);
address = m_conf.getYSFNetworkYSF2DMRAddress();
port = m_conf.getYSFNetworkYSF2DMRPort();
if (port > 0U)
m_wiresX->setYSF2DMR(address, port);
std::vector<std::pair<std::string, std::string>> entries = m_conf.getFCSNetworkEntries();
for (std::vector<std::pair<std::string, std::string>>::const_iterator it = entries.cbegin(); it != entries.cend(); ++it)
m_wiresX->addFCSRoom(*it);
m_reflectors->load();
m_wiresX->start();
}
@ -498,6 +500,37 @@ void CYSFGateway::processWiresX(const unsigned char* buffer, unsigned char fi, u
m_linkType = LINK_YSF;
}
break;
case WXS_CONNECT_FCS: {
if (m_linkType == LINK_YSF) {
m_ysfNetwork->writeUnlink(3U);
m_ysfNetwork->clearDestination();
}
if (m_linkType == LINK_FCS)
m_fcsNetwork->writeUnlink(3U);
m_current.clear();
m_inactivityTimer.stop();
m_lostTimer.stop();
m_linkType = LINK_NONE;
CYSFReflector* reflector = m_wiresX->getReflector();
LogMessage("Connect to %s - \"%s\" has been requested by %10.10s", reflector->m_id.c_str(), reflector->m_name.c_str(), buffer + 14U);
std::string name = reflector->m_name;
name.resize(8U, '0');
bool ok = m_fcsNetwork->writeLink(name);
if (ok) {
m_current = name;
m_inactivityTimer.start();
m_lostTimer.start();
m_linkType = LINK_FCS;
} else {
LogMessage("Unknown reflector - %s", name.c_str());
}
}
break;
case WXS_DISCONNECT:
if (m_linkType == LINK_YSF) {
LogMessage("Disconnect has been requested by %10.10s", buffer + 14U);

@ -53,4 +53,6 @@ YSF2DMRPort=42013
[FCS Network]
Enable=1
# Entry=FCS00199,FCS001 Echo
# Entry=FCS00299,FCS002 Echo
Port=42001

@ -1,195 +1,218 @@
65702;0 OE-Austria;Official;94.199.173.123;42000;001;http://c4fm-austria.dyndns.org:46193
38089;0077;IRLP/DMR Esp;216.21.9.156;42000;000;xe1dvi.crabdance.com/html/index.php
74652;119-YSF;TG45004 XLX170;125.129.207.86;42000;003;http://ysf119.dvham.com/index.php
89803;A.O.T. Roma;OndaTelematica;31.14.140.230;42000;000;http://www.ondatelematica.it
02034;Alabama-Link;Alabama-Link;199.119.98.174;42000;049;http://ysf.alabamalink.info/
64230;America-RC;YSF-TO-WIRES-X;65.101.7.49;42000;009;http://65.101.7.49
88060;AREC US FL-727;C4FM Bridge BM;97.76.81.165;42000;000;http://ysf.inerrantenergy.com/ysf/
38654;ARGENTINA;C4FM Team;212.237.3.87;42000;010;http://ysfargentina.mmdvm.es
59330;ARRGUS Array;Florida USA;96.94.7.200;42000;002;http://ysf.arrg.us
42586;ARRGUS_ArrayN;Back up server;64.137.194.85;42000;001;http://ysf6.arrg.us
38089;0077;IRLP/DMR Esp;216.21.9.156;42000;001;xe1dvi.crabdance.com/html/index.php
88236;1004 DMR;DRM C4FM CROSS;210.178.113.173;42000;003;http://1004dmr.dvham.com/indexysf.php
74652;119-YSF;TG45004 XLX170;125.129.207.86;42000;001;http://ysf119.dvham.com/index.php
39075;45024DMR;C4FM,DMR,DSTAR;121.162.91.82;42000;001;http://45024dmr.dvham.com/indexysf.php
02034;Alabama-Link;Alabama-Link;199.119.98.174;42000;053;http://ysf.alabamalink.info/
64230;America-RC;YSF-TO-WIRES-X;65.101.7.49;42000;016;http://65.101.7.49
73599;AR TG722 LINK;YSF to TG722;80.211.1.59;42000;001;http://722ysfargentina.dnsalias.com
03189;AR TG7221 LINK;YSF to TG7221;80.211.7.43;42000;001;http://7221ysfargentina.dnsalias.com
88060;AREC US FL-727;C4FM Bridge BM;97.76.81.165;42000;001;http://ysf.inerrantenergy.com/ysf/
66099;ARGENTINA LINK;Link to TG7227;212.237.3.87;42000;007;http://ysfargentina.dnsalias.com
59330;ARRGUS Array;Florida USA;96.94.7.200;42000;000;http://ysf.arrg.us
42586;ARRGUS_ArrayN;Back up server;45.62.254.207;42000;000;http://ysf6.arrg.us
25223;AT Austria OE1;OE1PHS;213.47.71.17;42000;004;http://oe1phs.ddns.net/YSFReflector-Dashboard/
00396;AT Austria OE3;OE3AAS;77.117.158.250;42100;001;http://oe3aas.ddns.net/YSFReflector-Dashboard/
59911;AT Austria OE8;OE8VIK;62.203.54.167;42000;004;http://oe8vik.ddns.net/YSFReflector-Dashboard
55693;AT C4FM Austria;YSF;89.185.97.38;42000;021;http://c4fm.oevsv.at/ysf
04201;AU YSF001;1st WW YSF;125.63.61.26;42000;018;http://ysf001.duckdns.org
93760;BE YSF-Vlaandere;C4FM Vlaandere;81.95.126.168;42000;003;http://ysf.on4top.be/ysf
79520;BE YSF-Wallonie;C4FM Wallon;51.255.193.63;42000;004;http://www.ysfwallonie.net/
00396;AT Austria OE3;OE3AAS;178.114.191.65;42100;001;http://oe3aas.ddns.net/YSFReflector-Dashboard/
59911;AT Austria OE8;OE8VIK;62.203.54.167;42000;002;http://oe8vik.ddns.net/YSFReflector-Dashboard
55693;AT C4FM Austria;YSF;89.185.97.38;42000;017;http://c4fm.oevsv.at/ysf
46690;AT TirolOberland;OE7TirolOberl;212.88.1.34;42000;000;
04201;AU YSF001;1st WW YSF;125.63.61.26;42000;017;http://ysf001.duckdns.org
93760;BE YSF-Vlaandere;C4FM Vlaandere;81.95.126.168;42000;002;http://ysf.on4top.be/ysf
79520;BE YSF-Wallonie;C4FM Wallon;51.255.193.63;42000;003;http://www.ysfwallonie.net/
67661;BG Bulgaria;Sysop: LZ1LCD;95.43.222.149;42000;001;http://fusion.spirka.net
35409;Blount,Co-Link;Local Area Lin;12.202.202.19;43000;000;http://blountysf.sytes.net
37692;BM TG28412;Test;193.93.24.29;42000;001;http://ysf.ham-dmr.bg/
47573;BM-EA-TG914;BM-EA-TG914;104.223.70.166;42000;003;http://104.223.70.166/ysf/
14341;BM-TG-208;BrMstr TG208;51.254.126.212;42000;002;
47573;BM-EA-TG914;BM-EA-TG914;104.223.70.166;42000;002;http://104.223.70.166/ysf/
14341;BM-TG-208;BrMstr TG208;51.254.126.212;42000;003;
30745;BM-TG-2080;BrMstr TG2080;51.254.126.212;42080;001;
00872;BM-TG-20820;BrMstr TG20820;51.254.126.212;42020;001;
37594;BM-TG-20845;BrMstr TG20845;51.254.126.212;42045;001;
52846;BM-TG-20859;BrMstr TG20859;51.254.126.212;42059;002;
52846;BM-TG-20859;BrMstr TG20859;51.254.126.212;42059;001;
39552;BM-TG-2087;BrMstr TG2087;51.254.126.212;42007;001;
93206;BM-TG-2088;BrMstr TG2088;51.254.126.212;42008;001;
81116;BM-TG-20883;BrMstr TG20883;51.254.126.212;42083;002;
81116;BM-TG-20883;BrMstr TG20883;51.254.126.212;42083;001;
35402;BM-TG-2089;BrMstr TG2089;51.254.126.212;42009;001;
36096;BR YSF724;C4FM - DV Braz;66.55.64.14;42000;007;http://ysf.dvbrazil.com.br/
85044;C4FM-SEOUL;TG45004 XLX170;121.162.91.45;42000;008;http://ysfso.dvham.com/indexysf.php
77353;CA Canada;C4FM Ontario;144.217.241.23;42100;007;http://c4fmontario.hopto.org
49473;CA QUEBEC;QC FR Fusion;64.34.60.44;42000;002;http://www.ve2mrc.com/ysfr/index.php
79602;Carolina Link;Carolina Link;52.3.47.55;42000;003;http://52.3.47.55/index.php
30998;CH 228 Swiss;Bridge BM22820;176.10.105.210;42000;005;http://ysf.hb-connect.ch/
52796;CH JOTA;Jota CH;157.161.57.65;42001;000;
80337;CN China #1;C4FM YSF;120.234.41.144;42000;038;http://ysf.sz790.com:8081/
82442;CN China #2;W24269/TG46072;116.6.107.115;42006;005;http://ufozhuzi.tpddns.cn:8081/
36096;BR YSF724;C4FM - DV Braz;66.55.64.14;42000;004;http://ysf.dvbrazil.com.br/
85044;C4FM-SEOUL;TG45004 XLX170;121.162.91.45;42000;003;http://ysfso.dvham.com/indexysf.php
77353;CA Canada;C4FM Ontario;144.217.241.23;42100;010;http://c4fmontario.hopto.org
49473;CA QUEBEC;QC FR Fusion;64.34.60.44;42000;001;http://www.ve2mrc.com/ysfr/index.php
79602;Carolina Link;Carolina Link;52.3.47.55;42000;007;http://52.3.47.55/index.php
30998;CH 228 Swiss;Bridge BM22820;176.10.105.210;42000;007;http://ysf.hb-connect.ch/
52796;CH JOTA;Jota CH;157.161.57.65;42001;000;http://pi2.woody.ch:8080/YSFReflector-Dashboard/ (ipv6 only)
80337;CN China #1;C4FM YSF;120.234.41.144;42000;043;http://ysf.sz790.com:8081/
82442;CN China #2;W24269/TG46072;116.6.107.115;42006;007;http://ufozhuzi.tpddns.cn:8081/
09724;CN China #99;YSF Test;103.107.105.251;42000;000;http://ysf.ncwxd.com
40973;CN-China-03;C4FM;123.58.6.137;42000;000;http://123.58.6.137:8088
40973;CN-China-03;C4FM;123.58.6.137;42000;002;http://123.58.6.137:8088
30490;CO 4 KILO MIKE;Antioquia;190.159.68.105;42000;000;
04523;CT CATALANA;C4FM Catalunya;85.214.119.76;42000;004;http://ysfcat.ea3hkb.com
30549;CT WIRESCAT;C4FM Catalunya;85.214.119.76;42001;012;http://wirescat.ea3hkb.com
26541;CZ Czech;TG2300 DCS019V;80.250.3.114;42000;009;http://80.250.3.114/index.php
77329;CZ YSF Praha;CZ YSF Praha;185.32.183.148;42000;005;http://185.32.183.148/ysf/
63382;DAHSOB;DAH / SOB;91.61.232.8;42000;001;
36245;CO HK_BMDMR_LCRA;YSF to DMR;186.29.69.76;42000;002;http://bmdmr.lcra.org.co
72001;CO HK_NAL_LCRA;BM TG732;186.154.94.181;42000;001;http://ysfnal.lcra.org.co
04523;CT CATALANA;C4FM Catalunya;85.214.119.76;42000;003;http://ysfcat.ea3hkb.com
30549;CT WIRESCAT;C4FM Catalunya;85.214.119.76;42001;010;http://wirescat.ea3hkb.com
26541;CZ Czech;TG2300 DCS019V;80.250.3.114;42000;006;http://80.250.3.114/index.php
52690;CZ YSF Klatovy;RPI Zero YSF;46.23.62.124;42000;005;http://46.23.62.124:42080
77329;CZ YSF Praha;CZ YSF Praha;185.32.183.148;42000;007;http://185.32.183.148/ysf/
46679;DE DAHSOB;DAH / SOB;87.176.109.82;42000;001;
80861;DE DL-NORD;AFu-Nord.de;5.45.96.68;42000;002;http://funk-sh.de
54919;DE DL-NORDWEST;Nordwest-DL;84.140.31.216;42000;017;http://dl-nordwest.spdns.de
62829;DE Germany;TG26208;213.202.229.15;42000;028;https://c4fm.ysfreflector.de/Germany
74154;DE PEGASUS;Multi-Bridge;78.46.11.65;42000;015;https://status.projekt-pegasus.net/
54919;DE DL-NORDWEST;Nordwest-DL;91.12.59.55;42000;011;http://dl-nordwest.spdns.de
62829;DE Germany;TG26208;213.202.229.15;42000;025;https://c4fm.ysfreflector.de/Germany
42558;DE Germany 02;a23-wertheim;213.202.228.87;42000;000;ysf-germany02.dyndns.org/ysf/
26433;DE Goettingen;Wires X <> BM;51.15.40.103;42000;000;ysf-goettingen.tk
02225;DE NIEDERSACHSEN;TG 26237;80.129.77.151;42000;002;http://ysf.db0eig.de
74154;DE PEGASUS;Multi-Bridge;78.46.11.65;42000;013;https://status.projekt-pegasus.net/
20548;DE PEGASUS2;Test System;78.46.11.65;42001;000;https://status.projekt-pegasus.net/
63421;DE Ruhrgebiet;Ruhrgebiet;144.76.12.90;42000;005;http://dg3yjb.beba.re/YSFReflector
63421;DE Ruhrgebiet;Ruhrgebiet;144.76.12.90;42000;003;http://dg3yjb.beba.re/YSFReflector
15017;DE Saarland;darc-saar.de;213.202.229.220;42000;000;https://c4fm.darc-saar.de/
95352;DE Twitterrunde;GW BM TG263333;213.202.229.15;42001;004;https://c4fm.ysfreflector.de/Twitterrunde
00561;DVSwitch NA;North America;44.103.32.18;42000;001;http://dvswitch.org/ysfreflector/
94533;EA Distrito 1;Wires X Spain;212.237.30.36;42000;000;http://ysfdistrito1.mmdvm.es/
55966;DE Thueringen;Thueringen;37.26.200.222;42000;002;http://relais.db0ins.de/YSFReflector-Dashboard/
95352;DE Twitterrunde;GW BM TG263333;213.202.229.15;42001;001;https://c4fm.ysfreflector.de/Twitterrunde
11614;DK/YSF12/C4FM;DK YSF012;176.21.189.181;42000;000;http://dstar4all.dk
00561;DVSwitch NA;North America;44.103.32.18;42000;002;http://dvswitch.org/ysfreflector/
94533;EA Distrito 1;Wires X Spain;212.237.30.36;42000;001;http://ysfdistrito1.mmdvm.es/
42493;EA Distrito 2;EDT;185.47.129.230;42000;003;http://server.ea2ip.com/ysf/
48495;EA Distrito 3;Wires X Spain;89.38.150.252;42000;001;http://ysfdistrito3.mmdvm.es/
62980;EA Distrito 4;REM SPAIN;212.237.0.67;42000;000;http://ysfdistrito4.mmdvm.es/
48495;EA Distrito 3;Wires X Spain;89.38.150.252;42000;005;http://ysfdistrito3.mmdvm.es/
62980;EA Distrito 4;REM SPAIN;212.237.0.67;42000;006;http://ysfdistrito4.mmdvm.es/
39908;EA Distrito 5;YSF EALINK;216.86.147.198;42000;000;http://ysfdistrito5.mmdvm.es/
58314;EA Distrito 7;RC Veleta;212.237.11.53;42000;009;http://ysfdistrito7.mmdvm.es/
37172;EA Sevilla;Prov Sevilla;204.44.93.190;42000;004;http://ysfsevilla.mmdvm.es/
01439;EMCOM SPAIN;Emergency;212.237.17.133;42000;000;http://ysf.emcomspain.xreflector.es/
58314;EA Distrito 7;RC Veleta;212.237.11.53;42000;008;http://ysfdistrito7.mmdvm.es/
37172;EA Sevilla;Prov Sevilla;204.44.93.190;42000;005;http://ysfsevilla.mmdvm.es/
32027;ES ADER;ASSOCIACIO;80.211.226.198;42000;002;http://80.211.226.198/index_dashboard.php
18423;ES andalucia-esp;andalucia EA7;94.177.196.120;42000;000;ysfandalucia.ddns.net
00131;ES ALMERIA;YSF ALMERIA;193.153.170.159;42000;003;http://licocasa.ddns.net:10000
18423;ES andalucia-esp;andalucia EA7;94.177.196.120;42000;001;ysfandalucia.ddns.net
26260;ES CORDOBA-ESP;CORDOBA;80.211.131.156;42000;001;http://www.ea7or.es
98529;ES ED2ZAE;Multiporpouse;94.177.237.192;42000;001;http://ysf900.dyndns.org/ysf
15642;ES REM SPAIN;REM YSF REF;213.37.155.58;42000;000;http://rem-esp.es
60318;ES Wires X;WIRES X SPAIN;80.211.236.189;42000;018;http://ysf.xreflector.es/
86886;FR Room-ZIT;Room F1ZIT;151.80.143.185;42002;009;http://151.80.143.185/zit/YSFReflector-Dashboard/
39510;FR wiresxfrance;Wires-X-France;151.80.143.185;42000;000;http://151.80.143.185/WXF/YSFReflector-Dashboard/index.php
15642;ES REM SPAIN;YSF Reflector;80.211.226.37;42000;001;http://80.211.226.37/YSF
60318;ES Wires X;BM TG21475;80.211.236.189;42000;009;http://ysf.xreflector.es/
60786;FR F1ZLJ (95);Val dOise-ARAM;82.236.81.19;42000;003;http://82.236.81.19
00645;FR FON-Gateway;AllModes-GW;185.109.201.81;42000;002;
86886;FR Room-ZIT;Room F1ZIT;151.80.143.185;42002;015;http://151.80.143.185/zit/YSFReflector-Dashboard/
72721;FR RRF-Gateway;AllModes-GW;185.109.201.81;42001;001;
39510;FR wiresxfrance;Wires-X-France;151.80.143.185;42000;001;http://151.80.143.185/WXF/YSFReflector-Dashboard/index.php
59495;FR YSF St Amand;St Amand (59);51.15.172.24;42000;002;https://srv.hambox.fr/dashboard/
83665;FR YSF-Alpes;Rhone-Alpes;217.182.66.229;42000;001;http://ysf-alpes.f4gve.net
60284;FR YSF-Alsace;Room (67-68);91.121.136.94;42000;001;http://c4fm.vulcain.space/
19531;FR YSF-Bretagne;Bretagne;78.206.208.208;42000;000;http://78.206.208.208:8081/YSFReflector-Dashboard/index.php
60284;FR YSF-Alsace;Room (67-68);91.121.136.94;42000;003;http://c4fm.vulcain.space/
19531;FR YSF-Bretagne;Bretagne;78.206.208.208;42000;001;http://78.206.208.208:8081/YSFReflector-Dashboard/index.php
13844;FR YSF-Cappelle;YSF Room F1ZKY;92.188.0.108;42000;001;http://ysf.a3rn.org:2626
58617;FR YSF-France;Fusion France;87.98.132.205;42000;031;http://ysf-france.fr/
91713;FR YSF-Limouzi;C4FM Limousin;88.174.140.210;42000;001;http://ysf-limousin.dyndns.org:8787
46353;FR YSF-Nord;Nord;178.32.163.106;42000;003;
33751;FUSION-ITALY;Italy YSFR;188.213.173.69;42000;002;http://c4fm-it.selfip.com/
91767;GB Fusion Kernow;Fusion SW UK;87.117.229.165;43000;001;http://ysf.mb6cc.co.uk
86111;GB Midlands;YSF Mids GB;86.181.124.242;42021;003;
97576;GB N.Ireland;YSF N.Ireland;87.117.229.165;42500;004;
16710;GB SOUTH WEST;YSF REFLECTOR;31.51.76.253;43000;003;http://g8koe.ddns.net:8000/
25419;Guatemala;CentOS7;74.208.88.137;42000;005;http://74.208.88.137/YSF/index.php
58617;FR YSF-France;Fusion France;87.98.132.205;42000;023;http://ysf-france.fr/
91713;FR YSF-Limouzi;C4FM Limousin;88.174.140.210;42000;002;http://ysf-limousin.dyndns.org:8787
46353;FR YSF-Nord;Nord;178.32.163.106;42000;002;
33751;FUSION-ITALY;Italy YSFR;188.213.173.69;42000;001;http://c4fm-it.selfip.com/
91767;GB Fusion Kernow;Fusion SW UK;87.117.229.165;43000;003;http://ysf.mb6cc.co.uk
86111;GB Midlands;YSF Mids GB;86.182.105.24;42021;003;
97576;GB N.Ireland;YSF N.Ireland;87.117.229.165;42500;000;
16710;GB SOUTH WEST;YSF REFLECTOR;81.146.41.163;43000;003;http://g8koe.ddns.net:8000/
39270;GB XRF922;All Modes;81.150.10.62;42000;007;http://www.mb6er.com/ysf/
20408;GB YSF-CYMRU;REFLECTOR-CYM;217.35.151.219;42000;000;http://ysf.cymru.link/ysf
73024;greatlakesneT;DETROIT AREA;107.141.52.226;42002;000;http://192.168.1.82
25419;Guatemala;CentOS7;74.208.88.137;42000;004;http://74.208.88.137/YSF/index.php
47247;HB C4FM Basel;CISAR Basel;212.237.33.114;42000;000;http://212.237.33.114/c4fm/index.php
62928;HBLINK EA5GVK;HBLINK EA5GVK;84.127.124.188;42000;000;http://ea5gvk.duckdns.org:84/YSFReflector
29256;HK-WTT-YSF;BM TG460790;218.255.238.138;42006;003;http://218.255.238.138/Dashboard/
29256;HK-WTT-YSF;C4FM;218.255.238.138;42006;003;http://218.255.238.138/Dashboard/
41120;HU Hungary;BM TG216;185.187.75.192;42100;001;http://brandmeister.hu/ysfref/
04251;IE YSF Ireland;Fusion <> DMR;87.44.19.111;42000;009;
94264;IT C4FM ENNA;HAMRADIOENNA #;94.176.6.45;42001;000;http://ysf.hamradioenna.it
99603;HUBNet;Link to HUBNet;81.105.24.211;42000;005;http://g7rpg.hubnetwork.uk:41689/ysf/index.php
04251;IE YSF Ireland;Fusion <> DMR;87.44.19.111;42000;007;
67939;IT C4FM LAZIO;773RadioGroup;93.186.255.126;42000;001;http://ysf.iz0rin.it/ysf/
30483;IT C4FM Lodi;Lombardia;79.51.62.21;42000;001;http://ysf.iw2gob.it/c4fm/index.php
30483;IT C4FM Lodi;Lombardia;95.244.128.57;42000;002;http://ysf.iw2gob.it/c4fm/index.php
51231;IT C4FM NORD;ITALY-NORD;78.47.154.19;42000;006;http://italy-nord.dyndns.biz/dashboard/index.php
19437;IT C4FM Piemonte;DSP Italy;94.177.173.53;42000;003;http://94.177.173.53:8085/c4fm/index.php
14115;IT C4FM PUGLIA;C4FM Puglia It;94.177.164.25;42000;000;http://c4fm-puglia.iz7auh.net/YSFReflector-Dashboard/index.php
14115;IT C4FM PUGLIA;C4FM Puglia It;94.177.164.25;42000;001;http://c4fm-puglia.iz7auh.net/YSFReflector-Dashboard/index.php
12624;IT C4FM SUD;ITALY-SUD;212.237.59.103;42000;000;http://c4fm-italy-sud.iz7auh.net/YSFReflector-Dashboard/index.php
47946;IT Digiland;Italia;212.227.203.37;42000;000;http://212.227.203.37/ysf/index.php
82915;IT Digiland 2;Italia;185.203.118.135;42000;000;http://185.203.118.135/ysf
82915;IT Digiland 2;Italia;185.203.118.135;42000;001;http://185.203.118.135/ysf
30942;IT Digiland 3;Italia;85.217.170.178;42000;000;http://85.217.170.178/
64120;IT DSTAR-LINK;LINK DSTAR;80.211.156.219;42000;002;http://80.211.156.219/index.php
58288;IT GDO FUSION;C4FM Ossola;78.134.125.81;42001;000;http://iz1zpj.ddns.net/c4fm/index.php
58288;IT GDO FUSION;C4FM Ossola;212.124.170.21;42001;002;http://iz1zpj.ddns.net/c4fm/index.php
64159;IT ITALY-FREE;c4fm bridge;37.187.106.175;42000;002;
34697;IT SICILIA;C4FM REFLECTOR;94.176.6.45;42000;004;http://sicilia.c4fm.it
82044;IT YSFROOM-ITALY;WIRES-X ITALY;94.177.187.40;42000;029;http://ysfroomitaly.iw2gob.it/c4fm/index.php
34697;IT SICILIA;C4FM REFLECTOR;94.176.6.45;42000;005;http://sicilia.c4fm.it
82044;IT YSFROOM-ITALY;WIRES-X ITALY;94.177.187.40;42000;025;http://ysfroomitaly.iw2gob.it/c4fm/index.php
67411;IT Zona 4;EmiliaRomagna;212.84.32.29;42000;001;
70220;ITALY-I5-PT;C4FM Pistoia;95.235.200.175;42000;001;http://iu5hju.ddns.net/index.php
70542;Japan ShounanYSF;Japan ShounanY;133.130.114.45;42000;001;http://shounandstar.dip.jp/ysf/
79242;ITALI-I5-PT;C4FM NODE Pist;79.23.63.195;42000;002;http://iu5hju.ddns.net/index.php
70542;Japan ShounanYSF;Japan ShounanY;133.130.114.45;42000;002;http://shounandstar.dip.jp/ysf/
25383;JP JAPAN;Fusion Japan;122.222.1.50;42000;010;http://c4fm.owari.biz/ysfref/
13870;KAVKAZ;RUS, North Cau;37.18.35.2;42000;002;
20457;Miami-LATINO;C4FM;80.211.175.168;42000;000;http://80.211.175.168/
23944;MX Fusion Mexico;Fusion Mexico;200.57.9.10;42000;002;http://200.57.9.10
11714;MY Malaysia Net;Malaysia Net;150.129.184.54;42000;001;http://ysf.myaprs.my/ysf/index.php
96455;NL Central;Centraal NL;90.145.156.196;42000;024;http://c4fm.pa7lim.nl/
85875;NL Fusion Almere;Flevoland;84.86.62.38;42000;002;http://c4fm-pe1gdf.nl
88748;JP SAKURA-Net;SNWLab Fusion;133.242.137.163;42000;001;
13870;KAVKAZ;RUS, North Cau;37.18.35.2;42000;002;http://kavkaz.qrz.ru/YSF/
20457;Miami-LATINO;C4FM;80.211.175.168;42000;001;http://80.211.175.168/
23944;MX Fusion Mexico;Fusion Mexico;200.57.9.10;42000;001;http://200.57.9.10
11714;MY Malaysia Net;Malaysia Net;150.129.184.54;42000;002;http://ysf.myaprs.my/ysf/index.php
96455;NL Central;Centraal NL;90.145.156.196;42000;028;http://c4fm.pa7lim.nl/
92034;NL ItaNed;Test reflector;83.162.231.214;42000;000;
73238;NL Noord;test reflector;44.137.87.82;42000;001;http://44.137.87.82/index.php
63539;NL Oost;test reflector;44.137.87.83;42000;002;http://44.137.87.83/index.php
63539;NL Oost;test reflector;44.137.87.83;42000;003;http://44.137.87.83/index.php
73443;NL PI1DAF;Multi Repeater;77.174.30.155;42000;002;http://pd0poh.ddns.net
66644;NL YSF amprnet;ampr reflector;44.137.33.52;42000;000;http://44.137.33.52/index.php
38627;NL YSF444;Dutch Refl.;188.68.37.51;42000;001;http://ysf444.pa3dfn.nl
56254;NO YSF006;Norway;80.89.46.242;42000;015;
46031;NZ ZL2VH;ZL2VH YSF;123.255.47.67;42000;006;http://123.255.47.67:84
48038;Ohio-Link;Ohio-Link;75.76.129.38;42000;006;
37761;OklahomaLink;Wires21733,BM3;70.189.115.214;42000;006;http://oklahomalink.duckdns.org:2080
38627;NL YSF444;Dutch Refl.;188.68.37.51;42000;005;http://ysf444.pa3dfn.nl
22354;NL ZODigi;Local testing;82.171.119.45;42000;001;http://vandenhoff.no-ip.info:8080
56254;NO YSF006;Norway;80.89.46.242;42000;013;
46031;NZ ZL2VH;ZL2VH YSF;123.255.47.67;42000;005;http://123.255.47.67:84
48038;Ohio-Link;Ohio-Link;75.76.129.38;42000;007;
37761;OklahomaLink;Wires21733,BM3;70.189.115.214;42000;003;http://oklahomalink.duckdns.org:2080
00001;Parrot;Parrot;213.202.229.15;42020;000;
25393;PL 4280;YSF/DMR/DCS132;94.246.175.66;42031;003;https://brandmeister.network/?page=lh&DestinationID=260080
29114;PL POLAND;POLAND WiresX;94.246.175.66;42025;015;https://brandmeister.network/?page=lh&DestinationID=260042
25393;PL 4280;YSF PL 4280;94.246.175.66;42031;003;https://brandmeister.network/?page=lh&DestinationID=260080
29114;PL POLAND;YSF PL POLAND;94.246.175.66;42025;012;https://brandmeister.network/?page=lh&DestinationID=260042
55546;PL Silesia;Poland Silesia;188.116.7.66;42001;001;http://ysfsilesia.pzk.pl/
38691;PL SR4H;SR4H-ROOM;91.244.185.128;42000;002;
11533;PL SR8DMR;RTCN Chotycze;94.246.175.66;42029;001;http://ysf016.wiresx.pl:8081/sr8dmr/
78099;PL SR8FWD;Wlodawa WiresX;94.246.175.66;42030;001;http://sr8fwd.wiresx.pl
79009;PL SR8K;Dubiecko;94.246.175.66;42032;001;http://ysf016.wiresx.pl:8081/sr8k/
91407;PL SR8LUF;Lublin;94.246.175.66;42028;001;http://ysf016.wiresx.pl:8081/sr8luf/
87318;PL SR8UVC;Chotylow;94.246.175.66;42034;001;
54644;PL SR8UWD;Wlodawa YSF;94.246.175.66;42027;001;http://sr8uwd.wiresx.pl
38691;PL SR4H;SR4H-ROOM;91.244.185.128;42000;001;
40464;PL SR7MK;YSF PL SR7MK;94.246.175.66;42024;002;http://ysf016.wiresx.pl:8081/sr7mk/
11533;PL SR8DMR;YSF PL SR8DMR;94.246.175.66;42029;001;http://ysf016.wiresx.pl:8081/sr8dmr/
78099;PL SR8FWD;YSF PL SR8FWD;94.246.175.66;42030;001;http://sr8fwd.wiresx.pl
91407;PL SR8LUF;YSF PL SR8LUF;94.246.175.66;42028;001;http://ysf016.wiresx.pl:8081/sr8luf/
87318;PL SR8UVC;YSF PL SR8UVC;94.246.175.66;42034;001;
54644;PL SR8UWD;YSF PL SR8UWD;94.246.175.66;42027;001;http://sr8uwd.wiresx.pl
74470;PL SR9FSR;Wola YSF;188.116.7.66;42002;001;http://ysfsr9fsr.pzk.pl/
80986;PL YSF260;BM TG260;94.246.175.66;42035;003;http://ysf016.wiresx.pl:8081/260/
80986;PL YSF260;YSF260;94.246.175.66;42035;002;http://ysf016.wiresx.pl:8081/260/
09948;PT YSF009;C4FM-Portugal;109.71.44.237;42000;004;http://c4fm.from-ct.com/ysf/
89355;R.E.E.C.;R.E.E.C.;5.135.137.65;42000;001;http://www.reec.be/ysf
13131;ref.c4fm.se;ref.c4fm.se;176.10.140.161;42000;005;http://ref.c4fm.se
89355;R.E.E.C.;R.E.E.C.;5.135.137.65;42000;000;http://www.reec.be/ysf
13131;ref.c4fm.se;ref.c4fm.se;176.10.140.161;42000;003;http://ref.c4fm.se
07931;RO YO QSO Party;C4FM Reflector;94.176.6.37;42001;001;http://wiresx.226.ro/
50662;RO-CafeGratis;BM TG2260;94.176.6.37;42005;001;http://ysf.cafegratis.club
06955;Salento Digital;-;185.203.118.8;42000;001;http://185.203.118.8/
40208;SC Scotland;Scottish YSF;13.69.14.204;42000;012;http://c4fm.dvscotland.net
43699;SE SK7ES;SK7ES Fusion;44.140.236.22;42000;002;http://ysf.sm7.hamnet.nu
50662;RO-CafeGratis;BM TG2260;94.176.6.37;42005;002;http://ysf.cafegratis.club
06955;Salento Digital;-;185.203.118.8;42000;000;http://185.203.118.8/
40208;SC Scotland;Scottish YSF;13.69.14.204;42000;010;http://c4fm.dvscotland.net
43699;SE SK7ES;SK7ES Fusion;44.140.236.22;42000;001;http://ysf.sm7.hamnet.nu
77010;SE SW-Sweden;C4FM;46.236.122.101;52000;000;http://sm4wdq.hopto.org:9999/
48857;SI-Slovenia;TG293;84.52.159.10;42000;004;http://xlx511.ddns.net:46193/index.php
48857;SI-Slovenia;C4FM Bridge BM;84.52.159.10;42000;005;http://xlx511.ddns.net:46193/index.php
94513;TH YSF520;C4FM THAILAND;119.59.125.192;42000;004;http://ysf.dtdxa.com
43513;TROJMIASTO;Poland Tricity;195.140.190.58;42000;001;http://ysftricity.ham-dmr.pl
30743;TW HAMTALK;C4FM @HAMTALK;118.150.164.96;42000;003;http://www.hamtalk.net/ysfr
00325;TW YSF886;C4FM Taiwan;118.163.103.178;42000;004;http://xlx886.metropit.net/ysfr/
13201;UK DVMEGA;DVMEGA CHAT;212.237.34.32;42000;007;http://c4fm.dvmega.co.uk
43513;TROJMIASTO;Poland Tricity;195.140.190.58;42000;002;http://ysftricity.ham-dmr.pl
30743;TW HAMTALK;C4FM @HAMTALK;118.150.164.96;42000;005;http://www.hamtalk.net/ysfr
00325;TW YSF886;C4FM Taiwan;118.163.103.178;42000;003;http://xlx886.metropit.net/ysfr/
13201;UK DVMEGA;DVMEGA CHAT;212.237.34.32;42000;008;http://c4fm.dvmega.co.uk
93019;UK DVMEGA SH;DVMEGA CHAT SH;212.237.18.27;42000;002;http://212.237.18.27/ysf/
83087;UK_YSF_BM_UK;UK_Ref_DN_ONLY;87.117.229.171;42000;030;
83087;UK_YSF_BM_UK;UK_Ref_DN_ONLY;87.117.229.171;42000;038;
37710;uNIVERSAL-TWR;SE Michigan;107.141.52.226;42000;000;192.168.1.85
21988;US AggielandLink;Aggieland Link;71.252.210.227;42000;001;http://www.aggielandlink.com/Dashboard
51512;US BM TG 3137;North Carolina;52.3.47.55;42001;002;http://52.3.47.55/NC/index.php
51512;US BM TG 3137;North Carolina;52.3.47.55;42001;003;http://52.3.47.55/NC/index.php
93196;US BM TG 31444;RI Digital Hub;54.68.216.180;42001;003;http://southeast.digitallink.us/RI/
49235;US CKRG;Central Kansas;198.211.109.207;42000;004;
39906;US COLORADO-LINK;Colorado Link;13.78.187.50;42000;012;http://cartradioysf.ae2l.net
84105;US East PA;MMDVM System;173.49.20.45;42005;001;http://www.wb0yle.com:8484
04162;US GLOBAL DX;Global DX;206.72.198.26;42000;005;http://206.72.198.26/ysf
83132;US Illinois Link;Illinois Link;74.208.235.115;42000;007;http://74.208.235.115/index.php
80374;US K4BUM;K4BUM-Group;35.196.9.211;42000;002;
99597;US Kingsland;Kingsland GA;54.68.216.180;42000;003;http://w1kfr.from-ga.com/GA/index.php
02912;US Nationwide;United States;174.36.222.36;42000;035;http://ysf.kc2idb.net/index.php
48139;US nature coast;nature coast;47.206.21.6;42000;004;http://47.206.21.6:81
49235;US CKRG;Central Kansas;198.211.109.207;42000;003;
39906;US COLORADO-LINK;Colorado Link;13.78.187.50;42000;006;http://cartradioysf.ae2l.net
84105;US East PA;MMDVM System;173.49.20.45;42005;000;http://www.wb0yle.com:8484
04162;US GLOBAL DX;Global DX;206.72.198.26;42000;003;http://206.72.198.26/ysf
83132;US Illinois Link;Illinois Link;74.208.235.115;42000;002;http://74.208.235.115/index.php
80374;US K4BUM;K4BUM-Group;35.196.9.211;42000;001;
99597;US Kingsland;Kingsland GA;54.68.216.180;42000;005;http://w1kfr.from-ga.com/GA/index.php
02912;US Nationwide;United States;174.36.222.36;42000;030;http://ysf.kc2idb.net/index.php
48139;US nature coast;nature coast;47.206.21.6;42000;005;http://47.206.21.6:81
85788;US NJ EXP;US NJ EXP;64.137.243.122;42000;000;http://xrf.njpaasterisk.org
83242;US NW-Ohio;YSF-WiresX-284;52.54.69.145;42000;001;http://ysf.k8xg.com
83242;US NW-Ohio;YSF-WiresX-284;52.54.69.145;42000;002;http://ysf.k8xg.com
53594;US Ohio;Ohio;162.243.74.151;42000;001;http://ysf.n8qq.com
09585;US RFIT;YSF TO DMR;73.233.224.103;42000;003;
84398;US SADRC;SanAntonioDRC;71.78.10.76;42000;012;
62554;US Texas-Nexus;Texas-Nexus;104.2.186.135;42000;020;http://ysf.texas-nexus.dyndns.org/ysf/
80767;US TGIF-BM 31665;US TGIF-BM 316;162.248.92.62;42000;011;http://n2nuo.com/ysf/index.php
76864;US Triangle NC;Triangle NC;192.223.28.198;42000;002;http://ysf.trianglenc.net
09585;US RFIT;YSF TO DMR;73.233.224.103;42000;001;
84398;US SADRC;SanAntonioDRC;71.78.10.76;42000;010;
62554;US Texas-Nexus;Texas-Nexus;104.2.186.135;42000;019;http://ysf.texas-nexus.dyndns.org/ysf/
80767;US TGIF-BM 31665;US TGIF-BM 316;162.248.92.62;42000;014;http://n2nuo.com/ysf/index.php
76864;US Triangle NC;Triangle NC;192.223.28.198;42000;003;http://ysf.trianglenc.net
98899;US WolfDen;Massachusetts;100.0.26.120;42000;001;http://wolfden.ddnsgeek.com:42080
38268;US YSF 012;PAPA YSF 012;209.112.244.28;42000;004;http://ysfr012.papasys.com
38268;US YSF 012;PAPA YSF 012;209.112.244.28;42000;001;http://ysfr012.papasys.com
90943;US YSF 858;YSF SDCA-NZ6D;104.236.156.191;42000;000;http://nz6d.dx40.com/ysf
08033;US YSF002;KingsOfDigital;52.10.253.1;42000;002;http://ysf002.dstar.club
08033;US YSF002;KingsOfDigital;52.10.253.1;42000;001;http://ysf002.dstar.club
91768;US YSF082 NYC;KARG & NB2O;108.21.232.23;42000;001;http://ysf082.pungsan.com/
23864;US YSF310;K6KD;64.137.191.209;42000;000;http://ysf310.xrefl.net
96429;US-KansasLink;Kansas C4FM Re;23.119.252.30;42000;006;http://kansas-ysf.dyndns.org:8675/index.php
87531;US-QuadNetATL;QuadNet-BM;107.191.121.105;42000;004;http://ysfr1.openquad.net/
74247;US-RepeaterBook;DMR TG 31419;69.71.127.9;42000;002;http://matfield.heartlandtower.com:8675
12224;US-YSF-NE;NEW-ENGLAND;54.144.216.63;42000;005;http://ysf.wizworks.net:41000/
88051;US-YSF587NYS;YSF-QNetBridge;216.155.157.11;42000;001;http://ysfopenquad.ddns.net
54595;Virginia;Virginia YSF;45.33.118.112;42000;003;http://45.33.118.112/ysf/
38635;Wires-X YO W;WiresX Romania;89.122.215.236;42001;004;http://wiresx.hamnet.ro
70375;YSF BRAZIL;C4FM BRAZIL PU;200.231.36.174;42000;007;http://ysf.pu2lrz.com
41577;YSF YO W;Fusion Romania;89.122.215.236;42000;009;http://ysf.hamnet.ro
24519;YSF-EA5 SPAIN;Zona EA5;84.127.124.188;42105;006;http://ea5gvk.duckdns.org:84/YSF
96429;US-KansasLink;Kansas C4FM Re;129.130.229.11;42010;004;http://129.130.229.11:15426/kansas
43352;US-Nevada;Nevada YSF Grp;129.130.229.11;42000;001;http://129.130.229.11:15426/nevada
87531;US-QuadNetATL;QuadNet-BM;107.191.121.105;42000;003;http://ysfr1.openquad.net/
74247;US-RepeaterBook;DMR TG 31419;129.130.229.11;42020;002;http://129.130.229.11:15426/rb
12224;US-YSF-NE;NEW-ENGLAND;54.144.216.63;42000;006;http://ysf.wizworks.net:41000/
88051;US-YSF587NYS;YSF-QNetBridge;216.155.157.11;42000;002;http://ysfopenquad.ddns.net
54595;Virginia;Virginia YSF;45.33.118.112;42000;000;http://45.33.118.112/ysf/
38635;Wires-X YO W;WiresX Romania;89.122.215.236;42001;003;http://wiresx.hamnet.ro
70375;YSF BRAZIL;C4FM BRAZIL PU;200.231.36.174;42000;005;http://ysf.pu2lrz.com
41577;YSF YO W;Fusion Romania;89.122.215.236;42000;008;http://ysf.hamnet.ro
24519;YSF-EA5 SPAIN;Zona EA5;84.127.124.188;42105;003;http://ea5gvk.duckdns.org:84/YSF
02891;ysf-ok-digital;OK Digital Grp;68.229.215.6;42000;000;http://192.168.1.135
26626;YSF-TI;YSF Tango Indi;159.89.183.117;42000;000;
93029;YSF004 MI5 SW2;Crossconnect t;44.103.34.3;42000;003;http://ysf004.kb8zgl.net/YSFReflector
65576;YSF937;Guri, South Ko;1.240.221.206;42000;000;http://sojubox.iptime.org:8080/ysfreflector/
31741;YSFColombiaLR;LCRA Fusion;120.146.216.45;42000;001;http://120.146.216.45/index.php
88240;ZOMBIE-ALERT;SE Michigan;107.141.52.226;42001;003;http://192.168.1.66

@ -30,6 +30,9 @@ CYSFReflectors::CYSFReflectors(const std::string& hostsFile, unsigned int reload
m_hostsFile(hostsFile),
m_parrotAddress(),
m_parrotPort(0U),
m_YSF2DMRAddress(),
m_YSF2DMRPort(0U),
m_fcsRooms(),
m_newReflectors(),
m_currReflectors(),
m_search(),
@ -80,6 +83,11 @@ void CYSFReflectors::setYSF2DMR(const std::string& address, unsigned int port)
m_YSF2DMRPort = port;
}
void CYSFReflectors::addFCSRoom(const std::pair<std::string, std::string>& entry)
{
m_fcsRooms.push_back(entry);
}
bool CYSFReflectors::load()
{
for (std::vector<CYSFReflector*>::iterator it = m_newReflectors.begin(); it != m_newReflectors.end(); ++it)
@ -107,12 +115,13 @@ bool CYSFReflectors::load()
in_addr address = CUDPSocket::lookup(host);
if (address.s_addr != INADDR_NONE) {
CYSFReflector* refl = new CYSFReflector;
refl->m_id = std::string(p1);
refl->m_name = std::string(p2);
refl->m_desc = std::string(p3);
refl->m_id = std::string(p1);
refl->m_name = std::string(p2);
refl->m_desc = std::string(p3);
refl->m_address = address;
refl->m_port = (unsigned int)::atoi(p5);
refl->m_count = std::string(p6);;
refl->m_port = (unsigned int)::atoi(p5);
refl->m_count = std::string(p6);;
refl->m_type = YT_YSF;
refl->m_name.resize(16U, ' ');
refl->m_desc.resize(14U, ' ');
@ -137,7 +146,10 @@ bool CYSFReflectors::load()
refl->m_address = CUDPSocket::lookup(m_parrotAddress);
refl->m_port = m_parrotPort;
refl->m_count = "000";
refl->m_type = YT_YSF;
m_newReflectors.push_back(refl);
LogInfo("Loaded YSF parrot");
}
@ -150,10 +162,37 @@ bool CYSFReflectors::load()
refl->m_address = CUDPSocket::lookup(m_YSF2DMRAddress);
refl->m_port = m_YSF2DMRPort;
refl->m_count = "000";
refl->m_type = YT_YSF;
m_newReflectors.push_back(refl);
LogInfo("Loaded YSF2DMR");
}
unsigned int id = 10U;
for (std::vector<std::pair<std::string, std::string>>::const_iterator it = m_fcsRooms.cbegin(); it != m_fcsRooms.cend(); ++it, id++) {
char text[10U];
::sprintf(text, "%05u", id);
std::string name = it->first;
std::string desc = it->second;
CYSFReflector* refl = new CYSFReflector;
refl->m_id = text;
refl->m_name = name;
refl->m_desc = desc;
refl->m_port = 0U;
refl->m_count = "000";
refl->m_type = YT_FCS;
refl->m_name.resize(16U, ' ');
refl->m_desc.resize(14U, ' ');
m_newReflectors.push_back(refl);
LogInfo("Loaded %s", name.c_str());
}
size = m_newReflectors.size();
if (size == 0U)
return false;
@ -203,7 +242,7 @@ std::vector<CYSFReflector*>& CYSFReflectors::search(const std::string& name)
trimmed.erase(std::find_if(trimmed.rbegin(), trimmed.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), trimmed.end());
std::transform(trimmed.begin(), trimmed.end(), trimmed.begin(), ::toupper);
unsigned int len = trimmed.size();
size_t len = trimmed.size();
for (std::vector<CYSFReflector*>::iterator it = m_currReflectors.begin(); it != m_currReflectors.end(); ++it) {
std::string reflector = (*it)->m_name;

@ -25,6 +25,11 @@
#include <vector>
#include <string>
enum YSF_TYPE {
YT_YSF,
YT_FCS
};
class CYSFReflector {
public:
CYSFReflector() :
@ -33,7 +38,8 @@ public:
m_desc(),
m_count("000"),
m_address(),
m_port(0U)
m_port(0U),
m_type(YT_YSF)
{
}
@ -43,6 +49,7 @@ public:
std::string m_count;
in_addr m_address;
unsigned int m_port;
YSF_TYPE m_type;
};
class CYSFReflectors {
@ -52,6 +59,7 @@ public:
void setParrot(const std::string& address, unsigned int port);
void setYSF2DMR(const std::string& address, unsigned int port);
void addFCSRoom(const std::pair<std::string, std::string>& entry);
bool load();
@ -72,6 +80,7 @@ private:
unsigned int m_parrotPort;
std::string m_YSF2DMRAddress;
unsigned int m_YSF2DMRPort;
std::vector<std::pair<std::string, std::string>> m_fcsRooms;
std::vector<CYSFReflector*> m_newReflectors;
std::vector<CYSFReflector*> m_currReflectors;
std::vector<CYSFReflector*> m_search;

@ -27,8 +27,7 @@ const unsigned int BUFFER_LENGTH = 200U;
CNetwork::CNetwork(unsigned int port) :
m_socket(port),
m_address(),
m_port(0U),
m_buffer(1000U, "YSF Network")
m_port(0U)
{
}
@ -76,53 +75,39 @@ bool CNetwork::writePoll(const in_addr& address, unsigned int port)
return m_socket.write(buffer, 14U, address, port);
}
void CNetwork::clock(unsigned int ms)
unsigned int CNetwork::read(unsigned char* data)
{
unsigned char buffer[BUFFER_LENGTH];
in_addr address;
unsigned int port;
int length = m_socket.read(buffer, BUFFER_LENGTH, address, port);
int length = m_socket.read(data, BUFFER_LENGTH, address, port);
if (length <= 0)
return;
return 0U;
// Handle incoming polls
if (::memcmp(buffer, "YSFP", 4U) == 0) {
if (::memcmp(data, "YSFP", 4U) == 0) {
writePoll(address, port);
return;
return 0U;
}
// Handle incoming unlinks
if (::memcmp(buffer, "YSFU", 4U) == 0)
return;
if (::memcmp(data, "YSFU", 4U) == 0)
return 0U;
// Handle the status command
if (::memcmp(buffer, "YSFS", 4U) == 0) {
if (::memcmp(data, "YSFS", 4U) == 0) {
unsigned char status[50U];
::sprintf((char*)status, "YSFS%05u%-16.16s%-14.14s%03u", 1U, "Parrot", "Parrot", 0U);
m_socket.write(status, 42U, address, port);
return;
return 0U;
}
// Invalid packet type?
if (::memcmp(buffer, "YSFD", 4U) != 0)
return;
if (::memcmp(data, "YSFD", 4U) != 0)
return 0U;
m_address.s_addr = address.s_addr;
m_port = port;
m_buffer.addData(buffer, 155U);
}
unsigned int CNetwork::read(unsigned char* data)
{
assert(data != NULL);
if (m_buffer.isEmpty())
return 0U;
m_buffer.getData(data, 155U);
return 155U;
}

@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2014,2016 by Jonathan Naylor G4KLX
* Copyright (C) 2009-2014,2016,2018 by Jonathan Naylor G4KLX
*
* 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
@ -19,7 +19,6 @@
#ifndef Network_H
#define Network_H
#include "RingBuffer.h"
#include "UDPSocket.h"
#include <cstdint>
@ -40,13 +39,10 @@ public:
void close();
void clock(unsigned int ms);
private:
CUDPSocket m_socket;
in_addr m_address;
unsigned int m_port;
CRingBuffer<unsigned char> m_buffer;
bool writePoll(const in_addr& address, unsigned int port);
};

@ -1,147 +0,0 @@
/*
* Copyright (C) 2006-2009,2012,2013,2015,2016,2018 by Jonathan Naylor G4KLX
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef RingBuffer_H
#define RingBuffer_H
#include <cstdio>
#include <cassert>
#include <cstring>
template<class T> class CRingBuffer {
public:
CRingBuffer(unsigned int length, const char* name) :
m_length(length),
m_name(name),
m_buffer(NULL),
m_iPtr(0U),
m_oPtr(0U)
{
assert(length > 0U);
assert(name != NULL);
m_buffer = new T[length];
::memset(m_buffer, 0x00, m_length * sizeof(T));
}
~CRingBuffer()
{
delete[] m_buffer;
}
bool addData(const T* buffer, unsigned int nSamples)
{
if (nSamples >= freeSpace()) {
::fprintf(stderr, "**** Overflow in %s ring buffer, %u >= %u\n", m_name, nSamples, freeSpace());
return false;
}
for (unsigned int i = 0U; i < nSamples; i++) {
m_buffer[m_iPtr++] = buffer[i];
if (m_iPtr == m_length)
m_iPtr = 0U;
}
return true;
}
bool getData(T* buffer, unsigned int nSamples)
{
if (dataSize() < nSamples) {
::fprintf(stderr, "**** Underflow in %s ring buffer, %u < %u\n", m_name, dataSize(), nSamples);
return false;
}
for (unsigned int i = 0U; i < nSamples; i++) {
buffer[i] = m_buffer[m_oPtr++];
if (m_oPtr == m_length)
m_oPtr = 0U;
}
return true;
}
bool peek(T* buffer, unsigned int nSamples)
{
if (dataSize() < nSamples) {
::fprintf(stderr, "**** Underflow peek in %s ring buffer, %u < %u\n", m_name, dataSize(), nSamples);
return false;
}
unsigned int ptr = m_oPtr;
for (unsigned int i = 0U; i < nSamples; i++) {
buffer[i] = m_buffer[ptr++];
if (ptr == m_length)
ptr = 0U;
}
return true;
}
void clear()
{
m_iPtr = 0U;
m_oPtr = 0U;
::memset(m_buffer, 0x00, m_length * sizeof(T));
}
unsigned int freeSpace() const
{
if (m_oPtr == m_iPtr)
return m_length;
if (m_oPtr > m_iPtr)
return m_oPtr - m_iPtr;
return (m_length + m_oPtr) - m_iPtr;
}
unsigned int dataSize() const
{
return m_length - freeSpace();
}
bool hasSpace(unsigned int length) const
{
return freeSpace() > length;
}
bool hasData() const
{
return m_oPtr != m_iPtr;
}
bool isEmpty() const
{
return m_oPtr == m_iPtr;
}
private:
unsigned int m_length;
const char* m_name;
T* m_buffer;
unsigned int m_iPtr;
unsigned int m_oPtr;
};
#endif

@ -119,7 +119,6 @@ void CYSFParrot::run()
unsigned int ms = stopWatch.elapsed();
stopWatch.start();
network.clock(ms);
watchdogTimer.clock(ms);
turnaroundTimer.clock(ms);

@ -150,7 +150,6 @@
<ClInclude Include="Thread.h" />
<ClInclude Include="Version.h" />
<ClInclude Include="YSFParrot.h" />
<ClInclude Include="RingBuffer.h" />
<ClInclude Include="Timer.h" />
<ClInclude Include="UDPSocket.h" />
<ClInclude Include="Network.h" />

@ -17,9 +17,6 @@
<ClInclude Include="Timer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="RingBuffer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Network.h">
<Filter>Header Files</Filter>
</ClInclude>

Loading…
Cancel
Save