1. 配置文件:ximeadll加入 getBufferPolicy 和 getAcqBufferSize;

2. 增大内存池的大小,以便100帧写一次硬盘;
3. 增加ximea报错代码:10/11,将报错代码添加时间写入文件;
This commit is contained in:
tangchao0503
2023-06-21 16:43:33 +08:00
parent 09d224075a
commit 6fc2680a1c
5 changed files with 149 additions and 45 deletions

View File

@ -26,7 +26,7 @@
#include <climits>
#include <cstddef>
template <typename T, size_t BlockSize = 16368000>
template <typename T, size_t BlockSize = 409200000>
class MemoryPool
{
public:

View File

@ -37,6 +37,9 @@ public:
bool getGainOffset(float &gain, float &offset);
bool getSN(QString &SN);
bool getBufferPolicy(int &bufferPolicy);
bool getAcqBufferSize(int &acqBufferSize);
bool createConfigFile();
bool updateConfigFile();

View File

@ -25,6 +25,8 @@
#include <fstream>
#include <unistd.h>
#include <exception>
#include <fcntl.h>
#include <sys/mman.h>
#include <QObject>
#include <QDateTime>
@ -62,7 +64,7 @@ public:
DataBuffer();
~DataBuffer();
unsigned short data[425600];//304*1400=425600为了兼容所有设置spectral bin和spatial bin
unsigned short data[41040000];//1368*300*100=41040000为了兼容所有设置spectral bin和spatial bin
private:
@ -98,12 +100,13 @@ Q_OBJECT
public:
WriteData2Disk();
void setParm(queue<DataBuffer *> * q, QString baseFileName, int frameSizeInByte, MemoryPool<DataBuffer> * pool, rgbImage * rgbImage);
void setParm(queue<DataBuffer *> * q, QString baseFileName, int frameSizeInByte, int number_WriteDisk, MemoryPool<DataBuffer> * pool, rgbImage * rgbImage);
private:
queue<DataBuffer *> * m_q;
QString m_QbaseFileName;
int m_iFrameSizeInByte;
int m_iNumber_WriteDisk;
MemoryPool<DataBuffer> * m_pool;
rgbImage * m_rgbImage;
@ -139,6 +142,7 @@ public:
void stopRecord();
int getFrameCounter();
void writeXiApiErrorCodes(QString filePath, int xiApiErrorCodes);
int getMaxValueOfOneFrame(unsigned short * data, int numberOfPixel);