|
1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #include "IAfterProc.h"
-
- IAfterProc::IAfterProc(QObject* parent)
- : QThread(parent)
- , m_pSingleton(nullptr)
- , m_uiIndex(0)
- , m_uiDataSize(0)
- , m_pChannelGroup(nullptr)
- , m_pFrame(nullptr)
- {
- m_pSingleton = Singleton::CreateInstance();
- }
-
- IAfterProc::~IAfterProc()
- {}
-
- void IAfterProc::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();
- // 创建文件存储路径
- createDataPath(m_pParam->m_strTitle);
- }
-
- void IAfterProc::setData(QByteArray byteArray)
- {
- m_byteArray = byteArray;
- }
-
- void IAfterProc::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);
- }
|