YULTek/Otarcik_CAN/Sources/PCANInterface.h
2023-07-31 12:07:34 -04:00

37 lines
777 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);
int SendCANMessage(unsigned short Channel,CCANMessage Msg);
private:
TPCANBaudrate mInterfaceBaudrate;
TPCANHandle mInterfaceCANHandle;
signals:
public slots:
};
#endif // PCANINTERFACE_H