43 lines
842 B
C++
43 lines
842 B
C++
#ifndef CANANALYZER_H
|
|
#define CANANALYZER_H
|
|
|
|
#include <QObject>
|
|
#include "defines.h"
|
|
#include <QTimer>
|
|
#include <QList>
|
|
#include "CANMessage.h"
|
|
#include "PCANInterface.h"
|
|
|
|
class CCANDevice;
|
|
|
|
class CCANAnalyzer : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit CCANAnalyzer(QObject *parent = 0);
|
|
~CCANAnalyzer();
|
|
CCANDevice *mDevicePtr;
|
|
|
|
CPCANInterface *mCANDriverIF;
|
|
|
|
QTimer *mCANReadTimer;
|
|
unsigned int mCANPollPeriod;
|
|
|
|
int Init(CPCANInterface *CANDriverIF,TPCANHandle DeviceHandle,quint8 CANDeviceChannel, QList<CCANMessage *> *MsgList, unsigned int PollPeriod);
|
|
int ReadCAN();
|
|
|
|
QList<CCANMessage *> *mDeviceMessagesList;
|
|
|
|
private:
|
|
bool mIsCANInitialized;
|
|
TPCANHandle mCANDeviceHandle;
|
|
quint8 mCANDeviceChannel;
|
|
|
|
signals:
|
|
|
|
public slots:
|
|
void CANTimerExpired();
|
|
};
|
|
|
|
#endif // CANANALYZER_H
|