mirror of
https://github.com/SDRSharpR/SDRSharper.git
synced 2026-04-21 06:13:41 +00:00
SDRSharper (SDRSharp Remake) Full Source (VS2017)
SDRSharper (SDRSharp Remake) Full Source (VS2017)
This commit is contained in:
parent
15020c6fd1
commit
c07e6e6034
494 changed files with 310729 additions and 0 deletions
38
Plugins/SDRSharper.RTLSDR/SDRSharp.RTLSDR/DeviceDisplay.cs
Normal file
38
Plugins/SDRSharper.RTLSDR/SDRSharp.RTLSDR/DeviceDisplay.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
namespace SDRSharp.RTLSDR
|
||||
{
|
||||
public class DeviceDisplay
|
||||
{
|
||||
public uint Index
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public static DeviceDisplay[] GetActiveDevices()
|
||||
{
|
||||
uint num = NativeMethods.rtlsdr_get_device_count();
|
||||
DeviceDisplay[] array = new DeviceDisplay[num];
|
||||
for (uint num2 = 0u; num2 < num; num2++)
|
||||
{
|
||||
string name = NativeMethods.rtlsdr_get_device_name(num2);
|
||||
array[num2] = new DeviceDisplay
|
||||
{
|
||||
Index = num2,
|
||||
Name = name
|
||||
};
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return this.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue