GNU Radio's SATELLITES Package
crc_append_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2022 Daniel Estevez <daniel@destevez.net>.
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_SATELLITES_CRC_APPEND_IMPL_H
12 #define INCLUDED_SATELLITES_CRC_APPEND_IMPL_H
13 
14 #include <satellites/crc.h>
15 #include <satellites/crc_append.h>
16 
17 namespace gr {
18 namespace satellites {
19 
21 {
22 private:
23  unsigned d_num_bits;
24  bool d_swap_endianness;
25  crc d_crc;
26  unsigned d_header_bytes;
27 
28 public:
29  crc_append_impl(unsigned num_bits,
30  uint64_t poly,
31  uint64_t initial_value,
32  uint64_t final_xor,
33  bool input_reflected,
34  bool result_reflected,
35  bool swap_endianness,
36  unsigned skip_header_bytes);
38 
39  void forecast(int noutput_items, gr_vector_int& ninput_items_required);
40 
41  int general_work(int noutput_items,
42  gr_vector_int& ninput_items,
43  gr_vector_const_void_star& input_items,
44  gr_vector_void_star& output_items);
45  void msg_handler(pmt::pmt_t pmt_msg);
46 };
47 
48 } // namespace satellites
49 } // namespace gr
50 
51 #endif /* INCLUDED_SATELLITES_CRC_APPEND_IMPL_H */
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
Calculates a CRC.
Definition: crc.h:32
Calculates and appends a CRC to a PDU.
Definition: crc_append.h:32
Definition: ax100_decode.h:17
Definition: crc_append_impl.h:20
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
crc_append_impl(unsigned num_bits, uint64_t poly, uint64_t initial_value, uint64_t final_xor, bool input_reflected, bool result_reflected, bool swap_endianness, unsigned skip_header_bytes)
void msg_handler(pmt::pmt_t pmt_msg)