diff --git a/canconnection_old.cpp b/canconnection_old.cpp deleted file mode 100644 index 70cf602..0000000 --- a/canconnection_old.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "canconnection.h" - - - -CANConnection::CANConnection(CANFrameModel *pModel, int base) -{ - model = pModel; - numBuses = getNumBuses(); - busBase = base; -} - -int CANConnection::getNumBuses() -{ - return 1; -} - -int CANConnection::getBusBase() -{ - return busBase; -} - -QString CANConnection::getConnTypeName() -{ - return QString("Generic"); -} - -QString CANConnection::getConnPortName() -{ - return portName; -} - -void CANConnection::run() -{ - -} - -void CANConnection::sendFrame(const CANFrame * frame) -{ - -} - -void CANConnection::sendFrameBatch(const QList *frames) -{ - -} - -void CANConnection::updatePortName(QString portName) -{ - this->portName = portName; -} - -void CANConnection::stopFrameCapture(int bus) -{ - -} - -void CANConnection::startFrameCapture(int bus) -{ - -} - -void CANConnection::updateBusSettings(CANBus bus) -{ - -} diff --git a/canconnection_old.h b/canconnection_old.h deleted file mode 100644 index d2aa0cb..0000000 --- a/canconnection_old.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef CANCONNECTION_H -#define CANCONNECTION_H - -#include -#include -#include "can_structs.h" -#include "canbus.h" -#include "canframemodel.h" - - -//Gentle reminder, CANConnection objects run in their own thread (each one, different thread) -//so, for the love of God, do not try to access them directly. -//Use the signal/slots system to do indirect calls. -//Please and thank you. -class CANConnection : public QObject -{ - Q_OBJECT - -public: - CANConnection(CANFrameModel *, int); - virtual int getNumBuses(); - int getBusBase(); - virtual QString getConnTypeName(); - QString getConnPortName(); - -signals: - void error(const QString &); - void frameUpdateRapid(int); - void frameUpdate(int); - void connectionSuccess(CANConnection *); - void connectionFailure(CANConnection *); - void deviceInfo(int, int); //First param = driver version (or version of whatever you want), second param a status byte - - //bus number, bus speed, status (bit 0 = enabled, 1 = single wire, 2 = listen only) - //3 = Use value stored for enabled, 4 = use value passed for single wire, 5 = use value passed for listen only - //6 = use value passed for speed. This allows bus status to be updated but set that some things aren't really - //being passed. Just set for things that really are being updated. - void busStatus(int, int, int); - -public slots: - virtual void run(); - virtual void sendFrame(const CANFrame *); - virtual void sendFrameBatch(const QList *); - virtual void updatePortName(QString); //string version of the port to connect to. This base doesnt know a thing about this value - virtual void stopFrameCapture(int); //pass bus number - virtual void startFrameCapture(int); //pass bus number. Only if stopped. Defaults to started anyway - /* this is not safe to use pointers with QueuedConnection */ - virtual void updateBusSettings(CANBus); //reference to the bus that changed. - -protected: - bool quit; - int numBuses; - int busBase; //first bus this class is supposed to handle - QString portName; //for easy access later on - QString connType; //what kind of connection this is (socketcan, kvaser, etc) - bool isConnected; //is the whole device connected? (Is the code connected to the device itself) - CANFrameModel *model; -}; - -#endif // CANCONNECTION_H