Proto- and Flatbuffer now share their input to all instances

Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
Paulchen-Panther
2019-07-29 19:09:26 +02:00
parent f5d0fe34a8
commit ce2f0a17d5
16 changed files with 208 additions and 76 deletions

View File

@@ -34,12 +34,42 @@ public:
explicit ProtoClientConnection(QTcpSocket* socket, const int &timeout, QObject *parent);
signals:
///
/// @brief forward register data to HyperionDaemon
///
void registerGlobalInput(const int priority, const hyperion::Components& component, const QString& origin = "ProtoBuffer", const QString& owner = "", unsigned smooth_cfg = 0);
///
/// @brief Forward clear command to HyperionDaemon
///
void clearGlobalInput(const int priority);
///
/// @brief Forward clearAll command to HyperionDaemon
///
void clearAllGlobalInput(bool forceClearAll=false);
///
/// @brief forward prepared image to HyperionDaemon
///
const bool setGlobalInputImage(const int priority, const Image<ColorRgb>& image, const int timeout_ms, const bool& clearEffect = false);
///
/// @brief Forward requested color
///
void setGlobalInputColor(const int priority, const ColorRgb &ledColor, const int timeout_ms, const QString& origin = "ProtoBuffer" ,bool clearEffects = true);
///
/// @brief Emits whenever the client disconnected
///
void clientDisconnected();
public slots:
///
/// @brief Requests a registration from the client
///
void registationRequired(const int priority) { if (_priority == priority) _priority = -1; };
///
/// @brief close the socket and call disconnected()
///
@@ -127,9 +157,6 @@ private:
int _timeout;
int _priority;
/// Link to Hyperion for writing led-values to a priority channel
Hyperion* _hyperion;
/// The buffer used for reading data from the socket
QByteArray _receiveBuffer;
};