Watchdog fonctionnel
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <QObject>
|
||||
#include "PCANInterface.h"
|
||||
#include <QTimer>
|
||||
#include "CANMessage.h"
|
||||
|
||||
class CCANWatchdog: public QObject
|
||||
{
|
||||
@@ -12,18 +13,22 @@ class CCANWatchdog: public QObject
|
||||
public:
|
||||
CCANWatchdog();
|
||||
|
||||
int Init(quint8 CANDeviceID, TPCANBaudrate CANDeviceBaudrate, unsigned int WDTPeriod);
|
||||
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;
|
||||
quint8 mCANDeviceID;
|
||||
TPCANBaudrate mCANDeviceBaudrate;
|
||||
QTimer *mWatchdogTimer;
|
||||
bool mWDTInitialized;
|
||||
CCANMessage mWDTCANMsg;
|
||||
|
||||
private:
|
||||
bool mIsCANInitialized;
|
||||
TPCANHandle mCANDeviceHandle;
|
||||
|
||||
|
||||
public slots:
|
||||
void WatchdogTimeoutTimerExpired();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user