MMDVMHost-Private/DMRTrellis.h

33 lines
1 KiB
C
Raw Normal View History

2016-07-07 21:23:30 +02:00
/*
* Copyright (C) 2016 by Jonathan Naylor, G4KLX
*
* 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; version 2 of the License.
*
* 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.
*/
#ifndef DMRTrellis_H
#define DMRTrellis_H
class CDMRTrellis {
public:
CDMRTrellis();
~CDMRTrellis();
void decode(const unsigned char* data, unsigned char* payload);
void encode(const unsigned char* payload, unsigned char* data);
private:
void deinterleave(const unsigned char* in, unsigned char* points) const;
void interleave(const unsigned char* points, unsigned char* out) const;
void totribits(const unsigned char* payload, unsigned char* tribits) const;
2016-07-08 08:12:24 +02:00
void fromtribits(const unsigned char* tribits, unsigned char* payload) const;
2016-07-07 21:23:30 +02:00
};
#endif