Revert "Revert "Simplify the logic by removing the ring buffer.""

This reverts commit d4d26fc05f.
This commit is contained in:
Jonathan Naylor
2017-11-28 10:19:13 +00:00
parent fc3328fb60
commit 71bd38f9e9
3 changed files with 70 additions and 107 deletions

View File

@@ -19,7 +19,6 @@
#if !defined(DMRNetwork_H)
#define DMRNetwork_H
#include "JitterBuffer.h"
#include "UDPSocket.h"
#include "Timer.h"
#include "RingBuffer.h"
@@ -32,7 +31,7 @@
class CDMRNetwork
{
public:
CDMRNetwork(const std::string& address, unsigned int port, unsigned int local, unsigned int id, const std::string& password, bool duplex, const char* version, bool debug, bool slot1, bool slot2, HW_TYPE hwType, unsigned int jitter);
CDMRNetwork(const std::string& address, unsigned int port, unsigned int local, unsigned int id, const std::string& password, bool duplex, const char* version, bool debug, bool slot1, bool slot2, HW_TYPE hwType);
~CDMRNetwork();
void setOptions(const std::string& options);
@@ -55,24 +54,21 @@ public:
void clock(unsigned int ms);
void reset(unsigned int slotNo);
void close();
private:
in_addr m_address;
unsigned int m_port;
uint8_t* m_id;
std::string m_password;
bool m_duplex;
const char* m_version;
bool m_debug;
CUDPSocket m_socket;
bool m_enabled;
bool m_slot1;
bool m_slot2;
CJitterBuffer** m_jitterBuffers;
HW_TYPE m_hwType;
in_addr m_address;
unsigned int m_port;
uint8_t* m_id;
std::string m_password;
bool m_duplex;
const char* m_version;
bool m_debug;
CUDPSocket m_socket;
bool m_enabled;
bool m_slot1;
bool m_slot2;
HW_TYPE m_hwType;
enum STATUS {
WAITING_CONNECT,