GNU Radio Radar Toolbox
msg_manipulator.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2014 Communications Engineering Lab, KIT.
4 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
8 * any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
19 */
20
21
22#ifndef INCLUDED_RADAR_MSG_MANIPULATOR_H
23#define INCLUDED_RADAR_MSG_MANIPULATOR_H
24
25#include <gnuradio/block.h>
26#include <radar/api.h>
27
28namespace gr {
29namespace radar {
30
31/*!
32 * \brief This block manipulates data in a msg with given identifier (symbol). All data
33 * are given as vectors and each index represents a dataset with identifier which should
34 * be processed. All other data is pushed through. The addition is performed before the
35 * multiplication.
36 *
37 * \param symbols Identifier (symbols) of data as vector
38 * \param const_add Value to add on the data
39 * \param const_mult Value to multiply on the data
40 *
41 * \ingroup radar
42 *
43 */
44class RADAR_API msg_manipulator : virtual public gr::block
45{
46public:
47 typedef std::shared_ptr<msg_manipulator> sptr;
48
49 /*!
50 * \brief Return a shared_ptr to a new instance of radar::msg_manipulator.
51 *
52 * To avoid accidental use of raw pointers, radar::msg_manipulator's
53 * constructor is in a private implementation
54 * class. radar::msg_manipulator::make is the public interface for
55 * creating new instances.
56 */
57 static sptr make(std::vector<std::string> symbols,
58 std::vector<float> const_add,
59 std::vector<float> const_mult);
60 virtual void set_const_add(std::vector<float> val) = 0;
61 virtual void set_const_mult(std::vector<float> val) = 0;
62};
63
64} // namespace radar
65} // namespace gr
66
67#endif /* INCLUDED_RADAR_MSG_MANIPULATOR_H */
#define RADAR_API
Definition api.h:31
This block manipulates data in a msg with given identifier (symbol). All data are given as vectors an...
Definition msg_manipulator.h:45
static sptr make(std::vector< std::string > symbols, std::vector< float > const_add, std::vector< float > const_mult)
Return a shared_ptr to a new instance of radar::msg_manipulator.
virtual void set_const_mult(std::vector< float > val)=0
std::shared_ptr< msg_manipulator > sptr
Definition msg_manipulator.h:47
virtual void set_const_add(std::vector< float > val)=0
Definition crop_matrix_vcvc.h:28