GNU Radio 3.7.2.2 C++ API
message_strobe_random.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2012-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_MESSAGE_STROBE_RANDOM_H
24
#define INCLUDED_GR_MESSAGE_STROBE_RANDOM_H
25
26
#include <
gnuradio/blocks/api.h
>
27
#include <
gnuradio/block.h
>
28
29
namespace
gr {
30
namespace
blocks {
31
32
/*
33
* strobing models
34
*/
35
typedef
enum
{
36
STROBE_POISSON
=1,
37
STROBE_GAUSSIAN
=2,
38
STROBE_UNIFORM
=3
39
}
message_strobe_random_distribution_t
;
40
41
/*!
42
* \brief Send message at defined interval
43
* \ingroup message_tools_blk
44
*
45
* \details
46
* Takes a PMT message and sends it out every \p period_ms
47
* milliseconds. Useful for testing/debugging the message system.
48
*/
49
class
BLOCKS_API
message_strobe_random
:
virtual
public
block
50
{
51
public
:
52
// gr::blocks::message_strobe_random::sptr
53
typedef
boost::shared_ptr<message_strobe_random>
sptr
;
54
55
/*!
56
* Make a message stobe block to send message \p msg every \p
57
* period_ms milliseconds.
58
*
59
* \param msg The message to send as a PMT.
60
* \param period_ms the time period in milliseconds in which to
61
* send \p msg.
62
*/
63
static
sptr
make(
pmt::pmt_t
msg,
message_strobe_random_distribution_t
dist,
float
mean_ms,
float
std_ms);
64
65
/*!
66
* Reset the message being sent.
67
* \param msg The message to send as a PMT.
68
*/
69
virtual
void
set_msg(
pmt::pmt_t
msg) = 0;
70
71
/*!
72
* Get the value of the message being sent.
73
*/
74
virtual
pmt::pmt_t
msg()
const
= 0;
75
76
/*!
77
* \param dist new distribution.
78
*/
79
virtual
void
set_dist(
message_strobe_random_distribution_t
dist) = 0;
80
81
/*!
82
* get the current distribution.
83
*/
84
virtual
message_strobe_random_distribution_t
dist()
const
= 0;
85
86
/*!
87
* Reset the sending interval.
88
* \param mean delay in milliseconds.
89
*/
90
virtual
void
set_mean(
float
mean) = 0;
91
92
/*!
93
* Get the time interval of the strobe_random.
94
*/
95
virtual
float
mean()
const
= 0;
96
97
/*!
98
* Reset the sending interval.
99
* \param std delay in milliseconds.
100
*/
101
virtual
void
set_std(
float
std) = 0;
102
103
/*!
104
* Get the std of strobe_random.
105
*/
106
virtual
float
std()
const
= 0;
107
108
};
109
110
}
/* namespace blocks */
111
}
/* namespace gr */
112
113
#endif
/* INCLUDED_GR_MESSAGE_STROBE_H */
gnuradio
gr-blocks
include
gnuradio
blocks
message_strobe_random.h
Generated by
1.8.3.1