1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-01 16:38:06 -04:00

Store device category (type) in the SamplingDevice structure

This commit is contained in:
f4exb
2017-11-01 20:06:33 +01:00
parent aea8de22a1
commit 9a055c643b
27 changed files with 49 additions and 38 deletions
+17 -8
View File
@@ -27,20 +27,28 @@ class PluginInterface {
public:
struct SamplingDevice
{
QString displayedName; //!< The human readable name
QString hardwareId; //!< The internal id that identifies the type of hardware (i.e. HackRF, BladeRF, ...)
QString id; //!< The internal plugin ID corresponding to the device (i.e. for HackRF input, for HackRF output ...)
QString serial; //!< The device serial number
int sequence; //!< The device sequence. >0 when more than one device of the same type is connected
bool rxElseTx; //!< This is the Rx part else the Tx part of the device
int deviceItemIndex; //!< For composite devices this is the Rx or Tx stream index. -1 if not initialized
int claimed; //!< This is the device set index if claimed else -1
enum SamplingDeviceType
{
PhysicalDevice,
BuiltInDevice
};
QString displayedName; //!< The human readable name
QString hardwareId; //!< The internal id that identifies the type of hardware (i.e. HackRF, BladeRF, ...)
QString id; //!< The internal plugin ID corresponding to the device (i.e. for HackRF input, for HackRF output ...)
QString serial; //!< The device serial number
int sequence; //!< The device sequence. >0 when more than one device of the same type is connected
SamplingDeviceType type; //!< The sampling device type for behavior information
bool rxElseTx; //!< This is the Rx part else the Tx part of the device
int deviceItemIndex; //!< For composite devices this is the Rx or Tx stream index. -1 if not initialized
int claimed; //!< This is the device set index if claimed else -1
SamplingDevice(const QString& _displayedName,
const QString& _hardwareId,
const QString& _id,
const QString& _serial,
int _sequence,
SamplingDeviceType _type,
bool _rxElseTx,
int _deviceItemIndex) :
displayedName(_displayedName),
@@ -48,6 +56,7 @@ public:
id(_id),
serial(_serial),
sequence(_sequence),
type(_type),
rxElseTx(_rxElseTx),
deviceItemIndex(_deviceItemIndex),
claimed(-1)