TEXT_LANG CIRCDDBGatewayMiscellaneousSet::getLanguage() const { int c = m_language->GetCurrentSelection(); if (c == wxNOT_FOUND) return TL_ENGLISH_UK; return TEXT_LANG(c); }
TEXT_LANG CDCSGatewayReflectorSet::getLanguage() const { int n = m_language->GetCurrentSelection(); if (n == wxNOT_FOUND) return TL_ENGLISH_UK; return TEXT_LANG(n); }
CDVAPNodeConfig::CDVAPNodeConfig(wxConfigBase* config, const wxString& name) : m_config(config), m_name(wxT("/")), m_callsign(DEFAULT_CALLSIGN), m_gateway(DEFAULT_GATEWAY), m_mode(DEFAULT_MODE), m_ack(DEFAULT_ACK), m_restriction(DEFAULT_RESTRICTION), m_rpt1Validation(DEFAULT_RPT1_VALIDATION), m_gatewayAddress(DEFAULT_GATEWAY_ADDRESS), m_gatewayPort(DEFAULT_GATEWAY_PORT), m_localAddress(DEFAULT_LOCAL_ADDRESS), m_localPort(DEFAULT_LOCAL_PORT), m_port(DEFAULT_DVAP_PORT), m_frequency(DEFAULT_DVAP_FREQUENCY), m_power(DEFAULT_DVAP_POWER), m_squelch(DEFAULT_DVAP_SQUELCH), m_offset(DEFAULT_DVAP_OFFSET), m_timeout(DEFAULT_TIMEOUT), m_ackTime(DEFAULT_ACK_TIME), m_beaconTime(DEFAULT_BEACON_TIME), m_beaconText(DEFAULT_BEACON_TEXT), m_beaconVoice(DEFAULT_BEACON_VOICE), m_language(DEFAULT_LANGUAGE), m_logging(DEFAULT_LOGGING), m_x(DEFAULT_WINDOW_X), m_y(DEFAULT_WINDOW_Y) { wxASSERT(config != NULL); if (!name.IsEmpty()) m_name = wxT("/") + name + wxT("/"); long temp; m_config->Read(m_name + KEY_CALLSIGN, &m_callsign, DEFAULT_CALLSIGN); m_config->Read(m_name + KEY_GATEWAY, &m_gateway, DEFAULT_GATEWAY); m_config->Read(m_name + KEY_MODE, &temp, long(DEFAULT_MODE)); m_mode = DSTAR_MODE(temp); m_config->Read(m_name + KEY_ACK, &temp, long(DEFAULT_ACK)); m_ack = ACK_TYPE(temp); m_config->Read(m_name + KEY_RESTRICTION, &m_restriction, DEFAULT_RESTRICTION); m_config->Read(m_name + KEY_RPT1_VALIDATION, &m_rpt1Validation, DEFAULT_RPT1_VALIDATION); m_config->Read(m_name + KEY_GATEWAY_ADDRESS, &m_gatewayAddress, DEFAULT_GATEWAY_ADDRESS); m_config->Read(m_name + KEY_GATEWAY_PORT, &temp, long(DEFAULT_GATEWAY_PORT)); m_gatewayPort = (unsigned int)temp; m_config->Read(m_name + KEY_LOCAL_ADDRESS, &m_localAddress, DEFAULT_LOCAL_ADDRESS); m_config->Read(m_name + KEY_LOCAL_PORT, &temp, long(DEFAULT_LOCAL_PORT)); m_localPort = (unsigned int)temp; m_config->Read(m_name + KEY_DVAP_PORT, &m_port, DEFAULT_DVAP_PORT); m_config->Read(m_name + KEY_DVAP_FREQUENCY, &temp, long(DEFAULT_DVAP_FREQUENCY)); m_frequency = (unsigned int)temp; m_config->Read(m_name + KEY_DVAP_POWER, &temp, long(DEFAULT_DVAP_POWER)); m_power = int(temp); m_config->Read(m_name + KEY_DVAP_SQUELCH, &temp, long(DEFAULT_DVAP_SQUELCH)); m_squelch = int(temp); m_config->Read(m_name + KEY_DVAP_OFFSET, &temp, long(DEFAULT_DVAP_OFFSET)); m_offset = int(temp); m_config->Read(m_name + KEY_TIMEOUT, &temp, long(DEFAULT_TIMEOUT)); m_timeout = (unsigned int)temp; m_config->Read(m_name + KEY_ACK_TIME, &temp, long(DEFAULT_ACK_TIME)); m_ackTime = (unsigned int)temp; m_config->Read(m_name + KEY_BEACON_TIME, &temp, long(DEFAULT_BEACON_TIME)); m_beaconTime = (unsigned int)temp; m_config->Read(m_name + KEY_BEACON_TEXT, &m_beaconText, DEFAULT_BEACON_TEXT); m_config->Read(m_name + KEY_BEACON_VOICE, &m_beaconVoice, DEFAULT_BEACON_VOICE); m_config->Read(m_name + KEY_LANGUAGE, &temp, long(DEFAULT_LANGUAGE)); m_language = TEXT_LANG(temp); m_config->Read(m_name + KEY_LOGGING, &m_logging, DEFAULT_LOGGING); m_config->Read(m_name + KEY_WINDOW_X, &temp, long(DEFAULT_WINDOW_X)); m_x = int(temp); m_config->Read(m_name + KEY_WINDOW_Y, &temp, long(DEFAULT_WINDOW_Y)); m_y = int(temp); }
CDVAPNodeConfig::CDVAPNodeConfig(const wxString& dir, const wxString& name) : m_fileName(), m_callsign(DEFAULT_CALLSIGN), m_gateway(DEFAULT_GATEWAY), m_mode(DEFAULT_MODE), m_ack(DEFAULT_ACK), m_restriction(DEFAULT_RESTRICTION), m_rpt1Validation(DEFAULT_RPT1_VALIDATION), m_gatewayAddress(DEFAULT_GATEWAY_ADDRESS), m_gatewayPort(DEFAULT_GATEWAY_PORT), m_localAddress(DEFAULT_LOCAL_ADDRESS), m_localPort(DEFAULT_LOCAL_PORT), m_port(DEFAULT_DVAP_PORT), m_frequency(DEFAULT_DVAP_FREQUENCY), m_power(DEFAULT_DVAP_POWER), m_squelch(DEFAULT_DVAP_SQUELCH), m_offset(DEFAULT_DVAP_OFFSET), m_timeout(DEFAULT_TIMEOUT), m_ackTime(DEFAULT_ACK_TIME), m_beaconTime(DEFAULT_BEACON_TIME), m_beaconText(DEFAULT_BEACON_TEXT), m_beaconVoice(DEFAULT_BEACON_VOICE), m_language(DEFAULT_LANGUAGE), m_logging(DEFAULT_LOGGING), m_x(DEFAULT_WINDOW_X), m_y(DEFAULT_WINDOW_Y) { wxASSERT(!dir.IsEmpty()); wxString fileName = CONFIG_FILE_NAME; if (!name.IsEmpty()) fileName = CONFIG_FILE_NAME + wxT("_") + name; m_fileName.Assign(dir, fileName); wxTextFile file(m_fileName.GetFullPath()); bool exists = file.Exists(); if (!exists) return; bool ret = file.Open(); if (!ret) { wxLogError(wxT("Cannot open the config file - %s"), m_fileName.GetFullPath().c_str()); return; } long temp1; unsigned long temp2; wxString str = file.GetFirstLine(); while (!file.Eof()) { if (str.GetChar(0U) == wxT('#')) { str = file.GetNextLine(); continue; } int n = str.Find(wxT('=')); if (n == wxNOT_FOUND) { str = file.GetNextLine(); continue; } wxString key = str.Left(n); wxString val = str.Mid(n + 1U); if (key.IsSameAs(KEY_CALLSIGN)) { m_callsign = val; } else if (key.IsSameAs(KEY_GATEWAY)) { m_gateway = val; } else if (key.IsSameAs(KEY_MODE)) { val.ToLong(&temp1); m_mode = DSTAR_MODE(temp1); } else if (key.IsSameAs(KEY_ACK)) { val.ToLong(&temp1); m_ack = ACK_TYPE(temp1); } else if (key.IsSameAs(KEY_RESTRICTION)) { val.ToLong(&temp1); m_restriction = temp1 == 1L; } else if (key.IsSameAs(KEY_RPT1_VALIDATION)) { val.ToLong(&temp1); m_rpt1Validation = temp1 == 1L; } else if (key.IsSameAs(KEY_GATEWAY_ADDRESS)) { m_gatewayAddress = val; } else if (key.IsSameAs(KEY_GATEWAY_PORT)) { val.ToULong(&temp2); m_gatewayPort = (unsigned int)temp2; } else if (key.IsSameAs(KEY_LOCAL_ADDRESS)) { m_localAddress = val; } else if (key.IsSameAs(KEY_LOCAL_PORT)) { val.ToULong(&temp2); m_localPort = (unsigned int)temp2; } else if (key.IsSameAs(KEY_DVAP_PORT)) { m_port = val; } else if (key.IsSameAs(KEY_DVAP_FREQUENCY)) { val.ToULong(&temp2); m_frequency = (unsigned int)temp2; } else if (key.IsSameAs(KEY_DVAP_POWER)) { val.ToLong(&temp1); m_power = int(temp1); } else if (key.IsSameAs(KEY_DVAP_SQUELCH)) { val.ToLong(&temp1); m_squelch = int(temp1); } else if (key.IsSameAs(KEY_DVAP_OFFSET)) { val.ToLong(&temp1); m_offset = int(temp1); } else if (key.IsSameAs(KEY_TIMEOUT)) { val.ToULong(&temp2); m_timeout = (unsigned int)temp2; } else if (key.IsSameAs(KEY_ACK_TIME)) { val.ToULong(&temp2); m_ackTime = (unsigned int)temp2; } else if (key.IsSameAs(KEY_BEACON_TIME)) { val.ToULong(&temp2); m_beaconTime = (unsigned int)temp2; } else if (key.IsSameAs(KEY_BEACON_TEXT)) { m_beaconText = val; } else if (key.IsSameAs(KEY_BEACON_VOICE)) { val.ToLong(&temp1); m_beaconVoice = temp1 == 1L; } else if (key.IsSameAs(KEY_LANGUAGE)) { val.ToLong(&temp1); m_language = TEXT_LANG(temp1); } else if (key.IsSameAs(KEY_LOGGING)) { val.ToLong(&temp1); m_logging = temp1 == 1L; } else if (key.IsSameAs(KEY_WINDOW_X)) { val.ToLong(&temp1); m_x = int(temp1); } else if (key.IsSameAs(KEY_WINDOW_Y)) { val.ToLong(&temp1); m_y = int(temp1); } str = file.GetNextLine(); } file.Close(); }
CGMSKRepeaterConfig::CGMSKRepeaterConfig(const wxString& dir, const wxString& name) : m_fileName(), m_callsign(DEFAULT_CALLSIGN), m_gateway(DEFAULT_GATEWAY), m_mode(DEFAULT_MODE), m_ack(DEFAULT_ACK), m_restriction(DEFAULT_RESTRICTION), m_rpt1Validation(DEFAULT_RPT1_VALIDATION), m_gatewayAddress(DEFAULT_GATEWAY_ADDRESS), m_gatewayPort(DEFAULT_GATEWAY_PORT), m_localAddress(DEFAULT_LOCAL_ADDRESS), m_localPort(DEFAULT_LOCAL_PORT), m_modemType(DEFAULT_MODEM_TYPE), m_modemAddress(DEFAULT_MODEM_ADDRESS), m_timeout(DEFAULT_TIMEOUT), m_ackTime(DEFAULT_ACK_TIME), m_beaconTime(DEFAULT_BEACON_TIME), m_beaconText(DEFAULT_BEACON_TEXT), m_beaconVoice(DEFAULT_BEACON_VOICE), m_language(DEFAULT_LANGUAGE), m_controlEnabled(DEFAULT_CONTROL_ENABLED), m_controlRpt1Callsign(DEFAULT_CONTROL_RPT1), m_controlRpt2Callsign(DEFAULT_CONTROL_RPT2), m_controlShutdown(DEFAULT_CONTROL_SHUTDOWN), m_controlStartup(DEFAULT_CONTROL_STARTUP), m_controlStatus1(DEFAULT_CONTROL_STATUS1), m_controlStatus2(DEFAULT_CONTROL_STATUS2), m_controlStatus3(DEFAULT_CONTROL_STATUS3), m_controlStatus4(DEFAULT_CONTROL_STATUS4), m_controlStatus5(DEFAULT_CONTROL_STATUS5), m_controlCommand1(DEFAULT_CONTROL_COMMAND1), m_controlCommand1Line(DEFAULT_CONTROL_COMMAND1_LINE), m_controlCommand2(DEFAULT_CONTROL_COMMAND2), m_controlCommand2Line(DEFAULT_CONTROL_COMMAND2_LINE), m_controlCommand3(DEFAULT_CONTROL_COMMAND3), m_controlCommand3Line(DEFAULT_CONTROL_COMMAND3_LINE), m_controlCommand4(DEFAULT_CONTROL_COMMAND4), m_controlCommand4Line(DEFAULT_CONTROL_COMMAND4_LINE), m_controlOutput1(DEFAULT_CONTROL_OUTPUT1), m_controlOutput2(DEFAULT_CONTROL_OUTPUT2), m_controlOutput3(DEFAULT_CONTROL_OUTPUT3), m_controlOutput4(DEFAULT_CONTROL_OUTPUT4), m_controllerType(DEFAULT_CONTROLLER_TYPE), m_activeHangTime(DEFAULT_ACTIVE_HANG_TIME), m_output1(DEFAULT_OUTPUT1), m_output2(DEFAULT_OUTPUT2), m_output3(DEFAULT_OUTPUT3), m_output4(DEFAULT_OUTPUT4), m_logging(DEFAULT_LOGGING), m_x(DEFAULT_WINDOW_X), m_y(DEFAULT_WINDOW_Y) { wxASSERT(!dir.IsEmpty()); wxString fileName = CONFIG_FILE_NAME; if (!name.IsEmpty()) fileName = CONFIG_FILE_NAME + wxT("_") + name; m_fileName.Assign(dir, fileName); wxTextFile file(m_fileName.GetFullPath()); bool exists = file.Exists(); if (!exists) return; bool ret = file.Open(); if (!ret) { wxLogError(wxT("Cannot open the config file - %s"), m_fileName.GetFullPath().c_str()); return; } long temp1; unsigned long temp2; wxString str = file.GetFirstLine(); while (!file.Eof()) { if (str.GetChar(0U) == wxT('#')) { str = file.GetNextLine(); continue; } int n = str.Find(wxT('=')); if (n == wxNOT_FOUND) { str = file.GetNextLine(); continue; } wxString key = str.Left(n); wxString val = str.Mid(n + 1U); if (key.IsSameAs(KEY_CALLSIGN)) { m_callsign = val; } else if (key.IsSameAs(KEY_GATEWAY)) { m_gateway = val; } else if (key.IsSameAs(KEY_MODE)) { val.ToLong(&temp1); m_mode = DSTAR_MODE(temp1); } else if (key.IsSameAs(KEY_ACK)) { val.ToLong(&temp1); m_ack = ACK_TYPE(temp1); } else if (key.IsSameAs(KEY_RESTRICTION)) { val.ToLong(&temp1); m_restriction = temp1 == 1L; } else if (key.IsSameAs(KEY_RPT1_VALIDATION)) { val.ToLong(&temp1); m_rpt1Validation = temp1 == 1L; } else if (key.IsSameAs(KEY_GATEWAY_ADDRESS)) { m_gatewayAddress = val; } else if (key.IsSameAs(KEY_GATEWAY_PORT)) { val.ToULong(&temp2); m_gatewayPort = (unsigned int)temp2; } else if (key.IsSameAs(KEY_LOCAL_ADDRESS)) { m_localAddress = val; } else if (key.IsSameAs(KEY_LOCAL_PORT)) { val.ToULong(&temp2); m_localPort = (unsigned int)temp2; } else if (key.IsSameAs(KEY_MODEM_TYPE)) { val.ToLong(&temp1); m_modemType = GMSK_MODEM_TYPE(temp1); } else if (key.IsSameAs(KEY_MODEM_ADDRESS)) { val.ToULong(&temp2); m_modemAddress = (unsigned int)temp2; } else if (key.IsSameAs(KEY_TIMEOUT)) { val.ToULong(&temp2); m_timeout = (unsigned int)temp2; } else if (key.IsSameAs(KEY_ACK_TIME)) { val.ToULong(&temp2); m_ackTime = (unsigned int)temp2; } else if (key.IsSameAs(KEY_BEACON_TIME)) { val.ToULong(&temp2); m_beaconTime = (unsigned int)temp2; } else if (key.IsSameAs(KEY_BEACON_TEXT)) { m_beaconText = val; } else if (key.IsSameAs(KEY_BEACON_VOICE)) { val.ToLong(&temp1); m_beaconVoice = temp1 == 1L; } else if (key.IsSameAs(KEY_LANGUAGE)) { val.ToLong(&temp1); m_language = TEXT_LANG(temp1); } else if (key.IsSameAs(KEY_CONTROL_ENABLED)) { val.ToLong(&temp1); m_controlEnabled = temp1 == 1L; } else if (key.IsSameAs(KEY_CONTROL_RPT1)) { m_controlRpt1Callsign = val; } else if (key.IsSameAs(KEY_CONTROL_RPT2)) { m_controlRpt2Callsign = val; } else if (key.IsSameAs(KEY_CONTROL_SHUTDOWN)) { m_controlShutdown = val; } else if (key.IsSameAs(KEY_CONTROL_STARTUP)) { m_controlStartup = val; } else if (key.IsSameAs(KEY_CONTROL_STATUS1)) { m_controlStatus1 = val; } else if (key.IsSameAs(KEY_CONTROL_STATUS2)) { m_controlStatus2 = val; } else if (key.IsSameAs(KEY_CONTROL_STATUS3)) { m_controlStatus3 = val; } else if (key.IsSameAs(KEY_CONTROL_STATUS4)) { m_controlStatus4 = val; } else if (key.IsSameAs(KEY_CONTROL_STATUS5)) { m_controlStatus5 = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND1)) { m_controlCommand1 = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND1_LINE)) { m_controlCommand1Line = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND2)) { m_controlCommand2 = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND2_LINE)) { m_controlCommand2Line = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND3)) { m_controlCommand3 = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND3_LINE)) { m_controlCommand3Line = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND4)) { m_controlCommand4 = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND4_LINE)) { m_controlCommand4Line = val; } else if (key.IsSameAs(KEY_CONTROL_OUTPUT1)) { m_controlOutput1 = val; } else if (key.IsSameAs(KEY_CONTROL_OUTPUT2)) { m_controlOutput2 = val; } else if (key.IsSameAs(KEY_CONTROL_OUTPUT3)) { m_controlOutput3 = val; } else if (key.IsSameAs(KEY_CONTROL_OUTPUT4)) { m_controlOutput4 = val; } else if (key.IsSameAs(KEY_CONTROLLER_TYPE)) { m_controllerType = val; } else if (key.IsSameAs(KEY_ACTIVE_HANG_TIME)) { val.ToULong(&temp2); m_activeHangTime = (unsigned int)temp2; } else if (key.IsSameAs(KEY_OUTPUT1)) { val.ToLong(&temp1); m_output1 = temp1 == 1L; } else if (key.IsSameAs(KEY_OUTPUT2)) { val.ToLong(&temp1); m_output2 = temp1 == 1L; } else if (key.IsSameAs(KEY_OUTPUT3)) { val.ToLong(&temp1); m_output3 = temp1 == 1L; } else if (key.IsSameAs(KEY_OUTPUT4)) { val.ToLong(&temp1); m_output4 = temp1 == 1L; } else if (key.IsSameAs(KEY_LOGGING)) { val.ToLong(&temp1); m_logging = temp1 == 1L; } else if (key.IsSameAs(KEY_WINDOW_X)) { val.ToLong(&temp1); m_x = int(temp1); } else if (key.IsSameAs(KEY_WINDOW_Y)) { val.ToLong(&temp1); m_y = int(temp1); } str = file.GetNextLine(); } file.Close(); }
CGMSKRepeaterConfig::CGMSKRepeaterConfig(wxConfigBase* config, const wxString& name) : m_config(config), m_name(wxT("/")), m_callsign(DEFAULT_CALLSIGN), m_gateway(DEFAULT_GATEWAY), m_mode(DEFAULT_MODE), m_ack(DEFAULT_ACK), m_restriction(DEFAULT_RESTRICTION), m_rpt1Validation(DEFAULT_RPT1_VALIDATION), m_gatewayAddress(DEFAULT_GATEWAY_ADDRESS), m_gatewayPort(DEFAULT_GATEWAY_PORT), m_localAddress(DEFAULT_LOCAL_ADDRESS), m_localPort(DEFAULT_LOCAL_PORT), m_modemType(DEFAULT_MODEM_TYPE), m_modemAddress(DEFAULT_MODEM_ADDRESS), m_timeout(DEFAULT_TIMEOUT), m_ackTime(DEFAULT_ACK_TIME), m_beaconTime(DEFAULT_BEACON_TIME), m_beaconText(DEFAULT_BEACON_TEXT), m_beaconVoice(DEFAULT_BEACON_VOICE), m_language(DEFAULT_LANGUAGE), m_controlEnabled(DEFAULT_CONTROL_ENABLED), m_controlRpt1Callsign(DEFAULT_CONTROL_RPT1), m_controlRpt2Callsign(DEFAULT_CONTROL_RPT2), m_controlShutdown(DEFAULT_CONTROL_SHUTDOWN), m_controlStartup(DEFAULT_CONTROL_STARTUP), m_controlStatus1(DEFAULT_CONTROL_STATUS1), m_controlStatus2(DEFAULT_CONTROL_STATUS2), m_controlStatus3(DEFAULT_CONTROL_STATUS3), m_controlStatus4(DEFAULT_CONTROL_STATUS4), m_controlStatus5(DEFAULT_CONTROL_STATUS5), m_controlCommand1(DEFAULT_CONTROL_COMMAND1), m_controlCommand1Line(DEFAULT_CONTROL_COMMAND1_LINE), m_controlCommand2(DEFAULT_CONTROL_COMMAND2), m_controlCommand2Line(DEFAULT_CONTROL_COMMAND2_LINE), m_controlCommand3(DEFAULT_CONTROL_COMMAND3), m_controlCommand3Line(DEFAULT_CONTROL_COMMAND3_LINE), m_controlCommand4(DEFAULT_CONTROL_COMMAND4), m_controlCommand4Line(DEFAULT_CONTROL_COMMAND4_LINE), m_controlOutput1(DEFAULT_CONTROL_OUTPUT1), m_controlOutput2(DEFAULT_CONTROL_OUTPUT2), m_controlOutput3(DEFAULT_CONTROL_OUTPUT3), m_controlOutput4(DEFAULT_CONTROL_OUTPUT4), m_controllerType(DEFAULT_CONTROLLER_TYPE), m_activeHangTime(DEFAULT_ACTIVE_HANG_TIME), m_output1(DEFAULT_OUTPUT1), m_output2(DEFAULT_OUTPUT2), m_output3(DEFAULT_OUTPUT3), m_output4(DEFAULT_OUTPUT4), m_logging(DEFAULT_LOGGING), m_x(DEFAULT_WINDOW_X), m_y(DEFAULT_WINDOW_Y) { wxASSERT(config != NULL); if (!name.IsEmpty()) m_name = wxT("/") + name + wxT("/"); long temp; m_config->Read(m_name + KEY_CALLSIGN, &m_callsign, DEFAULT_CALLSIGN); m_config->Read(m_name + KEY_GATEWAY, &m_gateway, DEFAULT_GATEWAY); m_config->Read(m_name + KEY_MODE, &temp, long(DEFAULT_MODE)); m_mode = DSTAR_MODE(temp); m_config->Read(m_name + KEY_ACK, &temp, long(DEFAULT_ACK)); m_ack = ACK_TYPE(temp); m_config->Read(m_name + KEY_RESTRICTION, &m_restriction, DEFAULT_RESTRICTION); m_config->Read(m_name + KEY_RPT1_VALIDATION, &m_rpt1Validation, DEFAULT_RPT1_VALIDATION); m_config->Read(m_name + KEY_GATEWAY_ADDRESS, &m_gatewayAddress, DEFAULT_GATEWAY_ADDRESS); m_config->Read(m_name + KEY_GATEWAY_PORT, &temp, long(DEFAULT_GATEWAY_PORT)); m_gatewayPort = (unsigned int)temp; m_config->Read(m_name + KEY_LOCAL_ADDRESS, &m_localAddress, DEFAULT_LOCAL_ADDRESS); m_config->Read(m_name + KEY_LOCAL_PORT, &temp, long(DEFAULT_LOCAL_PORT)); m_localPort = (unsigned int)temp; m_config->Read(m_name + KEY_MODEM_TYPE, &temp, long(DEFAULT_MODEM_TYPE)); m_modemType = GMSK_MODEM_TYPE(temp); m_config->Read(m_name + KEY_MODEM_ADDRESS, &temp, long(DEFAULT_MODEM_ADDRESS)); m_modemAddress = (unsigned int)temp; m_config->Read(m_name + KEY_TIMEOUT, &temp, long(DEFAULT_TIMEOUT)); m_timeout = (unsigned int)temp; m_config->Read(m_name + KEY_ACK_TIME, &temp, long(DEFAULT_ACK_TIME)); m_ackTime = (unsigned int)temp; m_config->Read(m_name + KEY_BEACON_TIME, &temp, long(DEFAULT_BEACON_TIME)); m_beaconTime = (unsigned int)temp; m_config->Read(m_name + KEY_BEACON_TEXT, &m_beaconText, DEFAULT_BEACON_TEXT); m_config->Read(m_name + KEY_BEACON_VOICE, &m_beaconVoice, DEFAULT_BEACON_VOICE); m_config->Read(m_name + KEY_LANGUAGE, &temp, long(DEFAULT_LANGUAGE)); m_language = TEXT_LANG(temp); m_config->Read(m_name + KEY_CONTROL_ENABLED, &m_controlEnabled, DEFAULT_CONTROL_ENABLED); m_config->Read(m_name + KEY_CONTROL_RPT1, &m_controlRpt1Callsign, DEFAULT_CONTROL_RPT1); m_config->Read(m_name + KEY_CONTROL_RPT2, &m_controlRpt2Callsign, DEFAULT_CONTROL_RPT2); m_config->Read(m_name + KEY_CONTROL_SHUTDOWN, &m_controlShutdown, DEFAULT_CONTROL_SHUTDOWN); m_config->Read(m_name + KEY_CONTROL_STARTUP, &m_controlStartup, DEFAULT_CONTROL_STARTUP); m_config->Read(m_name + KEY_CONTROL_STATUS1, &m_controlStatus1, DEFAULT_CONTROL_STATUS1); m_config->Read(m_name + KEY_CONTROL_STATUS2, &m_controlStatus2, DEFAULT_CONTROL_STATUS2); m_config->Read(m_name + KEY_CONTROL_STATUS3, &m_controlStatus3, DEFAULT_CONTROL_STATUS3); m_config->Read(m_name + KEY_CONTROL_STATUS4, &m_controlStatus4, DEFAULT_CONTROL_STATUS4); m_config->Read(m_name + KEY_CONTROL_STATUS5, &m_controlStatus5, DEFAULT_CONTROL_STATUS5); m_config->Read(m_name + KEY_CONTROL_COMMAND1, &m_controlCommand1, DEFAULT_CONTROL_COMMAND1); m_config->Read(m_name + KEY_CONTROL_COMMAND1_LINE, &m_controlCommand1Line, DEFAULT_CONTROL_COMMAND1_LINE); m_config->Read(m_name + KEY_CONTROL_COMMAND2, &m_controlCommand2, DEFAULT_CONTROL_COMMAND2); m_config->Read(m_name + KEY_CONTROL_COMMAND2_LINE, &m_controlCommand2Line, DEFAULT_CONTROL_COMMAND2_LINE); m_config->Read(m_name + KEY_CONTROL_COMMAND3, &m_controlCommand3, DEFAULT_CONTROL_COMMAND3); m_config->Read(m_name + KEY_CONTROL_COMMAND3_LINE, &m_controlCommand3Line, DEFAULT_CONTROL_COMMAND3_LINE); m_config->Read(m_name + KEY_CONTROL_COMMAND4, &m_controlCommand4, DEFAULT_CONTROL_COMMAND4); m_config->Read(m_name + KEY_CONTROL_COMMAND4_LINE, &m_controlCommand4Line, DEFAULT_CONTROL_COMMAND4_LINE); m_config->Read(m_name + KEY_CONTROL_OUTPUT1, &m_controlOutput1, DEFAULT_CONTROL_OUTPUT1); m_config->Read(m_name + KEY_CONTROL_OUTPUT2, &m_controlOutput2, DEFAULT_CONTROL_OUTPUT2); m_config->Read(m_name + KEY_CONTROL_OUTPUT3, &m_controlOutput3, DEFAULT_CONTROL_OUTPUT3); m_config->Read(m_name + KEY_CONTROL_OUTPUT4, &m_controlOutput4, DEFAULT_CONTROL_OUTPUT4); m_config->Read(m_name + KEY_CONTROLLER_TYPE, &m_controllerType, DEFAULT_CONTROLLER_TYPE); m_config->Read(m_name + KEY_ACTIVE_HANG_TIME, &temp, long(DEFAULT_ACTIVE_HANG_TIME)); m_activeHangTime = (unsigned int)temp; m_config->Read(m_name + KEY_OUTPUT1, &m_output1, DEFAULT_OUTPUT1); m_config->Read(m_name + KEY_OUTPUT2, &m_output2, DEFAULT_OUTPUT2); m_config->Read(m_name + KEY_OUTPUT3, &m_output3, DEFAULT_OUTPUT3); m_config->Read(m_name + KEY_OUTPUT4, &m_output4, DEFAULT_OUTPUT4); m_config->Read(m_name + KEY_LOGGING, &m_logging, DEFAULT_LOGGING); m_config->Read(m_name + KEY_WINDOW_X, &temp, long(DEFAULT_WINDOW_X)); m_x = int(temp); m_config->Read(m_name + KEY_WINDOW_Y, &temp, long(DEFAULT_WINDOW_Y)); m_y = int(temp); }
CSplitRepeaterConfig::CSplitRepeaterConfig(const wxString& dir, const wxString& name) : m_fileName(), m_callsign(DEFAULT_CALLSIGN), m_gateway(DEFAULT_GATEWAY), m_mode(DEFAULT_MODE), m_ack(DEFAULT_ACK), m_restriction(DEFAULT_RESTRICTION), m_rpt1Validation(DEFAULT_RPT1_VALIDATION), m_dtmfBlanking(DEFAULT_DTMF_BLANKING), m_gatewayAddress(DEFAULT_GATEWAY_ADDRESS), m_gatewayPort(DEFAULT_GATEWAY_PORT), m_localAddress(DEFAULT_LOCAL_ADDRESS), m_localPort(DEFAULT_LOCAL_PORT), m_receiver1Address(DEFAULT_RECEIVER1_ADDRESS), m_receiver1Port(DEFAULT_RECEIVER1_PORT), m_receiver2Address(DEFAULT_RECEIVER2_ADDRESS), m_receiver2Port(DEFAULT_RECEIVER2_PORT), m_transmitter1Address(DEFAULT_TRANSMITTER1_ADDRESS), m_transmitter1Port(DEFAULT_TRANSMITTER1_PORT), m_transmitter2Address(DEFAULT_TRANSMITTER2_ADDRESS), m_transmitter2Port(DEFAULT_TRANSMITTER2_PORT), m_timeout(DEFAULT_TIMEOUT), m_ackTime(DEFAULT_ACK_TIME), m_frameWaitTime(DEFAULT_FRAME_WAIT_TIME), m_beaconTime(DEFAULT_BEACON_TIME), m_beaconText(DEFAULT_BEACON_TEXT), m_beaconVoice(DEFAULT_BEACON_VOICE), m_language(DEFAULT_LANGUAGE), m_announcementEnabled(DEFAULT_ANNOUNCEMENT_ENABLED), m_announcementTime(DEFAULT_ANNOUNCEMENT_TIME), m_announcementRecordRPT1(DEFAULT_ANNOUNCEMENT_RECORD_RPT1), m_announcementRecordRPT2(DEFAULT_ANNOUNCEMENT_RECORD_RPT2), m_announcementDeleteRPT1(DEFAULT_ANNOUNCEMENT_DELETE_RPT1), m_announcementDeleteRPT2(DEFAULT_ANNOUNCEMENT_DELETE_RPT2), m_controlEnabled(DEFAULT_CONTROL_ENABLED), m_controlRpt1Callsign(DEFAULT_CONTROL_RPT1), m_controlRpt2Callsign(DEFAULT_CONTROL_RPT2), m_controlShutdown(DEFAULT_CONTROL_SHUTDOWN), m_controlStartup(DEFAULT_CONTROL_STARTUP), m_controlStatus1(DEFAULT_CONTROL_STATUS1), m_controlStatus2(DEFAULT_CONTROL_STATUS2), m_controlStatus3(DEFAULT_CONTROL_STATUS3), m_controlStatus4(DEFAULT_CONTROL_STATUS4), m_controlStatus5(DEFAULT_CONTROL_STATUS5), m_controlCommand1(DEFAULT_CONTROL_COMMAND1), m_controlCommand1Line(DEFAULT_CONTROL_COMMAND1_LINE), m_controlCommand2(DEFAULT_CONTROL_COMMAND2), m_controlCommand2Line(DEFAULT_CONTROL_COMMAND2_LINE), m_controlCommand3(DEFAULT_CONTROL_COMMAND3), m_controlCommand3Line(DEFAULT_CONTROL_COMMAND3_LINE), m_controlCommand4(DEFAULT_CONTROL_COMMAND4), m_controlCommand4Line(DEFAULT_CONTROL_COMMAND4_LINE), m_x(DEFAULT_WINDOW_X), m_y(DEFAULT_WINDOW_Y) { wxASSERT(!dir.IsEmpty()); wxString fileName = CONFIG_FILE_NAME; if (!name.IsEmpty()) fileName = CONFIG_FILE_NAME + wxT("_") + name; m_fileName.Assign(dir, fileName); wxTextFile file(m_fileName.GetFullPath()); bool exists = file.Exists(); if (!exists) return; bool ret = file.Open(); if (!ret) { wxLogError(wxT("Cannot open the config file - %s"), m_fileName.GetFullPath().c_str()); return; } long temp1; unsigned long temp2; wxString str = file.GetFirstLine(); while (!file.Eof()) { if (str.GetChar(0U) == wxT('#')) { str = file.GetNextLine(); continue; } int n = str.Find(wxT('=')); if (n == wxNOT_FOUND) { str = file.GetNextLine(); continue; } wxString key = str.Left(n); wxString val = str.Mid(n + 1U); if (key.IsSameAs(KEY_CALLSIGN)) { m_callsign = val; } else if (key.IsSameAs(KEY_GATEWAY)) { m_gateway = val; } else if (key.IsSameAs(KEY_MODE)) { val.ToLong(&temp1); m_mode = DSTAR_MODE(temp1); } else if (key.IsSameAs(KEY_ACK)) { val.ToLong(&temp1); m_ack = ACK_TYPE(temp1); } else if (key.IsSameAs(KEY_RESTRICTION)) { val.ToLong(&temp1); m_restriction = temp1 == 1L; } else if (key.IsSameAs(KEY_RPT1_VALIDATION)) { val.ToLong(&temp1); m_rpt1Validation = temp1 == 1L; } else if (key.IsSameAs(KEY_DTMF_BLANKING)) { val.ToLong(&temp1); m_dtmfBlanking = temp1 == 1L; } else if (key.IsSameAs(KEY_GATEWAY_ADDRESS)) { m_gatewayAddress = val; } else if (key.IsSameAs(KEY_GATEWAY_PORT)) { val.ToULong(&temp2); m_gatewayPort = (unsigned int)temp2; } else if (key.IsSameAs(KEY_LOCAL_ADDRESS)) { m_localAddress = val; } else if (key.IsSameAs(KEY_LOCAL_PORT)) { val.ToULong(&temp2); m_localPort = (unsigned int)temp2; } else if (key.IsSameAs(KEY_RECEIVER1_ADDRESS)) { m_receiver1Address = val; } else if (key.IsSameAs(KEY_RECEIVER1_PORT)) { val.ToULong(&temp2); m_receiver1Port = (unsigned int)temp2; } else if (key.IsSameAs(KEY_RECEIVER2_ADDRESS)) { m_receiver2Address = val; } else if (key.IsSameAs(KEY_RECEIVER2_PORT)) { val.ToULong(&temp2); m_receiver2Port = (unsigned int)temp2; } else if (key.IsSameAs(KEY_TRANSMITTER1_ADDRESS)) { m_transmitter1Address = val; } else if (key.IsSameAs(KEY_TRANSMITTER1_PORT)) { val.ToULong(&temp2); m_transmitter1Port = (unsigned int)temp2; } else if (key.IsSameAs(KEY_TRANSMITTER2_ADDRESS)) { m_transmitter2Address = val; } else if (key.IsSameAs(KEY_TRANSMITTER2_PORT)) { val.ToULong(&temp2); m_transmitter2Port = (unsigned int)temp2; } else if (key.IsSameAs(KEY_TIMEOUT)) { val.ToULong(&temp2); m_timeout = (unsigned int)temp2; } else if (key.IsSameAs(KEY_ACK_TIME)) { val.ToULong(&temp2); m_ackTime = (unsigned int)temp2; } else if (key.IsSameAs(KEY_FRAME_WAIT_TIME)) { val.ToULong(&temp2); m_frameWaitTime = (unsigned int)temp2; } else if (key.IsSameAs(KEY_BEACON_TIME)) { val.ToULong(&temp2); m_beaconTime = (unsigned int)temp2; } else if (key.IsSameAs(KEY_BEACON_TEXT)) { m_beaconText = val; } else if (key.IsSameAs(KEY_BEACON_VOICE)) { val.ToLong(&temp1); m_beaconVoice = temp1 == 1L; } else if (key.IsSameAs(KEY_LANGUAGE)) { val.ToLong(&temp1); m_language = TEXT_LANG(temp1); } else if (key.IsSameAs(KEY_ANNOUNCEMENT_ENABLED)) { val.ToLong(&temp1); m_announcementEnabled = temp1 == 1L; } else if (key.IsSameAs(KEY_ANNOUNCEMENT_TIME)) { val.ToULong(&temp2); m_announcementTime = (unsigned int)temp2; } else if (key.IsSameAs(KEY_ANNOUNCEMENT_RECORD_RPT1)) { m_announcementRecordRPT1 = val; } else if (key.IsSameAs(KEY_ANNOUNCEMENT_RECORD_RPT2)) { m_announcementRecordRPT2 = val; } else if (key.IsSameAs(KEY_ANNOUNCEMENT_DELETE_RPT1)) { m_announcementDeleteRPT1 = val; } else if (key.IsSameAs(KEY_ANNOUNCEMENT_DELETE_RPT2)) { m_announcementDeleteRPT2 = val; } else if (key.IsSameAs(KEY_CONTROL_ENABLED)) { val.ToLong(&temp1); m_controlEnabled = temp1 == 1L; } else if (key.IsSameAs(KEY_CONTROL_RPT1)) { m_controlRpt1Callsign = val; } else if (key.IsSameAs(KEY_CONTROL_RPT2)) { m_controlRpt2Callsign = val; } else if (key.IsSameAs(KEY_CONTROL_SHUTDOWN)) { m_controlShutdown = val; } else if (key.IsSameAs(KEY_CONTROL_STARTUP)) { m_controlStartup = val; } else if (key.IsSameAs(KEY_CONTROL_STATUS1)) { m_controlStatus1 = val; } else if (key.IsSameAs(KEY_CONTROL_STATUS2)) { m_controlStatus2 = val; } else if (key.IsSameAs(KEY_CONTROL_STATUS3)) { m_controlStatus3 = val; } else if (key.IsSameAs(KEY_CONTROL_STATUS4)) { m_controlStatus4 = val; } else if (key.IsSameAs(KEY_CONTROL_STATUS5)) { m_controlStatus5 = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND1)) { m_controlCommand1 = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND1_LINE)) { m_controlCommand1Line = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND2)) { m_controlCommand2 = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND2_LINE)) { m_controlCommand2Line = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND3)) { m_controlCommand3 = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND3_LINE)) { m_controlCommand3Line = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND4)) { m_controlCommand4 = val; } else if (key.IsSameAs(KEY_CONTROL_COMMAND4_LINE)) { m_controlCommand4Line = val; } else if (key.IsSameAs(KEY_WINDOW_X)) { val.ToLong(&temp1); m_x = int(temp1); } else if (key.IsSameAs(KEY_WINDOW_Y)) { val.ToLong(&temp1); m_y = int(temp1); } str = file.GetNextLine(); } file.Close(); }
CSplitRepeaterConfig::CSplitRepeaterConfig(wxConfigBase* config, const wxString& name) : m_config(config), m_name(wxT("/")), m_callsign(DEFAULT_CALLSIGN), m_gateway(DEFAULT_GATEWAY), m_mode(DEFAULT_MODE), m_ack(DEFAULT_ACK), m_restriction(DEFAULT_RESTRICTION), m_rpt1Validation(DEFAULT_RPT1_VALIDATION), m_dtmfBlanking(DEFAULT_DTMF_BLANKING), m_gatewayAddress(DEFAULT_GATEWAY_ADDRESS), m_gatewayPort(DEFAULT_GATEWAY_PORT), m_localAddress(DEFAULT_LOCAL_ADDRESS), m_localPort(DEFAULT_LOCAL_PORT), m_receiver1Address(DEFAULT_RECEIVER1_ADDRESS), m_receiver1Port(DEFAULT_RECEIVER1_PORT), m_receiver2Address(DEFAULT_RECEIVER2_ADDRESS), m_receiver2Port(DEFAULT_RECEIVER2_PORT), m_transmitter1Address(DEFAULT_TRANSMITTER1_ADDRESS), m_transmitter1Port(DEFAULT_TRANSMITTER1_PORT), m_transmitter2Address(DEFAULT_TRANSMITTER2_ADDRESS), m_transmitter2Port(DEFAULT_TRANSMITTER2_PORT), m_timeout(DEFAULT_TIMEOUT), m_ackTime(DEFAULT_ACK_TIME), m_frameWaitTime(DEFAULT_FRAME_WAIT_TIME), m_beaconTime(DEFAULT_BEACON_TIME), m_beaconText(DEFAULT_BEACON_TEXT), m_beaconVoice(DEFAULT_BEACON_VOICE), m_language(DEFAULT_LANGUAGE), m_announcementEnabled(DEFAULT_ANNOUNCEMENT_ENABLED), m_announcementTime(DEFAULT_ANNOUNCEMENT_TIME), m_announcementRecordRPT1(DEFAULT_ANNOUNCEMENT_RECORD_RPT1), m_announcementRecordRPT2(DEFAULT_ANNOUNCEMENT_RECORD_RPT2), m_announcementDeleteRPT1(DEFAULT_ANNOUNCEMENT_DELETE_RPT1), m_announcementDeleteRPT2(DEFAULT_ANNOUNCEMENT_DELETE_RPT2), m_controlEnabled(DEFAULT_CONTROL_ENABLED), m_controlRpt1Callsign(DEFAULT_CONTROL_RPT1), m_controlRpt2Callsign(DEFAULT_CONTROL_RPT2), m_controlShutdown(DEFAULT_CONTROL_SHUTDOWN), m_controlStartup(DEFAULT_CONTROL_STARTUP), m_controlStatus1(DEFAULT_CONTROL_STATUS1), m_controlStatus2(DEFAULT_CONTROL_STATUS2), m_controlStatus3(DEFAULT_CONTROL_STATUS3), m_controlStatus4(DEFAULT_CONTROL_STATUS4), m_controlStatus5(DEFAULT_CONTROL_STATUS5), m_controlCommand1(DEFAULT_CONTROL_COMMAND1), m_controlCommand1Line(DEFAULT_CONTROL_COMMAND1_LINE), m_controlCommand2(DEFAULT_CONTROL_COMMAND2), m_controlCommand2Line(DEFAULT_CONTROL_COMMAND2_LINE), m_controlCommand3(DEFAULT_CONTROL_COMMAND3), m_controlCommand3Line(DEFAULT_CONTROL_COMMAND3_LINE), m_controlCommand4(DEFAULT_CONTROL_COMMAND4), m_controlCommand4Line(DEFAULT_CONTROL_COMMAND4_LINE), m_x(DEFAULT_WINDOW_X), m_y(DEFAULT_WINDOW_Y) { wxASSERT(config != NULL); if (!name.IsEmpty()) m_name = wxT("/") + name + wxT("/"); long temp; m_config->Read(m_name + KEY_CALLSIGN, &m_callsign, DEFAULT_CALLSIGN); m_config->Read(m_name + KEY_GATEWAY, &m_gateway, DEFAULT_GATEWAY); m_config->Read(m_name + KEY_MODE, &temp, long(DEFAULT_MODE)); m_mode = DSTAR_MODE(temp); m_config->Read(m_name + KEY_ACK, &temp, long(DEFAULT_ACK)); m_ack = ACK_TYPE(temp); m_config->Read(m_name + KEY_RESTRICTION, &m_restriction, DEFAULT_RESTRICTION); m_config->Read(m_name + KEY_RPT1_VALIDATION, &m_rpt1Validation, DEFAULT_RPT1_VALIDATION); m_config->Read(m_name + KEY_DTMF_BLANKING, &m_dtmfBlanking, DEFAULT_DTMF_BLANKING); m_config->Read(m_name + KEY_GATEWAY_ADDRESS, &m_gatewayAddress, DEFAULT_GATEWAY_ADDRESS); m_config->Read(m_name + KEY_GATEWAY_PORT, &temp, long(DEFAULT_GATEWAY_PORT)); m_gatewayPort = (unsigned int)temp; m_config->Read(m_name + KEY_LOCAL_ADDRESS, &m_localAddress, DEFAULT_LOCAL_ADDRESS); m_config->Read(m_name + KEY_LOCAL_PORT, &temp, long(DEFAULT_LOCAL_PORT)); m_localPort = (unsigned int)temp; m_config->Read(m_name + KEY_RECEIVER1_ADDRESS, &m_receiver1Address, DEFAULT_RECEIVER1_ADDRESS); m_config->Read(m_name + KEY_RECEIVER1_PORT, &temp, long(DEFAULT_RECEIVER1_PORT)); m_receiver1Port = (unsigned int)temp; m_config->Read(m_name + KEY_RECEIVER2_ADDRESS, &m_receiver2Address, DEFAULT_RECEIVER2_ADDRESS); m_config->Read(m_name + KEY_RECEIVER2_PORT, &temp, long(DEFAULT_RECEIVER2_PORT)); m_receiver2Port = (unsigned int)temp; m_config->Read(m_name + KEY_TRANSMITTER1_ADDRESS, &m_transmitter1Address, DEFAULT_TRANSMITTER1_ADDRESS); m_config->Read(m_name + KEY_TRANSMITTER1_PORT, &temp, long(DEFAULT_TRANSMITTER1_PORT)); m_transmitter1Port = (unsigned int)temp; m_config->Read(m_name + KEY_TRANSMITTER2_ADDRESS, &m_transmitter2Address, DEFAULT_TRANSMITTER2_ADDRESS); m_config->Read(m_name + KEY_TRANSMITTER2_PORT, &temp, long(DEFAULT_TRANSMITTER2_PORT)); m_transmitter2Port = (unsigned int)temp; m_config->Read(m_name + KEY_TIMEOUT, &temp, long(DEFAULT_TIMEOUT)); m_timeout = (unsigned int)temp; m_config->Read(m_name + KEY_ACK_TIME, &temp, long(DEFAULT_ACK_TIME)); m_ackTime = (unsigned int)temp; m_config->Read(m_name + KEY_FRAME_WAIT_TIME, &temp, long(DEFAULT_FRAME_WAIT_TIME)); m_frameWaitTime = (unsigned int)temp; m_config->Read(m_name + KEY_BEACON_TIME, &temp, long(DEFAULT_BEACON_TIME)); m_beaconTime = (unsigned int)temp; m_config->Read(m_name + KEY_BEACON_TEXT, &m_beaconText, DEFAULT_BEACON_TEXT); m_config->Read(m_name + KEY_BEACON_VOICE, &m_beaconVoice, DEFAULT_BEACON_VOICE); m_config->Read(m_name + KEY_LANGUAGE, &temp, long(DEFAULT_LANGUAGE)); m_language = TEXT_LANG(temp); m_config->Read(m_name + KEY_ANNOUNCEMENT_ENABLED, &m_announcementEnabled, DEFAULT_ANNOUNCEMENT_ENABLED); m_config->Read(m_name + KEY_ANNOUNCEMENT_TIME, &temp, long(DEFAULT_ANNOUNCEMENT_TIME)); m_announcementTime = (unsigned int)temp; m_config->Read(m_name + KEY_ANNOUNCEMENT_RECORD_RPT1, &m_announcementRecordRPT1, DEFAULT_ANNOUNCEMENT_RECORD_RPT1); m_config->Read(m_name + KEY_ANNOUNCEMENT_RECORD_RPT2, &m_announcementRecordRPT2, DEFAULT_ANNOUNCEMENT_RECORD_RPT2); m_config->Read(m_name + KEY_ANNOUNCEMENT_DELETE_RPT1, &m_announcementDeleteRPT1, DEFAULT_ANNOUNCEMENT_DELETE_RPT1); m_config->Read(m_name + KEY_ANNOUNCEMENT_DELETE_RPT2, &m_announcementDeleteRPT2, DEFAULT_ANNOUNCEMENT_DELETE_RPT2); m_config->Read(m_name + KEY_CONTROL_ENABLED, &m_controlEnabled, DEFAULT_CONTROL_ENABLED); m_config->Read(m_name + KEY_CONTROL_RPT1, &m_controlRpt1Callsign, DEFAULT_CONTROL_RPT1); m_config->Read(m_name + KEY_CONTROL_RPT2, &m_controlRpt2Callsign, DEFAULT_CONTROL_RPT2); m_config->Read(m_name + KEY_CONTROL_SHUTDOWN, &m_controlShutdown, DEFAULT_CONTROL_SHUTDOWN); m_config->Read(m_name + KEY_CONTROL_STARTUP, &m_controlStartup, DEFAULT_CONTROL_STARTUP); m_config->Read(m_name + KEY_CONTROL_STATUS1, &m_controlStatus1, DEFAULT_CONTROL_STATUS1); m_config->Read(m_name + KEY_CONTROL_STATUS2, &m_controlStatus2, DEFAULT_CONTROL_STATUS2); m_config->Read(m_name + KEY_CONTROL_STATUS3, &m_controlStatus3, DEFAULT_CONTROL_STATUS3); m_config->Read(m_name + KEY_CONTROL_STATUS4, &m_controlStatus4, DEFAULT_CONTROL_STATUS4); m_config->Read(m_name + KEY_CONTROL_STATUS5, &m_controlStatus5, DEFAULT_CONTROL_STATUS5); m_config->Read(m_name + KEY_CONTROL_COMMAND1, &m_controlCommand1, DEFAULT_CONTROL_COMMAND1); m_config->Read(m_name + KEY_CONTROL_COMMAND1_LINE, &m_controlCommand1Line, DEFAULT_CONTROL_COMMAND1_LINE); m_config->Read(m_name + KEY_CONTROL_COMMAND2, &m_controlCommand2, DEFAULT_CONTROL_COMMAND2); m_config->Read(m_name + KEY_CONTROL_COMMAND2_LINE, &m_controlCommand2Line, DEFAULT_CONTROL_COMMAND2_LINE); m_config->Read(m_name + KEY_CONTROL_COMMAND3, &m_controlCommand3, DEFAULT_CONTROL_COMMAND3); m_config->Read(m_name + KEY_CONTROL_COMMAND3_LINE, &m_controlCommand3Line, DEFAULT_CONTROL_COMMAND3_LINE); m_config->Read(m_name + KEY_CONTROL_COMMAND4, &m_controlCommand4, DEFAULT_CONTROL_COMMAND4); m_config->Read(m_name + KEY_CONTROL_COMMAND4_LINE, &m_controlCommand4Line, DEFAULT_CONTROL_COMMAND4_LINE); m_config->Read(m_name + KEY_WINDOW_X, &temp, long(DEFAULT_WINDOW_X)); m_x = int(temp); m_config->Read(m_name + KEY_WINDOW_Y, &temp, long(DEFAULT_WINDOW_Y)); m_y = int(temp); }