#ifndef CANWATCHDOG_H #define CANWATCHDOG_H #include #include "PCANInterface.h" #include #include "CANMessage.h" class CCANWatchdog: public QObject { Q_OBJECT public: CCANWatchdog(); int Init(CPCANInterface *CANDriverIF, TPCANHandle CANDeviceHandle, unsigned int WDTPeriod,unsigned int CANMsgID); int StartWDT(); int StopWDT(); bool IsInitialized(){return mWDTInitialized;} CPCANInterface *mCANDriverIF; unsigned int mWDTPeriod; QTimer *mWatchdogTimer; bool mWDTInitialized; CCANMessage mWDTCANMsg; private: bool mIsCANInitialized; TPCANHandle mCANDeviceHandle; public slots: void WatchdogTimeoutTimerExpired(); }; #endif // CANWATCHDOG_H