#include <gr_udp_source.h>


Public Member Functions | |
| ~gr_udp_source () | |
| bool | open () |
| open a socket specified by the port and ip address info | |
| void | close () |
| Close current socket. | |
| int | payload_size () |
| return the PAYLOAD_SIZE 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 | |
Protected Member Functions | |
| gr_udp_source (size_t itemsize, const char *src, unsigned short port_src, int payload_size) | |
| UDP Source Constructor. | |
Friends | |
| gr_udp_source_sptr | gr_make_udp_source (size_t itemsize, const char *src, unsigned short port_src, int payload_size) |
| itemsize | The size (in bytes) of the item datatype | |
| src | The source address as either the host name or the 'numbers-and-dots' IP address | |
| port_src | The port number on which the socket listens for data | |
| payload_size | UDP payload size by default set to 1472 = (1500 MTU - (8 byte UDP header) - (20 byte IP header)) |
| gr_udp_source::gr_udp_source | ( | size_t | itemsize, | |
| const char * | src, | |||
| unsigned short | port_src, | |||
| int | payload_size | |||
| ) | [protected] |
UDP Source Constructor.
| itemsize | The size (in bytes) of the item datatype | |
| src | The source address as either the host name or the 'numbers-and-dots' IP address | |
| port_src | The port number on which the socket listens for data | |
| payload_size | UDP payload size by default set to 1472 = (1500 MTU - (8 byte UDP header) - (20 byte IP header)) |
| gr_udp_source::~gr_udp_source | ( | ) |
| void gr_udp_source::close | ( | ) |
Close current socket.
Shuts down read/write on the socket
| bool gr_udp_source::open | ( | ) |
open a socket specified by the port and ip address info
Opens a socket, binds to the address, and waits for a connection over UDP. If any of these fail, the fuction retuns the error and exits.
| int gr_udp_source::payload_size | ( | ) | [inline] |
return the PAYLOAD_SIZE of the socket
| int gr_udp_source::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.
| gr_udp_source_sptr gr_make_udp_source | ( | size_t | itemsize, | |
| const char * | src, | |||
| unsigned short | port_src, | |||
| int | payload_size | |||
| ) | [friend] |
1.5.8