ZMQ REQ Message Source

From GNU Radio
Revision as of 16:40, 10 March 2020 by Duggabe (talk | contribs) (add information about Zeromq restrictions)
Jump to: navigation, search

The ZMQ REQ Message Source block receives messages from a ZMQ REQ socket and outputs async messages. This block will connect to a ZMQ REP Message Sink only.
The website says:
"The REQ-REP socket pair is in lockstep. The client issues zmq_send() and then zmq_recv(), in a loop (or once if that's all it needs). Doing any other sequence (e.g., sending two messages in a row) will result in a return code of -1 from the send or recv call. Similarly, the service issues zmq_recv() and then zmq_send() in that order, as often as it needs to."
That happens on a single port. Apparently the gr-zeromq implementation of ZMQ REQ Message Source and ZMQ REP Message Sink do not require that message flow. On a flowgraph, a message feed such as a Message Strobe block can send to a ZMQ REP Message Sink on a continuous basis. Similarly, a ZMQ REQ Message Source can receive a continuous succession of messages with no errors.
Because of the restriction, apparently there is no way an external process can communicate with the GR implementation.


(R): Run-time adjustable

ZMQ socket address specifier. The format of the address is tcp://*:port where * should be for localhost.
Socket timeout in milliseconds, default is 100ms.

Example Flowgraph

REQ REP msg demo fg.png

Source Files

C++ files
Header files
Public header files
Block definition