GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
rep_msg_sink.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2013,2014 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio.
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef INCLUDED_ZEROMQ_REP_MSG_SINK_H
12#define INCLUDED_ZEROMQ_REP_MSG_SINK_H
13
14#include <gnuradio/block.h>
15#include <gnuradio/zeromq/api.h>
16
17namespace gr {
18namespace zeromq {
19
20/*!
21 * \brief Sink the contents of a msg port to a ZMQ REP socket
22 * \ingroup zeromq
23 *
24 * \details
25 * This block acts a message port receiver and writes individual
26 * messages to a ZMQ REP socket. The corresponding receiving ZMQ
27 * REQ socket can be either another gr-zeromq source block or a
28 * non-GNU Radio ZMQ socket.
29 */
30class ZEROMQ_API rep_msg_sink : virtual public gr::block
31{
32public:
33 typedef std::shared_ptr<rep_msg_sink> sptr;
34
35 /*!
36 * \brief Return a shared_ptr to a new instance of zeromq::rep_msg_sink.
37 *
38 * \param address ZMQ socket address specifier
39 * \param timeout Receive timeout in milliseconds, default is 100ms, 1us increments
40 * \param bind If true this block will bind to the address, otherwise it will
41 * connect; the default is to bind
42 *
43 */
44 static sptr make(char* address, int timeout = 100, bool bind = true);
45
46 /*!
47 * \brief Return a std::string of ZMQ_LAST_ENDPOINT from the underlying ZMQ socket.
48 */
49 virtual std::string last_endpoint() = 0;
50};
51
52} // namespace zeromq
53} // namespace gr
54
55#endif /* INCLUDED_ZEROMQ_REP_MSG_SINK_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:63
Sink the contents of a msg port to a ZMQ REP socket.
Definition: rep_msg_sink.h:31
std::shared_ptr< rep_msg_sink > sptr
Definition: rep_msg_sink.h:33
static sptr make(char *address, int timeout=100, bool bind=true)
Return a shared_ptr to a new instance of zeromq::rep_msg_sink.
virtual std::string last_endpoint()=0
Return a std::string of ZMQ_LAST_ENDPOINT from the underlying ZMQ socket.
#define ZEROMQ_API
Definition: gr-zeromq/include/gnuradio/zeromq/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29