GNU Radio 3.7.1-34 C++ API
tags.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2011,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_H
24
#define INCLUDED_GR_TAGS_H
25
26
#include <
gnuradio/api.h
>
27
#include <
pmt/pmt.h
>
28
29
namespace
gr {
30
31
struct
GR_RUNTIME_API
tag_t
32
{
33
//! the item \p tag occurred at (as a uint64_t)
34
uint64_t
offset
;
35
36
//! the key of \p tag (as a PMT symbol)
37
pmt::pmt_t
key
;
38
39
//! the value of \p tag (as a PMT)
40
pmt::pmt_t
value
;
41
42
//! the source ID of \p tag (as a PMT)
43
pmt::pmt_t
srcid
;
44
45
//! Used by gr_buffer to mark a tagged as deleted by a specific block. You can usually ignore this.
46
std::vector<long>
marked_deleted
;
47
48
/*!
49
* Comparison function to test which tag, \p x or \p y, came
50
* first in time
51
*/
52
static
inline
bool
offset_compare(
const
tag_t
&x,
53
const
tag_t
&y)
54
{
55
return
x.
offset
< y.
offset
;
56
}
57
58
inline
bool
operator == (
const
tag_t
&t)
const
59
{
60
return
(t.
key
== key) && (t.
value
== value) && \
61
(t.
srcid
== srcid) && (t.
offset
== offset);
62
}
63
};
64
65
}
/* namespace gr */
66
67
#endif
/*INCLUDED_GR_TAGS_H*/
gnuradio
gnuradio-runtime
include
gnuradio
tags.h
Generated by
1.8.1.1