GNU Radio 3.6.5.1 C++ API
gr::blocks::udp_source_impl Class Reference

#include <udp_source_impl.h>

Inheritance diagram for gr::blocks::udp_source_impl:
gr::blocks::udp_source gr_sync_block gr_block gr_basic_block gr_msg_accepter gruel::msg_accepter

Public Member Functions

 udp_source_impl (size_t itemsize, const std::string &host, int port, int payload_size, bool eof)
 ~udp_source_impl ()
void connect (const std::string &host, int port)
 Change the connection to a new destination.
void disconnect ()
 Cut the connection if we have one set up.
int payload_size ()
 return the PAYLOAD_SIZE of the socket
int get_port ()
 return the port number of the socket
int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
 just like gr_block::general_work, only this arranges to call consume_each for you

Additional Inherited Members

- Public Types inherited from gr::blocks::udp_source
typedef boost::shared_ptr
< udp_source
sptr
- Static Public Member Functions inherited from gr::blocks::udp_source
static sptr make (size_t itemsize, const std::string &host, int port, int payload_size=1472, bool eof=true)
 UDP Source Constructor.
- Protected Types inherited from gr_basic_block
enum  vcolor { WHITE, GREY, BLACK }
- Protected Member Functions inherited from gr_sync_block
 gr_sync_block (void)
 gr_sync_block (const std::string &name, gr_io_signature_sptr input_signature, gr_io_signature_sptr output_signature)
- Protected Attributes inherited from gr_block
std::vector< long > d_max_output_buffer
std::vector< long > d_min_output_buffer
gruel::mutex d_setlock
gr_logger_ptr d_logger
gr_logger_ptr d_debug_logger

Constructor & Destructor Documentation

gr::blocks::udp_source_impl::udp_source_impl ( size_t  itemsize,
const std::string &  host,
int  port,
int  payload_size,
bool  eof 
)
gr::blocks::udp_source_impl::~udp_source_impl ( )

Member Function Documentation

void gr::blocks::udp_source_impl::connect ( const std::string &  host,
int  port 
)
virtual

Change the connection to a new destination.

Parameters
hostThe name or IP address of the receiving host; use NULL or None to break the connection without closing
portDestination port to connect to on receiving host

Calls disconnect() to terminate any current connection first.

Implements gr::blocks::udp_source.

void gr::blocks::udp_source_impl::disconnect ( )
virtual

Cut the connection if we have one set up.

Implements gr::blocks::udp_source.

int gr::blocks::udp_source_impl::get_port ( )
virtual

return the port number of the socket

Implements gr::blocks::udp_source.

int gr::blocks::udp_source_impl::payload_size ( )
inlinevirtual

return the PAYLOAD_SIZE of the socket

Implements gr::blocks::udp_source.

int gr::blocks::udp_source_impl::work ( int  noutput_items,
gr_vector_const_void_star input_items,
gr_vector_void_star output_items 
)
virtual

just like gr_block::general_work, only this arranges to call consume_each for you

The user must override work to define the signal processing code

Implements gr_sync_block.


The documentation for this class was generated from the following file: