MMDVMHost/DStarSlowData.h

64 lines
1.5 KiB
C
Raw Permalink Normal View History

/*
* Copyright (C) 2016,2023,2025 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; either version 2 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, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef DStarSlowData_H
#define DStarSlowData_H
#include "DStarHeader.h"
class CDStarSlowData {
public:
CDStarSlowData();
~CDStarSlowData();
2025-04-17 13:32:54 +02:00
void add(const unsigned char* data);
2025-04-17 13:32:54 +02:00
CDStarHeader* getHeader();
const unsigned char* getText();
unsigned char getType() const;
bool isComplete() const;
void start();
void reset();
2016-02-01 21:49:52 +01:00
void setText(const char* text);
void getSlowData(unsigned char* data);
2016-02-01 21:49:52 +01:00
private:
unsigned char* m_header;
unsigned int m_ptr;
unsigned char* m_buffer;
2016-02-01 21:49:52 +01:00
unsigned char* m_text;
unsigned int m_textPtr;
unsigned char m_textBits;
2025-03-27 19:27:48 +01:00
enum class SDD_STATE {
FIRST,
SECOND
};
SDD_STATE m_state;
2025-04-17 13:32:54 +02:00
bool m_complete;
void loadHeader();
void loadText();
};
#endif