GNU Radio's SATELLITES Package
nanocom_golay_decode_length.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2025 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#ifndef INCLUDED_SATELLITES_NANCOM_GOLAY_DECODE_LENGTH_H
11#define INCLUDED_SATELLITES_NANCOM_GOLAY_DECODE_LENGTH_H
12
13#include <gnuradio/sync_block.h>
14#include <satellites/api.h>
15#include <string>
16
17namespace gr {
18namespace satellites {
19
20/*!
21 * \brief Decodes Golay field in NanoCom packets and adds a length tag
22 * \ingroup satellites
23 *
24 * \details
25 * This block acts as a sync block on a stream of unpacked bits. Whenever a tag
26 * marking the start of a Golay field is found, the block reads the 24 bits
27 * following the tag, attempts to perform Golay decoding, and if successful
28 * extracts the length field, computes the length in bits of the packet
29 * including the Golay field, and adds a tag with this length to the beginning
30 * of the Golay field so that the whole packet can be extracted as a PDU using
31 * this length tag.
32 */
33class SATELLITES_API nanocom_golay_decode_length : virtual public gr::sync_block
34{
35public:
36 typedef std::shared_ptr<nanocom_golay_decode_length> sptr;
37
38 /*!
39 * \brief Build the NanoCom Golay Decode Length block.
40 *
41 * \param golay_start_tag_key Key of the tag marking the start of Golay fields
42 * \param length_tag_key Key of the tag indicating the packet length
43 */
44 static sptr make(const std::string& golay_start_tag_key,
45 const std::string& length_tag_key);
46};
47
48} // namespace satellites
49} // namespace gr
50
51#endif /* INCLUDED_SATELLITES_NANOCOM_GOLAY_DECODE_LENGTH_H */
#define SATELLITES_API
Definition: api.h:31
Decodes Golay field in NanoCom packets and adds a length tag.
Definition: nanocom_golay_decode_length.h:34
static sptr make(const std::string &golay_start_tag_key, const std::string &length_tag_key)
Build the NanoCom Golay Decode Length block.
std::shared_ptr< nanocom_golay_decode_length > sptr
Definition: nanocom_golay_decode_length.h:36
Definition: ax100_decode.h:17