Loading...
Searching...
No Matches
message_strobe.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2012-2013 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_GR_MESSAGE_STROBE_H
#define INCLUDED_GR_MESSAGE_STROBE_H
#include <gnuradio/block.h>
#include <gnuradio/blocks/api.h>
namespace gr {
namespace blocks {
/*!
* \brief Send message at defined interval
* \ingroup message_tools_blk
*
* \details
* Takes a PMT message and sends it out every \p period_ms
* milliseconds. Useful for testing/debugging the message system.
*/
class BLOCKS_API message_strobe : virtual public block
{
public:
// gr::blocks::message_strobe::sptr
typedef std::shared_ptr<message_strobe> sptr;
/*!
* Make a message stobe block to send message \p msg every \p
* period_ms milliseconds.
*
* \param msg The message to send as a PMT.
* \param period_ms the time period in milliseconds in which to
* send \p msg.
*/
static sptr make(pmt::pmt_t msg, long period_ms);
/*!
* Reset the message being sent.
* \param msg The message to send as a PMT.
*/
virtual void set_msg(pmt::pmt_t msg) = 0;
/*!
* Get the value of the message being sent.
*/
virtual pmt::pmt_t msg() const = 0;
/*!
* Reset the sending interval.
* \param period_ms the time period in milliseconds.
*/
virtual void set_period(long period_ms) = 0;
/*!
* Get the time interval of the strobe.
*/
virtual long period() const = 0;
};
} /* namespace blocks */
} /* namespace gr */
#endif /* INCLUDED_GR_MESSAGE_STROBE_H */
gr::block::block
block(void)
Definition gnuradio-runtime/include/gnuradio/block.h:806
gr::blocks::message_strobe
Send message at defined interval.
Definition message_strobe.h:29
gr::blocks::message_strobe::msg
virtual pmt::pmt_t msg() const =0
gr::blocks::message_strobe::sptr
std::shared_ptr< message_strobe > sptr
Definition message_strobe.h:32
gr::blocks::message_strobe::period
virtual long period() const =0
gr::blocks::message_strobe::set_msg
virtual void set_msg(pmt::pmt_t msg)=0
gr::blocks::message_strobe::make
static sptr make(pmt::pmt_t msg, long period_ms)
gr::blocks::message_strobe::set_period
virtual void set_period(long period_ms)=0
block.h
api.h
BLOCKS_API
#define BLOCKS_API
Definition gr-blocks/include/gnuradio/blocks/api.h:18
gr::blocks
Definition abs_blk.h:20
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
pmt::pmt_t
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition pmt.h:83