33 lines
593 B
C++

#ifndef CANWATCHDOG_H
#define CANWATCHDOG_H
#include <QObject>
#include "PCANInterface.h"
#include <QTimer>
class CCANWatchdog: public QObject
{
Q_OBJECT
public:
CCANWatchdog();
int Init(quint8 CANDeviceID, TPCANBaudrate CANDeviceBaudrate, unsigned int WDTPeriod);
CPCANInterface *mCANDriverIF;
unsigned int mWDTPeriod;
quint8 mCANDeviceID;
TPCANBaudrate mCANDeviceBaudrate;
QTimer *mWatchdogTimer;
private:
bool mIsCANInitialized;
TPCANHandle mCANDeviceHandle;
public slots:
void WatchdogTimeoutTimerExpired();
};
#endif // CANWATCHDOG_H