GNU Radio 3.7.2git-29-g7516b6dd C++ API
tags_strobe.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2013 Free Software Foundation, Inc.
4
*
5
* This file is part of GNU Radio
6
*
7
* GNU Radio is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 3, or (at your option)
10
* any later version.
11
*
12
* GNU Radio is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with GNU Radio; see the file COPYING. If not, write to
19
* the Free Software Foundation, Inc., 51 Franklin Street,
20
* Boston, MA 02110-1301, USA.
21
*/
22
23
#ifndef INCLUDED_GR_TAGS_STROBE_H
24
#define INCLUDED_GR_TAGS_STROBE_H
25
26
#include <
gnuradio/blocks/api.h
>
27
#include <
gnuradio/sync_block.h
>
28
29
namespace
gr {
30
namespace
blocks {
31
32
/*!
33
* \brief Send tags at defined interval
34
* \ingroup debug_blk
35
*
36
* \details
37
* Sends a tag with key 'strobe' and a user-defined value (as a
38
* PMT) every \p nsamps number of samples. Useful for
39
* testing/debugging the tags system.
40
*
41
* Because tags are sent with a data stream, this is a source
42
* block that acts identical to a null_source block.
43
*/
44
class
BLOCKS_API
tags_strobe
:
virtual
public
sync_block
45
{
46
public
:
47
// gr::blocks::tags_strobe::sptr
48
typedef
boost::shared_ptr<tags_strobe>
sptr
;
49
50
/*!
51
* Make a tags stobe block to send tags with value \p value
52
* every \p nsamps number of samples.
53
*
54
* \param sizeof_stream_item size of the stream items in bytes.
55
* \param value The value of the tags to send, as a PMT.
56
* \param nsamps the number of samples between each tag.
57
*/
58
static
sptr
make(
size_t
sizeof_stream_item,
59
pmt::pmt_t
value,
uint64_t
nsamps);
60
61
/*!
62
* Reset the value of the tags being sent.
63
* \param value The value of the tags to send as a PMT.
64
*/
65
virtual
void
set_value(
pmt::pmt_t
value) = 0;
66
67
/*!
68
* Get the value of the tags being sent.
69
*/
70
virtual
pmt::pmt_t
value()
const
= 0;
71
72
/*!
73
* Reset the sending interval.
74
* \param nsamps the number of samples between each tag
75
*/
76
virtual
void
set_nsamps(
uint64_t
nsamps) = 0;
77
78
/*!
79
* Get the number of samples between the tag strobe.
80
*/
81
virtual
uint64_t
nsamps()
const
= 0;
82
};
83
84
}
/* namespace blocks */
85
}
/* namespace gr */
86
87
#endif
/* INCLUDED_GR_TAGS_STROBE_H */
gnuradio
gr-blocks
include
gnuradio
blocks
tags_strobe.h
Generated by
1.8.1.2