|
void | initFromConsole (const std::string &description, int argc, char *argv[]) |
| Should be called before the main() function to initialize the connections using the paremeters given on command line. More...
|
|
void | main () |
| Start the main loop polling on the output and monitoring connections and eventually also on the input if the output is ready. More...
|
|
|
void | initialize () final |
| Initialize the two connections using the command line arguments.
|
|
void | addOptions (po::options_description &desc) final |
| Add the parameters to the cmd line arguments.
|
|
void | handleExternalSignal (EMessageTypes type) final |
| Send a stop message on stop or clear the counters on start from the monitoring connection.
|
|
void | handleInput () final |
| Pass the message from the input connection to the output connection (if there is a message)
|
|
void | handleTimeout () final |
| When a timeout is set (= we are waiting for all messages after a stop), send a stop message once we have not seen any more events.
|
|
virtual void | handleOutput () |
| Will get called for every message on the output connection. Can be overridden in a derived class. Calls handleIncomingData by default.
|
|
virtual void | fillMonitoringJSON (std::stringstream &buffer) const |
| Using the connections, fill up a buffer with the content to be monitored.
|
|
bool | terminated () const |
| Check if the main loop will be exited on next occasion. Can be set via the "m_terminate" flag.
|
|
void | resetTimer () |
| Helper function to reset the start time and the remaining time.
|
|
void | pollEvent (bool pollOnInput) |
| Poll until a single event is retreived.
|
|
|
std::shared_ptr< ZMQParent > | m_parent |
| Pointer to the ZMQParent to be used as base for all connections.
|
|
std::unique_ptr< ZMQRawInput > | m_input |
| Pointer to the input connection. Should be set in initialize.
|
|
std::unique_ptr< ZMQConfirmedOutput > | m_output |
| Pointer to the output connection. Should be set in initialize.
|
|
std::unique_ptr< ZMQSimpleConnection > | m_monitor |
| Pointer to the monitoring connection. Should be set in initialize.
|
|
bool | m_terminate |
| Can be set by functions to terminate the main loop at the next possibility.
|
|
unsigned int | m_timeout |
| If set to a value != 0, will call handleTimeout with this frequency (in seconds).
|
|
bool | m_monitorHasPriority |
| Flag to break out of the polling loop to check for monitoring messages. Except for the finalcollector you probably do not want this.
|
|
|
bool | checkTimer () |
| Helper function to check, if the timeout should happen.
|
|
void | updateTimer () |
| Helper function to update the remaining time.
|
|
void | handleMonitoring () |
| Handle an incoming message on the monitoring socket by either calling handleExternalSignal() or by passing on the monitor JSONs of the connections.
|
|
Definition at line 59 of file ZMQDistributor.h.
◆ initFromConsole()
void initFromConsole |
( |
const std::string & |
description, |
|
|
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
|
inherited |
Should be called before the main() function to initialize the connections using the paremeters given on command line.
Custom implementations should implement the addOptions function to pass the command line arguments correctly. Calls the initialize function (which should also be overridden).
Definition at line 54 of file ZMQApp.details.h.
◆ main()
Start the main loop polling on the output and monitoring connections and eventually also on the input if the output is ready.
Calls the functions handleExternalSignal, handleInput, handleOutput and handleTimeout as described in the documentation of this class.
Definition at line 61 of file ZMQApp.details.h.
The documentation for this class was generated from the following files: