Loading...
Searching...
No Matches
take_skip_to_pdu.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2021 NTESS LLC.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_PDU_TAKE_SKIP_TO_PDU_H
#define INCLUDED_PDU_TAKE_SKIP_TO_PDU_H
#include <gnuradio/pdu/api.h>
#include <gnuradio/sync_block.h>
namespace gr {
namespace pdu {
#ifndef MAXIMUM_PDU_SIZE
#define MAXIMUM_PDU_SIZE
#endif
/*!
* \brief Extract periodic PDUs from a data stream.
* \ingroup pdu_blk
*
* This block will generate PDUs of size TAKE skipping SKIP samples between
*
*/
template <class T>
class PDU_API take_skip_to_pdu : virtual public gr::sync_block
{
public:
typedef std::shared_ptr<take_skip_to_pdu<T>> sptr;
/*!
* \brief Return a shared_ptr to a new instance of pdu::take_skip_to_pdu.
*
* @param take - size of generated PDUs in samples
* @param skip - number of samples to skip between takes
*/
static sptr make(uint32_t take, uint32_t skip);
virtual void set_take(uint32_t take) = 0;
virtual void set_skip(uint32_t skip) = 0;
};
typedef take_skip_to_pdu<unsigned char> take_skip_to_pdu_b;
typedef take_skip_to_pdu<short> take_skip_to_pdu_s;
typedef take_skip_to_pdu<int> take_skip_to_pdu_i;
typedef take_skip_to_pdu<float> take_skip_to_pdu_f;
typedef take_skip_to_pdu<gr_complex> take_skip_to_pdu_c;
} // namespace pdu
} // namespace gr
#endif /* INCLUDED_PDU_TAKE_SKIP_TO_PDU_H */
gr::pdu::take_skip_to_pdu
Extract periodic PDUs from a data stream.
Definition take_skip_to_pdu.h:33
gr::pdu::take_skip_to_pdu::make
static sptr make(uint32_t take, uint32_t skip)
Return a shared_ptr to a new instance of pdu::take_skip_to_pdu.
gr::pdu::take_skip_to_pdu::sptr
std::shared_ptr< take_skip_to_pdu< T > > sptr
Definition take_skip_to_pdu.h:35
gr::pdu::take_skip_to_pdu::set_skip
virtual void set_skip(uint32_t skip)=0
gr::pdu::take_skip_to_pdu::set_take
virtual void set_take(uint32_t take)=0
gr::sync_block
synchronous 1:1 input to output with history
Definition sync_block.h:26
api.h
PDU_API
#define PDU_API
Definition gr-pdu/include/gnuradio/pdu/api.h:18
gr::msgport_names::pdu
GR_RUNTIME_API const pmt::pmt_t pdu()
gr::pdu::take_skip_to_pdu_b
take_skip_to_pdu< unsigned char > take_skip_to_pdu_b
Definition take_skip_to_pdu.h:49
gr::pdu::take_skip_to_pdu_i
take_skip_to_pdu< int > take_skip_to_pdu_i
Definition take_skip_to_pdu.h:51
gr::pdu::take_skip_to_pdu_c
take_skip_to_pdu< gr_complex > take_skip_to_pdu_c
Definition take_skip_to_pdu.h:53
gr::pdu::take_skip_to_pdu_s
take_skip_to_pdu< short > take_skip_to_pdu_s
Definition take_skip_to_pdu.h:50
gr::pdu::take_skip_to_pdu_f
take_skip_to_pdu< float > take_skip_to_pdu_f
Definition take_skip_to_pdu.h:52
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
sync_block.h