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.

IAfterProc.cpp 1.2 kB

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