GNU Radio Manual and C++ API Reference
3.9.1.0
The Free & Open Software Radio Ecosystem
push_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_PUSH_SINK_H
12
#define INCLUDED_ZEROMQ_PUSH_SINK_H
13
14
#include <
gnuradio/sync_block.h
>
15
#include <
gnuradio/zeromq/api.h
>
16
17
namespace
gr
{
18
namespace
zeromq {
19
20
/*!
21
* \brief Sink the contents of a stream to a ZMQ PUSH socket
22
* \ingroup zeromq
23
*
24
* \details
25
* This block acts a a streaming sink for a GNU Radio flowgraph
26
* and writes its contents to a ZMQ PUSH socket. A PUSH socket
27
* will round-robin send its messages to each connected ZMQ PULL
28
* socket, either another gr-zeromq source block or a regular,
29
* non-GNU Radio ZMQ socket.
30
*
31
*/
32
class
ZEROMQ_API
push_sink
:
virtual
public
gr::sync_block
33
{
34
public
:
35
typedef
std::shared_ptr<push_sink>
sptr
;
36
37
/*!
38
* \brief Return a shared_ptr to a new instance of gr::zeromq::push_sink
39
*
40
* \param itemsize Size of a stream item in bytes.
41
* \param vlen Vector length of the input items. Note that one vector is one item.
42
* \param address ZMQ socket address specifier.
43
* \param timeout Receive timeout in milliseconds, default is 100ms, 1us increments.
44
* \param pass_tags Whether sink will serialize and pass tags over the link.
45
* \param hwm High Watermark to configure the socket to (-1 => zmq's default)
46
*/
47
static
sptr
make(
size_t
itemsize
,
48
size_t
vlen,
49
char
* address,
50
int
timeout = 100,
51
bool
pass_tags =
false
,
52
int
hwm = -1);
53
54
/*!
55
* \brief Return a std::string of ZMQ_LAST_ENDPOINT from the underlying ZMQ socket.
56
*/
57
virtual
std::string last_endpoint() = 0;
58
};
59
60
}
// namespace zeromq
61
}
// namespace gr
62
63
#endif
/* INCLUDED_ZEROMQ_PUSH_SINK_H */
gr::blocks::pdu::itemsize
BLOCKS_API size_t itemsize(vector_type type)
api.h
ZEROMQ_API
#define ZEROMQ_API
Definition:
gr-zeromq/include/gnuradio/zeromq/api.h:18
gr::sync_block
synchronous 1:1 input to output with history
Definition:
sync_block.h:25
gr::zeromq::push_sink
Sink the contents of a stream to a ZMQ PUSH socket.
Definition:
push_sink.h:32
sync_block.h
gr::zeromq::push_sink::sptr
std::shared_ptr< push_sink > sptr
Definition:
push_sink.h:35
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition:
basic_block.h:29
gr-zeromq
include
gnuradio
zeromq
push_sink.h
Generated by
1.8.17