Files
giesCANne/connections/canconfactory.cpp
T
Andre Hartmann 1dd59ed73c SocketCan: Rename to SerialBusConnection
QtCanBus is not limited to SocketCAN, it also supports various
Windows CAN adapters directly.

Also, add the term Connection to describe the inheritance
hierarchy better.
2017-11-25 17:27:19 +01:00

20 lines
419 B
C++

#include <QString>
#include "canconfactory.h"
#include "serialbusconnection.h"
#include "gvretserial.h"
using namespace CANCon;
CANConnection* CanConFactory::create(type pType, QString pPortName)
{
switch(pType) {
case SOCKETCAN:
return new SerialBusConnection(pPortName);
case GVRET_SERIAL:
return new GVRetSerial(pPortName);
default: {}
}
return NULL;
}