GNU Radio C++ API Reference 3.10.10.0
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
tags_to_pdu.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2021 NTESS LLC.
4 *
5 * This file is part of GNU Radio
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef INCLUDED_PDU_TAGS_TO_PDU_H
12#define INCLUDED_PDU_TAGS_TO_PDU_H
13
14#include <gnuradio/pdu/api.h>
15#include <gnuradio/sync_block.h>
16
17namespace gr {
18namespace pdu {
19
20/*!
21 * \brief Tags to PDU
22 * \ingroup pdu_blk
23 *
24 * This block will generate a PDU (of up to Max PDU Size) based on input
25 * tags. No tag alignment in input buffer is necessary.
26 *
27 */
28template <class T>
29class PDU_API tags_to_pdu : virtual public gr::sync_block
30{
31public:
32 typedef std::shared_ptr<tags_to_pdu<T>> sptr;
33
34 /*!
35 * \brief Return a shared_ptr to a new instance of pdu_utils::tags_to_pdu.
36 *
37 * @param start_tag - PMT Key of the start tag
38 * @param end_tag - PMT Key of the end tag
39 * @param max_pdu_size - maximum number of items in PDU
40 * @param samp_rate - sample rate of input data stream
41 * @param prepend - data vector to prepend to the PDU
42 * @param pub_start_msg - publish message when start tag is received
43 * @param tail_size -
44 * @param start_time - time to start burst
45 */
46 static sptr make(pmt::pmt_t start_tag,
47 pmt::pmt_t end_tag,
48 uint32_t max_pdu_size,
49 double samp_rate,
50 std::vector<T> prepend,
51 bool pub_start_msg,
52 uint32_t tail_size,
53 double start_time);
54
55 virtual void set_eob_parameters(uint32_t, uint32_t) = 0;
56 virtual uint32_t get_eob_offset(void) = 0;
57 virtual uint32_t get_eob_alignment(void) = 0;
58
59 virtual void set_start_tag(pmt::pmt_t tag) = 0;
60 virtual void set_end_tag(pmt::pmt_t tag) = 0;
61 virtual void set_time_tag_key(pmt::pmt_t tag) = 0;
62 virtual void set_prepend(std::vector<T> prepend) = 0;
63 virtual void set_tail_size(uint32_t size) = 0;
64 virtual void set_max_pdu_size(uint32_t size) = 0;
65 virtual void set_samp_rate(double) = 0;
66 virtual void set_start_time(double) = 0;
67 virtual void publish_start_msgs(bool) = 0;
68 virtual void enable_time_debug(bool) = 0;
69};
70
76} // namespace pdu
77} // namespace gr
78
79#endif /* INCLUDED_PDU_TAGS_TO_PDU_H */
Tags to PDU.
Definition tags_to_pdu.h:30
virtual void set_start_time(double)=0
virtual void publish_start_msgs(bool)=0
virtual void set_end_tag(pmt::pmt_t tag)=0
virtual void set_tail_size(uint32_t size)=0
virtual void set_samp_rate(double)=0
virtual uint32_t get_eob_alignment(void)=0
virtual void set_prepend(std::vector< T > prepend)=0
virtual void set_time_tag_key(pmt::pmt_t tag)=0
std::shared_ptr< tags_to_pdu< T > > sptr
Definition tags_to_pdu.h:32
virtual void enable_time_debug(bool)=0
virtual uint32_t get_eob_offset(void)=0
virtual void set_max_pdu_size(uint32_t size)=0
virtual void set_eob_parameters(uint32_t, uint32_t)=0
virtual void set_start_tag(pmt::pmt_t tag)=0
static sptr make(pmt::pmt_t start_tag, pmt::pmt_t end_tag, uint32_t max_pdu_size, double samp_rate, std::vector< T > prepend, bool pub_start_msg, uint32_t tail_size, double start_time)
Return a shared_ptr to a new instance of pdu_utils::tags_to_pdu.
synchronous 1:1 input to output with history
Definition sync_block.h:26
STL class.
Definition vector_docstub.h:11
#define PDU_API
Definition gr-pdu/include/gnuradio/pdu/api.h:18
GR_RUNTIME_API const pmt::pmt_t pdu()
tags_to_pdu< short > tags_to_pdu_s
Definition tags_to_pdu.h:72
tags_to_pdu< float > tags_to_pdu_f
Definition tags_to_pdu.h:74
tags_to_pdu< gr_complex > tags_to_pdu_c
Definition tags_to_pdu.h:75
tags_to_pdu< unsigned char > tags_to_pdu_b
Definition tags_to_pdu.h:71
tags_to_pdu< int > tags_to_pdu_i
Definition tags_to_pdu.h:73
GNU Radio logging wrapper.
Definition basic_block.h:29
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition pmt.h:83