LibreVNA/Software/PC_Application/Device/compounddevice.h

45 lines
894 B
C
Raw Normal View History

2022-08-06 00:29:31 +08:00
#ifndef COMPOUNDDEVICE_H
#define COMPOUNDDEVICE_H
#include "savable.h"
#include <vector>
#include <QString>
class CompoundDevice : public Savable
{
friend class CompoundDeviceEditDialog;
public:
CompoundDevice();
virtual nlohmann::json toJSON();
virtual void fromJSON(nlohmann::json j);
class PortMapping {
public:
unsigned int device;
unsigned int port;
2022-08-07 09:01:22 +08:00
static int findActiveStage(std::vector<PortMapping> map, int device, int port);
2022-08-06 00:29:31 +08:00
};
enum class Synchronization {
USB,
ExtRef,
Trigger,
Last
};
static QString SyncToString(Synchronization sync);
static Synchronization SyncFromString(QString s);
QString getDesription();
QString name;
Synchronization sync;
std::vector<QString> deviceSerials;
std::vector<PortMapping> portMapping;
};
#endif // COMPOUNDDEVICE_H