basecan.h 760 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef BASECAN_H
  2. #define BASECAN_H
  3. #include <QThread>
  4. #include "ivfault.h"
  5. #include "ivlog.h"
  6. class basecan_msg
  7. {
  8. public:
  9. unsigned int id;
  10. bool isExtern;
  11. bool isRemote;
  12. unsigned char nLen;
  13. unsigned char data[8];
  14. };
  15. class basecan : public QThread
  16. {
  17. Q_OBJECT
  18. public:
  19. basecan();
  20. ~basecan();
  21. virtual int GetMessage(const int nch,basecan_msg * pMsg,const int nCap);
  22. virtual int SetMessage(const int nch,basecan_msg * pMsg); //Send Message
  23. virtual void startdev();
  24. virtual void stopdev();
  25. virtual bool IsOpen() = 0;
  26. iv::Ivfault *mfault = nullptr;
  27. iv::Ivlog *mivlog = nullptr;
  28. signals:
  29. void SIG_CANOPENSTATE(bool bCAN,int nR,const char * strres);
  30. void SIGTEST();
  31. };
  32. #endif // BASECAN_H