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

33 lines
637 B

12 months ago
12 months ago
12 months ago
  1. #pragma once
  2. #include "stm32basic/stm32basic.hpp"
  3. #include "stm32halport/stm32halport.hpp"
  4. #define MAX_IDITERM 64
  5. namespace iflytop {
  6. using namespace std;
  7. class IdIterm {
  8. public:
  9. int boardTypeId;
  10. int projId;
  11. int boardId;
  12. IdIterm(int boardTypeId, int projId, int boardId) : boardTypeId(boardTypeId), projId(projId), boardId(boardId) {}
  13. IdIterm() {}
  14. };
  15. class IdMgr {
  16. IdIterm table[MAX_IDITERM];
  17. int tableNum;
  18. public:
  19. static IdMgr& ins() {
  20. static IdMgr ins;
  21. return ins;
  22. }
  23. void addIdItem(IdIterm item);
  24. int getBoardId(int boardTypeId);
  25. int getProjId(int boardTypeId);
  26. };
  27. } // namespace iflytop