add lock free queue

This commit is contained in:
canpadawan
2016-06-15 18:18:56 +02:00
parent f36d432b50
commit 80719b253b
14 changed files with 367 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
#ifndef SOCKETCANCONNECTION_H
#define SOCKETCANCONNECTION_H
#include <QObject>
#include <QCanBus>
#include "canframemodel.h"
#include "canconnection_old.h"
class BUSConfig {
public:
BUSConfig();
void reset();
bool operator ==(CANBus&);
void operator =(CANBus&);
bool isConfigured;
int speed;
bool listenOnly;
bool active;
};
class SocketCanConnection : public CANConnection
{
Q_OBJECT
public:
SocketCanConnection(CANFrameModel *, int);
virtual ~SocketCanConnection() override;
public slots:
virtual void updateBusSettings(CANBus) override;
private:
void errorReceived(QCanBusDevice::CanBusError error) const;
void framesWritten(qint64 count);
void framesReceived();
void disconnect();
QCanBusDevice* mDev_p;
BUSConfig mConf;
};
#endif // SOCKETCANCONNECTION_H