/
pdu_to_tagged_stream.h
44 lines (37 loc) · 1.12 KB
/
pdu_to_tagged_stream.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* -*- c++ -*- */
/*
* Copyright 2013 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_PDU_PDU_TO_TAGGED_STREAM_H
#define INCLUDED_PDU_PDU_TO_TAGGED_STREAM_H
#include <gnuradio/pdu.h>
#include <gnuradio/pdu/api.h>
#include <gnuradio/tagged_stream_block.h>
namespace gr {
namespace pdu {
/*!
* \brief Turns received PDUs into a tagged stream of items
* \ingroup message_tools_blk
*/
class PDU_API pdu_to_tagged_stream : virtual public tagged_stream_block
{
public:
// gr::pdu::pdu_to_tagged_stream::sptr
typedef std::shared_ptr<pdu_to_tagged_stream> sptr;
/*!
* \brief Construct a pdu_to_tagged_stream block
* \param type PDU type of gr::types::vector_type
* \param lengthtagname The name of the tag that specifies how long the packet is.
* Defaults to 'packet_len'.
*/
static sptr make(gr::types::vector_type type,
const std::string& lengthtagname = "packet_len");
};
} /* namespace pdu */
} /* namespace gr */
#endif /* INCLUDED_PDU_PDU_TO_TAGGED_STREAM_H */