diff --git a/assets/webconfig/i18n/cs.json b/assets/webconfig/i18n/cs.json index 388be7f5..7c6c71a1 100644 --- a/assets/webconfig/i18n/cs.json +++ b/assets/webconfig/i18n/cs.json @@ -510,9 +510,9 @@ "edt_conf_fw_json_title": "Seznam klientů json", "edt_conf_fw_json_expl": "Jeden z cílů na jeden řádek. Obsahuje IP:PORT (Příklad: 127.0.0.1:19446)", "edt_conf_fw_json_itemtitle": "Json cíl", - "edt_conf_fw_proto_title": "Seznam proto klientů", - "edt_conf_fw_proto_expl": "Jeden cíl na každý řádek. Obsahuje IP:PORT (Příklad: 127.0.0.1:19401)", - "edt_conf_fw_proto_itemtitle": "Proto cíl", + "edt_conf_fw_flat_title": "Seznam flatbuffer klientů", + "edt_conf_fw_flat_expl": "Jeden cíl na každý řádek. Obsahuje IP:PORT (Příklad: 127.0.0.1:19401)", + "edt_conf_fw_flat_itemtitle": "flatbuffer cíl", "edt_conf_js_heading_title": "JSON Server", "edt_conf_ps_heading_title": "PROTO Server", "edt_conf_bobls_heading_title": "Boblight Server", diff --git a/assets/webconfig/i18n/de.json b/assets/webconfig/i18n/de.json index c06d8733..605f1d2f 100644 --- a/assets/webconfig/i18n/de.json +++ b/assets/webconfig/i18n/de.json @@ -599,9 +599,9 @@ "edt_conf_fw_json_title": "Liste von Json zielen", "edt_conf_fw_json_expl": "Ein Json Ziel pro Zeile. Bestehend aus IP:PORT (Beispiel: 127.0.0.1:19446)", "edt_conf_fw_json_itemtitle": "Json Ziel", - "edt_conf_fw_proto_title": "Liste von Proto zielen", - "edt_conf_fw_proto_expl": "Ein Proto Ziel pro Zeile. Bestehend aus IP:PORT (Beispiel: 127.0.0.1:19401)", - "edt_conf_fw_proto_itemtitle": "Proto Ziel", + "edt_conf_fw_flat_title": "Liste von Flatbuffer zielen", + "edt_conf_fw_flat_expl": "Ein Flatbuffer Ziel pro Zeile. Bestehend aus IP:PORT (Beispiel: 127.0.0.1:19401)", + "edt_conf_fw_flat_itemtitle": "Flatbuffer Ziel", "edt_conf_net_heading_title" : "Network", "edt_conf_net_internetAccessAPI_title":"Internet API Zugriff", "edt_conf_net_internetAccessAPI_expl":"Erlaube Zugriff auf die Hyperion API/Webinterface aus dem Internet, deaktivieren für höhere Sicherheit.", diff --git a/assets/webconfig/i18n/en.json b/assets/webconfig/i18n/en.json index 495e9364..ac312d12 100644 --- a/assets/webconfig/i18n/en.json +++ b/assets/webconfig/i18n/en.json @@ -598,9 +598,9 @@ "edt_conf_fw_json_title" : "List of json clients", "edt_conf_fw_json_expl" : "One json target per line. Contains IP:PORT (Example: 127.0.0.1:19446)", "edt_conf_fw_json_itemtitle" : "Json target", - "edt_conf_fw_proto_title" : "List of proto clients", - "edt_conf_fw_proto_expl" : "One proto target per line. Contains IP:PORT (Example: 127.0.0.1:19401)", - "edt_conf_fw_proto_itemtitle" : "Proto target", + "edt_conf_fw_flat_title" : "List of flatbuffer clients", + "edt_conf_fw_flat_expl" : "One flatbuffer target per line. Contains IP:PORT (Example: 127.0.0.1:19401)", + "edt_conf_fw_flat_itemtitle" : "flatbuffer target", "edt_conf_net_heading_title" : "Network", "edt_conf_net_internetAccessAPI_title":"Internet API Access", "edt_conf_net_internetAccessAPI_expl":"Allow access to the Hyperion API/Webinterface from the internet, disable for higher security.", diff --git a/assets/webconfig/i18n/es.json b/assets/webconfig/i18n/es.json index 2d0b6116..54c756ca 100644 --- a/assets/webconfig/i18n/es.json +++ b/assets/webconfig/i18n/es.json @@ -510,9 +510,9 @@ "edt_conf_fw_json_title": "Lista de clientes JSON", "edt_conf_fw_json_expl": "Un destino json por línea. Contiene IP:PUERTO (Ejemplo: 127.0.0.1:19446)", "edt_conf_fw_json_itemtitle": "Destino json", - "edt_conf_fw_proto_title": "Lista de clientes proto", - "edt_conf_fw_proto_expl": "Un destino proto por línea. Contiene IP:PUERTO (Ejemplo: 127.0.0.1:19446)", - "edt_conf_fw_proto_itemtitle": "Destino proto", + "edt_conf_fw_flat_title": "Lista de clientes flatbuffer", + "edt_conf_fw_flat_expl": "Un destino flatbuffer por línea. Contiene IP:PUERTO (Ejemplo: 127.0.0.1:19446)", + "edt_conf_fw_flat_itemtitle": "Destino flatbuffer", "edt_conf_js_heading_title": "Servidor JSON", "edt_conf_ps_heading_title": "Servidor PROTO", "edt_conf_bobls_heading_title": "Servidor Boblight", diff --git a/assets/webconfig/i18n/it.json b/assets/webconfig/i18n/it.json index 8b799874..57dc4701 100644 --- a/assets/webconfig/i18n/it.json +++ b/assets/webconfig/i18n/it.json @@ -510,9 +510,9 @@ "edt_conf_fw_json_title": "Lista dei client json", "edt_conf_fw_json_expl": "Una destinazione json per riga. Contiene IP:PORTA:(Esempio: 127.0.0.1:19446)", "edt_conf_fw_json_itemtitle": "Destinatario json", - "edt_conf_fw_proto_title": "Lista dei client proto", - "edt_conf_fw_proto_expl": "Una destinazione proto per riga. Contiene IP:PORTA:(Esempio: 127.0.0.1:19401)", - "edt_conf_fw_proto_itemtitle": "Destinatario proto", + "edt_conf_fw_flat_title": "Lista dei client flatbuffer", + "edt_conf_fw_flat_expl": "Una destinazione flatbuffer per riga. Contiene IP:PORTA:(Esempio: 127.0.0.1:19401)", + "edt_conf_fw_flat_itemtitle": "Destinatario flatbuffer", "edt_conf_js_heading_title": "Server JSON", "edt_conf_ps_heading_title": "Server PROTO", "edt_conf_bobls_heading_title": "Srtver Boblight", diff --git a/config/hyperion.config.json.commented b/config/hyperion.config.json.commented index bc94c3fa..62c8a376 100644 --- a/config/hyperion.config.json.commented +++ b/config/hyperion.config.json.commented @@ -223,7 +223,7 @@ "forwarder" : { "enable" : false, - "proto" : ["127.0.0.1:19401"], + "flat" : ["127.0.0.1:19401"], "json" : ["127.0.0.1:19446"] }, diff --git a/config/hyperion.config.json.default b/config/hyperion.config.json.default index ddc1fdde..57916ad2 100644 --- a/config/hyperion.config.json.default +++ b/config/hyperion.config.json.default @@ -122,7 +122,7 @@ { "enable" : false, "json" : ["127.0.0.1:19446"], - "proto" : ["127.0.0.1:19401"] + "flat" : ["127.0.0.1:19401"] }, "jsonServer" : diff --git a/include/hyperion/MessageForwarder.h b/include/hyperion/MessageForwarder.h index 4a37fb76..eaf7ef4b 100644 --- a/include/hyperion/MessageForwarder.h +++ b/include/hyperion/MessageForwarder.h @@ -37,7 +37,7 @@ public: ~MessageForwarder(); void addJsonSlave(QString slave); - void addProtoSlave(QString slave); + void addFlatbufferSlave(QString slave); private slots: /// @@ -67,10 +67,10 @@ private slots: void forwardJsonMessage(const QJsonObject &message); /// - /// @brief Forward image to all proto slaves - /// @param image The PROTO image to send + /// @brief Forward image to all flatbuffer slaves + /// @param image The flatbuffer image to send /// - void forwardProtoMessage(const QString& name, const Image &image); + void forwardFlatbufferMessage(const QString& name, const Image &image); /// /// @brief Forward message to a single json slave @@ -93,7 +93,7 @@ private: QStringList _jsonSlaves; /// Proto connection for forwarding - QStringList _protoSlaves; + QStringList _flatSlaves; QList _forwardClients; /// Flag if forwarder is enabled diff --git a/libsrc/hyperion/MessageForwarder.cpp b/libsrc/hyperion/MessageForwarder.cpp index 22bb0c3d..9433ffe9 100644 --- a/libsrc/hyperion/MessageForwarder.cpp +++ b/libsrc/hyperion/MessageForwarder.cpp @@ -49,7 +49,7 @@ void MessageForwarder::handleSettingsUpdate(const settings::type &type, const QJ { // clear the current targets _jsonSlaves.clear(); - _protoSlaves.clear(); + _flatSlaves.clear(); while (!_forwardClients.isEmpty()) delete _forwardClients.takeFirst(); @@ -64,12 +64,12 @@ void MessageForwarder::handleSettingsUpdate(const settings::type &type, const QJ } } - if ( !obj["proto"].isNull() ) + if ( !obj["flat"].isNull() ) { - const QJsonArray & addr = obj["proto"].toArray(); + const QJsonArray & addr = obj["flat"].toArray(); for (const auto& entry : addr) { - addProtoSlave(entry.toString()); + addFlatbufferSlave(entry.toString()); } } @@ -80,11 +80,11 @@ void MessageForwarder::handleSettingsUpdate(const settings::type &type, const QJ } else if (_jsonSlaves.isEmpty() || ! obj["enable"].toBool() || !_forwarder_enabled) disconnect(_hyperion, &Hyperion::forwardJsonMessage, 0, 0); - if (!_protoSlaves.isEmpty() && obj["enable"].toBool() && _forwarder_enabled) + if (!_flatSlaves.isEmpty() && obj["enable"].toBool() && _forwarder_enabled) { - InfoIf(obj["enable"].toBool(true), _log, "Forward now to proto targets '%s'", QSTRING_CSTR(_protoSlaves.join(", "))); -// connect(_hyperion, &Hyperion::forwardProtoMessage, this, &MessageForwarder::forwardProtoMessage, Qt::UniqueConnection); - } else if ( _protoSlaves.isEmpty() || ! obj["enable"].toBool() || !_forwarder_enabled) + InfoIf(obj["enable"].toBool(true), _log, "Forward now to flatbuffer targets '%s'", QSTRING_CSTR(_flatSlaves.join(", "))); + } + else if ( _flatSlaves.isEmpty() || ! obj["enable"].toBool() || !_forwarder_enabled) { disconnect(_hyperion, &Hyperion::forwardSystemProtoMessage, 0, 0); disconnect(_hyperion, &Hyperion::forwardV4lProtoMessage, 0, 0); @@ -111,7 +111,7 @@ void MessageForwarder::handlePriorityChanges(const quint8 &priority) const QJsonObject obj = _hyperion->getSetting(settings::NETFORWARD).object(); if (priority != 0 && _forwarder_enabled && obj["enable"].toBool()) { - _protoSlaves.clear(); + _flatSlaves.clear(); while (!_forwardClients.isEmpty()) delete _forwardClients.takeFirst(); @@ -123,7 +123,7 @@ void MessageForwarder::handlePriorityChanges(const quint8 &priority) const QJsonArray & addr = obj["proto"].toArray(); for (const auto& entry : addr) { - addProtoSlave(entry.toString()); + addFlatbufferSlave(entry.toString()); } } @@ -132,13 +132,13 @@ void MessageForwarder::handlePriorityChanges(const quint8 &priority) case hyperion::COMP_GRABBER: { disconnect(_hyperion, &Hyperion::forwardV4lProtoMessage, 0, 0); - connect(_hyperion, &Hyperion::forwardSystemProtoMessage, this, &MessageForwarder::forwardProtoMessage, Qt::UniqueConnection); + connect(_hyperion, &Hyperion::forwardSystemProtoMessage, this, &MessageForwarder::forwardFlatbufferMessage, Qt::UniqueConnection); } break; case hyperion::COMP_V4L: { disconnect(_hyperion, &Hyperion::forwardSystemProtoMessage, 0, 0); - connect(_hyperion, &Hyperion::forwardV4lProtoMessage, this, &MessageForwarder::forwardProtoMessage, Qt::UniqueConnection); + connect(_hyperion, &Hyperion::forwardV4lProtoMessage, this, &MessageForwarder::forwardFlatbufferMessage, Qt::UniqueConnection); } break; default: @@ -185,7 +185,7 @@ void MessageForwarder::addJsonSlave(QString slave) _jsonSlaves << slave; } -void MessageForwarder::addProtoSlave(QString slave) +void MessageForwarder::addFlatbufferSlave(QString slave) { QStringList parts = slave.split(":"); if (parts.size() != 2) @@ -206,13 +206,13 @@ void MessageForwarder::addProtoSlave(QString slave) const QJsonObject &obj = _hyperion->getSetting(settings::FLATBUFSERVER).object(); if(QHostAddress(parts[0]) == QHostAddress::LocalHost && parts[1].toInt() == obj["port"].toInt()) { - Error(_log, "Loop between ProtoServer and Forwarder! (%s)",QSTRING_CSTR(slave)); + Error(_log, "Loop between Flatbuffer Server and Forwarder! (%s)",QSTRING_CSTR(slave)); return; } if (_forwarder_enabled) { - _protoSlaves << slave; + _flatSlaves << slave; FlatBufferConnection* flatbuf = new FlatBufferConnection("Forwarder", slave.toLocal8Bit().constData(), _priority, false); _forwardClients << flatbuf; } @@ -236,7 +236,7 @@ void MessageForwarder::forwardJsonMessage(const QJsonObject &message) } } -void MessageForwarder::forwardProtoMessage(const QString& name, const Image &image) +void MessageForwarder::forwardFlatbufferMessage(const QString& name, const Image &image) { if (_forwarder_enabled) { diff --git a/libsrc/hyperion/schema/schema-forwarder.json b/libsrc/hyperion/schema/schema-forwarder.json index 283ec40a..bd33e7bc 100644 --- a/libsrc/hyperion/schema/schema-forwarder.json +++ b/libsrc/hyperion/schema/schema-forwarder.json @@ -24,15 +24,15 @@ }, "propertyOrder" : 2 }, - "proto" : + "flat" : { "type" : "array", - "title" : "edt_conf_fw_proto_title", + "title" : "edt_conf_fw_flat_title", "required" : true, "default" : ["127.0.0.1:19401"], "items" : { "type": "string", - "title" : "edt_conf_fw_proto_itemtitle" + "title" : "edt_conf_fw_flat_itemtitle" }, "propertyOrder" : 3 }