gr-baz Package
UDP_SINK_NAME Class Reference

Write stream to an UDP socket. More...

#include <baz_udp_sink.h>

List of all members.

Public Member Functions

 ~UDP_SINK_NAME ()
int payload_size ()
 return the PAYLOAD_SIZE of the socket
void connect (const char *host, unsigned short port)
 Change the connection to a new destination.
void disconnect ()
 Send zero-length packet (if eof is requested) then stop sending.
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.
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 ( 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

Member Function Documentation

void UDP_SINK_NAME::allocate ( ) [protected]
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.

bool UDP_SINK_NAME::create ( ) [protected]
void UDP_SINK_NAME::destroy ( ) [protected]

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.

int UDP_SINK_NAME::payload_size ( ) [inline]

return the PAYLOAD_SIZE of the socket

void UDP_SINK_NAME::set_borip ( bool  enable)
void UDP_SINK_NAME::set_payload_size ( int  payload_size)
void UDP_SINK_NAME::set_status_msgq ( gr_msg_queue_sptr  queue)
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

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: