GNU Radio's TDD Package
ferMsgGen_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2019 <+YOU OR YOUR COMPANY+>.
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#ifndef INCLUDED_TDD_FERMSGGEN_IMPL_H
22#define INCLUDED_TDD_FERMSGGEN_IMPL_H
23
24#include <tdd/ferMsgGen.h>
25#include <cstdlib>
26
27namespace gr {
28 namespace tdd {
29 /*typedef struct
30 {
31 uint64_t msgCnt;
32 unsigned char* data;
33 } msgGen;*/
34
36 {
37 private:
38 int d_frame_size;
39 uint64_t d_msg_cnt;
40 std::string d_out_tag_key;
41 uint64_t d_tag_position;
42 pmt::pmt_t d_me;
43
44 //msgGen *msg;
45 protected:
46 int calculate_output_stream_length(const gr_vector_int &ninput_items);
47
48 public:
49 ferMsgGen_impl(int frame_size, std::string out_tag_key, std::string len_tag_key);
51 unsigned short crc_ccitt(unsigned char* frame, int frame_len);
52
53 // Where all the action really happens
54 int work(int noutput_items,
55 gr_vector_int &ninput_items,
56 gr_vector_const_void_star &input_items,
57 gr_vector_void_star &output_items);
58 };
59
60 } // namespace tdd
61} // namespace gr
62
63#endif /* INCLUDED_TDD_FERMSGGEN_IMPL_H */
64
Definition ferMsgGen_impl.h:36
unsigned short crc_ccitt(unsigned char *frame, int frame_len)
int work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
ferMsgGen_impl(int frame_size, std::string out_tag_key, std::string len_tag_key)
int calculate_output_stream_length(const gr_vector_int &ninput_items)
<+description of block+>
Definition ferMsgGen.h:37
Definition ferMsgBlock.h:28