2023-01-28 09:01:02 -05:00

42 lines
798 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(TPCANHandle CANDeviceChannel, TPCANBaudrate CANDeviceBaudrate, QList<CCANMessage *> *MsgList, unsigned int PollPeriod);
int ReadCAN();
QList<CCANMessage *> *mDeviceMessagesList;
private:
bool mIsCANInitialized;
TPCANHandle mCANDeviceChannel;
signals:
public slots:
void CANTimerExpired();
};
#endif // CANANALYZER_H