GNU Radio's SATELLITES Package

nusat_decoder_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2017 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_NUSAT_DECODER_IMPL_H
12#define INCLUDED_SATELLITES_NUSAT_DECODER_IMPL_H
13
14#include <pmt/pmt.h>
15#include <satellites/nusat_decoder.h>
16
17#include <stdint.h>
18
19#include <array>
20
21#include "rs.h"
22
23 namespace gr {
24 namespace satellites {
25
26 class nusat_decoder_impl : public nusat_decoder
27{
28 private:
29 constexpr static size_t d_msg_len = 64;
30 constexpr static size_t d_header_len = 2;
31 constexpr static size_t d_len_byte = 0;
32 constexpr static size_t d_crc_byte = 1;
33 static const uint8_t d_scrambler_sequence[];
34 static const uint_fast8_t crc8_table[];
35 void* d_rs;
36 std::array<uint8_t, MAX_FRAME_LEN> d_data;
37
38 uint_fast8_t crc8(const uint8_t* data, size_t data_len);
39
40 public:
41 nusat_decoder_impl();
42 ~nusat_decoder_impl();
43
44 // Where all the action really happens
45 void forecast(int noutput_items, gr_vector_int& ninput_items_required);
46
47 int general_work(int noutput_items,
48 gr_vector_int& ninput_items,
49 gr_vector_const_void_star& input_items,
50 gr_vector_void_star& output_items);
51
52 void msg_handler(pmt::pmt_t pmt_msg);
53};
54
55} // namespace satellites
56} // namespace gr
57
58#endif /* INCLUDED_SATELLITES_NUSAT_DECODER_IMPL_H */
gr::satellites::nusat_decoder_impl::nusat_decoder_impl
nusat_decoder_impl()
gr::satellites::nusat_decoder_impl::msg_handler
void msg_handler(pmt::pmt_t pmt_msg)
gr::satellites::nusat_decoder_impl::general_work
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
gr::satellites::nusat_decoder_impl::~nusat_decoder_impl
~nusat_decoder_impl()
gr::satellites::nusat_decoder_impl::forecast
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
gr::satellites::nusat_decoder
<+description of block+>
Definition nusat_decoder.h:26
gr::satellites
Definition ax100_decode.h:18
gr
Definition ax100_decode.h:17
nusat_decoder.h
rs.h