You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

IProcess.cpp 1.2 kB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include "IProcess.h"
  2. IProcess::IProcess(QObject* parent)
  3. : QThread(parent)
  4. , m_pSingleton(nullptr)
  5. , m_bNeedWork(false)
  6. , m_pConstBuffer(nullptr)
  7. , m_uiIndex(0)
  8. , m_uiDataSize(0)
  9. , m_pChannelGroup(nullptr)
  10. , m_pFrame(nullptr)
  11. {
  12. m_pSingleton = Singleton::CreateInstance();
  13. }
  14. IProcess::~IProcess()
  15. {}
  16. void IProcess::init(Frame* frame, std::pair<const unsigned int, Param*>& pUIntParam)
  17. {
  18. m_pFrame = frame;
  19. m_pUIntParam = pUIntParam;
  20. m_pParam = m_pUIntParam.second;
  21. m_pChannelGroup = m_pUIntParam.second->m_pChannelGroup;
  22. m_fillArray = m_pUIntParam.second->m_fillArray;
  23. m_usFillSize = m_fillArray.size();
  24. m_pConstBuffer = new ConstBuffer(DataBufferLength, false, false, m_pFrame->m_uiFrameLen);
  25. // 创建文件存储路径
  26. createDataPath(m_pParam->m_strTitle);
  27. }
  28. void IProcess::createDataPath(QString title)
  29. {
  30. QString strFilePath = m_pFrame->m_dataStore.m_strDataPath + "/" + title + "_"
  31. + m_pFrame->m_dataStore.m_strStoreType + "_"
  32. + m_pFrame->m_dataStore.m_strDateTime + ".bin";
  33. m_file.setFileName(strFilePath);
  34. m_file.open(QIODevice::WriteOnly);
  35. }