mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-06 06:53:42 +00:00
Merge branch 'master' into fix/FastData
This commit is contained in:
commit
03efef08d8
247 changed files with 6676 additions and 13583 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2015-2019,2025 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2015-2019,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
|
||||
|
|
@ -27,17 +27,20 @@
|
|||
#include "RingBuffer.h"
|
||||
#include "StopWatch.h"
|
||||
#include "AMBEFEC.h"
|
||||
#include "Display.h"
|
||||
#include "Defines.h"
|
||||
#include "Timer.h"
|
||||
#include "Modem.h"
|
||||
|
||||
#if defined(USE_DSTAR)
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
class CDStarControl {
|
||||
public:
|
||||
CDStarControl(const std::string& callsign, const std::string& module, bool selfOnly, bool ackReply, unsigned int ackTime, DSTAR_ACK ackMessage, bool errorReply, const std::vector<std::string>& blackList, const std::vector<std::string>& whiteList, CDStarNetwork* network, CDisplay* display, unsigned int timeout, bool duplex, bool remoteGateway, CRSSIInterpolator* rssiMapper);
|
||||
CDStarControl(const std::string& callsign, const std::string& module, bool selfOnly, bool ackReply, unsigned int ackTime, DSTAR_ACK ackMessage, bool errorReply, const std::vector<std::string>& blackList, const std::vector<std::string>& whiteList, CDStarNetwork* network, unsigned int timeout, bool duplex, bool remoteGateway, CRSSIInterpolator* rssiMapper);
|
||||
~CDStarControl();
|
||||
|
||||
bool writeModem(unsigned char* data, unsigned int len);
|
||||
|
|
@ -61,7 +64,6 @@ private:
|
|||
std::vector<std::string> m_blackList;
|
||||
std::vector<std::string> m_whiteList;
|
||||
CDStarNetwork* m_network;
|
||||
CDisplay* m_display;
|
||||
bool m_duplex;
|
||||
CRingBuffer<unsigned char> m_queue;
|
||||
CDStarHeader m_rfHeader;
|
||||
|
|
@ -88,15 +90,18 @@ private:
|
|||
unsigned int m_rfBits;
|
||||
unsigned int m_netBits;
|
||||
unsigned int m_rfErrs;
|
||||
unsigned int m_netErrs;
|
||||
unsigned char* m_lastFrame;
|
||||
bool m_lastFrameValid;
|
||||
CRSSIInterpolator* m_rssiMapper;
|
||||
unsigned char m_rssi;
|
||||
unsigned char m_maxRSSI;
|
||||
unsigned char m_minRSSI;
|
||||
unsigned int m_aveRSSI;
|
||||
int m_rssi;
|
||||
int m_maxRSSI;
|
||||
int m_minRSSI;
|
||||
int m_aveRSSI;
|
||||
unsigned int m_rssiCountTotal;
|
||||
int m_rssiAccum;
|
||||
unsigned int m_rssiCount;
|
||||
unsigned int m_bitErrsAccum;
|
||||
unsigned int m_bitsCount;
|
||||
bool m_enabled;
|
||||
FILE* m_fp;
|
||||
unsigned char * m_RFdataLookBack;
|
||||
|
|
@ -121,9 +126,19 @@ private:
|
|||
void writeEndRF();
|
||||
void writeEndNet();
|
||||
|
||||
bool openFile();
|
||||
bool writeFile(const unsigned char* data, unsigned int length);
|
||||
void closeFile();
|
||||
void writeJSONRSSI();
|
||||
void writeJSONBER();
|
||||
void writeJSONText(const unsigned char* text);
|
||||
|
||||
void writeJSONRF(const char* action, const unsigned char* my1, const unsigned char* my2, const unsigned char* your);
|
||||
void writeJSONRF(const char* action, float duration, float ber);
|
||||
void writeJSONRF(const char* action, float duration, float ber, int minRSSI, int maxRSSI, int aveRSSI);
|
||||
void writeJSONNet(const char* action, const unsigned char* my1, const unsigned char* my2, const unsigned char* your, const unsigned char* reflector = nullptr);
|
||||
void writeJSONNet(const char* action, float duration, float loss);
|
||||
|
||||
void writeJSONRF(nlohmann::json& json, const char* action, float duration, float ber);
|
||||
|
||||
std::string convertBuffer(const unsigned char* buffer, unsigned int length) const;
|
||||
|
||||
bool insertSilence(const unsigned char* data, unsigned char seqNo);
|
||||
void insertSilence(unsigned int count);
|
||||
|
|
@ -135,3 +150,5 @@ private:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue