Update YSF2NXDN and YSF2P25 for new YSF code

This commit is contained in:
root
2020-06-05 16:43:13 +01:00
parent 00606bb544
commit 73f0829136
12 changed files with 363 additions and 123 deletions
+91
View File
@@ -126,6 +126,8 @@ bool CConf::read()
// Remove quotes from the value
size_t len = ::strlen(value);
char *t;
unsigned char tokencnt = 0;
if (len > 1U && *value == '"' && value[len - 1U] == '"') {
value[len - 1U] = '\0';
value++;
@@ -167,6 +169,40 @@ bool CConf::read()
m_enableWiresX = ::atoi(value) == 1;
else if (::strcmp(key, "WiresXMakeUpper") == 0)
m_wiresXMakeUpper = ::atoi(value) == 1;
else if (::strcmp(key, "RadioID") == 0)
::memcpy(m_ysfRadioID, value, 5);
else if (::strcmp(key, "FICHCallsign") == 0)
m_fichCallSign = ::atoi(value);
else if (::strcmp(key, "FICHCallMode") == 0)
m_fichCallMode = ::atoi(value);
else if (::strcmp(key, "FICHFrameTotal") == 0)
m_fichFrameTotal = ::atoi(value);
else if (::strcmp(key, "FICHMessageRoute") == 0)
m_fichMessageRoute = ::atoi(value);
else if (::strcmp(key, "FICHVOIP") == 0)
m_fichVOIP = ::atoi(value);
else if (::strcmp(key, "FICHDataType") == 0)
m_fichDataType = ::atoi(value);
else if (::strcmp(key, "FICHSQLType") == 0)
m_fichSQLType = ::atoi(value);
else if (::strcmp(key, "FICHSQLCode") == 0)
m_fichSQLCode = ::atoi(value);
else if (::strcmp(key, "DT1") == 0){
tokencnt = 0;
while((t = strtok_r(value, ",", &value)) != NULL){
if(tokencnt < 10){
m_ysfDT1[tokencnt++] = atoi(t);
}
}
}
else if (::strcmp(key, "DT2") == 0){
tokencnt = 0;
while((t = strtok_r(value, ",", &value)) != NULL){
if(tokencnt < 10){
m_ysfDT2[tokencnt++] = atoi(t);
}
}
}
else if (::strcmp(key, "Daemon") == 0)
m_daemon = ::atoi(value) == 1;
} else if (section == SECTION_NXDN_NETWORK) {
@@ -293,6 +329,61 @@ bool CConf::getWiresXMakeUpper() const
return m_wiresXMakeUpper;
}
unsigned char CConf::getFICHCallSign() const
{
return m_fichCallSign;
}
unsigned char CConf::getFICHCallMode() const
{
return m_fichCallMode;
}
unsigned char CConf::getFICHFrameTotal() const
{
return m_fichFrameTotal;
}
unsigned char CConf::getFICHMessageRoute() const
{
return m_fichMessageRoute;
}
unsigned char CConf::getFICHVOIP() const
{
return m_fichVOIP;
}
unsigned char CConf::getFICHDataType() const
{
return m_fichDataType;
}
unsigned char CConf::getFICHSQLType() const
{
return m_fichSQLType;
}
unsigned char CConf::getFICHSQLCode() const
{
return m_fichSQLCode;
}
unsigned char* CConf::getYsfDT1()
{
return m_ysfDT1;
}
unsigned char* CConf::getYsfDT2()
{
return m_ysfDT2;
}
char* CConf::getYsfRadioID()
{
return m_ysfRadioID;
}
bool CConf::getDaemon() const
{
return m_daemon;