-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added libad9361 improved sampling quality implemented filter control implemented decimation implemented a new settings dialog implemented higher sample rates fixed a lot of bugs...
- Loading branch information
Showing
8 changed files
with
647 additions
and
426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace SDRSharp.PlutoSDR | ||
{ | ||
class NativeMethods | ||
{ | ||
[DllImport("libad9361.dll", CallingConvention = CallingConvention.Cdecl)] | ||
public static extern int ad9361_set_bb_rate(IntPtr dev, [In()] uint rate); | ||
|
||
/// <summary> | ||
/// Uses reflection to get the field value from an object. | ||
/// </summary> | ||
/// | ||
/// <param name="type">The instance type.</param> | ||
/// <param name="instance">The instance object.</param> | ||
/// <param name="fieldName">The field's name which is to be fetched.</param> | ||
/// | ||
/// <returns>The field value from the object.</returns> | ||
public static object GetInstanceField(Type type, object instance, string fieldName) | ||
{ | ||
BindingFlags bindFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | ||
| BindingFlags.Static; | ||
FieldInfo field = type.GetField(fieldName, bindFlags); | ||
return field.GetValue(instance); | ||
} | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.