GNU Radio's SATELLITES Package
varlen_packet_framer_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2017 Glenn Richardson <glenn@spacequest.com>
4  *
5  * This file is part of gr-satellites
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_VARLEN_PACKET_FRAMER_IMPL_H
12 #define INCLUDED_VARLEN_PACKET_FRAMER_IMPL_H
13 
14 #include <pmt/pmt.h>
16 
17 //#define VLPF_DEBUG_TIMING
18 
19 namespace gr {
20 namespace satellites {
22 {
23 private:
24  int d_header_length; // size of packet length field in bits
25  bool d_use_golay; // decode golay packet length
26  std::vector<uint8_t> d_sync_word; // option ASM
27  endianness_t d_endianness; // header endianness
28  pmt::pmt_t d_packet_tag; // packet length tag
29  int d_ninput_items_required;
30 
31 #ifdef VLPF_DEBUG_TIMING
32  std::time_t d_last_debug1;
33  std::time_t d_last_debug2;
34  std::time_t d_start_time;
35 #endif
36 
37 
38 public:
39  varlen_packet_framer_impl(const std::string& packet_key,
40  int length_field_size,
41  endianness_t endianness,
42  bool use_golay,
43  const std::vector<uint8_t> sync_word);
44 
46 
47  void forecast(int noutput_items, gr_vector_int& ninput_items_required);
48 
49  int general_work(int noutput_items,
50  gr_vector_int& ninput_items,
51  gr_vector_const_void_star& input_items,
52  gr_vector_void_star& output_items);
53 };
54 
55 } // namespace satellites
56 } // namespace gr
57 
58 #endif
Definition: varlen_packet_framer_impl.h:22
varlen_packet_framer_impl(const std::string &packet_key, int length_field_size, endianness_t endianness, bool use_golay, const std::vector< uint8_t > sync_word)
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
insert a packet length field into a tagged stream
Definition: varlen_packet_framer.h:33
Definition: ax100_decode.h:17