GNU Radio Manual and C++ API Reference
3.9.1.0
The Free & Open Software Radio Ecosystem
additive_scrambler_bb.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2008,2010,2012 Free Software Foundation, Inc.
4
*
5
* This file is part of GNU Radio
6
*
7
* SPDX-License-Identifier: GPL-3.0-or-later
8
*
9
*/
10
11
#ifndef INCLUDED_DIGITAL_ADDITIVE_SCRAMBLER_BB_H
12
#define INCLUDED_DIGITAL_ADDITIVE_SCRAMBLER_BB_H
13
14
#include <
gnuradio/digital/api.h
>
15
#include <
gnuradio/sync_block.h
>
16
17
namespace
gr
{
18
namespace
digital {
19
20
/*!
21
* \ingroup coding_blk
22
*
23
* \brief
24
* Scramble an input stream using an LFSR.
25
*
26
* \details
27
* This block scrambles up to 8 bits per byte of the input
28
* data stream, starting at the LSB.
29
*
30
* The scrambler works by XORing the incoming bit stream by the
31
* output of the LFSR. Optionally, after \p count bits have been
32
* processed, the shift register is reset to the \p seed value.
33
* This allows processing fixed length vectors of samples.
34
*
35
* Alternatively, the LFSR can be reset using a reset tag to
36
* scramble variable length vectors. However, it cannot be reset
37
* between bytes.
38
*
39
* For details on configuring the LFSR, see gr::digital::lfsr.
40
*/
41
class
DIGITAL_API
additive_scrambler_bb
:
virtual
public
sync_block
42
{
43
public
:
44
// gr::digital::additive_scrambler_bb::sptr
45
typedef
std::shared_ptr<additive_scrambler_bb>
sptr
;
46
47
/*!
48
* \brief Create additive scrambler.
49
*
50
* \param mask Polynomial mask for LFSR
51
* \param seed Initial shift register contents
52
* \param len Shift register length
53
* \param count Number of bytes after which shift register is reset, 0=never
54
* \param bits_per_byte Number of bits per byte
55
* \param reset_tag_key When a tag with this key is detected, the shift register is
56
* reset (when this is set, count is ignored!)
57
*/
58
static
sptr
make(
int
mask,
59
int
seed,
60
int
len,
61
int
count = 0,
62
int
bits_per_byte = 1,
63
const
std::string& reset_tag_key =
""
);
64
65
virtual
int
mask()
const
= 0;
66
virtual
int
seed()
const
= 0;
67
virtual
int
len()
const
= 0;
68
virtual
int
count()
const
= 0;
69
virtual
int
bits_per_byte() = 0;
70
};
71
72
}
/* namespace digital */
73
}
/* namespace gr */
74
75
#endif
/* INCLUDED_DIGITAL_ADDITIVE_SCRAMBLER_BB_H */
gr::digital::additive_scrambler_bb::sptr
std::shared_ptr< additive_scrambler_bb > sptr
Definition:
additive_scrambler_bb.h:45
gr::digital::additive_scrambler_bb
Scramble an input stream using an LFSR.
Definition:
additive_scrambler_bb.h:41
gr::sync_block
synchronous 1:1 input to output with history
Definition:
sync_block.h:25
DIGITAL_API
#define DIGITAL_API
Definition:
gr-digital/include/gnuradio/digital/api.h:18
sync_block.h
api.h
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition:
basic_block.h:29
gr-digital
include
gnuradio
digital
additive_scrambler_bb.h
Generated by
1.8.17