ivdriver_can_nvidia_agx.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef IVDRIVER_CAN_NVIDIA_AGX_H
  2. #define IVDRIVER_CAN_NVIDIA_AGX_H
  3. #include "ivdriver_can.h"
  4. #include <QThread>
  5. #include <QMutex>
  6. #include <memory>
  7. #include <QTimer>
  8. #include <array>
  9. #include <vector>
  10. #include <iostream>
  11. #include "nvcan.h"
  12. #include "modulecomm.h"
  13. #include "canmsg.pb.h"
  14. #include "canraw.pb.h"
  15. #include "canstate.pb.h"
  16. #include "xmlparam.h"
  17. namespace iv {
  18. class ivdriver_can_nvidia_agx : public ivdriver_can
  19. {
  20. public:
  21. ivdriver_can_nvidia_agx(std::string strxmlpath);
  22. public:
  23. virtual void modulerun();
  24. private:
  25. basecan * mpcan;
  26. std::shared_ptr<basecan> mspcan;
  27. bool mbCANOpen = false;
  28. std::vector<basecan_msg> msendmsgvector1;
  29. std::vector<basecan_msg> msendmsgvector2;
  30. const int SENDMSGBUFSIZE = 3000;
  31. QMutex mMutexcan1;
  32. QMutex mMutexcan2;
  33. int mindex[2];
  34. void * mpasend0, * mpasend1, * mparecv0, * mparecv1, *mpcanState;
  35. public:
  36. void sendmsg(int index,iv::can::canmsg xmsg);
  37. void sharecanmsg(void * xpa,basecan_msg * pxmsg,int ncount,int nch);
  38. };
  39. }
  40. #endif // IVDRIVER_CAN_NVIDIA_AGX_H