can_sensor.h 526 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include "types.h"
  3. #include "PCANBasic.h"
  4. class CCanSensor
  5. {
  6. public:
  7. TPCANStatus Initialize();
  8. TPCANStatus Uninitialize();
  9. TPCANStatus Read(TPCANMsg* MessageBuffer, TPCANTimestamp* TimestampBuffer);
  10. TPCANStatus Write(TPCANMsg* MessageBuffer);
  11. TPCANStatus GetErrorText(TPCANStatus Error, WORD Language, LPSTR Buffer);
  12. private:
  13. //TPCANStatus InitCan(TPCANBaudrate Btr0Btr1, TPCANType HwType = 0, DWORD IOPort = 0, WORD Interrupt = 0);
  14. private:
  15. TPCANHandle _handle=PCAN_NONEBUS;
  16. bool _isFD;
  17. };