GNU Radio's GSM Package
Viterbi.h
Go to the documentation of this file.
1 /*
2 * Copyright 2013, 2014 Range Networks, Inc.
3 *
4 * This software is distributed under multiple licenses;
5 * see the COPYING file in the main directory for licensing
6 * information for this specific distribution.
7 *
8 * This use of this software may be subject to additional restrictions.
9 * See the LEGAL file in the main directory for details.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 
15 */
16 
17 
18 #ifndef _VITERBI_H_
19 #define _VITERBI_H_ 1
20 
21 // (pat) Virtual base class for Viterbi and Turbo coder/decoders.
22 class ViterbiBase {
23  public:
24  virtual void encode(const BitVector &in, BitVector& target) const = 0;
25  virtual void decode(const SoftVector &in, BitVector& target) = 0;
26  // (pat) Return error count from most recent decoder run.
27  // If you get -1 from this, the method is not defined in the Viterbi class.
28  virtual int getBEC() { return -1; }
29  //virtual ~ViterbiBase(); Currently None of these have destructors.
30 
31  // These functions are logically part of the Viterbi functionality, even though they do not use any class variables.
32  unsigned applyPoly(uint64_t val, uint64_t poly);
33  unsigned applyPoly(uint64_t val, uint64_t poly, unsigned order);
34 };
35 #endif
unsigned applyPoly(uint64_t val, uint64_t poly)
virtual void encode(const BitVector &in, BitVector &target) const =0
virtual void decode(const SoftVector &in, BitVector &target)=0
virtual int getBEC()
Definition: Viterbi.h:28
Definition: BitVector.h:120
Definition: BitVector.h:333
Definition: Viterbi.h:22