2023-02-19 17:03:43 -05:00

56 lines
1.3 KiB
C++

#ifndef CANDEVICE_H
#define CANDEVICE_H
#include "defines.h"
#include <QObject>
#include "CANAnalyzer.h"
#include "CANMessage.h"
#include "PCANInterface.h"
#include "CANDatabase.h"
#include <QList>
#include "PCANBasic.h"
#include "CANDeviceConfig.h"
#include "CANDataLogger.h"
class COtarcikCan;
class CCANDevice : public QObject
{
Q_OBJECT
public:
explicit CCANDevice(QObject *parent = 0);
CCANDevice(CCANDeviceConfig &SysConfig);
~CCANDevice();
int Init(QString DatabaseFileName, TPCANHandle CANDeviceID, TPCANBaudrate CANDeviceBaudRate, QString DevDescription, QString DeviceName, unsigned int DevicePollPeriod);
int Init();
public:
CCANDeviceConfig mDeviceConfigInfo;
COtarcikCan *mProgramPtr;
bool mMessagesListLoaded;
CCANAnalyzer mCANAnalyzer; //The module that handles the USB puck and decodes the data
CCANDatabase mCANDatabase; //The device's database loaded from dbc file
CCANDataLogger mCANDataLogger;
QList<CCANMessage*> mMessageList;
// CCANDevice &operator=(const CCANDevice *source);
int NewMessageParsed();
private:
bool mConfigSet;
signals:
public slots:
};
QDataStream &operator<<(QDataStream &out, const CCANDevice &source);
QDataStream &operator>>(QDataStream &in, CCANDevice &dest);
#endif // CANDEVICE_H