-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathchdr2pdu.h
69 lines (61 loc) · 2.25 KB
/
chdr2pdu.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* -*- c++ -*- */
/*
* Copyright 2019 Leon Fernandez (zluudg).
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef INCLUDED_ZLUUDGBEE_CHDR2PDU_H
#define INCLUDED_ZLUUDGBEE_CHDR2PDU_H
#include <zluudgbee/api.h>
#include <ettus/device3.h>
#include <ettus/rfnoc_block.h>
#include <uhd/stream.hpp> // TODO verify whether this is needed
namespace gr {
namespace zluudgbee {
/*!
* \brief Converts an incoming CHDR packet of 32-bit samples into
* a PDU. The PDU is represented by a PMT pair, one empty dict
* (no metadate/tags) and one uint8 vector where element 'n' is
* extracted from word 'n' in the incoming CHDR packet.
* \ingroup zluudgbee
*
*/
class ZLUUDGBEE_API chdr2pdu : virtual public gr::ettus::rfnoc_block
{
public:
typedef boost::shared_ptr<chdr2pdu> sptr;
/*!
* \brief Return a shared_ptr to a new instance of zluudgbee::chdr2pdu.
*
* To avoid accidental use of raw pointers, zluudgbee::chdr2pdu's
* constructor is in a private implementation
* class. zluudgbee::chdr2pdu::make is the public interface for
* creating new instances.
*/
static sptr make(
const gr::ettus::device3::sptr &dev,
const ::uhd::stream_args_t &tx_stream_args,
const ::uhd::stream_args_t &rx_stream_args,
const std::string &block_name,
const int block_select=-1,
const int device_select=-1,
const int mtu=2048,
const bool enable_eob_on_stop=true
);
};
} // namespace zluudgbee
} // namespace gr
#endif /* INCLUDED_ZLUUDGBEE_CHDR2PDU_H */