gr-baz Package
UDP_SINK_NAME Class Reference

Write stream to an UDP socket. More...

#include <baz_udp_sink.h>

Inheritance diagram for UDP_SINK_NAME:

Public Member Functions

 ~UDP_SINK_NAME ()
 
int payload_size ()
 return the PAYLOAD_SIZE of the socket More...
 
void connect (const char *host, unsigned short port)
 Change the connection to a new destination. More...
 
void disconnect ()
 Send zero-length packet (if eof is requested) then stop sending. More...
 
void set_borip (bool enable)
 
void set_payload_size (int payload_size)
 
void set_status_msgq (gr::msg_queue::sptr queue)
 
int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
 

Protected Member Functions

 UDP_SINK_NAME (size_t itemsize, const char *host, unsigned short port, int payload_size, bool eof, bool bor)
 UDP Sink Constructor. More...
 
bool create ()
 
void allocate ()
 
void destroy ()
 

Friends

BAZ_API UDP_SINK_SPTR UDP_SINK_MAKER (size_t itemsize, const char *host, unsigned short port, int payload_size, bool eof, bool bor)
 

Detailed Description

Write stream to an UDP socket.

Parameters
itemsizeThe size (in bytes) of the item datatype
hostThe name or IP address of the receiving host; use NULL or None for no connection
portDestination port to connect to on receiving host
payload_sizeUDP payload size by default set to 1472 = (1500 MTU - (8 byte UDP header) - (20 byte IP header))
eofSend zero-length packet on disconnect

Constructor & Destructor Documentation

◆ UDP_SINK_NAME()

UDP_SINK_NAME::UDP_SINK_NAME ( size_t  itemsize,
const char *  host,
unsigned short  port,
int  payload_size,
bool  eof,
bool  bor 
)
protected

UDP Sink Constructor.

Parameters
itemsizeThe size (in bytes) of the item datatype
hostThe name or IP address of the receiving host; use NULL or None for no connection
portDestination port to connect to on receiving host
payload_sizeUDP payload size by default set to 1472 = (1500 MTU - (8 byte UDP header) - (20 byte IP header))
eofSend zero-length packet on disconnect
borEnable BorIP encapsulation

◆ ~UDP_SINK_NAME()

UDP_SINK_NAME::~UDP_SINK_NAME ( )

Member Function Documentation

◆ allocate()

void UDP_SINK_NAME::allocate ( )
protected

◆ connect()

void UDP_SINK_NAME::connect ( const char *  host,
unsigned short  port 
)

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.

◆ create()

bool UDP_SINK_NAME::create ( )
protected

◆ destroy()

void UDP_SINK_NAME::destroy ( )
protected

◆ disconnect()

void UDP_SINK_NAME::disconnect ( )

Send zero-length packet (if eof is requested) then stop sending.

Zero-byte packets can be interpreted as EOF by gr_udp_source. Note that disconnect occurs automatically when the sink is destroyed, but not when its top_block stops.

◆ payload_size()

int UDP_SINK_NAME::payload_size ( )
inline

return the PAYLOAD_SIZE of the socket

◆ set_borip()

void UDP_SINK_NAME::set_borip ( bool  enable)

◆ set_payload_size()

void UDP_SINK_NAME::set_payload_size ( int  payload_size)

◆ set_status_msgq()

void UDP_SINK_NAME::set_status_msgq ( gr::msg_queue::sptr  queue)

◆ work()

int UDP_SINK_NAME::work ( int  noutput_items,
gr_vector_const_void_star &  input_items,
gr_vector_void_star &  output_items 
)

Friends And Related Function Documentation

◆ UDP_SINK_MAKER

BAZ_API UDP_SINK_SPTR UDP_SINK_MAKER ( size_t  itemsize,
const char *  host,
unsigned short  port,
int  payload_size,
bool  eof,
bool  bor 
)
friend

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