gnuradio.blocks: Message Tools

gnuradio.blocks.message_burst_source(size_t itemsize, int msgq_limit) → message_burst_source_sptr

make(size_t itemsize, msg_queue_sptr msgq) -> message_burst_source_sptr

Turn received messages into a stream and tag them for UHD to send.

Constructor Specific Documentation:

Parameters:
  • itemsize
  • msgq_limit
message_burst_source_sptr.active_thread_priority(message_burst_source_sptr self) → int
message_burst_source_sptr.declare_sample_delay(message_burst_source_sptr self, int which, int delay)

declare_sample_delay(message_burst_source_sptr self, unsigned int delay)

message_burst_source_sptr.message_subscribers(message_burst_source_sptr self, swig_int_ptr which_port) → swig_int_ptr
message_burst_source_sptr.min_noutput_items(message_burst_source_sptr self) → int
message_burst_source_sptr.msgq(message_burst_source_sptr self) → msg_queue_sptr
message_burst_source_sptr.pc_input_buffers_full_avg(message_burst_source_sptr self, int which) → float

pc_input_buffers_full_avg(message_burst_source_sptr self) -> pmt_vector_float

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

pc_output_buffers_full_avg(message_burst_source_sptr self) -> pmt_vector_float

message_burst_source_sptr.pc_throughput_avg(message_burst_source_sptr self) → float
message_burst_source_sptr.pc_work_time_avg(message_burst_source_sptr self) → float
message_burst_source_sptr.pc_work_time_total(message_burst_source_sptr self) → float
message_burst_source_sptr.sample_delay(message_burst_source_sptr self, int which) → unsigned int
message_burst_source_sptr.set_min_noutput_items(message_burst_source_sptr self, int m)
message_burst_source_sptr.set_thread_priority(message_burst_source_sptr self, int priority) → int
message_burst_source_sptr.thread_priority(message_burst_source_sptr self) → int
gnuradio.blocks.message_debug() → message_debug_sptr

Debug block for the message passing system.

The message debug block is used to capture and print or store messages as they are received. Any block that generates a message may connect that message port to one or more of the three message input ports of this debug block. The message ports are:

Constructor Specific Documentation:

Build the message debug block. It takes no parameters and has three message ports: print, store, and print_pdu.

message_debug_sptr.active_thread_priority(message_debug_sptr self) → int
message_debug_sptr.declare_sample_delay(message_debug_sptr self, int which, int delay)

declare_sample_delay(message_debug_sptr self, unsigned int delay)

message_debug_sptr.get_message(message_debug_sptr self, int i) → swig_int_ptr

Get a message (as a PMT) from the message vector at index .

Messages passed to the ‘store’ port will be stored in a vector. This function retrieves those messages by index. They are index in order of when they were received (all messages are just pushed onto the back of a vector). This is mostly useful in debugging message passing graphs and in QA code.

message_debug_sptr.message_subscribers(message_debug_sptr self, swig_int_ptr which_port) → swig_int_ptr
message_debug_sptr.min_noutput_items(message_debug_sptr self) → int
message_debug_sptr.num_messages(message_debug_sptr self) → int

Reports the number of messages received by this block.

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

pc_input_buffers_full_avg(message_debug_sptr self) -> pmt_vector_float

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

pc_output_buffers_full_avg(message_debug_sptr self) -> pmt_vector_float

message_debug_sptr.pc_throughput_avg(message_debug_sptr self) → float
message_debug_sptr.pc_work_time_avg(message_debug_sptr self) → float
message_debug_sptr.pc_work_time_total(message_debug_sptr self) → float
message_debug_sptr.sample_delay(message_debug_sptr self, int which) → unsigned int
message_debug_sptr.set_min_noutput_items(message_debug_sptr self, int m)
message_debug_sptr.set_thread_priority(message_debug_sptr self, int priority) → int
message_debug_sptr.thread_priority(message_debug_sptr self) → int
gnuradio.blocks.message_sink(size_t itemsize, msg_queue_sptr msgq, bool dont_block) → message_sink_sptr

make(size_t itemsize, msg_queue_sptr msgq, bool dont_block, std::string const & lengthtagname) -> message_sink_sptr

Gather received items into messages and insert into msgq.

Constructor Specific Documentation:

Parameters:
  • itemsize
  • msgq
  • dont_block
message_sink_sptr.active_thread_priority(message_sink_sptr self) → int
message_sink_sptr.declare_sample_delay(message_sink_sptr self, int which, int delay)

declare_sample_delay(message_sink_sptr self, unsigned int delay)

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

pc_input_buffers_full_avg(message_sink_sptr self) -> pmt_vector_float

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

pc_output_buffers_full_avg(message_sink_sptr self) -> pmt_vector_float

message_sink_sptr.pc_throughput_avg(message_sink_sptr self) → float
message_sink_sptr.pc_work_time_avg(message_sink_sptr self) → float
message_sink_sptr.pc_work_time_total(message_sink_sptr self) → float
message_sink_sptr.sample_delay(message_sink_sptr self, int which) → unsigned int
message_sink_sptr.set_min_noutput_items(message_sink_sptr self, int m)
message_sink_sptr.set_thread_priority(message_sink_sptr self, int priority) → int
message_sink_sptr.thread_priority(message_sink_sptr self) → int
gnuradio.blocks.message_source(size_t itemsize, int msgq_limit=0) → message_source_sptr

make(size_t itemsize, msg_queue_sptr msgq) -> message_source_sptr make(size_t itemsize, msg_queue_sptr msgq, std::string const & lengthtagname) -> message_source_sptr

Turn received messages into a stream.

Constructor Specific Documentation:

Parameters:
  • itemsize
  • msgq_limit
message_source_sptr.active_thread_priority(message_source_sptr self) → int
message_source_sptr.declare_sample_delay(message_source_sptr self, int which, int delay)

declare_sample_delay(message_source_sptr self, unsigned int delay)

message_source_sptr.message_subscribers(message_source_sptr self, swig_int_ptr which_port) → swig_int_ptr
message_source_sptr.min_noutput_items(message_source_sptr self) → int
message_source_sptr.msgq(message_source_sptr self) → msg_queue_sptr
message_source_sptr.pc_input_buffers_full_avg(message_source_sptr self, int which) → float

pc_input_buffers_full_avg(message_source_sptr self) -> pmt_vector_float

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

pc_output_buffers_full_avg(message_source_sptr self) -> pmt_vector_float

message_source_sptr.pc_throughput_avg(message_source_sptr self) → float
message_source_sptr.pc_work_time_avg(message_source_sptr self) → float
message_source_sptr.pc_work_time_total(message_source_sptr self) → float
message_source_sptr.sample_delay(message_source_sptr self, int which) → unsigned int
message_source_sptr.set_min_noutput_items(message_source_sptr self, int m)
message_source_sptr.set_thread_priority(message_source_sptr self, int priority) → int
message_source_sptr.thread_priority(message_source_sptr self) → int
gnuradio.blocks.message_strobe(swig_int_ptr msg, float period_ms) → message_strobe_sptr

Send message at defined interval.

Takes a PMT message and sends it out every milliseconds. Useful for testing/debugging the message system.

Constructor Specific Documentation:

Make a message stobe block to send message every milliseconds.

Parameters:
  • msg – The message to send as a PMT.
  • period_ms – the time period in milliseconds in which to send .
message_strobe_sptr.active_thread_priority(message_strobe_sptr self) → int
message_strobe_sptr.declare_sample_delay(message_strobe_sptr self, int which, int delay)

declare_sample_delay(message_strobe_sptr self, unsigned int delay)

message_strobe_sptr.message_subscribers(message_strobe_sptr self, swig_int_ptr which_port) → swig_int_ptr
message_strobe_sptr.min_noutput_items(message_strobe_sptr self) → int
message_strobe_sptr.msg(message_strobe_sptr self) → swig_int_ptr

Get the value of the message being sent.

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

pc_input_buffers_full_avg(message_strobe_sptr self) -> pmt_vector_float

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

pc_output_buffers_full_avg(message_strobe_sptr self) -> pmt_vector_float

message_strobe_sptr.pc_throughput_avg(message_strobe_sptr self) → float
message_strobe_sptr.pc_work_time_avg(message_strobe_sptr self) → float
message_strobe_sptr.pc_work_time_total(message_strobe_sptr self) → float
message_strobe_sptr.period(message_strobe_sptr self) → float

Get the time interval of the strobe.

message_strobe_sptr.sample_delay(message_strobe_sptr self, int which) → unsigned int
message_strobe_sptr.set_min_noutput_items(message_strobe_sptr self, int m)
message_strobe_sptr.set_msg(message_strobe_sptr self, swig_int_ptr msg)

Reset the message being sent.

message_strobe_sptr.set_period(message_strobe_sptr self, float period_ms)

Reset the sending interval.

message_strobe_sptr.set_thread_priority(message_strobe_sptr self, int priority) → int
message_strobe_sptr.thread_priority(message_strobe_sptr self) → int
gnuradio.blocks.pdu_to_tagged_stream(gr::blocks::pdu::vector_type type, std::string const & lengthtagname="packet_len") → pdu_to_tagged_stream_sptr

Turns received PDUs into a tagged stream of items.

Constructor Specific Documentation:

Construct a pdu_to_tagged_stream block.

Parameters:
  • type – PDU type of pdu::vector_type
  • lengthtagname – The name of the tag that specifies how long the packet is. Defaults to ‘packet_len’.
pdu_to_tagged_stream_sptr.active_thread_priority(pdu_to_tagged_stream_sptr self) → int
pdu_to_tagged_stream_sptr.declare_sample_delay(pdu_to_tagged_stream_sptr self, int which, int delay)

declare_sample_delay(pdu_to_tagged_stream_sptr self, unsigned int delay)

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

pc_input_buffers_full_avg(pdu_to_tagged_stream_sptr self) -> pmt_vector_float

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

pc_output_buffers_full_avg(pdu_to_tagged_stream_sptr self) -> pmt_vector_float

pdu_to_tagged_stream_sptr.pc_throughput_avg(pdu_to_tagged_stream_sptr self) → float
pdu_to_tagged_stream_sptr.pc_work_time_avg(pdu_to_tagged_stream_sptr self) → float
pdu_to_tagged_stream_sptr.pc_work_time_total(pdu_to_tagged_stream_sptr self) → float
pdu_to_tagged_stream_sptr.sample_delay(pdu_to_tagged_stream_sptr self, int which) → unsigned int
pdu_to_tagged_stream_sptr.set_min_noutput_items(pdu_to_tagged_stream_sptr self, int m)
pdu_to_tagged_stream_sptr.set_thread_priority(pdu_to_tagged_stream_sptr self, int priority) → int
pdu_to_tagged_stream_sptr.thread_priority(pdu_to_tagged_stream_sptr self) → int
gnuradio.blocks.random_pdu(int mintime, int maxtime, char byte_mask=0xFF, int length_modulo=1) → random_pdu_sptr

Sends a random PDU at intervals.

Constructor Specific Documentation:

Construct a random PDU generator.

Parameters:
  • mintime
  • maxtime
  • byte_mask
  • length_modulo
random_pdu_sptr.active_thread_priority(random_pdu_sptr self) → int
random_pdu_sptr.declare_sample_delay(random_pdu_sptr self, int which, int delay)

declare_sample_delay(random_pdu_sptr self, unsigned int delay)

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

pc_input_buffers_full_avg(random_pdu_sptr self) -> pmt_vector_float

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

pc_output_buffers_full_avg(random_pdu_sptr self) -> pmt_vector_float

random_pdu_sptr.pc_throughput_avg(random_pdu_sptr self) → float
random_pdu_sptr.pc_work_time_avg(random_pdu_sptr self) → float
random_pdu_sptr.pc_work_time_total(random_pdu_sptr self) → float
random_pdu_sptr.sample_delay(random_pdu_sptr self, int which) → unsigned int
random_pdu_sptr.set_min_noutput_items(random_pdu_sptr self, int m)
random_pdu_sptr.set_thread_priority(random_pdu_sptr self, int priority) → int
random_pdu_sptr.thread_priority(random_pdu_sptr self) → int
gnuradio.blocks.tagged_stream_to_pdu(gr::blocks::pdu::vector_type type, std::string const & lengthtagname="packet_len") → tagged_stream_to_pdu_sptr

Turns received stream data and tags into PDUs and sends them through a message port.

The sent message is a PMT-pair (created by pmt::cons()). The first element is a dictionary containing all the tags. The second is a vector containing the actual data.

Constructor Specific Documentation:

Construct a tagged_stream_to_pdu block.

Parameters:
  • type – PDU type of pdu::vector_type
  • lengthtagname – The name of the tag that specifies how long the packet is.
tagged_stream_to_pdu_sptr.active_thread_priority(tagged_stream_to_pdu_sptr self) → int
tagged_stream_to_pdu_sptr.declare_sample_delay(tagged_stream_to_pdu_sptr self, int which, int delay)

declare_sample_delay(tagged_stream_to_pdu_sptr self, unsigned int delay)

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

pc_input_buffers_full_avg(tagged_stream_to_pdu_sptr self) -> pmt_vector_float

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

pc_output_buffers_full_avg(tagged_stream_to_pdu_sptr self) -> pmt_vector_float

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

Previous topic

gnuradio.blocks: File Operators

Next topic

gnuradio.blocks: Waveform Generators

This Page