#include #include "check_nid.h" using namespace itpp; // Ideas taken from http://op25.osmocom.org/trac/wiki.png/browser/op25/gr-op25/lib/decoder_ff_impl.cc // See also p25_training_guide.pdf page 48. // See also tia-102-baaa-a-project_25-fdma-common_air_interface.pdf page 40. // BCH encoder/decoder implementation from IT++. GNU GPL 3 license. itpp::BCH bch(63, 16, 11, "6 3 3 1 1 4 1 3 6 7 2 3 5 4 5 3", true); /** Convenience class to calculate the parity of the DUID values. Keeps a table with the expected outcomes * for fast lookup. */ class ParityTable { private: unsigned char table[16]; unsigned char get_index(unsigned char x, unsigned char y) { return (x<<2) + y; } public: ParityTable() { for (unsigned int i=0; i