Loading...
Searching...
No Matches
rpcpmtconverters_thrift.h
Go to the documentation of this file.
/*
* Copyright 2014,2015 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef RPCPMTCONVERTERS_THRIFT_H
#define RPCPMTCONVERTERS_THRIFT_H
#include "thrift/gnuradio_types.h"
#include <pmt/pmt.h>
#include <map>
namespace rpcpmtconverter {
GNURadio::Knob from_pmt(const pmt::pmt_t& knob);
struct to_pmt_f {
to_pmt_f() { ; }
virtual ~to_pmt_f() {}
virtual pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_byte_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_short_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_int_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_long_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_double_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_string_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_bool_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_complex_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_f32vect_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_f64vect_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_s64vect_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_s32vect_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_s16vect_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_s8vect_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
struct to_pmt_c32vect_f : public to_pmt_f {
pmt::pmt_t operator()(const GNURadio::Knob& knob);
};
class To_PMT
{
public:
To_PMT(const To_PMT&) = delete;
To_PMT& operator=(const To_PMT&) = delete;
static To_PMT instance;
template <typename TO_PMT_F>
friend struct to_pmt_reg;
pmt::pmt_t operator()(const GNURadio::Knob& knob);
protected:
std::map<GNURadio::BaseTypes::type, to_pmt_f> to_pmt_map;
private:
To_PMT() { ; }
};
template <typename TO_PMT_F>
struct to_pmt_reg {
to_pmt_reg(To_PMT& instance, const GNURadio::BaseTypes::type type);
};
} // namespace rpcpmtconverter
#endif /* RPCPMTCONVERTERS_THRIFT_H */
rpcpmtconverter::To_PMT
Definition rpcpmtconverters_thrift.h:74
rpcpmtconverter::To_PMT::to_pmt_map
std::map< GNURadio::BaseTypes::type, to_pmt_f > to_pmt_map
Definition rpcpmtconverters_thrift.h:85
rpcpmtconverter::To_PMT::operator=
To_PMT & operator=(const To_PMT &)=delete
rpcpmtconverter::To_PMT::To_PMT
To_PMT(const To_PMT &)=delete
rpcpmtconverter::To_PMT::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::To_PMT::instance
static To_PMT instance
Definition rpcpmtconverters_thrift.h:79
pmt::pmt_t
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition pmt.h:83
rpcpmtconverter
Definition rpcpmtconverters_thrift.h:18
rpcpmtconverter::from_pmt
GNURadio::Knob from_pmt(const pmt::pmt_t &knob)
pmt.h
rpcpmtconverter::to_pmt_bool_f
Definition rpcpmtconverters_thrift.h:45
rpcpmtconverter::to_pmt_bool_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_byte_f
Definition rpcpmtconverters_thrift.h:27
rpcpmtconverter::to_pmt_byte_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_c32vect_f
Definition rpcpmtconverters_thrift.h:69
rpcpmtconverter::to_pmt_c32vect_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_complex_f
Definition rpcpmtconverters_thrift.h:48
rpcpmtconverter::to_pmt_complex_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_double_f
Definition rpcpmtconverters_thrift.h:39
rpcpmtconverter::to_pmt_double_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_f32vect_f
Definition rpcpmtconverters_thrift.h:51
rpcpmtconverter::to_pmt_f32vect_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_f64vect_f
Definition rpcpmtconverters_thrift.h:54
rpcpmtconverter::to_pmt_f64vect_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_f
Definition rpcpmtconverters_thrift.h:21
rpcpmtconverter::to_pmt_f::to_pmt_f
to_pmt_f()
Definition rpcpmtconverters_thrift.h:22
rpcpmtconverter::to_pmt_f::~to_pmt_f
virtual ~to_pmt_f()
Definition rpcpmtconverters_thrift.h:23
rpcpmtconverter::to_pmt_f::operator()
virtual pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_int_f
Definition rpcpmtconverters_thrift.h:33
rpcpmtconverter::to_pmt_int_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_long_f
Definition rpcpmtconverters_thrift.h:36
rpcpmtconverter::to_pmt_long_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_reg
Definition rpcpmtconverters_thrift.h:92
rpcpmtconverter::to_pmt_reg::to_pmt_reg
to_pmt_reg(To_PMT &instance, const GNURadio::BaseTypes::type type)
rpcpmtconverter::to_pmt_s16vect_f
Definition rpcpmtconverters_thrift.h:63
rpcpmtconverter::to_pmt_s16vect_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_s32vect_f
Definition rpcpmtconverters_thrift.h:60
rpcpmtconverter::to_pmt_s32vect_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_s64vect_f
Definition rpcpmtconverters_thrift.h:57
rpcpmtconverter::to_pmt_s64vect_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_s8vect_f
Definition rpcpmtconverters_thrift.h:66
rpcpmtconverter::to_pmt_s8vect_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_short_f
Definition rpcpmtconverters_thrift.h:30
rpcpmtconverter::to_pmt_short_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)
rpcpmtconverter::to_pmt_string_f
Definition rpcpmtconverters_thrift.h:42
rpcpmtconverter::to_pmt_string_f::operator()
pmt::pmt_t operator()(const GNURadio::Knob &knob)