gr-baz Package

Public Member Functions | Protected Member Functions | Friends | List of all members
UDP_SOURCE_NAME Class Reference

Read stream from an UDP socket. More...

`#include <baz_udp_source.h>`

Inheritance diagram for UDP_SOURCE_NAME:
[legend]

## Public Member Functions
| ~UDP_SOURCE_NAME ()
int | payload_size ()
| return the PAYLOAD_SIZE of the socket More...
int | get_port ()
| return the port number of the socket More...
void | signal_eos ()
int | work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)

## Protected Member Functions
| 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. More...

## Friends
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)

## Detailed Description

Read stream from an UDP socket.

Parameters

  itemsize | The size (in bytes) of the item datatype
  host | The name or IP address of the receiving host; can be NULL, None, or "0.0.0.0" to allow reading from any interface on the host
  port | The port number on which to receive data; use 0 to have the system assign an unused port number
  payload_size | UDP payload size by default set to 1472 = (1500 MTU - (8 byte UDP header) - (20 byte IP header))
  eof | Interpret zero-length packet as EOF (default: true)
  wait | Wait for data if not immediately available (default: true)

## Constructor & Destructor Documentation

## ◆ UDP_SOURCE_NAME()

UDP_SOURCE_NAME::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
| ) |  |
| protected

UDP Source Constructor.

Parameters

  itemsize | The size (in bytes) of the item datatype
  host | The name or IP address of the receiving host; can be NULL, None, or "0.0.0.0" to allow reading from any interface on the host
  port | The port number on which to receive data; use 0 to have the system assign an unused port number
  payload_size | UDP payload size by default set to 1472 = (1500 MTU - (8 byte UDP header) - (20 byte IP header))
  eof | Interpret zero-length packet as EOF (default: true)
  wait | Wait for data if not immediately available (default: true)
  bor | Enable BorIP encapsulation
  verbose | Output BorIP packet debug messages (helpful to judge packet loss)

## ◆ ~UDP_SOURCE_NAME()

UDP_SOURCE_NAME::~UDP_SOURCE_NAME | ( |  | ) |

## Member Function Documentation

## ◆ get_port()

int UDP_SOURCE_NAME::get_port | ( |  | ) |

return the port number of the socket

## ◆ payload_size()

int UDP_SOURCE_NAME::payload_size | ( |  | ) |
| inline

return the PAYLOAD_SIZE of the socket

## ◆ signal_eos()

void UDP_SOURCE_NAME::signal_eos | ( |  | ) |

## ◆ work()

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

## Friends And Related Function Documentation

## ◆ UDP_SOURCE_MAKER

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
| ) |  |
| friend

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

- baz_udp_source.h