YULTek/Otarcik_CAN/Sources/PCANInterface.h

36 lines
713 B
C++

#ifndef PCANINTERFACE_H
#define PCANINTERFACE_H
#include <QObject>
#include "CANMessage.h"
#include "PCANBasic.h"
#include <QList>
//class CCANMessage;
class CPCANInterface : public QObject
{
Q_OBJECT
public:
explicit CPCANInterface(QObject *parent = 0);
int Init(TPCANHandle CANDeviceHandle, TPCANBaudrate CANBaudRate);
int DeInit();
bool IsInterfaceOpened(){return CANInterfaceOpened;}
int GetDeviceHandle(quint8 DeviceID, TPCANHandle &Handle);
bool CANInterfaceOpened;
QList<CCANMessage*> ReadCANFullBuffer(unsigned short Channel);
private:
TPCANBaudrate mInterfaceBaudrate;
TPCANHandle mInterfaceCANHandle;
signals:
public slots:
};
#endif // PCANINTERFACE_H