changed unix port names between gateway and modems

pull/12/head
Tom Early 7 years ago
parent e72ed87b2f
commit 5b1396ac41

@ -202,8 +202,8 @@ static bool read_config(const char *cfgFile)
} }
} }
RPTR_MOD = 'A' + assigned_module; RPTR_MOD = 'A' + assigned_module;
cfg.GetValue(dvap_path+"_gate2modem"+std::to_string(assigned_module), type, gate2modem, 1, FILENAME_MAX); cfg.GetValue(dvap_path+"_gate2modem"+std::string(1, 'a'+assigned_module), type, gate2modem, 1, FILENAME_MAX);
cfg.GetValue(dvap_path+"_modem2gate"+std::to_string(assigned_module), type, modem2gate, 1, FILENAME_MAX); cfg.GetValue(dvap_path+"_modem2gate"+std::string(1, 'a'+assigned_module), type, modem2gate, 1, FILENAME_MAX);
if (cfg.KeyExists(dvap_path+"_callsign")) { if (cfg.KeyExists(dvap_path+"_callsign")) {
if (cfg.GetValue(dvap_path+"_callsign", type, RPTR, 3, 6)) if (cfg.GetValue(dvap_path+"_callsign", type, RPTR, 3, 6))
return true; return true;

@ -1855,8 +1855,8 @@ static bool read_config(const char *cfgFile)
} }
} }
DVRPTR_MOD = 'A' + assigned_module; DVRPTR_MOD = 'A' + assigned_module;
cfg.GetValue(path+"_gate2modem"+std::to_string(assigned_module), type, gate2modem, 1, FILENAME_MAX); cfg.GetValue(path+"_gate2modem"+std::string(1, 'a'+assigned_module), type, gate2modem, 1, FILENAME_MAX);
cfg.GetValue(path+"_modem2gate"+std::to_string(assigned_module), type, modem2gate, 1, FILENAME_MAX); cfg.GetValue(path+"_modem2gate"+std::string(1, 'a'+assigned_module), type, modem2gate, 1, FILENAME_MAX);
std::string call; std::string call;
if (cfg.GetValue("ircddb_login", type, call, 3, 6)) if (cfg.GetValue("ircddb_login", type, call, 3, 6))

@ -220,8 +220,8 @@ bool CQnetGateway::read_config(char *cfgFile)
rptr.mod[m].defined = true; rptr.mod[m].defined = true;
path.append(1, '_'); path.append(1, '_');
cfg.GetValue(path+"togateway", type, modem2gate[m], 1, FILENAME_MAX); cfg.GetValue(path+"modem2gate"+std::string(1, 'a'+m), type, modem2gate[m], 1, FILENAME_MAX);
cfg.GetValue(path+"fromgateway", type, gate2modem[m], 1, FILENAME_MAX); cfg.GetValue(path+"gate2modem"+std::string(1, 'a'+m), type, gate2modem[m], 1, FILENAME_MAX);
cfg.GetValue(path+"frequency", type, rptr.mod[m].frequency, 0.0, 1.0e12); cfg.GetValue(path+"frequency", type, rptr.mod[m].frequency, 0.0, 1.0e12);
cfg.GetValue(path+"offset", type, rptr.mod[m].offset, -1.0e12, 1.0e12); cfg.GetValue(path+"offset", type, rptr.mod[m].offset, -1.0e12, 1.0e12);
cfg.GetValue(path+"range", type, rptr.mod[m].range, 0.0, 1609344.0); cfg.GetValue(path+"range", type, rptr.mod[m].range, 0.0, 1609344.0);

@ -198,7 +198,7 @@ void CQnetITAP::Run(const char *cfgfile)
int ug2m = Gate2Modem.GetFD(); int ug2m = Gate2Modem.GetFD();
int um2g = Modem2Gate.GetFD(); int um2g = Modem2Gate.GetFD();
printf("gate2modem=%d, modem2gate=%d seral=%d\n", ug2m, um2g, serfd); printf("gate2modem=%d, modem2gate=%d serial=%d\n", ug2m, um2g, serfd);
keep_running = true; keep_running = true;
unsigned poll_counter = 0; unsigned poll_counter = 0;
@ -501,8 +501,8 @@ bool CQnetITAP::ReadConfig(const char *cfgFile)
RPTR_MOD = 'A' + assigned_module; RPTR_MOD = 'A' + assigned_module;
cfg.GetValue(itap_path+"_device", type, ITAP_DEVICE, 7, FILENAME_MAX); cfg.GetValue(itap_path+"_device", type, ITAP_DEVICE, 7, FILENAME_MAX);
cfg.GetValue(itap_path+"_gate2modem"+std::to_string(assigned_module), type, gate2modem, 1, FILENAME_MAX); cfg.GetValue(itap_path+"_gate2modem"+std::string(1, 'a'+assigned_module), type, gate2modem, 1, FILENAME_MAX);
cfg.GetValue(itap_path+"_modem2gate"+std::to_string(assigned_module), type, modem2gate, 1, FILENAME_MAX); cfg.GetValue(itap_path+"_modem2gate"+std::string(1, 'a'+assigned_module), type, modem2gate, 1, FILENAME_MAX);
itap_path.append("_callsign"); itap_path.append("_callsign");
if (cfg.KeyExists(itap_path)) { if (cfg.KeyExists(itap_path)) {

@ -394,8 +394,8 @@ bool CQnetRelay::ReadConfig(const char *cfgFile)
} }
RPTR_MOD = 'A' + assigned_module; RPTR_MOD = 'A' + assigned_module;
cfg.GetValue(mmdvm_path+"_gate2modem"+std::to_string(assigned_module), type, gate2modem, 1, FILENAME_MAX); cfg.GetValue(mmdvm_path+"_gate2modem"+std::string(1, 'a'+assigned_module), type, gate2modem, 1, FILENAME_MAX);
cfg.GetValue(mmdvm_path+"_modem2gate"+std::to_string(assigned_module), type, modem2gate, 1, FILENAME_MAX); cfg.GetValue(mmdvm_path+"_modem2gate"+std::string(1, 'a'+assigned_module), type, modem2gate, 1, FILENAME_MAX);
cfg.GetValue(mmdvm_path+"_internal_ip", type, MMDVM_IP, 7, IP_SIZE); cfg.GetValue(mmdvm_path+"_internal_ip", type, MMDVM_IP, 7, IP_SIZE);
int i; int i;
cfg.GetValue(mmdvm_path+"_local_port", type, i, 10000, 65535); cfg.GetValue(mmdvm_path+"_local_port", type, i, 10000, 65535);

13
configure vendored

@ -420,7 +420,7 @@ ModuleMenu () {
} }
WriteCFGFile () { WriteCFGFile () {
local m n p q outFile local m p q outFile
outFile='./qn.cfg' outFile='./qn.cfg'
echo "# Created on `date`" > $outFile echo "# Created on `date`" > $outFile
# gateway_ section # gateway_ section
@ -432,13 +432,6 @@ WriteCFGFile () {
# module_?_ section # module_?_ section
for m in a b c for m in a b c
do do
if [[ "$m" == a ]]; then
n=0
elif [[ "$m" == b ]]; then
n=1
else
n=2
fi
p="module_$m" p="module_$m"
if [ -n "${!p}" ]; then if [ -n "${!p}" ]; then
echo "${p}=${!p}" >> $outFile echo "${p}=${!p}" >> $outFile
@ -448,8 +441,8 @@ WriteCFGFile () {
q=${p}_offset; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile q=${p}_offset; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
q=${p}_range; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile q=${p}_range; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
q=${p}_agl; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile q=${p}_agl; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
q=${p}_gate2modem${n}; [ -z ${!q+x} ] || echo "${q}='${!q}'" >> $outFile q=${p}_gate2modem${m}; [ -z ${!q+x} ] || echo "${q}='${!q}'" >> $outFile
q=${p}_modem2gate${n}; [ -z ${!q+x} ] || echo "${q}='${!q}'" >> $outFile q=${p}_modem2gate${m}; [ -z ${!q+x} ] || echo "${q}='${!q}'" >> $outFile
q=${p}_inactivity; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile q=${p}_inactivity; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
q=${p}_packet_wait; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile q=${p}_packet_wait; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
q=${p}_acknowledge; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile q=${p}_acknowledge; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile

@ -94,12 +94,12 @@ module_x_frequency=0 # if you specify here, this frequency will show up on
module_x_offset=0 # usually the duplex tx-rx offset, but for dvap, it's a frequency tweak module_x_offset=0 # usually the duplex tx-rx offset, but for dvap, it's a frequency tweak
module_x_range=0 # the range of this repeater, in meters 1609.344 meters is 1.0 miles module_x_range=0 # the range of this repeater, in meters 1609.344 meters is 1.0 miles
module_x_agl=0 # the height above ground level for this repeater's antenna module_x_agl=0 # the height above ground level for this repeater's antenna
module_x_gate2modem0='gate2modem0' # Unix Sockets between a modem and the gateway module_x_gate2modem0='gate2modema' # Unix Sockets between a modem and the gateway
module_x_gate2modem1='gate2modem1' # 0 is for A, 1 is for B and 2 is for C module_x_gate2modem1='gate2modemb'
module_x_gate2modem2='gate2modem2' module_x_gate2modem2='gate2modemc'
module_x_modem2gate0='modem2gate0' module_x_modem2gate0='modem2gatea'
module_x_modem2gate1='modem2gate1' module_x_modem2gate1='modem2gateb'
module_x_modem2gate2='modem2gate2' module_x_modem2gate2='modem2gatec'
########################################################################################################################## ##########################################################################################################################
# #

Loading…
Cancel
Save

Powered by TurnKey Linux.