2016-02-15 18:25:18 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// STL includes
|
|
|
|
#include <vector>
|
|
|
|
#include <map>
|
|
|
|
#include <cstdint>
|
|
|
|
#include <limits>
|
|
|
|
|
|
|
|
// QT includes
|
|
|
|
#include <QList>
|
|
|
|
#include <QStringList>
|
2016-02-15 20:53:03 +01:00
|
|
|
#include <QHostAddress>
|
2016-02-15 18:25:18 +01:00
|
|
|
|
|
|
|
// Utils includes
|
|
|
|
#include <utils/ColorRgb.h>
|
|
|
|
class MessageForwarder
|
|
|
|
{
|
|
|
|
public:
|
2016-02-15 20:53:03 +01:00
|
|
|
|
|
|
|
struct JsonSlaveAddress {
|
|
|
|
QHostAddress addr;
|
2016-02-16 14:16:59 +01:00
|
|
|
quint16 port;
|
2016-02-15 20:53:03 +01:00
|
|
|
};
|
|
|
|
|
2016-02-15 18:25:18 +01:00
|
|
|
MessageForwarder();
|
|
|
|
~MessageForwarder();
|
|
|
|
|
|
|
|
void addJsonSlave(std::string slave);
|
|
|
|
void addProtoSlave(std::string slave);
|
|
|
|
void sendMessage();
|
|
|
|
|
|
|
|
QStringList getProtoSlaves();
|
2016-02-15 20:53:03 +01:00
|
|
|
QList<MessageForwarder::JsonSlaveAddress> getJsonSlaves();
|
2016-02-15 18:25:18 +01:00
|
|
|
|
|
|
|
private:
|
2016-02-15 20:53:03 +01:00
|
|
|
QStringList _protoSlaves;
|
|
|
|
QList<MessageForwarder::JsonSlaveAddress> _jsonSlaves;
|
2016-02-15 18:25:18 +01:00
|
|
|
};
|