mirror of
https://github.com/ShaYmez/MMDVM_CM.git
synced 2025-02-20 12:42:18 -05:00
Allocating some buffers using dynamic memory
This commit is contained in:
parent
496e705536
commit
536a38dd38
@ -105,14 +105,19 @@ m_dmrinfo(false),
|
||||
m_config(NULL),
|
||||
m_configLen(0U)
|
||||
{
|
||||
m_nxdnFrame = new unsigned char[200U];
|
||||
m_dmrFrame = new unsigned char[50U];
|
||||
m_config = new unsigned char[400U];
|
||||
|
||||
::memset(m_nxdnFrame, 0U, 200U);
|
||||
::memset(m_dmrFrame, 0U, 50U);
|
||||
|
||||
m_config = new unsigned char[400U];
|
||||
}
|
||||
|
||||
CDMR2NXDN::~CDMR2NXDN()
|
||||
{
|
||||
delete[] m_nxdnFrame;
|
||||
delete[] m_dmrFrame;
|
||||
delete[] m_config;
|
||||
}
|
||||
|
||||
int CDMR2NXDN::run()
|
||||
|
@ -73,8 +73,8 @@ private:
|
||||
unsigned int m_nxdnSrc;
|
||||
unsigned int m_nxdnDst;
|
||||
unsigned char m_dmrLastDT;
|
||||
unsigned char m_nxdnFrame[200U];
|
||||
unsigned char m_dmrFrame[50U];
|
||||
unsigned char* m_nxdnFrame;
|
||||
unsigned char* m_dmrFrame;
|
||||
unsigned int m_dmrFrames;
|
||||
unsigned int m_nxdnFrames;
|
||||
CDMREmbeddedData m_EmbeddedLC;
|
||||
|
@ -20,6 +20,6 @@
|
||||
#if !defined(VERSION_H)
|
||||
#define VERSION_H
|
||||
|
||||
const char* VERSION = "20180728";
|
||||
const char* VERSION = "20180729";
|
||||
|
||||
#endif
|
||||
|
@ -20,6 +20,6 @@
|
||||
#if !defined(VERSION_H)
|
||||
#define VERSION_H
|
||||
|
||||
const char* VERSION = "20180728";
|
||||
const char* VERSION = "20180729";
|
||||
|
||||
#endif
|
||||
|
@ -111,12 +111,17 @@ m_dmrinfo(false),
|
||||
m_xlxmodule(),
|
||||
m_xlxConnected(false)
|
||||
{
|
||||
m_nxdnFrame = new unsigned char[200U];
|
||||
m_dmrFrame = new unsigned char[50U];
|
||||
|
||||
::memset(m_nxdnFrame, 0U, 200U);
|
||||
::memset(m_dmrFrame, 0U, 50U);
|
||||
}
|
||||
|
||||
CNXDN2DMR::~CNXDN2DMR()
|
||||
{
|
||||
delete[] m_nxdnFrame;
|
||||
delete[] m_dmrFrame;
|
||||
}
|
||||
|
||||
int CNXDN2DMR::run()
|
||||
|
@ -84,8 +84,8 @@ private:
|
||||
unsigned int m_nxdnSrc;
|
||||
unsigned int m_nxdnDst;
|
||||
unsigned char m_dmrLastDT;
|
||||
unsigned char m_nxdnFrame[200U];
|
||||
unsigned char m_dmrFrame[50U];
|
||||
unsigned char* m_nxdnFrame;
|
||||
unsigned char* m_dmrFrame;
|
||||
unsigned int m_dmrFrames;
|
||||
unsigned int m_nxdnFrames;
|
||||
CDMREmbeddedData m_EmbeddedLC;
|
||||
|
@ -20,6 +20,6 @@
|
||||
#if !defined(VERSION_H)
|
||||
#define VERSION_H
|
||||
|
||||
const char* VERSION = "20180728";
|
||||
const char* VERSION = "20180729";
|
||||
|
||||
#endif
|
||||
|
@ -20,6 +20,6 @@
|
||||
#if !defined(VERSION_H)
|
||||
#define VERSION_H
|
||||
|
||||
const char* VERSION = "20180728";
|
||||
const char* VERSION = "20180729";
|
||||
|
||||
#endif
|
||||
|
@ -118,12 +118,17 @@ m_enableWiresX(false),
|
||||
m_remoteGateway(false),
|
||||
m_hangTime(1000U)
|
||||
{
|
||||
m_ysfFrame = new unsigned char[200U];
|
||||
m_dmrFrame = new unsigned char[50U];
|
||||
|
||||
::memset(m_ysfFrame, 0U, 200U);
|
||||
::memset(m_dmrFrame, 0U, 50U);
|
||||
}
|
||||
|
||||
CYSF2DMR::~CYSF2DMR()
|
||||
{
|
||||
delete[] m_ysfFrame;
|
||||
delete[] m_dmrFrame;
|
||||
}
|
||||
|
||||
int CYSF2DMR::run()
|
||||
|
@ -86,8 +86,8 @@ private:
|
||||
std::string m_netDst;
|
||||
std::string m_ysfSrc;
|
||||
unsigned char m_dmrLastDT;
|
||||
unsigned char m_ysfFrame[200U];
|
||||
unsigned char m_dmrFrame[50U];
|
||||
unsigned char* m_ysfFrame;
|
||||
unsigned char* m_dmrFrame;
|
||||
CGPS* m_gps;
|
||||
CDTMF* m_dtmf;
|
||||
CAPRSReader* m_APRS;
|
||||
|
@ -20,6 +20,6 @@
|
||||
#if !defined(VERSION_H)
|
||||
#define VERSION_H
|
||||
|
||||
const char* VERSION = "20180728";
|
||||
const char* VERSION = "20180729";
|
||||
|
||||
#endif
|
||||
|
@ -109,12 +109,17 @@ m_nxdnFrames(0U),
|
||||
m_ysfFrames(0U),
|
||||
m_nxdninfo(false)
|
||||
{
|
||||
m_ysfFrame = new unsigned char[200U];
|
||||
m_nxdnFrame = new unsigned char[200U];
|
||||
|
||||
::memset(m_ysfFrame, 0U, 200U);
|
||||
::memset(m_nxdnFrame, 0U, 50U);
|
||||
::memset(m_nxdnFrame, 0U, 200U);
|
||||
}
|
||||
|
||||
CYSF2NXDN::~CYSF2NXDN()
|
||||
{
|
||||
delete[] m_ysfFrame;
|
||||
delete[] m_nxdnFrame;
|
||||
}
|
||||
|
||||
int CYSF2NXDN::run()
|
||||
|
@ -73,8 +73,8 @@ private:
|
||||
std::string m_netSrc;
|
||||
std::string m_netDst;
|
||||
std::string m_ysfSrc;
|
||||
unsigned char m_ysfFrame[200U];
|
||||
unsigned char m_nxdnFrame[200U];
|
||||
unsigned char* m_ysfFrame;
|
||||
unsigned char* m_nxdnFrame;
|
||||
CGPS* m_gps;
|
||||
CDTMF* m_dtmf;
|
||||
CAPRSReader* m_APRS;
|
||||
|
@ -20,6 +20,6 @@
|
||||
#if !defined(VERSION_H)
|
||||
#define VERSION_H
|
||||
|
||||
const char* VERSION = "20180728";
|
||||
const char* VERSION = "20180729";
|
||||
|
||||
#endif
|
||||
|
@ -161,12 +161,17 @@ m_p25Frames(0U),
|
||||
m_ysfFrames(0U),
|
||||
m_p25info(false)
|
||||
{
|
||||
m_ysfFrame = new unsigned char[200U];
|
||||
m_p25Frame = new unsigned char[100U];
|
||||
|
||||
::memset(m_ysfFrame, 0U, 200U);
|
||||
::memset(m_p25Frame, 0U, 100U);
|
||||
}
|
||||
|
||||
CYSF2P25::~CYSF2P25()
|
||||
{
|
||||
delete[] m_ysfFrame;
|
||||
delete[] m_p25Frame;
|
||||
}
|
||||
|
||||
int CYSF2P25::run()
|
||||
|
@ -66,8 +66,8 @@ private:
|
||||
std::string m_netSrc;
|
||||
std::string m_netDst;
|
||||
std::string m_ysfSrc;
|
||||
unsigned char m_ysfFrame[200U];
|
||||
unsigned char m_p25Frame[100U];
|
||||
unsigned char* m_ysfFrame;
|
||||
unsigned char* m_p25Frame;
|
||||
CDTMF* m_dtmf;
|
||||
unsigned int m_p25Frames;
|
||||
unsigned int m_ysfFrames;
|
||||
|
Loading…
Reference in New Issue
Block a user