GNU Radio's SATELLITES Package

fixed.h
Go to the documentation of this file.
1/* Stuff specific to the CCSDS (255,223) RS codec
2 * (255,223) code over GF(256). Note: the conventional basis is still
3 * used; the dual-basis mappings are performed in [en|de]code_rs_ccsds.c
4 *
5 * Copyright 2003 Phil Karn, KA9Q
6 * May be used under the terms of the GNU Lesser General Public License (LGPL)
7 */
8 typedef unsigned char data_t;
9
10 static inline int mod255(int x)
11{
12 while (x >= 255) {
13 x -= 255;
14 x = (x >> 8) + (x & 255);
15 }
16 return x;
17}
18#define MODNN(x) mod255(x)
19
20 extern data_t CCSDS_alpha_to[];
21 extern data_t CCSDS_index_of[];
22 extern data_t CCSDS_poly[];
23
24#define MM 8
25#define NN 255
26#define ALPHA_TO CCSDS_alpha_to
27#define INDEX_OF CCSDS_index_of
28#define GENPOLY CCSDS_poly
29#define NROOTS 32
30#define FCR 112
31#define PRIM 11
32#define IPRIM 116
33#define PAD pad
data_t
unsigned char data_t
Definition ccsds.h:1
CCSDS_alpha_to
data_t CCSDS_alpha_to[]
CCSDS_poly
data_t CCSDS_poly[]
mod255
static int mod255(int x)
Definition fixed.h:10
CCSDS_index_of
data_t CCSDS_index_of[]