GNU Radio's DVBS2RX Package
pl_defs.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright (c) 2021 Igor Freire.
4 *
5 * This file is part of gr-dvbs2rx.
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 */
9
10#ifndef INCLUDED_DVBS2RX_PL_DEFS_H
11#define INCLUDED_DVBS2RX_PL_DEFS_H
12
13#include <stdint.h>
14
15#define SOF_LEN 26
16#define PLSC_LEN 64
17#define PILOT_BLK_LEN 36
18#define MAX_PILOT_BLKS 22
19#define MIN_SLOTS 36
20#define MAX_SLOTS 360
21#define PLHEADER_LEN (SOF_LEN + PLSC_LEN)
22#define SLOT_LEN 90
23#define SLOTS_PER_PILOT_BLK 16
24#define PILOT_BLK_INTERVAL (SLOTS_PER_PILOT_BLK * SLOT_LEN)
25#define PILOT_BLK_PERIOD (PILOT_BLK_INTERVAL + PILOT_BLK_LEN)
26#define MIN_XFECFRAME_LEN (MIN_SLOTS * SLOT_LEN)
27#define MAX_XFECFRAME_LEN (MAX_SLOTS * SLOT_LEN)
28#define MIN_PLFRAME_PAYLOAD MIN_XFECFRAME_LEN
29#define MAX_PLFRAME_PAYLOAD MAX_XFECFRAME_LEN + (MAX_PILOT_BLKS * PILOT_BLK_LEN)
30#define MIN_PLFRAME_LEN (PLHEADER_LEN + MIN_PLFRAME_PAYLOAD)
31#define MAX_PLFRAME_LEN (PLHEADER_LEN + MAX_PLFRAME_PAYLOAD)
32
33// Math macros
34#define SQRT2_2 0.7071067811865476
35
36namespace gr {
37namespace dvbs2rx {
38
39// number of codewords for the 7-bit PLSC dataword
40const unsigned int n_plsc_codewords = 128;
41// Start of Frame field in bit-level big endian format (MSB transmitted first)
42constexpr uint64_t sof_big_endian = 0x18D2E82ll << 38;
43// PLSC scrambler sequence (see Section 5.5.2.4 of the standard)
44const uint64_t plsc_scrambler = 0x719d83c953422dfa;
45
46} // namespace dvbs2rx
47} // namespace gr
48
49#endif /* INCLUDED_DVBS2RX_PL_DEFS_H */
constexpr uint64_t sof_big_endian
Definition pl_defs.h:42
const uint64_t plsc_scrambler
Definition pl_defs.h:44
const unsigned int n_plsc_codewords
Definition pl_defs.h:40
Fixed-length double-ended queue with contiguous volk-aligned elements.
Definition gr_bch.h:22