ProcessingIt.hpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * @Description:
  3. * @Version: 1.0
  4. * @Autor: lishengyin
  5. * @Date: 2022-04-02 14:19:03
  6. * @LastEditors: lishengyin
  7. * @LastEditTime: 2022-04-15 11:21:32
  8. */
  9. #ifndef __PROCESSINGLT_HPP_
  10. #define __PROCESSINGLT_HPP_
  11. #include <iostream>
  12. #include "ParserBase.hpp"
  13. #include "Util/logger.h"
  14. #include "Util/NoticeCenter.h"
  15. using namespace toolkit;
  16. using namespace std;
  17. namespace ins
  18. {
  19. class ProcessingIt:public Module
  20. {
  21. private:
  22. ProcessingIt(): Module("ProcessingIt"){
  23. Init();
  24. }
  25. public:
  26. using Ptr = std::shared_ptr<ProcessingIt>;
  27. ~ProcessingIt(){this->Destroy();}
  28. /**
  29. * @description: 获取Ptr
  30. * @param {*}
  31. * @return {*}
  32. */
  33. static std::shared_ptr<ProcessingIt> getPtr();
  34. /**
  35. * @description: 初始化
  36. * @param {*}
  37. * @return {*}
  38. */
  39. int8_t Init() override;
  40. /**
  41. * @description: 释放资源
  42. * @param {*}
  43. * @return {*}
  44. */
  45. void Destroy() override;
  46. /**
  47. * @description: 是否正常
  48. * @param {*}
  49. * @return {*}
  50. */
  51. bool isNormally() override{
  52. return true;
  53. }
  54. /**
  55. * @description: 解析数据
  56. * @param {*}
  57. * @return {*}
  58. */
  59. bool ParserData(std::shared_ptr<InsPacket> packet);
  60. /**
  61. * @description: 获取解析器
  62. * @param {*}
  63. * @return {*}
  64. */
  65. std::shared_ptr<ParserBase> getParser(InsUniversalData::Ptr data);
  66. };
  67. } // namespace name
  68. #endif