|
- #include "IProcess.h"
-
- IProcess::IProcess(QObject* parent)
- : QThread(parent)
- , m_pSingleton(nullptr)
- , m_bNeedWork(false)
- , m_pConstBuffer(nullptr)
- , m_uiIndex(0)
- , m_uiDataSize(0)
- , m_pChannelGroup(nullptr)
- , m_pFrame(nullptr)
- {
- m_pSingleton = Singleton::CreateInstance();
- }
-
- IProcess::~IProcess()
- {}
-
- void IProcess::init(Frame* frame, std::pair<const unsigned int, Param*>& pUIntParam)
- {
- m_pFrame = frame;
- m_pUIntParam = pUIntParam;
- m_pParam = m_pUIntParam.second;
- m_pChannelGroup = m_pUIntParam.second->m_pChannelGroup;
- m_fillArray = m_pUIntParam.second->m_fillArray;
- m_usFillSize = m_fillArray.size();
- m_pConstBuffer = new ConstBuffer(DataBufferLength, false, false, m_pFrame->m_uiFrameLen);
- // 创建文件存储路径
- createDataPath(m_pParam->m_strTitle);
- }
-
- void IProcess::createDataPath(QString title)
- {
- QString strFilePath = m_pFrame->m_dataStore.m_strDataPath + "/" + title + "_"
- + m_pFrame->m_dataStore.m_strStoreType + "_"
- + m_pFrame->m_dataStore.m_strDateTime + ".bin";
- m_file.setFileName(strFilePath);
- m_file.open(QIODevice::WriteOnly);
- }
|