GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
random_uniform_source.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2015,2018 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 
12 #ifndef RANDOM_UNIFORM_SOURCE_H
13 #define RANDOM_UNIFORM_SOURCE_H
14 
15 #include <gnuradio/analog/api.h>
16 #include <gnuradio/sync_block.h>
17 
18 namespace gr {
19 namespace analog {
20 
21 /*!
22  * \brief Uniform Random Number Generator
23  * \ingroup waveform_generators_blk
24  */
25 template <class T>
27 {
28 public:
29  // gr::analog::random_uniform_source::sptr
30  typedef std::shared_ptr<random_uniform_source<T>> sptr;
31 
32  /*!
33  * \brief Return a shared_ptr to a new instance of analog::random_uniform_source_X.
34  *
35  * Since it's perfectly safe to generate non-pointer random source blocks,
36  * the constructor for this block is public. Nevertheless this make()
37  * function is exposed for consistency.
38  * \param minimum defines minimal integer value output.
39  * \param maximum output values are below this value
40  * \param seed for Pseudo Random Number Generator. Defaults to 0. In this case current
41  * time is used.
42  */
43  static sptr make(int minimum, int maximum, int seed);
44 };
45 
49 } /* namespace analog */
50 } /* namespace gr */
51 
52 #endif /* RANDOM_UNIFORM_SOURCE_H */
Uniform Random Number Generator.
Definition: random_uniform_source.h:27
std::shared_ptr< random_uniform_source< T > > sptr
Definition: random_uniform_source.h:30
static sptr make(int minimum, int maximum, int seed)
Return a shared_ptr to a new instance of analog::random_uniform_source_X.
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define ANALOG_API
Definition: gr-analog/include/gnuradio/analog/api.h:18
random_uniform_source< std::int32_t > random_uniform_source_i
Definition: random_uniform_source.h:48
random_uniform_source< std::int16_t > random_uniform_source_s
Definition: random_uniform_source.h:47
random_uniform_source< std::uint8_t > random_uniform_source_b
Definition: random_uniform_source.h:46
GNU Radio logging wrapper.
Definition: basic_block.h:29