mirror of
https://github.com/ShaYmez/MMDVM_CM.git
synced 2025-05-23 17:52:27 -04:00
Wires-X upper case for YSF2NXDN and YSF2P25
This commit is contained in:
parent
faf78a842f
commit
220ce15db1
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015-2019 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -46,6 +46,7 @@ m_dstPort(0U),
|
|||||||
m_localAddress(),
|
m_localAddress(),
|
||||||
m_localPort(0U),
|
m_localPort(0U),
|
||||||
m_enableWiresX(false),
|
m_enableWiresX(false),
|
||||||
|
m_wiresXMakeUpper(true),
|
||||||
m_daemon(false),
|
m_daemon(false),
|
||||||
m_rxFrequency(0U),
|
m_rxFrequency(0U),
|
||||||
m_txFrequency(0U),
|
m_txFrequency(0U),
|
||||||
@ -164,6 +165,8 @@ bool CConf::read()
|
|||||||
m_localPort = (unsigned int)::atoi(value);
|
m_localPort = (unsigned int)::atoi(value);
|
||||||
else if (::strcmp(key, "EnableWiresX") == 0)
|
else if (::strcmp(key, "EnableWiresX") == 0)
|
||||||
m_enableWiresX = ::atoi(value) == 1;
|
m_enableWiresX = ::atoi(value) == 1;
|
||||||
|
else if (::strcmp(key, "WiresXMakeUpper") == 0)
|
||||||
|
m_wiresXMakeUpper = ::atoi(value) == 1;
|
||||||
else if (::strcmp(key, "Daemon") == 0)
|
else if (::strcmp(key, "Daemon") == 0)
|
||||||
m_daemon = ::atoi(value) == 1;
|
m_daemon = ::atoi(value) == 1;
|
||||||
} else if (section == SECTION_NXDN_NETWORK) {
|
} else if (section == SECTION_NXDN_NETWORK) {
|
||||||
@ -285,6 +288,11 @@ bool CConf::getEnableWiresX() const
|
|||||||
return m_enableWiresX;
|
return m_enableWiresX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CConf::getWiresXMakeUpper() const
|
||||||
|
{
|
||||||
|
return m_wiresXMakeUpper;
|
||||||
|
}
|
||||||
|
|
||||||
bool CConf::getDaemon() const
|
bool CConf::getDaemon() const
|
||||||
{
|
{
|
||||||
return m_daemon;
|
return m_daemon;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015-2019 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -47,6 +47,7 @@ public:
|
|||||||
std::string getLocalAddress() const;
|
std::string getLocalAddress() const;
|
||||||
unsigned int getLocalPort() const;
|
unsigned int getLocalPort() const;
|
||||||
bool getEnableWiresX() const;
|
bool getEnableWiresX() const;
|
||||||
|
bool getWiresXMakeUpper() const;
|
||||||
bool getDaemon() const;
|
bool getDaemon() const;
|
||||||
|
|
||||||
// The NXDN Network section
|
// The NXDN Network section
|
||||||
@ -88,6 +89,7 @@ private:
|
|||||||
std::string m_localAddress;
|
std::string m_localAddress;
|
||||||
unsigned int m_localPort;
|
unsigned int m_localPort;
|
||||||
bool m_enableWiresX;
|
bool m_enableWiresX;
|
||||||
|
bool m_wiresXMakeUpper;
|
||||||
bool m_daemon;
|
bool m_daemon;
|
||||||
|
|
||||||
unsigned int m_rxFrequency;
|
unsigned int m_rxFrequency;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2018 by Manuel Sanchez EA7EE
|
* Copyright (C) 2018 by Manuel Sanchez EA7EE
|
||||||
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -49,7 +49,7 @@ const unsigned char DEFAULT_FICH[] = {0x20U, 0x00U, 0x01U, 0x00U};
|
|||||||
|
|
||||||
const unsigned char NET_HEADER[] = "YSFD ALL ";
|
const unsigned char NET_HEADER[] = "YSFD ALL ";
|
||||||
|
|
||||||
CWiresX::CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, std::string tgfile) :
|
CWiresX::CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, std::string tgfile, bool makeUpper) :
|
||||||
m_callsign(callsign),
|
m_callsign(callsign),
|
||||||
m_node(),
|
m_node(),
|
||||||
m_id(),
|
m_id(),
|
||||||
@ -68,7 +68,8 @@ m_csd3(NULL),
|
|||||||
m_status(WXSI_NONE),
|
m_status(WXSI_NONE),
|
||||||
m_start(0U),
|
m_start(0U),
|
||||||
m_search(),
|
m_search(),
|
||||||
m_category()
|
m_category(),
|
||||||
|
m_makeUpper(makeUpper)
|
||||||
{
|
{
|
||||||
assert(network != NULL);
|
assert(network != NULL);
|
||||||
|
|
||||||
@ -113,6 +114,11 @@ m_category()
|
|||||||
tgreg->m_name = std::string(p2);
|
tgreg->m_name = std::string(p2);
|
||||||
tgreg->m_desc = std::string(p3);
|
tgreg->m_desc = std::string(p3);
|
||||||
|
|
||||||
|
if (m_makeUpper) {
|
||||||
|
std::transform(tgreg->m_name.begin(), tgreg->m_name.end(), tgreg->m_name.begin(), ::toupper);
|
||||||
|
std::transform(tgreg->m_desc.begin(), tgreg->m_desc.end(), tgreg->m_desc.begin(), ::toupper);
|
||||||
|
}
|
||||||
|
|
||||||
tgreg->m_name.resize(16U, ' ');
|
tgreg->m_name.resize(16U, ' ');
|
||||||
tgreg->m_desc.resize(14U, ' ');
|
tgreg->m_desc.resize(14U, ' ');
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2018 by Manuel Sanchez EA7EE
|
* Copyright (C) 2018 by Manuel Sanchez EA7EE
|
||||||
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -63,7 +63,7 @@ public:
|
|||||||
|
|
||||||
class CWiresX {
|
class CWiresX {
|
||||||
public:
|
public:
|
||||||
CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, std::string tgfile);
|
CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, std::string tgfile, bool makeUpper);
|
||||||
~CWiresX();
|
~CWiresX();
|
||||||
|
|
||||||
bool start();
|
bool start();
|
||||||
@ -104,6 +104,7 @@ private:
|
|||||||
std::vector<CTGReg*> m_currTGList;
|
std::vector<CTGReg*> m_currTGList;
|
||||||
std::vector<CTGReg*> m_TGSearch;
|
std::vector<CTGReg*> m_TGSearch;
|
||||||
std::vector<CTGReg*> m_category;
|
std::vector<CTGReg*> m_category;
|
||||||
|
bool m_makeUpper;
|
||||||
|
|
||||||
WX_STATUS processConnect(const unsigned char* source, const unsigned char* data);
|
WX_STATUS processConnect(const unsigned char* source, const unsigned char* data);
|
||||||
void processDX(const unsigned char* source);
|
void processDX(const unsigned char* source);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2018 by Manuel Sanchez EA7EE
|
* Copyright (C) 2018 by Manuel Sanchez EA7EE
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -280,7 +280,8 @@ int CYSF2NXDN::run()
|
|||||||
|
|
||||||
// CWiresX Control Object
|
// CWiresX Control Object
|
||||||
if (enableWiresX) {
|
if (enableWiresX) {
|
||||||
m_wiresX = new CWiresX(m_callsign, m_suffix, m_ysfNetwork, TGList);
|
bool makeUpper = m_conf.getWiresXMakeUpper();
|
||||||
|
m_wiresX = new CWiresX(m_callsign, m_suffix, m_ysfNetwork, TGList, makeUpper);
|
||||||
m_dtmf = new CDTMF;
|
m_dtmf = new CDTMF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ DstPort=42000
|
|||||||
LocalAddress=127.0.0.1
|
LocalAddress=127.0.0.1
|
||||||
LocalPort=42014
|
LocalPort=42014
|
||||||
EnableWiresX=1
|
EnableWiresX=1
|
||||||
|
WiresXMakeUpper=1
|
||||||
Daemon=0
|
Daemon=0
|
||||||
|
|
||||||
[NXDN Network]
|
[NXDN Network]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015-2019 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -45,6 +45,7 @@ m_dstPort(0U),
|
|||||||
m_localAddress(),
|
m_localAddress(),
|
||||||
m_localPort(0U),
|
m_localPort(0U),
|
||||||
m_enableWiresX(false),
|
m_enableWiresX(false),
|
||||||
|
m_wiresXMakeUpper(true),
|
||||||
m_daemon(false),
|
m_daemon(false),
|
||||||
m_networkDebug(false),
|
m_networkDebug(false),
|
||||||
m_rxFrequency(0U),
|
m_rxFrequency(0U),
|
||||||
@ -146,6 +147,8 @@ bool CConf::read()
|
|||||||
m_localPort = (unsigned int)::atoi(value);
|
m_localPort = (unsigned int)::atoi(value);
|
||||||
else if (::strcmp(key, "EnableWiresX") == 0)
|
else if (::strcmp(key, "EnableWiresX") == 0)
|
||||||
m_enableWiresX = ::atoi(value) == 1;
|
m_enableWiresX = ::atoi(value) == 1;
|
||||||
|
else if (::strcmp(key, "WiresXMakeUpper") == 0)
|
||||||
|
m_wiresXMakeUpper = ::atoi(value) == 1;
|
||||||
else if (::strcmp(key, "Daemon") == 0)
|
else if (::strcmp(key, "Daemon") == 0)
|
||||||
m_daemon = ::atoi(value) == 1;
|
m_daemon = ::atoi(value) == 1;
|
||||||
else if (::strcmp(key, "Debug") == 0)
|
else if (::strcmp(key, "Debug") == 0)
|
||||||
@ -239,6 +242,11 @@ bool CConf::getEnableWiresX() const
|
|||||||
return m_enableWiresX;
|
return m_enableWiresX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CConf::getWiresXMakeUpper() const
|
||||||
|
{
|
||||||
|
return m_wiresXMakeUpper;
|
||||||
|
}
|
||||||
|
|
||||||
bool CConf::getDaemon() const
|
bool CConf::getDaemon() const
|
||||||
{
|
{
|
||||||
return m_daemon;
|
return m_daemon;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015-2019 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -44,6 +44,7 @@ public:
|
|||||||
std::string getLocalAddress() const;
|
std::string getLocalAddress() const;
|
||||||
unsigned int getLocalPort() const;
|
unsigned int getLocalPort() const;
|
||||||
bool getEnableWiresX() const;
|
bool getEnableWiresX() const;
|
||||||
|
bool getWiresXMakeUpper() const;
|
||||||
bool getDaemon() const;
|
bool getDaemon() const;
|
||||||
bool getNetworkDebug() const;
|
bool getNetworkDebug() const;
|
||||||
|
|
||||||
@ -76,6 +77,7 @@ private:
|
|||||||
std::string m_localAddress;
|
std::string m_localAddress;
|
||||||
unsigned int m_localPort;
|
unsigned int m_localPort;
|
||||||
bool m_enableWiresX;
|
bool m_enableWiresX;
|
||||||
|
bool m_wiresXMakeUpper;
|
||||||
bool m_daemon;
|
bool m_daemon;
|
||||||
bool m_networkDebug;
|
bool m_networkDebug;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2018 by Manuel Sanchez EA7EE
|
* Copyright (C) 2018 by Manuel Sanchez EA7EE
|
||||||
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -49,7 +49,7 @@ const unsigned char DEFAULT_FICH[] = {0x20U, 0x00U, 0x01U, 0x00U};
|
|||||||
|
|
||||||
const unsigned char NET_HEADER[] = "YSFD ALL ";
|
const unsigned char NET_HEADER[] = "YSFD ALL ";
|
||||||
|
|
||||||
CWiresX::CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, std::string tgfile) :
|
CWiresX::CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, std::string tgfile, bool makeUpper) :
|
||||||
m_callsign(callsign),
|
m_callsign(callsign),
|
||||||
m_node(),
|
m_node(),
|
||||||
m_id(),
|
m_id(),
|
||||||
@ -68,7 +68,8 @@ m_csd3(NULL),
|
|||||||
m_status(WXSI_NONE),
|
m_status(WXSI_NONE),
|
||||||
m_start(0U),
|
m_start(0U),
|
||||||
m_search(),
|
m_search(),
|
||||||
m_category()
|
m_category(),
|
||||||
|
m_makeUpper(makeUpper)
|
||||||
{
|
{
|
||||||
assert(network != NULL);
|
assert(network != NULL);
|
||||||
|
|
||||||
@ -113,6 +114,11 @@ m_category()
|
|||||||
tgreg->m_name = std::string(p2);
|
tgreg->m_name = std::string(p2);
|
||||||
tgreg->m_desc = std::string(p3);
|
tgreg->m_desc = std::string(p3);
|
||||||
|
|
||||||
|
if (m_makeUpper) {
|
||||||
|
std::transform(tgreg->m_name.begin(), tgreg->m_name.end(), tgreg->m_name.begin(), ::toupper);
|
||||||
|
std::transform(tgreg->m_desc.begin(), tgreg->m_desc.end(), tgreg->m_desc.begin(), ::toupper);
|
||||||
|
}
|
||||||
|
|
||||||
tgreg->m_name.resize(16U, ' ');
|
tgreg->m_name.resize(16U, ' ');
|
||||||
tgreg->m_desc.resize(14U, ' ');
|
tgreg->m_desc.resize(14U, ' ');
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2018 by Manuel Sanchez EA7EE
|
* Copyright (C) 2018 by Manuel Sanchez EA7EE
|
||||||
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -63,7 +63,7 @@ public:
|
|||||||
|
|
||||||
class CWiresX {
|
class CWiresX {
|
||||||
public:
|
public:
|
||||||
CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, std::string tgfile);
|
CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, std::string tgfile, bool makeUpper);
|
||||||
~CWiresX();
|
~CWiresX();
|
||||||
|
|
||||||
bool start();
|
bool start();
|
||||||
@ -104,6 +104,7 @@ private:
|
|||||||
std::vector<CTGReg*> m_currTGList;
|
std::vector<CTGReg*> m_currTGList;
|
||||||
std::vector<CTGReg*> m_TGSearch;
|
std::vector<CTGReg*> m_TGSearch;
|
||||||
std::vector<CTGReg*> m_category;
|
std::vector<CTGReg*> m_category;
|
||||||
|
bool m_makeUpper;
|
||||||
|
|
||||||
WX_STATUS processConnect(const unsigned char* source, const unsigned char* data);
|
WX_STATUS processConnect(const unsigned char* source, const unsigned char* data);
|
||||||
void processDX(const unsigned char* source);
|
void processDX(const unsigned char* source);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2018 by Manuel Sanchez EA7EE
|
* Copyright (C) 2018 by Manuel Sanchez EA7EE
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -334,7 +334,8 @@ int CYSF2P25::run()
|
|||||||
|
|
||||||
// CWiresX Control Object
|
// CWiresX Control Object
|
||||||
if (enableWiresX) {
|
if (enableWiresX) {
|
||||||
m_wiresX = new CWiresX(m_callsign, suffix, m_ysfNetwork, TGList);
|
bool makeUpper = m_conf.getWiresXMakeUpper();
|
||||||
|
m_wiresX = new CWiresX(m_callsign, suffix, m_ysfNetwork, TGList, makeUpper);
|
||||||
m_dtmf = new CDTMF;
|
m_dtmf = new CDTMF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ DstPort=42000
|
|||||||
LocalAddress=127.0.0.1
|
LocalAddress=127.0.0.1
|
||||||
LocalPort=42015
|
LocalPort=42015
|
||||||
EnableWiresX=1
|
EnableWiresX=1
|
||||||
|
WiresXMakeUpper=1
|
||||||
Daemon=0
|
Daemon=0
|
||||||
Debug=0
|
Debug=0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user