gnuradio.blocks: Networking Tools

gnuradio.blocks.socket_pdu(std::string type, std::string addr, std::string port, int MTU=10000) → socket_pdu_sptr

Creates socket interface and translates traffic to PDUs.

Constructor Specific Documentation:

Construct a SOCKET PDU interface.

Parameters:
  • type – “TCP_SERVER”, “TCP_CLIENT”, “UDP_SERVER”, or “UDP_CLIENT”
  • addr – network address to use
  • port – network port to use
  • MTU – maximum transmission unit
socket_pdu_sptr.active_thread_priority(socket_pdu_sptr self) → int
socket_pdu_sptr.declare_sample_delay(socket_pdu_sptr self, int which, int delay)

declare_sample_delay(socket_pdu_sptr self, unsigned int delay)

socket_pdu_sptr.message_subscribers(socket_pdu_sptr self, swig_int_ptr which_port) → swig_int_ptr
socket_pdu_sptr.min_noutput_items(socket_pdu_sptr self) → int
socket_pdu_sptr.pc_input_buffers_full_avg(socket_pdu_sptr self, int which) → float

pc_input_buffers_full_avg(socket_pdu_sptr self) -> pmt_vector_float

socket_pdu_sptr.pc_noutput_items_avg(socket_pdu_sptr self) → float
socket_pdu_sptr.pc_nproduced_avg(socket_pdu_sptr self) → float
socket_pdu_sptr.pc_output_buffers_full_avg(socket_pdu_sptr self, int which) → float

pc_output_buffers_full_avg(socket_pdu_sptr self) -> pmt_vector_float

socket_pdu_sptr.pc_work_time_avg(socket_pdu_sptr self) → float
socket_pdu_sptr.pc_work_time_total(socket_pdu_sptr self) → float
socket_pdu_sptr.sample_delay(socket_pdu_sptr self, int which) → unsigned int
socket_pdu_sptr.set_min_noutput_items(socket_pdu_sptr self, int m)
socket_pdu_sptr.set_thread_priority(socket_pdu_sptr self, int priority) → int
socket_pdu_sptr.thread_priority(socket_pdu_sptr self) → int
gnuradio.blocks.tuntap_pdu(std::string dev, int MTU=10000) → tuntap_pdu_sptr

Creates TUNTAP interface and translates traffic to PDUs.

Constructor Specific Documentation:

Construct a TUNTAP PDU interface.

Parameters:
  • dev – Device name to create
  • MTU – Maximum Transmission Unit size
tuntap_pdu_sptr.active_thread_priority(tuntap_pdu_sptr self) → int
tuntap_pdu_sptr.declare_sample_delay(tuntap_pdu_sptr self, int which, int delay)

declare_sample_delay(tuntap_pdu_sptr self, unsigned int delay)

tuntap_pdu_sptr.message_subscribers(tuntap_pdu_sptr self, swig_int_ptr which_port) → swig_int_ptr
tuntap_pdu_sptr.min_noutput_items(tuntap_pdu_sptr self) → int
tuntap_pdu_sptr.pc_input_buffers_full_avg(tuntap_pdu_sptr self, int which) → float

pc_input_buffers_full_avg(tuntap_pdu_sptr self) -> pmt_vector_float

tuntap_pdu_sptr.pc_noutput_items_avg(tuntap_pdu_sptr self) → float
tuntap_pdu_sptr.pc_nproduced_avg(tuntap_pdu_sptr self) → float
tuntap_pdu_sptr.pc_output_buffers_full_avg(tuntap_pdu_sptr self, int which) → float

pc_output_buffers_full_avg(tuntap_pdu_sptr self) -> pmt_vector_float

tuntap_pdu_sptr.pc_work_time_avg(tuntap_pdu_sptr self) → float
tuntap_pdu_sptr.pc_work_time_total(tuntap_pdu_sptr self) → float
tuntap_pdu_sptr.sample_delay(tuntap_pdu_sptr self, int which) → unsigned int
tuntap_pdu_sptr.set_min_noutput_items(tuntap_pdu_sptr self, int m)
tuntap_pdu_sptr.set_thread_priority(tuntap_pdu_sptr self, int priority) → int
tuntap_pdu_sptr.thread_priority(tuntap_pdu_sptr self) → int
gnuradio.blocks.udp_sink(size_t itemsize, std::string const & host, int port, int payload_size=1472, bool eof=True) → udp_sink_sptr

Write stream to an UDP socket.

Constructor Specific Documentation:

UDP Sink Constructor.

Parameters:
  • itemsize – The size (in bytes) of the item datatype
  • host – The name or IP address of the receiving host; use NULL or None for no connection
  • port – Destination port to connect to on receiving host
  • payload_size – UDP payload size by default set to 1472 = (1500 MTU - (8 byte UDP header) - (20 byte IP header))
  • eof – Send zero-length packet on disconnect
udp_sink_sptr.active_thread_priority(udp_sink_sptr self) → int
udp_sink_sptr.connect(udp_sink_sptr self, std::string const & host, int port)

Change the connection to a new destination.

Calls disconnect() to terminate any current connection first.

udp_sink_sptr.declare_sample_delay(udp_sink_sptr self, int which, int delay)

declare_sample_delay(udp_sink_sptr self, unsigned int delay)

udp_sink_sptr.disconnect(udp_sink_sptr self)

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.

udp_sink_sptr.message_subscribers(udp_sink_sptr self, swig_int_ptr which_port) → swig_int_ptr
udp_sink_sptr.min_noutput_items(udp_sink_sptr self) → int
udp_sink_sptr.payload_size(udp_sink_sptr self) → int

return the PAYLOAD_SIZE of the socket

udp_sink_sptr.pc_input_buffers_full_avg(udp_sink_sptr self, int which) → float

pc_input_buffers_full_avg(udp_sink_sptr self) -> pmt_vector_float

udp_sink_sptr.pc_noutput_items_avg(udp_sink_sptr self) → float
udp_sink_sptr.pc_nproduced_avg(udp_sink_sptr self) → float
udp_sink_sptr.pc_output_buffers_full_avg(udp_sink_sptr self, int which) → float

pc_output_buffers_full_avg(udp_sink_sptr self) -> pmt_vector_float

udp_sink_sptr.pc_work_time_avg(udp_sink_sptr self) → float
udp_sink_sptr.pc_work_time_total(udp_sink_sptr self) → float
udp_sink_sptr.sample_delay(udp_sink_sptr self, int which) → unsigned int
udp_sink_sptr.set_min_noutput_items(udp_sink_sptr self, int m)
udp_sink_sptr.set_thread_priority(udp_sink_sptr self, int priority) → int
udp_sink_sptr.thread_priority(udp_sink_sptr self) → int
gnuradio.blocks.udp_source(size_t itemsize, std::string const & host, int port, int payload_size=1472, bool eof=True) → udp_source_sptr

Read stream from an UDP socket.

Constructor Specific Documentation:

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)
udp_source_sptr.active_thread_priority(udp_source_sptr self) → int
udp_source_sptr.connect(udp_source_sptr self, std::string const & host, int port)

Change the connection to a new destination.

Calls disconnect() to terminate any current connection first.

udp_source_sptr.declare_sample_delay(udp_source_sptr self, int which, int delay)

declare_sample_delay(udp_source_sptr self, unsigned int delay)

udp_source_sptr.disconnect(udp_source_sptr self)

Cut the connection if we have one set up.

udp_source_sptr.get_port(udp_source_sptr self) → int

return the port number of the socket

udp_source_sptr.message_subscribers(udp_source_sptr self, swig_int_ptr which_port) → swig_int_ptr
udp_source_sptr.min_noutput_items(udp_source_sptr self) → int
udp_source_sptr.payload_size(udp_source_sptr self) → int

return the PAYLOAD_SIZE of the socket

udp_source_sptr.pc_input_buffers_full_avg(udp_source_sptr self, int which) → float

pc_input_buffers_full_avg(udp_source_sptr self) -> pmt_vector_float

udp_source_sptr.pc_noutput_items_avg(udp_source_sptr self) → float
udp_source_sptr.pc_nproduced_avg(udp_source_sptr self) → float
udp_source_sptr.pc_output_buffers_full_avg(udp_source_sptr self, int which) → float

pc_output_buffers_full_avg(udp_source_sptr self) -> pmt_vector_float

udp_source_sptr.pc_work_time_avg(udp_source_sptr self) → float
udp_source_sptr.pc_work_time_total(udp_source_sptr self) → float
udp_source_sptr.sample_delay(udp_source_sptr self, int which) → unsigned int
udp_source_sptr.set_min_noutput_items(udp_source_sptr self, int m)
udp_source_sptr.set_thread_priority(udp_source_sptr self, int priority) → int
udp_source_sptr.thread_priority(udp_source_sptr self) → int

Previous topic

gnuradio.blocks: Audio Signals

Next topic

gnuradio.blocks: Boolean Operators

This Page