Compare commits

..

No commits in common. "130c3c4dfcfb5a31d10627e84b8bb618c0a2a91d" and "2c2cbf42495771ba8270bbf16c497df5e3a8841e" have entirely different histories.

14 changed files with 79 additions and 143 deletions

3
.gitignore vendored
View File

@ -9,6 +9,3 @@ dh.pem
# эти файлы после генерации должны быть перемещены в `/static`
front-generator/main-scpc.html
front-generator/main-tdma.html
# логи сервера в релизной версии
http_server_*.log

View File

@ -154,8 +154,8 @@
"values": [{"label": "Ethernet", "value": "false"}, {"label": "Тест", "value": "true"}]
},
{"widget": "h3", "label": "Параметры передачи"},
{"widget": "number-int", "label": "Центральная частота, КГц", "name": "txCentralFreq", "min": 950000, "max": 6000000},
{"widget": "number-int", "label": "Символьная скорость, Бод", "name": "txBaudrate", "min": 200000, "max": 54000000},
{"widget": "number", "label": "Центральная частота, КГц", "name": "txCentralFreq", "min": 900000, "step": 0.01},
{"widget": "number", "label": "Символьная скорость, Бод", "name": "txBaudrate", "min": 0, "step": 1},
{
"widget": "select", "label": "Roll-off", "name": "txRolloff",
"values": [{"label": "0.02", "value": "2"}, {"label": "0.05", "value": "5"}, {"label": "0.10", "value": "10"}, {"label": "0.15", "value": "15"}, {"label": "0.20", "value": "20"}, {"label": "0.25", "value": "25"}]
@ -214,8 +214,8 @@
{"widget": "number", "label": "Усиление, дБ", "name": "rxManualGain", "min": -40, "step": 0.01, "max": 40, "v_show": "paramRxtx.rxAgcEn === false"},
{"widget": "watch-expr", "label": "Текущее усиление", "expr": "paramRxtx.rxManualGain", "v_show": "paramRxtx.rxAgcEn === true"},
{"widget": "checkbox", "label": "Инверсия спектра", "name": "rxSpectrumInversion"},
{"widget": "number-int", "label": "Центральная частота, КГц", "name": "rxCentralFreq", "min": 950000, "max": 6000000},
{"widget": "number-int", "label": "Символьная скорость, Бод", "name": "rxBaudrate", "min": 200000, "max": 54000000},
{"widget": "number", "label": "Центральная частота, КГц", "name": "rxCentralFreq", "min": 900000, "step": 0.01},
{"widget": "number", "label": "Символьная скорость, Бод", "name": "rxBaudrate", "min": 0, "step": 1},
{
"widget": "select", "label": "Roll-off", "name": "rxRolloff",
"values": [{"label": "0.02", "value": "2"}, {"label": "0.05", "value": "5"}, {"label": "0.10", "value": "10"}, {"label": "0.15", "value": "15"}, {"label": "0.20", "value": "20"}, {"label": "0.25", "value": "25"}]

View File

@ -17,22 +17,15 @@ def extract_param_names(mc):
r += helper_extract(child)
return r
elif 'name' in widget:
copy_fields = {"widget": widget['widget'], "name": widget['name']}
if 'min' in widget:
copy_fields['min'] = widget['min']
if 'max' in widget:
copy_fields['max'] = widget['max']
match widget['widget']:
case 'select': return [{"initValue": widget['values'][0]['value']} | copy_fields]
case 'checkbox': return [{"initValue": 'false'} | copy_fields]
case 'number': return [{"initValue": widget['min'] if widget['min'] else '0'} | copy_fields]
case 'number-int': return [{"initValue": "0"} | copy_fields]
case 'modulation-modcod': return [copy_fields | {"name": widget['name'] + "Modulation", "initValue": '"QPSK"'}]
case 'modulation-speed': return [copy_fields | {"name": widget['name'] + "Speed", "initValue": '"1/4"'}]
case 'select': return [{"name": widget['name'], "initValue": widget['values'][0]['value']}]
case 'checkbox': return [{"name": widget['name'], "initValue": 'false'}]
case 'number': return [{"name": widget['name'], "initValue": widget['min'] if widget['min'] else '0'}]
case 'modulation-modcod': return [{"name": widget['name'] + "Modulation", "initValue": '"QPSK"'}]
case 'modulation-speed': return [{"name": widget['name'] + "Speed", "initValue": '"1/4"'}]
case 'watch': return []
return [{"initValue": 'null'} | copy_fields]
return [{"name": widget['name'], "initValue": 'null'}]
return []
for cat in mc['params']:

View File

@ -1,4 +1,3 @@
{% from 'common/widgets.j2' import build_getter_js, build_setter_js %}
{% for g in paramGroups %}
settingsSubmit{{ g['group'] | title }}() {
if (this.submitStatus.{{ g['group'] }}) { return }
@ -8,7 +7,7 @@
let query = {
{% for p in g['params'] %}
"{{ p['name'] }}": {{ build_getter_js(g['group'], p) }},
"{{ p['name'] }}": this.param{{ g['group'] | title }}.{{ p['name'] }},
{% endfor %}
}
@ -24,7 +23,7 @@
update{{ g['group'] | title }}Settings(vals) {
this.submitStatus.{{ g['group'] }} = false
{% for p in g['params'] %}
{{ build_setter_js(g['group'], p, "vals[\"settings\"][\"" ~ p['name'] ~ "\"]") }}
this.param{{ g['group'] | title }}.{{ p['name'] }} = vals["settings"]["{{ p['name'] }}"]
{% endfor %}
},
{% endfor %}

View File

@ -19,7 +19,11 @@
<tr><th>Ошибка ФАПЧ</th><td>{{ statRx.pllError }}</td></tr>
<tr><th>Инф. скорость на приеме</th><td>{{ statRx.speedOnRxKbit }} кбит/с</td></tr>
<tr><th>Инф. скорость на интерфейсе</th><td>{{ statRx.speedOnIifKbit }} кбит/с</td></tr>
<tr><td colspan="2" style="padding-top: 1em; text-align: center">Статистика пакетов</td></tr>
</tbody>
</table>
<p> Статистика пакетов </p>
<table>
<tbody>
<tr><th>Качественных пакетов</th><td>{{ statRx.packetsOk }}</td></tr>
<tr><th>Поврежденных пакетов</th><td>{{ statRx.packetsBad }}</td></tr>
<tr><th>DUMMY</th><td>{{ statRx.packetsDummy }}</td></tr>

View File

@ -73,9 +73,9 @@
updateQosSettings(vals) {
this.submitStatusQos = false
this.paramQos.en = vals["settings"]["qosEnabled"]
this.paramQos.en = vals["settings"]["qos.enabled"]
const qosProfile = vals["settings"]["qosProfile"]
const qosProfile = vals["settings"]["qos.profile"]
if (qosProfile !== null && qosProfile !== undefined) {
this.paramQos.rt1 = [] // .splice(0, this.paramQos.rt1.length)
this.paramQos.rt2 = [] // .splice(0, this.paramQos.rt2.length)

View File

@ -6,14 +6,6 @@
{# https://ru.stackoverflow.com/questions/1241064 #}
{% macro build_widget_number(param_group, widget) %}<label{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}><span>{{ widget.label }}</span><input type="number" v-model="param{{ param_group | title }}.{{ widget.name }}"{% if widget['min'] %} min="{{ widget['min'] }}"{% endif %}{% if widget['max'] %} max="{{ widget['max'] }}"{% endif %}{% if widget['step'] %} step="{{ widget['step'] }}"{% endif %}/></label>{% endmacro %}
{% macro js_build_number_int_validator(widget) %}{{ '{' }}{% if widget['min'] %}min:{{ widget['min'] }},{% endif %}{% if widget['max'] %}max:{{ widget['max'] }}{% endif %}{{ '}' }}{% endmacro %}
{% macro build_widget_number_int(param_group, widget) %}<label{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}>
<span>{{ widget.label }}</span>
<input type="text" v-model.lazy="param{{ param_group | title }}.{{ widget.name }}" @change="e => {{ build_setter(param_group, widget, "inputFormatInt(e.target.value, " ~ js_build_number_int_validator(widget) ~ ")") }}"/>
</label>{% endmacro %}
{% macro build_widget_select(param_group, widget) %}<label{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}>
<span>{{ widget.label }}</span>
<select v-model="param{{ param_group | title }}.{{ widget.name }}">
@ -66,7 +58,6 @@
{% elif widget.widget == 'submit' %}<button class="action-button" @click="settingsSubmit{{ param_group | title }}()"{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}>Сохранить <span class="submit-spinner" v-show="submitStatus.{{ param_group }}"></span></button>
{% elif widget.widget == 'checkbox' %}{{ build_widget_checkbox(param_group, widget) }}
{% elif widget.widget == 'number' %}{{ build_widget_number(param_group, widget) }}
{% elif widget.widget == 'number-int' %}{{ build_widget_number_int(param_group, widget) }}
{% elif widget.widget == 'watch' %}{{ build_widget_watch(param_group, widget) }}
{% elif widget.widget == 'watch-expr' %}{{ build_widget_watch_expr(param_group, widget) }}
{% elif widget.widget == 'select' %}{{ build_widget_select(param_group, widget) }}
@ -76,24 +67,3 @@
{% else %}<p>Widget '{{ widget.widget }}' not defined!</p><p>{{ widget }}</p>
{% endif %}
{% endmacro %}
{% macro build_getter_js(param_group, widget) %}{% if widget.widget in ['flex-container', 'settings-container', 'h2', 'h3', 'submit', 'watch', 'watch-expr'] %}null{%
elif widget.widget == 'checkbox' or widget.widget == 'number' or widget.widget == 'select' or widget.widget == 'ip-address' %}this.param{{ param_group | title }}.{{ widget.name }}{%
elif widget.widget == 'modulation-modcod' %}this.param{{ param_group | title }}.{{ widget.name }}Modulation{%
elif widget.widget == 'modulation-speed' %}this.param{{ param_group | title }}.{{ widget.name }}Speed{%
elif widget.widget == 'number-int' %}parseInt(this.param{{ param_group | title }}.{{ widget.name }}.replace(/[^0-9]/g, '')){%
else %}<p>Widget '{{ widget.widget }}' not defined!</p><p>{{ widget }}</p>{% endif %}{% endmacro %}
{% macro build_setter_js(param_group, widget, expr) %}{% if widget.widget in ['flex-container', 'settings-container', 'h2', 'h3', 'submit', 'watch', 'watch-expr'] %}null{%
elif widget.widget in ['checkbox', 'number', 'select', 'ip-address'] %}this.param{{ param_group | title }}.{{ widget.name }} = {{ expr }}{%
elif widget.widget == 'modulation-modcod' %}this.param{{ param_group | title }}.{{ widget.name }}Modulation = {{ expr }}{%
elif widget.widget == 'modulation-speed' %}this.param{{ param_group | title }}.{{ widget.name }}Speed = {{ expr }}{%
elif widget.widget == 'number-int' %}this.param{{ param_group | title }}.{{ widget.name }} = this.inputFormatInt({{ expr }}, {{ js_build_number_int_validator(widget) }}){%
else %}<p>Widget '{{ widget.widget }}' not defined!</p><p>{{ widget }}</p>{% endif %}{% endmacro %}
{% macro build_setter(param_group, widget, expr) %}{% if widget.widget in ['flex-container', 'settings-container', 'h2', 'h3', 'submit', 'watch', 'watch-expr'] %}null{%
elif widget.widget in ['checkbox', 'number', 'select', 'ip-address'] %}param{{ param_group | title }}.{{ widget.name }} = {{ expr }}{%
elif widget.widget == 'modulation-modcod' %}param{{ param_group | title }}.{{ widget.name }}Modulation = {{ expr }}{%
elif widget.widget == 'modulation-speed' %}param{{ param_group | title }}.{{ widget.name }}Speed = {{ expr }}{%
elif widget.widget == 'number-int' %}param{{ param_group | title }}.{{ widget.name }} = ({{ expr }}).toString(){%
else %}<p>Widget '{{ widget.widget }}' not defined!</p><p>{{ widget }}</p>{% endif %}{% endmacro %}

View File

@ -153,14 +153,6 @@
return []
}
},
inputFormatInt(src, validation) {
if (validation === null || validation === undefined) { validation = {} }
const rawVal = src.toString().replace(/[^0-9]/g, '')
let result = rawVal === '' ? 0 : parseInt(rawVal)
if ('min' in validation) { if (result <= validation['min']) { result = validation['min'] } }
if ('max' in validation) { if (result >= validation['max']) { result = validation['max'] } }
return result.toLocaleString()
},
// ========== include from 'common/all-params-methods.js.j2'
{% include 'common/all-params-methods.js.j2' %}

View File

@ -38,18 +38,23 @@ void init_logging() {
log::register_simple_formatter_factory<log::trivial::severity_level, char>("Severity");
#ifdef USE_DEBUG
log::add_console_log(std::clog, keywords::format = "%TimeStamp%: [%Severity%] %Message%");
#else
log::add_file_log(
keywords::file_name = "http_server_%N.log",
keywords::rotation_size = 10 * 1024 * 1024,
keywords::time_based_rotation = log::sinks::file::rotation_at_time_point(0, 0, 0),
keywords::format = "%TimeStamp%: [%Severity%] %Message%",
keywords::open_mode = std::ios_base::app,
keywords::auto_flush = true
);
#endif
// #ifdef USE_DEBUG
// log::add_console_log(std::clog, keywords::format = "%TimeStamp%: [%Severity%] %Message% [%ThreadID%]");
// #else
// log::add_file_log(
// keywords::file_name = "/home/root/manager_orlik_%N.log",
// keywords::rotation_size = 10 * 1024 * 1024,
// keywords::time_based_rotation = log::sinks::file::rotation_at_time_point(0, 0, 0),
// keywords::format = expressions::format("%1% [%2%] [%3%] <%4%> [%5%]")
// % expressions::format_date_time<boost::posix_time::ptime>("TimeStamp", "%Y-%m-%d, %H:%M:%S.%f")
// % expressions::format_named_scope("Scope", keywords::format = "%n (%f:%l)")
// % expressions::attr<log::trivial::severity_level>("Severity")
// % expressions::message % expressions::attr<attributes::current_thread_id::value_type>("ThreadID"),
// keywords::open_mode = std::ios_base::app,
// keywords::auto_flush = true
// );
// #endif
log::add_console_log(std::clog, keywords::format = "%TimeStamp%: [%Severity%] %Message% [%ThreadID%]");
log::core::get()->set_filter(log::trivial::severity >= log::trivial::info);
log::add_common_attributes();

View File

@ -59,8 +59,7 @@ namespace http::server {
reply_.headers.push_back({.name = "Connection", .value = "keep-alive"});
}
const auto ep = socket_.remote_endpoint();
BOOST_LOG_TRIVIAL(info) << "HTTP query " << ep.address().to_string() << ":" << ep.port() << " " << reply_.status << " " << request_.method << " " << request_.queryUri;
BOOST_LOG_TRIVIAL(info) << "HTTP query " << reply_.status << " " << request_.method << " " << request_.queryUri;
auto self(shared_from_this());
async_write(socket_, reply_.to_buffers(), [this, self](boost::system::error_code ec, std::size_t) {
@ -93,7 +92,6 @@ namespace http::server {
void SslConnection::stop() {
try {
stream_.next_layer().socket().close();
stream_.shutdown();
} catch (std::exception& e) {
BOOST_LOG_TRIVIAL(warning) << "SslConnection::stop(): Can't shutdown ssl socket: " << e.what();
@ -135,8 +133,7 @@ namespace http::server {
reply_.headers.push_back({.name = "Connection", .value = "keep-alive"});
}
const auto ep = stream_.next_layer().socket().remote_endpoint();
BOOST_LOG_TRIVIAL(info) << "HTTPS query " << ep.address().to_string() << ":" << ep.port() << " " << reply_.status << " " << request_.method << " " << request_.queryUri;
BOOST_LOG_TRIVIAL(info) << "HTTPS query " << reply_.status << " " << request_.method << " " << request_.queryUri;
auto self(shared_from_this());
async_write(stream_, reply_.to_buffers(), [this, self](boost::system::error_code ec, std::size_t) {

View File

@ -1037,7 +1037,7 @@ void api_driver::ApiDriver::setRxTxSettings(boost::property_tree::ptree &pt) {
#ifdef MODEM_IS_SCPC
mod.baudrate = pt.get<uint32_t>("txBaudrate");
mod.rollof = pt.get<unsigned int>("txRolloff");
mod.gold_seq_is_active = pt.get<unsigned int>("txGoldan");
mod.gold_seq_is_active = pt.get<bool>("txGoldan");
#endif
mod.attenuation = pt.get<double>("txAttenuation");
@ -1054,7 +1054,7 @@ void api_driver::ApiDriver::setRxTxSettings(boost::property_tree::ptree &pt) {
demod.baudrate = pt.get<uint32_t>("rxBaudrate");
demod.rollof = pt.get<unsigned int>("rxRolloff");
#ifdef MODEM_IS_SCPC
demod.gold_seq_is_active = pt.get<unsigned int>("rxGoldan");
demod.gold_seq_is_active = pt.get<bool>("rxGoldan");
#endif
#ifdef MODEM_IS_SCPC

View File

@ -87,11 +87,10 @@
.settings-set-container th {
text-align: left;
font-weight: normal;
padding: 0.2em 1em 0.2em 0.2em;
padding-right: 1em;
}
.settings-set-container td {
min-width: 10em;
padding: 0.2em;
}
.tabs-item-flex-container h2 {
margin-top: 0;

View File

@ -73,7 +73,11 @@
<tr><th>Ошибка ФАПЧ</th><td>{{ statRx.pllError }}</td></tr>
<tr><th>Инф. скорость на приеме</th><td>{{ statRx.speedOnRxKbit }} кбит/с</td></tr>
<tr><th>Инф. скорость на интерфейсе</th><td>{{ statRx.speedOnIifKbit }} кбит/с</td></tr>
<tr><td colspan="2" style="padding-top: 1em; text-align: center">Статистика пакетов</td></tr>
</tbody>
</table>
<p> Статистика пакетов </p>
<table>
<tbody>
<tr><th>Качественных пакетов</th><td>{{ statRx.packetsOk }}</td></tr>
<tr><th>Поврежденных пакетов</th><td>{{ statRx.packetsBad }}</td></tr>
<tr><th>DUMMY</th><td>{{ statRx.packetsDummy }}</td></tr>
@ -158,14 +162,8 @@
</select>
</label>
<h3>Параметры передачи</h3>
<label>
<span>Центральная частота, КГц</span>
<input type="text" v-model.lazy="paramRxtx.txCentralFreq" @change="e => paramRxtx.txCentralFreq = (inputFormatInt(e.target.value, {min:950000,max:6000000})).toString()"/>
</label>
<label>
<span>Символьная скорость, Бод</span>
<input type="text" v-model.lazy="paramRxtx.txBaudrate" @change="e => paramRxtx.txBaudrate = (inputFormatInt(e.target.value, {min:200000,max:54000000})).toString()"/>
</label>
<label><span>Центральная частота, КГц</span><input type="number" v-model="paramRxtx.txCentralFreq" min="900000" step="0.01"/></label>
<label><span>Символьная скорость, Бод</span><input type="number" v-model="paramRxtx.txBaudrate" step="1"/></label>
<label>
<span>Roll-off</span>
<select v-model="paramRxtx.txRolloff">
@ -289,14 +287,8 @@
<span>Инверсия спектра</span>
<span class="toggle-input"><input type="checkbox" v-model="paramRxtx.rxSpectrumInversion" /><span class="slider"></span></span>
</label>
<label>
<span>Центральная частота, КГц</span>
<input type="text" v-model.lazy="paramRxtx.rxCentralFreq" @change="e => paramRxtx.rxCentralFreq = (inputFormatInt(e.target.value, {min:950000,max:6000000})).toString()"/>
</label>
<label>
<span>Символьная скорость, Бод</span>
<input type="text" v-model.lazy="paramRxtx.rxBaudrate" @change="e => paramRxtx.rxBaudrate = (inputFormatInt(e.target.value, {min:200000,max:54000000})).toString()"/>
</label>
<label><span>Центральная частота, КГц</span><input type="number" v-model="paramRxtx.rxCentralFreq" min="900000" step="0.01"/></label>
<label><span>Символьная скорость, Бод</span><input type="number" v-model="paramRxtx.rxBaudrate" step="1"/></label>
<label>
<span>Roll-off</span>
<select v-model="paramRxtx.rxRolloff">
@ -586,7 +578,7 @@
txAutoStart: false,
txModulatorIsTest: false,
txIsTestInput: false,
txCentralFreq: 0,
txCentralFreq: 900000,
txBaudrate: 0,
txRolloff: 2,
txGoldan: 0,
@ -608,7 +600,7 @@
rxAgcEn: false,
rxManualGain: -40,
rxSpectrumInversion: false,
rxCentralFreq: 0,
rxCentralFreq: 900000,
rxBaudrate: 0,
rxRolloff: 2,
rxGoldan: 0,
@ -755,14 +747,6 @@
return []
}
},
inputFormatInt(src, validation) {
if (validation === null || validation === undefined) { validation = {} }
const rawVal = src.toString().replace(/[^0-9]/g, '')
let result = rawVal === '' ? 0 : parseInt(rawVal)
if ('min' in validation) { if (result <= validation['min']) { result = validation['min'] } }
if ('max' in validation) { if (result >= validation['max']) { result = validation['max'] } }
return result.toLocaleString()
},
// ========== include from 'common/all-params-methods.js.j2'
settingsSubmitRxtx() {
@ -774,20 +758,20 @@
"txAutoStart": this.paramRxtx.txAutoStart,
"txModulatorIsTest": this.paramRxtx.txModulatorIsTest,
"txIsTestInput": this.paramRxtx.txIsTestInput,
"txCentralFreq": parseInt(this.paramRxtx.txCentralFreq.replace(/[^0-9]/g, '')),
"txBaudrate": parseInt(this.paramRxtx.txBaudrate.replace(/[^0-9]/g, '')),
"txCentralFreq": this.paramRxtx.txCentralFreq,
"txBaudrate": this.paramRxtx.txBaudrate,
"txRolloff": this.paramRxtx.txRolloff,
"txGoldan": this.paramRxtx.txGoldan,
"txAttenuation": this.paramRxtx.txAttenuation,
"dvbServicePacketPeriod": this.paramRxtx.dvbServicePacketPeriod,
"dvbIsAcm": this.paramRxtx.dvbIsAcm,
"txFrameSizeNormal": this.paramRxtx.txFrameSizeNormal,
"dvbCcmModulation": this.paramRxtx.dvbCcmModulationModulation,
"dvbCcmSpeed": this.paramRxtx.dvbCcmSpeedSpeed,
"dvbAcmMinModulation": this.paramRxtx.dvbAcmMinModulationModulation,
"dvbAcmMinSpeed": this.paramRxtx.dvbAcmMinSpeedSpeed,
"dvbAcmMaxModulation": this.paramRxtx.dvbAcmMaxModulationModulation,
"dvbAcmMaxSpeed": this.paramRxtx.dvbAcmMaxSpeedSpeed,
"dvbCcmModulation": this.paramRxtx.dvbCcmModulation,
"dvbCcmSpeed": this.paramRxtx.dvbCcmSpeed,
"dvbAcmMinModulation": this.paramRxtx.dvbAcmMinModulation,
"dvbAcmMinSpeed": this.paramRxtx.dvbAcmMinSpeed,
"dvbAcmMaxModulation": this.paramRxtx.dvbAcmMaxModulation,
"dvbAcmMaxSpeed": this.paramRxtx.dvbAcmMaxSpeed,
"dvbSnrReserve": this.paramRxtx.dvbSnrReserve,
"aupcEn": this.paramRxtx.aupcEn,
"aupcMinAttenuation": this.paramRxtx.aupcMinAttenuation,
@ -796,8 +780,8 @@
"rxAgcEn": this.paramRxtx.rxAgcEn,
"rxManualGain": this.paramRxtx.rxManualGain,
"rxSpectrumInversion": this.paramRxtx.rxSpectrumInversion,
"rxCentralFreq": parseInt(this.paramRxtx.rxCentralFreq.replace(/[^0-9]/g, '')),
"rxBaudrate": parseInt(this.paramRxtx.rxBaudrate.replace(/[^0-9]/g, '')),
"rxCentralFreq": this.paramRxtx.rxCentralFreq,
"rxBaudrate": this.paramRxtx.rxBaudrate,
"rxRolloff": this.paramRxtx.rxRolloff,
"rxGoldan": this.paramRxtx.rxGoldan,
}
@ -885,20 +869,20 @@
this.paramRxtx.txAutoStart = vals["settings"]["txAutoStart"]
this.paramRxtx.txModulatorIsTest = vals["settings"]["txModulatorIsTest"]
this.paramRxtx.txIsTestInput = vals["settings"]["txIsTestInput"]
this.paramRxtx.txCentralFreq = this.inputFormatInt(vals["settings"]["txCentralFreq"], {min:950000,max:6000000})
this.paramRxtx.txBaudrate = this.inputFormatInt(vals["settings"]["txBaudrate"], {min:200000,max:54000000})
this.paramRxtx.txCentralFreq = vals["settings"]["txCentralFreq"]
this.paramRxtx.txBaudrate = vals["settings"]["txBaudrate"]
this.paramRxtx.txRolloff = vals["settings"]["txRolloff"]
this.paramRxtx.txGoldan = vals["settings"]["txGoldan"]
this.paramRxtx.txAttenuation = vals["settings"]["txAttenuation"]
this.paramRxtx.dvbServicePacketPeriod = vals["settings"]["dvbServicePacketPeriod"]
this.paramRxtx.dvbIsAcm = vals["settings"]["dvbIsAcm"]
this.paramRxtx.txFrameSizeNormal = vals["settings"]["txFrameSizeNormal"]
this.paramRxtx.dvbCcmModulationModulation = vals["settings"]["dvbCcmModulation"]
this.paramRxtx.dvbCcmSpeedSpeed = vals["settings"]["dvbCcmSpeed"]
this.paramRxtx.dvbAcmMinModulationModulation = vals["settings"]["dvbAcmMinModulation"]
this.paramRxtx.dvbAcmMinSpeedSpeed = vals["settings"]["dvbAcmMinSpeed"]
this.paramRxtx.dvbAcmMaxModulationModulation = vals["settings"]["dvbAcmMaxModulation"]
this.paramRxtx.dvbAcmMaxSpeedSpeed = vals["settings"]["dvbAcmMaxSpeed"]
this.paramRxtx.dvbCcmModulation = vals["settings"]["dvbCcmModulation"]
this.paramRxtx.dvbCcmSpeed = vals["settings"]["dvbCcmSpeed"]
this.paramRxtx.dvbAcmMinModulation = vals["settings"]["dvbAcmMinModulation"]
this.paramRxtx.dvbAcmMinSpeed = vals["settings"]["dvbAcmMinSpeed"]
this.paramRxtx.dvbAcmMaxModulation = vals["settings"]["dvbAcmMaxModulation"]
this.paramRxtx.dvbAcmMaxSpeed = vals["settings"]["dvbAcmMaxSpeed"]
this.paramRxtx.dvbSnrReserve = vals["settings"]["dvbSnrReserve"]
this.paramRxtx.aupcEn = vals["settings"]["aupcEn"]
this.paramRxtx.aupcMinAttenuation = vals["settings"]["aupcMinAttenuation"]
@ -907,8 +891,8 @@
this.paramRxtx.rxAgcEn = vals["settings"]["rxAgcEn"]
this.paramRxtx.rxManualGain = vals["settings"]["rxManualGain"]
this.paramRxtx.rxSpectrumInversion = vals["settings"]["rxSpectrumInversion"]
this.paramRxtx.rxCentralFreq = this.inputFormatInt(vals["settings"]["rxCentralFreq"], {min:950000,max:6000000})
this.paramRxtx.rxBaudrate = this.inputFormatInt(vals["settings"]["rxBaudrate"], {min:200000,max:54000000})
this.paramRxtx.rxCentralFreq = vals["settings"]["rxCentralFreq"]
this.paramRxtx.rxBaudrate = vals["settings"]["rxBaudrate"]
this.paramRxtx.rxRolloff = vals["settings"]["rxRolloff"]
this.paramRxtx.rxGoldan = vals["settings"]["rxGoldan"]
},
@ -1149,9 +1133,9 @@
updateQosSettings(vals) {
this.submitStatusQos = false
this.paramQos.en = vals["settings"]["qosEnabled"]
this.paramQos.en = vals["settings"]["qos.enabled"]
const qosProfile = vals["settings"]["qosProfile"]
const qosProfile = vals["settings"]["qos.profile"]
if (qosProfile !== null && qosProfile !== undefined) {
this.paramQos.rt1 = [] // .splice(0, this.paramQos.rt1.length)
this.paramQos.rt2 = [] // .splice(0, this.paramQos.rt2.length)

View File

@ -72,7 +72,11 @@
<tr><th>Ошибка ФАПЧ</th><td>{{ statRx.pllError }}</td></tr>
<tr><th>Инф. скорость на приеме</th><td>{{ statRx.speedOnRxKbit }} кбит/с</td></tr>
<tr><th>Инф. скорость на интерфейсе</th><td>{{ statRx.speedOnIifKbit }} кбит/с</td></tr>
<tr><td colspan="2" style="padding-top: 1em; text-align: center">Статистика пакетов</td></tr>
</tbody>
</table>
<p> Статистика пакетов </p>
<table>
<tbody>
<tr><th>Качественных пакетов</th><td>{{ statRx.packetsOk }}</td></tr>
<tr><th>Поврежденных пакетов</th><td>{{ statRx.packetsBad }}</td></tr>
<tr><th>DUMMY</th><td>{{ statRx.packetsDummy }}</td></tr>
@ -409,14 +413,6 @@
return []
}
},
inputFormatInt(src, validation) {
if (validation === null || validation === undefined) { validation = {} }
const rawVal = src.toString().replace(/[^0-9]/g, '')
let result = rawVal === '' ? 0 : parseInt(rawVal)
if ('min' in validation) { if (result <= validation['min']) { result = validation['min'] } }
if ('max' in validation) { if (result >= validation['max']) { result = validation['max'] } }
return result.toLocaleString()
},
// ========== include from 'common/all-params-methods.js.j2'
settingsSubmitRxtx() {