GNU Radio's SATELLITES Package
level_to_message.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2025 Daniel Estevez <daniel@destevez.net>.
4 *
5 * This file is part of gr-satellites
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 */
9
10#ifndef INCLUDED_SATELLITES_LEVEL_TO_MESSAGE_H
11#define INCLUDED_SATELLITES_LEVEL_TO_MESSAGE_H
12
13#include <gnuradio/sync_block.h>
14#include <satellites/api.h>
15
16namespace gr {
17namespace satellites {
18
19/*!
20 * \brief Converts changes in signal level to messages
21 * \ingroup satellites
22 *
23 * \details
24 * This block is mainly intended to be used with the output of the Threshold
25 * block. It compares its input with a given threshold. Whenever the input
26 * crosses the threshold, a message is output saying if the signal is now over
27 * the threshold or below the threshold. If there are multiple threshold
28 * crossings inside a work() call, only the last one is considered, so at most
29 * there is an output message per work() call (i.e., the block only ever looks
30 * at the last input sample in each work() call).
31 */
32class SATELLITES_API level_to_message : virtual public gr::sync_block
33{
34public:
35 typedef std::shared_ptr<level_to_message> sptr;
36
37 /*!
38 * \brief Build the Level to Message block.
39 *
40 * \param threshold Level change threshold
41 */
42 static sptr make(float threshold);
43};
44
45} // namespace satellites
46} // namespace gr
47
48#endif /* INCLUDED_SATELLITES_LEVEL_TO_MESSAGE_H */
#define SATELLITES_API
Definition: api.h:31
Converts changes in signal level to messages.
Definition: level_to_message.h:33
std::shared_ptr< level_to_message > sptr
Definition: level_to_message.h:35
static sptr make(float threshold)
Build the Level to Message block.
Definition: ax100_decode.h:17