diff options
author | Piotr Krysik <ptrkrysik@gmail.com> | 2017-08-23 15:59:28 +0200 |
---|---|---|
committer | Piotr Krysik <ptrkrysik@gmail.com> | 2017-08-23 15:59:28 +0200 |
commit | b9a87a18fb1b3a78f03e795479d815b2b2cda734 (patch) | |
tree | f15ffa28f69b4a56508490f366b36af43ab3f3da | |
parent | 344e9d2f47bf260323d1cd9d3382efb0b0beebb8 (diff) |
Moved openbts codes into a separate directory and updated their license statements so they can be automatically processed
-rw-r--r-- | lib/CMakeLists.txt | 12 | ||||
-rw-r--r-- | lib/decoding/GSM610Tables.h | 37 | ||||
-rw-r--r-- | lib/decoding/Viterbi.h | 35 | ||||
-rw-r--r-- | lib/decoding/openbts/AmrCoder.cpp (renamed from lib/decoding/AmrCoder.cpp) | 32 | ||||
-rw-r--r-- | lib/decoding/openbts/AmrCoder.h (renamed from lib/decoding/AmrCoder.h) | 31 | ||||
-rw-r--r-- | lib/decoding/openbts/BitVector.cpp (renamed from lib/decoding/BitVector.cpp) | 46 | ||||
-rw-r--r-- | lib/decoding/openbts/BitVector.h (renamed from lib/decoding/BitVector.h) | 43 | ||||
-rw-r--r-- | lib/decoding/openbts/GSM503Tables.cpp (renamed from lib/decoding/GSM503Tables.cpp) | 32 | ||||
-rw-r--r-- | lib/decoding/openbts/GSM503Tables.h (renamed from lib/decoding/GSM503Tables.h) | 32 | ||||
-rw-r--r-- | lib/decoding/openbts/GSM610Tables.cpp (renamed from lib/decoding/GSM610Tables.cpp) | 39 | ||||
-rw-r--r-- | lib/decoding/openbts/GSM610Tables.h | 34 | ||||
-rw-r--r-- | lib/decoding/openbts/GSM660Tables.cpp (renamed from lib/decoding/GSM660Tables.cpp) | 15 | ||||
-rw-r--r-- | lib/decoding/openbts/GSM660Tables.h (renamed from lib/decoding/GSM660Tables.h) | 11 | ||||
-rw-r--r-- | lib/decoding/openbts/Vector.h (renamed from lib/decoding/Vector.h) | 41 | ||||
-rw-r--r-- | lib/decoding/openbts/Viterbi.h | 39 | ||||
-rw-r--r-- | lib/decoding/openbts/ViterbiR204.cpp (renamed from lib/decoding/ViterbiR204.cpp) | 43 | ||||
-rw-r--r-- | lib/decoding/openbts/ViterbiR204.h (renamed from lib/decoding/ViterbiR204.h) | 42 |
17 files changed, 281 insertions, 283 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 18619e3..1686de5 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -35,12 +35,12 @@ list(APPEND grgsm_sources demapping/tch_f_chans_demapper_impl.cc decoding/control_channels_decoder_impl.cc decoding/tch_f_decoder_impl.cc - decoding/AmrCoder.cpp - decoding/BitVector.cpp - decoding/GSM610Tables.cpp - decoding/GSM660Tables.cpp - decoding/GSM503Tables.cpp - decoding/ViterbiR204.cpp + decoding/openbts/AmrCoder.cpp + decoding/openbts/BitVector.cpp + decoding/openbts/GSM610Tables.cpp + decoding/openbts/GSM660Tables.cpp + decoding/openbts/GSM503Tables.cpp + decoding/openbts/ViterbiR204.cpp decoding/osmocom/coding/gsm0503_conv.c decoding/osmocom/coding/gsm0503_coding.c decoding/osmocom/coding/gsm0503_interleaving.c diff --git a/lib/decoding/GSM610Tables.h b/lib/decoding/GSM610Tables.h deleted file mode 100644 index 53a8e1c..0000000 --- a/lib/decoding/GSM610Tables.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -* Copyright 2008 Free Software Foundation, Inc. -* -* This software is distributed under the terms of the GNU Public License. -* See the COPYING file in the main directory for details. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -*/ - - - -#ifndef GSM610TABLES_H -#define GSM610TABLES_H - - - -namespace GSM { - -/** Table #2 from GSM 05.03 */ -extern unsigned int g610BitOrder[260]; - -} - - -#endif diff --git a/lib/decoding/Viterbi.h b/lib/decoding/Viterbi.h deleted file mode 100644 index 8635bf5..0000000 --- a/lib/decoding/Viterbi.h +++ /dev/null @@ -1,35 +0,0 @@ -/* -* Copyright 2013, 2014 Range Networks, Inc. -* -* This software is distributed under multiple licenses; -* see the COPYING file in the main directory for licensing -* information for this specific distribution. -* -* This use of this software may be subject to additional restrictions. -* See the LEGAL file in the main directory for details. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -*/ - - -#ifndef _VITERBI_H_ -#define _VITERBI_H_ 1 - -// (pat) Virtual base class for Viterbi and Turbo coder/decoders. -class ViterbiBase { - public: - virtual void encode(const BitVector &in, BitVector& target) const = 0; - virtual void decode(const SoftVector &in, BitVector& target) = 0; - // (pat) Return error count from most recent decoder run. - // If you get -1 from this, the method is not defined in the Viterbi class. - virtual int getBEC() { return -1; } - //virtual ~ViterbiBase(); Currently None of these have destructors. - - // These functions are logically part of the Viterbi functionality, even though they do not use any class variables. - unsigned applyPoly(uint64_t val, uint64_t poly); - unsigned applyPoly(uint64_t val, uint64_t poly, unsigned order); -}; -#endif diff --git a/lib/decoding/AmrCoder.cpp b/lib/decoding/openbts/AmrCoder.cpp index d02e69c..718baf0 100644 --- a/lib/decoding/AmrCoder.cpp +++ b/lib/decoding/openbts/AmrCoder.cpp @@ -1,18 +1,22 @@ /* -* Copyright 2013, 2014 Range Networks, Inc. -* -* This software is distributed under multiple licenses; -* see the COPYING file in the main directory for licensing -* information for this specific distribution. -* -* This use of this software may be subject to additional restrictions. -* See the LEGAL file in the main directory for details. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -*/ + * Copyright 2013, 2014 Range Networks, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + */ #include "BitVector.h" diff --git a/lib/decoding/AmrCoder.h b/lib/decoding/openbts/AmrCoder.h index c1df823..ae49bd0 100644 --- a/lib/decoding/AmrCoder.h +++ b/lib/decoding/openbts/AmrCoder.h @@ -1,18 +1,23 @@ /* -* Copyright 2013, 2014 Range Networks, Inc. -* -* This software is distributed under multiple licenses; -* see the COPYING file in the main directory for licensing -* information for this specific distribution. -* -* This use of this software may be subject to additional restrictions. -* See the LEGAL file in the main directory for details. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * Copyright 2013, 2014 Range Networks, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + */ -*/ #ifndef _AMRCODER_H_ #define _AMRCODER_H_ #include <stdint.h> diff --git a/lib/decoding/BitVector.cpp b/lib/decoding/openbts/BitVector.cpp index 86f326a..00730f6 100644 --- a/lib/decoding/BitVector.cpp +++ b/lib/decoding/openbts/BitVector.cpp @@ -1,31 +1,23 @@ /* -* Copyright 2008, 2009, 2014 Free Software Foundation, Inc. -* Copyright 2014 Range Networks, Inc. -* -* -* This software is distributed under the terms of the GNU Affero Public License. -* See the COPYING file in the main directory for details. -* -* This use of this software may be subject to additional restrictions. -* See the LEGAL file in the main directory for details. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -*/ - - - + * Copyright 2008, 2009, 2014 Free Software Foundation, Inc. + * Copyright 2014 Range Networks, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + */ #include "BitVector.h" #include <iostream> diff --git a/lib/decoding/BitVector.h b/lib/decoding/openbts/BitVector.h index 0899817..c8782eb 100644 --- a/lib/decoding/BitVector.h +++ b/lib/decoding/openbts/BitVector.h @@ -1,28 +1,23 @@ /* -* Copyright 2008, 2009, 2014 Free Software Foundation, Inc. -* Copyright 2014 Range Networks, Inc. -* -* This software is distributed under the terms of the GNU Affero Public License. -* See the COPYING file in the main directory for details. -* -* This use of this software may be subject to additional restrictions. -* See the LEGAL file in the main directory for details. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -*/ - + * Copyright 2008, 2009, 2014 Free Software Foundation, Inc. + * Copyright 2014 Range Networks, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + */ #ifndef BITVECTORS_H #define BITVECTORS_H diff --git a/lib/decoding/GSM503Tables.cpp b/lib/decoding/openbts/GSM503Tables.cpp index 02150f2..fb0f235 100644 --- a/lib/decoding/GSM503Tables.cpp +++ b/lib/decoding/openbts/GSM503Tables.cpp @@ -1,18 +1,22 @@ /* -* Copyright 2012, 2014 Range Networks, Inc. -* -* This software is distributed under multiple licenses; see the COPYING file in the main directory for licensing information for this specific distribution. -* -* This use of this software may be subject to additional restrictions. -* See the LEGAL file in the main directory for details. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -*/ - - + * Copyright 2012, 2014 Range Networks, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + */ #include "GSM503Tables.h" diff --git a/lib/decoding/GSM503Tables.h b/lib/decoding/openbts/GSM503Tables.h index 6b6327c..1fe405e 100644 --- a/lib/decoding/GSM503Tables.h +++ b/lib/decoding/openbts/GSM503Tables.h @@ -1,18 +1,22 @@ /* -* Copyright 2012, 2014 Range Networks, Inc. -* -* This software is distributed under multiple licenses; see the COPYING file in the main directory for licensing information for this specific distribution. -* -* This use of this software may be subject to additional restrictions. -* See the LEGAL file in the main directory for details. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -*/ - - + * Copyright 2012, 2014 Range Networks, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + */ #ifndef GSM503TABLES_H #define GSM503TABLES_H diff --git a/lib/decoding/GSM610Tables.cpp b/lib/decoding/openbts/GSM610Tables.cpp index 38f643f..1b08496 100644 --- a/lib/decoding/GSM610Tables.cpp +++ b/lib/decoding/openbts/GSM610Tables.cpp @@ -1,25 +1,22 @@ /* -* Copyright 2008 Free Software Foundation, Inc. -* -* This software is distributed under the terms of the GNU Public License. -* See the COPYING file in the main directory for details. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -*/ - - + * Copyright 2008 Free Software Foundation, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + */ #include "GSM610Tables.h" diff --git a/lib/decoding/openbts/GSM610Tables.h b/lib/decoding/openbts/GSM610Tables.h new file mode 100644 index 0000000..0b8d64f --- /dev/null +++ b/lib/decoding/openbts/GSM610Tables.h @@ -0,0 +1,34 @@ +/* + * Copyright 2008 Free Software Foundation, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + */ + +#ifndef GSM610TABLES_H +#define GSM610TABLES_H + + + +namespace GSM { + +/** Table #2 from GSM 05.03 */ +extern unsigned int g610BitOrder[260]; + +} + + +#endif diff --git a/lib/decoding/GSM660Tables.cpp b/lib/decoding/openbts/GSM660Tables.cpp index 520a6c1..e5687c3 100644 --- a/lib/decoding/GSM660Tables.cpp +++ b/lib/decoding/openbts/GSM660Tables.cpp @@ -1,23 +1,26 @@ -/* EFR (GSM 06.60) importance bit ordering */ - /* * Copyright 2010 Sylvain Munaut <tnt@246tNt.com> * All Rights Reserved * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by + * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. */ +/* EFR (GSM 06.60) importance bit ordering */ + #include "GSM660Tables.h" unsigned int GSM::g660BitOrder[260] = { diff --git a/lib/decoding/GSM660Tables.h b/lib/decoding/openbts/GSM660Tables.h index 9d639fc..9052c3b 100644 --- a/lib/decoding/GSM660Tables.h +++ b/lib/decoding/openbts/GSM660Tables.h @@ -5,17 +5,20 @@ * All Rights Reserved * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by + * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU Affero General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. */ #ifndef GSM660TABLES_H diff --git a/lib/decoding/Vector.h b/lib/decoding/openbts/Vector.h index 23b4dd3..e1224e8 100644 --- a/lib/decoding/Vector.h +++ b/lib/decoding/openbts/Vector.h @@ -1,26 +1,25 @@ -/**@file Simplified Vector template with aliases. */ /* -* Copyright 2008 Free Software Foundation, Inc. -* Copyright 2014 Range Networks, Inc. -* -* This software is distributed under the terms of the GNU Affero Public License. -* See the COPYING file in the main directory for details. -* -* This use of this software may be subject to additional restrictions. -* See the LEGAL file in the main directory for details. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - + * Copyright 2008 Free Software Foundation, Inc. + * Copyright 2014 Range Networks, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + */ +/**@file Simplified Vector template with aliases. */ #ifndef VECTOR_H diff --git a/lib/decoding/openbts/Viterbi.h b/lib/decoding/openbts/Viterbi.h new file mode 100644 index 0000000..77bd599 --- /dev/null +++ b/lib/decoding/openbts/Viterbi.h @@ -0,0 +1,39 @@ +/* + * Copyright 2013, 2014 Range Networks, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + */ + + +#ifndef _VITERBI_H_ +#define _VITERBI_H_ 1 + +// (pat) Virtual base class for Viterbi and Turbo coder/decoders. +class ViterbiBase { + public: + virtual void encode(const BitVector &in, BitVector& target) const = 0; + virtual void decode(const SoftVector &in, BitVector& target) = 0; + // (pat) Return error count from most recent decoder run. + // If you get -1 from this, the method is not defined in the Viterbi class. + virtual int getBEC() { return -1; } + //virtual ~ViterbiBase(); Currently None of these have destructors. + + // These functions are logically part of the Viterbi functionality, even though they do not use any class variables. + unsigned applyPoly(uint64_t val, uint64_t poly); + unsigned applyPoly(uint64_t val, uint64_t poly, unsigned order); +}; +#endif diff --git a/lib/decoding/ViterbiR204.cpp b/lib/decoding/openbts/ViterbiR204.cpp index 999b31b..296e292 100644 --- a/lib/decoding/ViterbiR204.cpp +++ b/lib/decoding/openbts/ViterbiR204.cpp @@ -1,28 +1,23 @@ /* -* Copyright 2008, 2009, 2014 Free Software Foundation, Inc. -* Copyright 2014 Range Networks, Inc. -* -* -* This software is distributed under the terms of the GNU Affero Public License. -* See the COPYING file in the main directory for details. -* -* This use of this software may be subject to additional restrictions. -* See the LEGAL file in the main directory for details. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -*/ + * Copyright 2008, 2009, 2014 Free Software Foundation, Inc. + * Copyright 2014 Range Networks, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + */ diff --git a/lib/decoding/ViterbiR204.h b/lib/decoding/openbts/ViterbiR204.h index 4fd053f..090f1e8 100644 --- a/lib/decoding/ViterbiR204.h +++ b/lib/decoding/openbts/ViterbiR204.h @@ -1,27 +1,23 @@ /* -* Copyright 2008, 2009, 2014 Free Software Foundation, Inc. -* Copyright 2014 Range Networks, Inc. -* -* This software is distributed under the terms of the GNU Affero Public License. -* See the COPYING file in the main directory for details. -* -* This use of this software may be subject to additional restrictions. -* See the LEGAL file in the main directory for details. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -*/ + * Copyright 2008, 2009, 2014 Free Software Foundation, Inc. + * Copyright 2014 Range Networks, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + */ #ifndef _VITERBIR204_H_ #define _VITERBIR204_H_ 1 |