Skip to content

Commit

Permalink
readd missing constants and missing FEC code from previous revert;
Browse files Browse the repository at this point in the history
gatekeep committed Jan 9, 2019
1 parent 2d4829c commit 0da6167
Showing 7 changed files with 210 additions and 89 deletions.
2 changes: 1 addition & 1 deletion P25Control.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2016,2017,2018 by Jonathan Naylor G4KLX
* Copyright (C) 2018 by Bryan Biedenkapp <gatekeep@gmail.com>
* Copyright (C) 2018 by Bryan Biedenkapp <gatekeep@gmail.com> N2PLL
*
* 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
2 changes: 1 addition & 1 deletion P25Control.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2016,2017,2018 by Jonathan Naylor G4KLX
* Copyright (C) 2018 by Bryan Biedenkapp <gatekeep@gmail.com>
* Copyright (C) 2018 by Bryan Biedenkapp <gatekeep@gmail.com> N2PLL
*
* 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
2 changes: 1 addition & 1 deletion P25Data.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
* Copyright (C) 2018 by Bryan Biedenkapp <gatekeep@gmail.com>
* Copyright (C) 2018 by Bryan Biedenkapp <gatekeep@gmail.com> N2PLL
*
* 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
2 changes: 1 addition & 1 deletion P25Data.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
* Copyright (C) 2018 by Bryan Biedenkapp <gatekeep@gmail.com>
* Copyright (C) 2018 by Bryan Biedenkapp <gatekeep@gmail.com> N2PLL
*
* 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
2 changes: 2 additions & 0 deletions P25Defines.h
Original file line number Diff line number Diff line change
@@ -55,6 +55,8 @@ const unsigned int P25_PDU_FEC_LENGTH_BITS = P25_PDU_FEC_LENGTH_BYTES

const unsigned int P25_MI_LENGTH_BYTES = 9U;

const unsigned char P25_ALGO_UNENCRYPT = 0x80U;

const unsigned char P25_LCF_GROUP = 0x00U;
const unsigned char P25_LCF_PRIVATE = 0x03U;

283 changes: 198 additions & 85 deletions RS241213.cpp

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions RS241213.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2016 by Jonathan Naylor G4KLX
* Copyright (C) 2018 by Bryan Biedenkapp <gatekeep@gmail.com> N2PLL
*
* 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
@@ -26,11 +27,16 @@ class CRS241213
~CRS241213();

bool decode(unsigned char* data);
bool decode24169(unsigned char* data);
bool decode362017(unsigned char* data);

void encode(unsigned char* data);
void encode24169(unsigned char* data);
void encode362017(unsigned char* data);

private:
unsigned char gf6Mult(unsigned char a, unsigned char b) const;
bool decode(unsigned char* data, const unsigned int bitLength, const int firstData, const int roots);
};

#endif

0 comments on commit 0da6167

Please sign in to comment.