优化:
1. 通过内存池解决丢帧问题; 2. 解析惯导卫星个数,并通过socket发送给psdk; 3. 取消通过sbg卫星时间设置linux系统时间,此功能交给psdk做;
This commit is contained in:
@ -37,6 +37,11 @@
|
||||
#include "math.h"
|
||||
#include "utility_tc.h"
|
||||
|
||||
#include "MemoryPool.h"
|
||||
#include <queue>
|
||||
#include <QMutex>
|
||||
|
||||
|
||||
|
||||
//#ifdef WIN32
|
||||
//#include <xiApi.h> // Windows
|
||||
@ -44,6 +49,23 @@
|
||||
//#include <m3api/xiApi.h> // Linux, OSX
|
||||
//#endif
|
||||
|
||||
//struct DataBuffer
|
||||
//{
|
||||
// unsigned short data[409200/2];
|
||||
//};
|
||||
|
||||
class DataBuffer
|
||||
{
|
||||
public:
|
||||
DataBuffer();
|
||||
~DataBuffer();
|
||||
|
||||
unsigned short data[425600];//304*1400=425600,为了兼容所有设置spectral bin和spatial bin
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
class RecordXimeaTemperature : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -64,6 +86,30 @@ signals:
|
||||
|
||||
};
|
||||
|
||||
//queue<DataBuffer *> q;
|
||||
//static QMutex r_qtx{ QMutex::Recursive };
|
||||
static std::mutex r_qtx;
|
||||
|
||||
class WriteData2Disk : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
WriteData2Disk();
|
||||
void setParm(queue<DataBuffer *> * q, QString baseFileName, int frameSizeInByte, MemoryPool<DataBuffer> * pool);
|
||||
|
||||
private:
|
||||
queue<DataBuffer *> * m_q;
|
||||
QString m_QbaseFileName;
|
||||
int m_iFrameSizeInByte;
|
||||
MemoryPool<DataBuffer> * m_pool;
|
||||
|
||||
public slots:
|
||||
void write2Disk();
|
||||
|
||||
signals:
|
||||
};
|
||||
|
||||
class XimeaImager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -99,11 +145,17 @@ private:
|
||||
QThread * m_recordTempThread;
|
||||
RecordXimeaTemperature * m_ximeaTemperature;
|
||||
|
||||
QThread * writeData2DiskThread;
|
||||
WriteData2Disk * writeData2Disk;
|
||||
queue<DataBuffer *> * q;
|
||||
MemoryPool<DataBuffer> * m_pool;
|
||||
|
||||
QString m_baseFileName;
|
||||
QString m_ximeaTemperatureCSVPath;
|
||||
|
||||
Iris::IrisXimeaImager m_imager;
|
||||
unsigned short * m_buffer;
|
||||
// MemoryPool<unsigned short> m_pool;
|
||||
bool m_bRecordControl;
|
||||
int m_iFrameCounter;
|
||||
int m_iFrameSizeInByte;
|
||||
@ -132,6 +184,8 @@ private:
|
||||
|
||||
Configfile m_configfile;
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
void openImger();
|
||||
void closeImger();
|
||||
@ -143,5 +197,6 @@ signals:
|
||||
void ximeaImageStatus(int);
|
||||
|
||||
void recordXimeaTemperatureSignal(QString);
|
||||
void startWriteDiskSignal();
|
||||
};
|
||||
#endif // XIMEAIMAGER_H
|
||||
|
Reference in New Issue
Block a user