сделал чтение настроек, удалил пару рудиментов
This commit is contained in:
parent
eaee827261
commit
4a293e10f6
40
dependencies/control_system/client/main.cpp
vendored
40
dependencies/control_system/client/main.cpp
vendored
@ -6,6 +6,46 @@ std::shared_mutex mtx;
|
||||
TSID sid_counter { 0 };
|
||||
std::map<TSID, std::unique_ptr<system_client>> clients;
|
||||
|
||||
|
||||
EXTERNC CP_Result CP_SetBUC_LNB_settings(TSID sid, buc_lnb_settings &settings){
|
||||
std::shared_lock lock(mtx);
|
||||
try
|
||||
{
|
||||
if (clients.find(sid) == clients.end())
|
||||
return ERROR;
|
||||
auto settings_ = reinterpret_cast<buc_lnb_settings_com&>(settings);
|
||||
auto resp = clients[sid]->send_set_buc_lnb_settings(settings_);
|
||||
if (resp == response_type::error)
|
||||
return ERROR;
|
||||
return OK;
|
||||
}
|
||||
|
||||
catch(const std::exception& e)
|
||||
{
|
||||
return ERROR;
|
||||
}
|
||||
}
|
||||
EXTERNC CP_Result CP_GetBUC_LNB_settings(TSID sid, buc_lnb_settings &settings){
|
||||
std::shared_lock lock(mtx);
|
||||
try
|
||||
{
|
||||
if (clients.find(sid) == clients.end())
|
||||
return ERROR;
|
||||
|
||||
buc_lnb_settings_com settings_com;
|
||||
auto resp = clients[sid]->send_get_buc_lnb_settings(settings_com);
|
||||
|
||||
if (resp == response_type::error)
|
||||
return ERROR;
|
||||
settings = reinterpret_cast<buc_lnb_settings&>(settings_com);
|
||||
return OK;
|
||||
}
|
||||
|
||||
catch(const std::exception& e)
|
||||
{
|
||||
return ERROR;
|
||||
}
|
||||
}
|
||||
EXTERNC CP_Result CP_SetModulatorSettings(TSID sid, modulator_settings& settings){
|
||||
std::shared_lock lock(mtx);
|
||||
try
|
||||
|
@ -337,6 +337,17 @@ void system_client::data_received(const std::vector<uint8_t> & data)
|
||||
break;
|
||||
}
|
||||
|
||||
case cmd_type::get_lnb_buc_settings:
|
||||
{
|
||||
if(cmd.rsp == response_type::ok)
|
||||
{
|
||||
cmd_lnb_buc_settings value;
|
||||
iarchive(value);
|
||||
data_from_serv = value;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case cmd_type::get_demodulator_settings:
|
||||
{
|
||||
if(cmd.rsp == response_type::ok)
|
||||
@ -801,7 +812,6 @@ response_type system_client::send_get_demodulator_settings(demodulator_settings_
|
||||
cmd_header cmd_dpdi_header{curr_id, cmd_type::get_demodulator_settings};
|
||||
cmd_demodulator_settings demodulator;
|
||||
send_to_socket(cmd_dpdi_header, demodulator);
|
||||
std::cout << "END GET_DEMODULATOR SETTINGS SEND TO SOCKET" << std::endl;
|
||||
std::any data_from_serv;
|
||||
|
||||
auto result = wait_for_response(curr_id, cmd_type::get_demodulator_settings, data_from_serv);
|
||||
@ -841,6 +851,39 @@ response_type system_client::send_get_modulator_state(modulator_state_com &modul
|
||||
return result;
|
||||
}
|
||||
|
||||
response_type system_client::send_set_buc_lnb_settings(buc_lnb_settings_com &settings){
|
||||
std::scoped_lock lock(cmd_in_progress_mtx);
|
||||
uint32_t curr_id { ++cmd_id };
|
||||
cmd_header cmd_acm_header{curr_id, cmd_type::set_lnb_buc_settings};
|
||||
|
||||
cmd_lnb_buc_settings settings_;
|
||||
settings_.buc_lnb = settings;
|
||||
send_to_socket(cmd_acm_header, settings_);
|
||||
|
||||
std::any data_to_serv;
|
||||
|
||||
auto result = wait_for_response(curr_id, cmd_type::set_lnb_buc_settings, data_to_serv);
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
response_type system_client::send_get_buc_lnb_settings(buc_lnb_settings_com &settings){
|
||||
std::scoped_lock lock(cmd_in_progress_mtx);
|
||||
uint32_t curr_id { ++cmd_id };
|
||||
cmd_header cmd_buc_lnb_header{curr_id, cmd_type::get_lnb_buc_settings};
|
||||
cmd_lnb_buc_settings lnb_buc;
|
||||
send_to_socket(cmd_buc_lnb_header, lnb_buc);
|
||||
|
||||
std::any data_from_serv;
|
||||
|
||||
auto result = wait_for_response(curr_id, cmd_type::get_lnb_buc_settings, data_from_serv);
|
||||
if (data_from_serv.has_value())
|
||||
settings = std::any_cast<cmd_lnb_buc_settings>(data_from_serv).buc_lnb;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
response_type system_client::send_get_device_state(device_state_com &device_state ){
|
||||
std::scoped_lock lock(cmd_in_progress_mtx);
|
||||
uint32_t curr_id { ++cmd_id };
|
||||
|
@ -59,6 +59,8 @@ public:
|
||||
response_type send_get_modulator_settings(modulator_settings_com &settings);
|
||||
response_type send_get_demodulator_settings(demodulator_settings_com &settings);
|
||||
|
||||
response_type send_set_buc_lnb_settings(buc_lnb_settings_com &settings);
|
||||
response_type send_get_buc_lnb_settings(buc_lnb_settings_com &settings);
|
||||
|
||||
response_type send_set_dpdi_params(dpdi_parameters &dpdi_params);
|
||||
response_type send_get_dpdi_params(dpdi_parameters &dpdi_params);
|
||||
|
@ -120,6 +120,21 @@ struct device_state_com{
|
||||
double pl_temp;
|
||||
};
|
||||
|
||||
enum class voltage_lnb_com{
|
||||
DISABLE = 0, _13V, _18V, _24V
|
||||
};
|
||||
enum class voltage_buc_com{
|
||||
DISABLE = 0, _24V, _48V
|
||||
};
|
||||
struct buc_lnb_settings_com
|
||||
{
|
||||
voltage_lnb_com lnb;
|
||||
bool is_ref_10MHz_lnb = false;
|
||||
voltage_buc_com buc;
|
||||
bool is_ref_10MHz_buc = false;
|
||||
bool is_ref_10MHz_output = false;
|
||||
bool is_save_current_state = false;
|
||||
};
|
||||
enum class name_classes_qos
|
||||
{
|
||||
realtime1 = 0,
|
||||
@ -373,7 +388,9 @@ enum class cmd_type
|
||||
set_modulator_settings = 35,
|
||||
set_demodulator_settings = 36,
|
||||
get_modulator_settings = 37,
|
||||
get_demodulator_settings = 38
|
||||
get_demodulator_settings = 38,
|
||||
set_lnb_buc_settings = 39,
|
||||
get_lnb_buc_settings = 40
|
||||
};
|
||||
|
||||
struct cmd_lbq_params
|
||||
@ -387,6 +404,15 @@ struct cmd_lbq_params
|
||||
}
|
||||
};
|
||||
|
||||
struct cmd_lnb_buc_settings{
|
||||
buc_lnb_settings_com buc_lnb;
|
||||
template<class Archive>
|
||||
void serialize(Archive & archive)
|
||||
{
|
||||
archive(buc_lnb.buc, buc_lnb.is_ref_10MHz_buc, buc_lnb.lnb,buc_lnb.is_ref_10MHz_lnb, buc_lnb.is_ref_10MHz_output, buc_lnb.is_save_current_state);
|
||||
}
|
||||
};
|
||||
|
||||
struct cmd_get_cinc_state
|
||||
{
|
||||
CinC_state_com cinc_state;
|
||||
|
@ -156,6 +156,25 @@ struct demodulator_settings
|
||||
EXTERNC CP_Result CP_SetDemodulatorSettings(TSID sid, demodulator_settings& settings);
|
||||
EXTERNC CP_Result CP_GetDemodulatorSettings(TSID sid, demodulator_settings& settings);
|
||||
|
||||
enum class voltage_lnb{
|
||||
DISABLE = 0, _13V, _18V, _24V
|
||||
};
|
||||
enum class voltage_buc{
|
||||
DISABLE = 0, _24V, _48V
|
||||
};
|
||||
struct buc_lnb_settings
|
||||
{
|
||||
voltage_lnb lnb;
|
||||
bool is_ref_10MHz_lnb = false;
|
||||
voltage_buc buc;
|
||||
bool is_ref_10MHz_buc = false;
|
||||
bool is_ref_10MHz_output = false;
|
||||
bool is_save_current_state = false;
|
||||
};
|
||||
|
||||
EXTERNC CP_Result CP_SetBUC_LNB_settings(TSID sid, buc_lnb_settings &settings);
|
||||
EXTERNC CP_Result CP_GetBUC_LNB_settings(TSID sid, buc_lnb_settings &settings);
|
||||
|
||||
|
||||
EXTERNC CP_Result CP_GetModulatorParams(TSID sid, const char *modulator_param, uint32_t *value);
|
||||
|
||||
|
@ -152,7 +152,7 @@ std::string api_driver::ApiDriver::loadTerminalState() const {
|
||||
// структура температур девайса
|
||||
result << ",\n\"device.adrv\":"; writeDouble(result, device.adrv_temp, 1);
|
||||
result << ",\"device.fpga\":"; writeDouble(result, device.pl_temp, 1);
|
||||
result << ",\"device.zync\":"; writeDouble(result, device.zynq_temp, 1);
|
||||
result << ",\"device.zynq\":"; writeDouble(result, device.zynq_temp, 1);
|
||||
|
||||
result << "}";
|
||||
|
||||
@ -166,33 +166,7 @@ void api_driver::ApiDriver::resetPacketStatistics() const {
|
||||
}
|
||||
|
||||
std::string api_driver::ApiDriver::loadSettings() const {
|
||||
/*
|
||||
param: {
|
||||
cinc: {
|
||||
cinc.mode: null, // 'positional' | 'delay'
|
||||
cinc.searchBandwidth: 0, // полоса поиска в кГц
|
||||
cinc.position.station.latitude: 0,
|
||||
cinc.position.station.longitude: 0,
|
||||
cinc.position.satelliteLongitude: 0,
|
||||
cinc.delayMin: 0,
|
||||
cinc.delayMax: 0
|
||||
},
|
||||
buc: {
|
||||
buc.refClk10M: false, // подача опоры 10MHz
|
||||
buc.powering: 0 // 0, 24, 48
|
||||
},
|
||||
lnb: {
|
||||
lnb.refClk10M: false, // подача опоры 10MHz
|
||||
lnb.powering: 0 // 0, 13, 18, 24
|
||||
},
|
||||
serviceSettings: {
|
||||
serviceSettings.refClk10M: false, // подача опоры 10MHz
|
||||
serviceSettings.startDelay: 0, // задержка включения передачи
|
||||
serviceSettings.autoStart: false
|
||||
},
|
||||
},
|
||||
*/
|
||||
constexpr auto* UNKNOWN = "\"?\"";
|
||||
// constexpr auto* UNKNOWN = "\"?\"";
|
||||
|
||||
modulator_settings modSettings{};
|
||||
CP_GetModulatorSettings(sid, modSettings);
|
||||
@ -202,19 +176,21 @@ param: {
|
||||
demodulator_settings demodSettings{};
|
||||
CP_GetDemodulatorSettings(sid, demodSettings);
|
||||
ACM_parameters_serv_ acmSettings{};
|
||||
// CP_GetAcmParams(sid, &acmSettings);
|
||||
CP_GetAcmParams(sid, &acmSettings);
|
||||
DPDI_parmeters dpdiSettings{};
|
||||
// CP_GetDpdiParams(sid, &dpdiSettings);
|
||||
CP_GetDpdiParams(sid, &dpdiSettings);
|
||||
buc_lnb_settings bucLnb{};
|
||||
CP_GetBUC_LNB_settings(sid, bucLnb);
|
||||
|
||||
std::stringstream result;
|
||||
result << "{\n\"general.iscInC\":" << boolAsStr(modSettings.is_cinc);
|
||||
result << "{\n\"general.isCinC\":" << boolAsStr(modSettings.is_cinc);
|
||||
result << ",\"general.txEn\":" << boolAsStr(modSettings.tx_is_on);
|
||||
result << ",\"general.modulatorMode\":" << (modSettings.is_carrier ? "\"normal\"" : "\"test\"");
|
||||
result << ",\"general.autoStartTx\":" << boolAsStr(modSettings.is_save_current_state);
|
||||
result << ",\"general.isTestInputData\":" << boolAsStr(modSettings.is_test_data);
|
||||
|
||||
result << ",\n\"tx.attenuation\":"; writeDouble(result, modSettings.attenuation);
|
||||
result << ",\"tx.rolloff\":"; writeDouble(result, modSettings.rollof);
|
||||
result << ",\"tx.rolloff\":" << static_cast<int>(modSettings.rollof * 100);
|
||||
result << ",\"tx.cymRate\":" << modSettings.baudrate;
|
||||
result << ",\"tx.centerFreq\":"; writeDouble(result, modSettings.central_freq_in_kGz, 3);
|
||||
|
||||
@ -224,18 +200,18 @@ param: {
|
||||
result << ",\"dvbs2.ccm_modcod\":" << (modulatorModcod >> 4);
|
||||
result << ",\"dvbs2.acm_maxModcod\":" << (acmSettings.max_modcod >> 2);
|
||||
result << ",\"dvbs2.acm_minModcod\":" << (acmSettings.min_modcod >> 2);
|
||||
result << ",\"dvbs2.snrReserve\":" << UNKNOWN;
|
||||
result << ",\"dvbs2.servicePacketPeriod\":" << UNKNOWN;
|
||||
result << ",\"dvbs2.snrReserve\":"; writeDouble(result, acmSettings.min_attenuation);
|
||||
result << ",\"dvbs2.servicePacketPeriod\":" << acmSettings.period_pack;
|
||||
|
||||
result << ",\n\"acm.en\":" << boolAsStr(acmSettings.enable_auto_atten);
|
||||
result << ",\"acm.maxAttenuation\":"; writeDouble(result, acmSettings.max_attenuation);
|
||||
result << ",\"acm.minAttenuation\":"; writeDouble(result, acmSettings.min_attenuation);
|
||||
result << ",\"acm.requiredSnr\":" << UNKNOWN;
|
||||
result << ",\"acm.requiredSnr\":"; writeDouble(result, acmSettings.snr_treashold_acm);
|
||||
|
||||
result << ",\n\"rx.gainMode\":" << (demodSettings.is_aru_on ? "\"auto\"" : "\"manual\"");
|
||||
result << ",\"rx.manualGain\":"; writeDouble(result, demodSettings.gain);
|
||||
result << ",\"rx.spectrumInversion\":" << boolAsStr(demodSettings.is_rvt_iq);
|
||||
result << ",\"rx.rolloff\":"; writeDouble(result, demodSettings.rollof);
|
||||
result << ",\"rx.rolloff\":" << static_cast<int>(demodSettings.rollof * 100);
|
||||
result << ",\"rx.cymRate\":" << demodSettings.baudrate;
|
||||
result << ",\"rx.centerFreq\":"; writeDouble(result, demodSettings.central_freq_in_kGz);
|
||||
|
||||
@ -247,15 +223,23 @@ param: {
|
||||
result << ",\"cinc.delayMin\":" << dpdiSettings.min_delay;
|
||||
result << ",\"cinc.delayMax\":" << dpdiSettings.max_delay;
|
||||
|
||||
result << ",\n\"buc.refClk10M\":" << UNKNOWN;
|
||||
result << ",\"buc.powering\":" << UNKNOWN;
|
||||
result << ",\n\"buc.refClk10M\":" << boolAsStr(bucLnb.is_ref_10MHz_buc);
|
||||
switch (bucLnb.buc) {
|
||||
case voltage_buc::DISABLE: result << ",\"buc.powering\":0"; break;
|
||||
case voltage_buc::_24V: result << ",\"buc.powering\":24"; break;
|
||||
case voltage_buc::_48V: result << ",\"buc.powering\":48"; break;
|
||||
}
|
||||
|
||||
result << ",\n\"lnb.refClk10M\":" << UNKNOWN;
|
||||
result << ",\"lnb.powering\":" << UNKNOWN;
|
||||
result << ",\n\"lnb.refClk10M\":" << boolAsStr(bucLnb.is_ref_10MHz_lnb);
|
||||
switch (bucLnb.lnb) {
|
||||
case voltage_lnb::DISABLE: result << ",\"lnb.powering\":0"; break;
|
||||
case voltage_lnb::_13V: result << ",\"lnb.powering\":13"; break;
|
||||
case voltage_lnb::_18V: result << ",\"lnb.powering\":18"; break;
|
||||
case voltage_lnb::_24V: result << ",\"lnb.powering\":24"; break;
|
||||
}
|
||||
|
||||
result << ",\n\"serviceSettings.refClk10M\":" << UNKNOWN;
|
||||
result << ",\"serviceSettings.startDelay\":" << UNKNOWN;
|
||||
result << ",\"serviceSettings.autoStart\":" << UNKNOWN;
|
||||
result << ",\n\"serviceSettings.refClk10M\":" << boolAsStr(bucLnb.is_ref_10MHz_output);
|
||||
result << ",\"serviceSettings.autoStart\":" << boolAsStr(bucLnb.is_save_current_state);
|
||||
|
||||
result << "}";
|
||||
return result.str();
|
||||
|
164
static/main.html
164
static/main.html
@ -13,7 +13,7 @@
|
||||
<div>
|
||||
<span class="nav-bar-element">Прием: <span :class="{ indicator_bad: stat_rx.state === false, indicator_good: stat_rx.state === true, indicator: true }"></span></span>
|
||||
<span class="nav-bar-element">Передача: <span :class="{ indicator_good: stat_tx.state === true, indicator: true }"></span></span>
|
||||
<span class="nav-bar-element">Тест: <span :class="{ indicator_bad: testState === false, indicator_good: testState === true, indicator: true }"></span></span>
|
||||
<span class="nav-bar-element">Тест: <span :class="{ indicator_good: (param.general.isTestInputData === true || param.general.modulatorMode === 'test'), indicator: true }"></span></span>
|
||||
<!-- Последнее обновление: {{ lastUpdateTime }}-->
|
||||
</div>
|
||||
<div class="tabs">
|
||||
@ -90,7 +90,7 @@
|
||||
<table>
|
||||
<tbody>
|
||||
<tr><th>Температура ADRV</th><td>{{ stat_device.adrv }} °C</td></tr>
|
||||
<tr><th>Температура ZYNC ULTRASUCK</th><td>{{ stat_device.zync }} °C</td></tr>
|
||||
<tr><th>Температура ZYNQ ULTRASUCK</th><td>{{ stat_device.zynq }} °C</td></tr>
|
||||
<tr><th>Температура FPGA</th><td>{{ stat_device.fpga }} °C</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -133,9 +133,9 @@
|
||||
</label>
|
||||
<label>
|
||||
<span>Входные данные</span>
|
||||
<select v-model="param.general.inputData">
|
||||
<option value="eth">Ethernet</option>
|
||||
<option value="test">Тест (CW)</option>
|
||||
<select v-model="param.general.isTestInputData">
|
||||
<option value="false">Ethernet</option>
|
||||
<option value="true">Тест (CW)</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
@ -309,8 +309,8 @@
|
||||
</form>
|
||||
<button>Сохранить</button>
|
||||
|
||||
<h2 v-show="param.general.mode === 'cinc'">Настройки режима CinC</h2>
|
||||
<form v-show="param.general.mode === 'cinc'" class="settings-set-container">
|
||||
<h2 v-show="param.general.isCinC">Настройки режима CinC</h2>
|
||||
<form v-show="param.general.isCinC" class="settings-set-container">
|
||||
<label>
|
||||
<span>Метод расчета задержки</span>
|
||||
<select v-model="param.cinc.mode">
|
||||
@ -343,7 +343,7 @@
|
||||
<input v-model="param.cinc.delayMax"/>
|
||||
</label>
|
||||
</form>
|
||||
<button v-show="param.general.mode === 'cinc'" type="submit">Сохранить</button>
|
||||
<button v-show="param.general.isCinC" type="submit">Сохранить</button>
|
||||
|
||||
<h2>Настройки питания и опорного генератора</h2>
|
||||
<div class="tabs-item-flex-container">
|
||||
@ -396,11 +396,7 @@
|
||||
</span>
|
||||
</label>
|
||||
<label>
|
||||
<span>Задержка включения передачи, мс</span>
|
||||
<input v-model="param.serviceSettings.startDelay"/>
|
||||
</label>
|
||||
<label>
|
||||
<span>Автозапуск при включении</span>
|
||||
<span>Автозапуск BUC и LNB при включении</span>
|
||||
<span class="toggle-input">
|
||||
<input type="checkbox" v-model="param.serviceSettings.autoStart" />
|
||||
<span class="slider"></span>
|
||||
@ -412,9 +408,9 @@
|
||||
</div>
|
||||
<div class="tabs-body-item" v-show="activeTab === 'qos'">
|
||||
<p>
|
||||
Эти настройки пока недоступны, но скоро разработчик это поправит. А пока купи разработчику банку пива)
|
||||
Эти настройки пока недоступны, но скоро разработчик это поправит. А пока купи разработчику банку <strike>пива</strike> колы)
|
||||
</p>
|
||||
<video preload="auto" controls>
|
||||
<video preload="auto" controls style="max-width: 100%">
|
||||
<source src="/vid/video_2024-11-06_15-49-35.mp4" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
@ -489,6 +485,40 @@
|
||||
return modcods[modcod]
|
||||
}
|
||||
|
||||
function extractModulationAndSpeedFromModcod(modcod) {
|
||||
switch (modcod) {
|
||||
case 1: return { modulation: 'qpsk', speed: '1/4' }
|
||||
case 2: return { modulation: 'qpsk', speed: '1/3' }
|
||||
case 3: return { modulation: 'qpsk', speed: '2/5' }
|
||||
case 4: return { modulation: 'qpsk', speed: '1/2' }
|
||||
case 5: return { modulation: 'qpsk', speed: '3/5' }
|
||||
case 6: return { modulation: 'qpsk', speed: '2/3' }
|
||||
case 7: return { modulation: 'qpsk', speed: '3/4' }
|
||||
case 8: return { modulation: 'qpsk', speed: '4/5' }
|
||||
case 9: return { modulation: 'qpsk', speed: '5/6' }
|
||||
case 10: return { modulation: 'qpsk', speed: '8/9' }
|
||||
case 11: return { modulation: 'qpsk', speed: '9/10' }
|
||||
case 12: return { modulation: '8psk', speed: '3/5' }
|
||||
case 13: return { modulation: '8psk', speed: '2/3' }
|
||||
case 14: return { modulation: '8psk', speed: '3/4' }
|
||||
case 15: return { modulation: '8psk', speed: '5/6' }
|
||||
case 16: return { modulation: '8psk', speed: '8/9' }
|
||||
case 17: return { modulation: '8psk', speed: '9/10' }
|
||||
case 18: return { modulation: '16apsk', speed: '2/3' }
|
||||
case 19: return { modulation: '16apsk', speed: '3/4' }
|
||||
case 20: return { modulation: '16apsk', speed: '4/5' }
|
||||
case 21: return { modulation: '16apsk', speed: '5/6' }
|
||||
case 22: return { modulation: '16apsk', speed: '8/9' }
|
||||
case 23: return { modulation: '16apsk', speed: '9/10' }
|
||||
case 24: return { modulation: '32apsk', speed: '3/4' }
|
||||
case 25: return { modulation: '32apsk', speed: '4/5' }
|
||||
case 26: return { modulation: '32apsk', speed: '5/6' }
|
||||
case 27: return { modulation: '32apsk', speed: '8/9' }
|
||||
case 28: return { modulation: '32apsk', speed: '9/10' }
|
||||
}
|
||||
return { modulation: 'qpsk', speed: '1/4' }
|
||||
}
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
@ -531,7 +561,7 @@
|
||||
channelDelay: '?'
|
||||
},
|
||||
stat_device: { // температурные датчики
|
||||
adrv: 0, zync: 0, fpga: 0
|
||||
adrv: 0, zynq: 0, fpga: 0
|
||||
},
|
||||
|
||||
param: {
|
||||
@ -540,44 +570,44 @@
|
||||
txEn: false, // включен/выключен
|
||||
modulatorMode: 'normal', // режим работы модулятора
|
||||
autoStartTx: false, // было "режим работы передатчика"
|
||||
inputData: 'eth', // входные данные: eth или test
|
||||
isTestInputData: false, // входные данные: eth или test
|
||||
},
|
||||
tx: {
|
||||
attenuation: -3.0, // ослабление
|
||||
rolloff: 20,
|
||||
cymRate: 100000,
|
||||
centerFreq: 1200000.0,
|
||||
attenuation: null, // ослабление
|
||||
rolloff: null,
|
||||
cymRate: null,
|
||||
centerFreq: null,
|
||||
},
|
||||
dvbs2: {
|
||||
mode: 'ccm',
|
||||
frameSize: 'normal',
|
||||
pilots: false,
|
||||
mode: null, // ccm/acm
|
||||
frameSize: null, // 'normal' / 'short'
|
||||
// pilots: false,
|
||||
|
||||
// CCM
|
||||
ccm_modulation: 'qpsk',
|
||||
ccm_speed: '1/2',
|
||||
ccm_modulation: null,
|
||||
ccm_speed: null,
|
||||
|
||||
// ACM
|
||||
acm_maxModulation: 'qpsk',
|
||||
acm_maxSpeed: '1/2',
|
||||
acm_minModulation: 'qpsk',
|
||||
acm_minSpeed: '1/2',
|
||||
acm_maxModulation: null,
|
||||
acm_maxSpeed: null,
|
||||
acm_minModulation: null,
|
||||
acm_minSpeed: null,
|
||||
|
||||
snrReserve: 0.5,
|
||||
servicePacketPeriod: 15,
|
||||
snrReserve: null,
|
||||
servicePacketPeriod: null,
|
||||
},
|
||||
// авто-регулировка мощности
|
||||
acm: {
|
||||
en: false,
|
||||
maxAttenuation: -2.0,
|
||||
minAttenuation: -3.0,
|
||||
requiredSnr: -10,
|
||||
maxAttenuation: null,
|
||||
minAttenuation: null,
|
||||
requiredSnr: null,
|
||||
},
|
||||
rx: {
|
||||
gainMode: 'auto', // режим управления усилением
|
||||
manualGain: 70, // усиление, только для ручного режима
|
||||
gainMode: null, // 'auto'/'manual' режим управления усилением
|
||||
manualGain: 0, // усиление, только для ручного режима
|
||||
spectrumInversion: false,
|
||||
rolloff: 20,
|
||||
rolloff: 0,
|
||||
cymRate: 100000,
|
||||
centerFreq: 1200000.0,
|
||||
},
|
||||
@ -605,7 +635,6 @@
|
||||
},
|
||||
serviceSettings: {
|
||||
refClk10M: false, // подача опоры 10MHz
|
||||
startDelay: 0, // задержка включения передачи
|
||||
autoStart: false
|
||||
},
|
||||
},
|
||||
@ -674,7 +703,7 @@
|
||||
this.stat_cinc.channelDelay = vals["mainState"]["cinc.channelDelay"]
|
||||
|
||||
this.stat_device.adrv = vals["mainState"]["device.adrv"]
|
||||
this.stat_device.zync = vals["mainState"]["device.zync"]
|
||||
this.stat_device.zynq = vals["mainState"]["device.zynq"]
|
||||
this.stat_device.fpga = vals["mainState"]["device.fpga"]
|
||||
|
||||
this.testState = vals["mainState"]["testState"]
|
||||
@ -692,6 +721,61 @@
|
||||
|
||||
updateSettings(vals) {
|
||||
this.settingFetchComplete = true
|
||||
|
||||
this.param.general.isCinC = vals["settings"]["general.isCinC"]
|
||||
this.param.general.txEn = vals["settings"]["general.txEn"]
|
||||
this.param.general.modulatorMode = vals["settings"]["general.modulatorMode"]
|
||||
this.param.general.autoStartTx = vals["settings"]["general.autoStartTx"]
|
||||
this.param.general.isTestInputData = vals["settings"]["general.isTestInputData"]
|
||||
|
||||
this.param.tx.attenuation = vals["settings"]["tx.attenuation"]
|
||||
this.param.tx.rolloff = vals["settings"]["tx.rolloff"]
|
||||
this.param.tx.cymRate = vals["settings"]["tx.cymRate"]
|
||||
this.param.tx.centerFreq = vals["settings"]["tx.centerFreq"]
|
||||
|
||||
this.param.dvbs2.mode = (vals["settings"]["dvbs2.isAcm"] ? 'acm' : 'ccm')
|
||||
this.param.dvbs2.frameSize = vals["settings"]["dvbs2.frameSize"]
|
||||
// this.param.dvbs2.pilots = vals["settings"]["dvbs2.pilots"]
|
||||
|
||||
let m = extractModulationAndSpeedFromModcod(vals["settings"]["dvbs2.ccm_modcod"])
|
||||
this.param.dvbs2.ccm_modulation = m.modulation
|
||||
this.param.dvbs2.ccm_speed = m.speed
|
||||
m = extractModulationAndSpeedFromModcod(vals["settings"]["dvbs2.acm_maxModcod"])
|
||||
this.param.dvbs2.acm_maxModulation = m.modulation
|
||||
this.param.dvbs2.acm_maxSpeed = m.speed
|
||||
m = extractModulationAndSpeedFromModcod(vals["settings"]["dvbs2.acm_minModcod"])
|
||||
this.param.dvbs2.acm_minModulation = m.modulation
|
||||
this.param.dvbs2.acm_minSpeed = m.speed
|
||||
|
||||
this.param.dvbs2.snrReserve = vals["settings"]["dvbs2.snrReserve"]
|
||||
this.param.dvbs2.servicePacketPeriod = vals["settings"]["dvbs2.servicePacketPeriod"]
|
||||
|
||||
this.param.acm.en = vals["settings"]["acm.en"]
|
||||
this.param.acm.maxAttenuation = vals["settings"]["acm.maxAttenuation"]
|
||||
this.param.acm.minAttenuation = vals["settings"]["acm.minAttenuation"]
|
||||
this.param.acm.requiredSnr = vals["settings"]["acm.requiredSnr"]
|
||||
|
||||
this.param.rx.gainMode = vals["settings"]["rx.gainMode"]
|
||||
this.param.rx.manualGain = vals["settings"]["rx.manualGain"]
|
||||
this.param.rx.spectrumInversion = vals["settings"]["rx.spectrumInversion"]
|
||||
this.param.rx.rolloff = vals["settings"]["rx.rolloff"]
|
||||
this.param.rx.cymRate = vals["settings"]["rx.cymRate"]
|
||||
this.param.rx.centerFreq = vals["settings"]["rx.centerFreq"]
|
||||
|
||||
this.param.cinc.mode = vals["settings"]["cinc.mode"]
|
||||
this.param.cinc.searchBandwidth = vals["settings"]["cinc.searchBandwidth"]
|
||||
this.param.cinc.position.station.latitude = vals["settings"]["cinc.position.station.latitude"]
|
||||
this.param.cinc.position.station.longitude = vals["settings"]["cinc.position.station.longitude"]
|
||||
this.param.cinc.position.satelliteLongitude = vals["settings"]["cinc.position.satelliteLongitude"]
|
||||
this.param.cinc.delayMin = vals["settings"]["cinc.delayMin"]
|
||||
this.param.cinc.delayMax = vals["settings"]["cinc.delayMax"]
|
||||
|
||||
this.param.buc.refClk10M = vals["settings"]["buc.refClk10M"]
|
||||
this.param.buc.powering = vals["settings"]["buc.powering"]
|
||||
this.param.lnb.refClk10M = vals["settings"]["lnb.refClk10M"]
|
||||
this.param.lnb.powering = vals["settings"]["lnb.powering"]
|
||||
this.param.serviceSettings.refClk10M = vals["settings"]["serviceSettings.refClk10M"]
|
||||
this.param.serviceSettings.autoStart = vals["settings"]["serviceSettings.autoStart"]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user