mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Refactor ICommunication/Transport => Driver
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
#include <string>
|
||||
#include <ftdi.h>
|
||||
#include "icsneo/device/neodevice.h"
|
||||
#include "icsneo/communication/icommunication.h"
|
||||
#include "icsneo/communication/driver.h"
|
||||
#include "icsneo/third-party/concurrentqueue/blockingconcurrentqueue.h"
|
||||
#include "icsneo/api/eventmanager.h"
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
class FTDI : public ICommunication {
|
||||
class FTDI : public Driver {
|
||||
public:
|
||||
static std::vector<neodevice_t> FindByProduct(int product);
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
#define __PCAP_POSIX_H_
|
||||
|
||||
#include "icsneo/device/neodevice.h"
|
||||
#include "icsneo/communication/icommunication.h"
|
||||
#include "icsneo/communication/driver.h"
|
||||
#include "icsneo/api/eventmanager.h"
|
||||
#include <string>
|
||||
#include <pcap.h>
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
class PCAP : public ICommunication {
|
||||
class PCAP : public Driver {
|
||||
public:
|
||||
class PCAPFoundDevice {
|
||||
public:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef __STM32_POSIX_H_
|
||||
#define __STM32_POSIX_H_
|
||||
|
||||
#include "icsneo/communication/icommunication.h"
|
||||
#include "icsneo/communication/driver.h"
|
||||
#include "icsneo/device/neodevice.h"
|
||||
#include "icsneo/api/eventmanager.h"
|
||||
#include <chrono>
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
class STM32 : public ICommunication {
|
||||
class STM32 : public Driver {
|
||||
public:
|
||||
/*
|
||||
* Note: This is a driver for all devices which use CDC_ACM
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
* in stm32linux.cpp and stm32darwin.cpp respectively
|
||||
* Other POSIX systems (BSDs, QNX, etc) will need bespoke code written in the future
|
||||
*/
|
||||
STM32(const device_eventhandler_t& err, neodevice_t& forDevice) : ICommunication(err), device(forDevice) {}
|
||||
STM32(const device_eventhandler_t& err, neodevice_t& forDevice) : Driver(err), device(forDevice) {}
|
||||
static std::vector<neodevice_t> FindByProduct(int product);
|
||||
|
||||
bool open();
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
#include "icsneo/platform/windows/internal/pcapdll.h"
|
||||
#include "icsneo/device/neodevice.h"
|
||||
#include "icsneo/communication/icommunication.h"
|
||||
#include "icsneo/communication/driver.h"
|
||||
#include "icsneo/api/eventmanager.h"
|
||||
#include <string>
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
class PCAP : public ICommunication {
|
||||
class PCAP : public Driver {
|
||||
public:
|
||||
class PCAPFoundDevice {
|
||||
public:
|
||||
|
||||
@@ -8,19 +8,19 @@
|
||||
#include <chrono>
|
||||
#include <Windows.h>
|
||||
#include "icsneo/device/neodevice.h"
|
||||
#include "icsneo/communication/icommunication.h"
|
||||
#include "icsneo/communication/driver.h"
|
||||
#include "icsneo/api/eventmanager.h"
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
// Virtual COM Port Communication
|
||||
class VCP : public ICommunication {
|
||||
class VCP : public Driver {
|
||||
public:
|
||||
static std::vector<neodevice_t> FindByProduct(int product, std::vector<std::wstring> driverName);
|
||||
static bool IsHandleValid(neodevice_handle_t handle);
|
||||
typedef void(*fn_boolCallback)(bool success);
|
||||
|
||||
VCP(const device_eventhandler_t& err, neodevice_t& forDevice) : ICommunication(err), device(forDevice) {
|
||||
VCP(const device_eventhandler_t& err, neodevice_t& forDevice) : Driver(err), device(forDevice) {
|
||||
overlappedRead.hEvent = INVALID_HANDLE_VALUE;
|
||||
overlappedWrite.hEvent = INVALID_HANDLE_VALUE;
|
||||
overlappedWait.hEvent = INVALID_HANDLE_VALUE;
|
||||
|
||||
Reference in New Issue
Block a user