5 #include <Poco/Event.h>
6 #include <Poco/Mutex.h>
8 #include "gwmessage/GWMessage.h"
9 #include "server/GWSConnector.h"
10 #include "server/GWSPriorityAssigner.h"
11 #include "util/Loggable.h"
44 void setOutputsCount(
int count);
45 void setPriorityAssigner(GWSPriorityAssigner::Ptr assigner);
57 void send(
const GWMessage::Ptr message)
override;
89 Poco::Event m_outputsUpdated;
90 mutable Poco::Mutex m_outputLock;
93 unsigned int m_outputsCount;
94 std::vector<std::queue<GWMessage::Ptr>> m_outputs;
95 std::vector<size_t> m_outputsStatus;
96 GWSPriorityAssigner::Ptr m_priorityAssigner;
void popOutput(size_t i)
Pop the first (oldest) message in the queue of the given index.
Definition: AbstractGWSConnector.cpp:143
Most GWSConnector implementations would solve the issue of sending prioritization and asynchronous qu...
Definition: AbstractGWSConnector.h:38
bool outputValid(size_t i) const
Definition: AbstractGWSConnector.cpp:128
void setupQueues()
Setup queues based on configuration. This must be called before the connector is started.
Definition: AbstractGWSConnector.cpp:29
GWSConnector is an abstract class that defines an API for communication with a remote server...
Definition: GWSConnector.h:21
Definition: Loggable.h:19
void updateOutputs(size_t i)
Definition: AbstractGWSConnector.cpp:110
void send(const GWMessage::Ptr message) override
Put the message into a queue and notify sender to check queues for updates.
Definition: AbstractGWSConnector.cpp:151
GWMessage::Ptr peekOutput(size_t i) const
Definition: AbstractGWSConnector.cpp:135
size_t selectOutput() const
Definition: AbstractGWSConnector.cpp:48