23#if (!defined(INCLUDED_GR_UDP_SOURCE_H) && !defined(IN_GR_BAZ)) || (!defined(INCLUDED_BAZ_UDP_SOURCE_H) && defined(IN_GR_BAZ))
25#define INCLUDED_BAZ_UDP_SOURCE_H
27#define INCLUDED_GR_UDP_SOURCE_H
30#include <gnuradio/sync_block.h>
31#include <gnuradio/thread/thread.h>
34#define UDP_SOURCE_NAME baz_udp_source
35#define UDP_SOURCE_MAKER baz_make_udp_source
36#define UDP_SOURCE_SPTR baz_udp_source_sptr
38#define UDP_SOURCE_NAME gr_udp_source
39#define UDP_SOURCE_MAKER gr_make_udp_source
40#define UDP_SOURCE_SPTR gr_udp_source_sptr
46#define UDP_SOURCE_STRING _TO_STR(UDP_SOURCE_NAME)
48#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
50typedef ptrdiff_t ssize_t;
67 int payload_size=1472,
68 bool eof=
true,
bool wait=
true,
bool bor=
false,
bool verbose=
false,
size_t buf_size = 0,
int mode =
UP_COMPAT);
94 bool eof,
bool wait,
bool bor,
bool verbose,
size_t buf_size,
int mode);
104 size_t d_temp_offset;
106 unsigned long d_bor_counter;
131 int payload_size,
bool eof,
bool wait,
bool bor,
bool verbose,
size_t buf_size,
int mode);
147 gr_vector_const_void_star &input_items,
148 gr_vector_void_star &output_items);
#define BAZ_API
Definition api.h:19
#define UDP_SOURCE_SPTR
Definition baz_udp_source.h:40
UDPProtocol
Definition baz_udp_source.h:58
@ UP_ATA
Definition baz_udp_source.h:62
@ UP_COMPAT
Definition baz_udp_source.h:59
@ UP_RAW
Definition baz_udp_source.h:60
@ UP_BORIP
Definition baz_udp_source.h:61
#define UDP_SOURCE_MAKER
Definition baz_udp_source.h:39
boost::shared_ptr< UDP_SOURCE_NAME > UDP_SOURCE_SPTR
Definition baz_udp_source.h:56
Read stream from an UDP socket.
Definition baz_udp_source.h:89
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
int get_port()
return the port number of the socket
UDP_SOURCE_NAME(size_t itemsize, const char *host, unsigned short port, int payload_size, bool eof, bool wait, bool bor, bool verbose, size_t buf_size, int mode)
UDP Source Constructor.
friend BAZ_API UDP_SOURCE_SPTR UDP_SOURCE_MAKER(size_t itemsize, const char *host, unsigned short port, int payload_size, bool eof, bool wait, bool bor, bool verbose, size_t buf_size, int mode)
int payload_size()
return the PAYLOAD_SIZE of the socket
Definition baz_udp_source.h:137