Using RFmx with Microsoft Visual C/C++ and .NET

RFmx TD-SCDMA 19.1 Help

Edition Date: October 2019

Part Number: 375493H-01

»View Product Info
Download Help (Windows Only)

This topic assumes that you are using the Microsoft Visual C/C++/C# or VB .NET ADE to manage your code development and that you are familiar with the following ADEs:

Creating a C/C++ Application with Microsoft Visual Studio 2008

The ADE that you can use to create applications using Microsoft Visual C/C++ is Microsoft Visual Studio 2008 or later.

To develop an RFmx SpecAn application in Microsoft Visual C/C++, follow these general steps:

  1. Open an existing or new Visual C/C++ project to manage your application code.
  2. Create source code files of type .c (C) or .cpp (C++).
  3. Add the source code files to the project.
  4. Add following in the source code files: #include "niRFmxSpecAn.h".
  5. Add the RFmx include and library files to the project.
    Note Note  In the following steps, <NIDir> is an alias to specific National Instruments file folder locations. Refer to the RFmx SpecAn Readme for more information about installed file locations.
    Tip Tip  You can modify an RFmx SpecAn C example to create an application, and all required include and library files are added to the project for you
    1. Select Project»Properties»Configuration Properties»C/C++»General»Additional Include Directories, and add the path : <NIDir>\Shared\ExternalCompilerSupport\C\include
    2. Select Linker»Input»Additional Dependencies, and add niRFmxInstr.lib and niRFmxSpecAn.lib separated by a space.
    3. Note Note: For Visual Studio 2010 and above, add niRFmxInstr.lib and niRFmxSpecAn.lib separated by a semicolon .
    4. Select Linker»General»Additional Dependencies and add the following paths
      • 32-Bit Systems:
        • <NIDir>\Shared\ExternalCompilerSupport\C\lib32\msvc;
      • 64-Bit Systems:
        • <NIDir>\Shared\ExternalCompilerSupport\C\lib64\msvc;
  6. Build your application using the appropriate programming flow steps as described in the RFmx Overview topic.

Creating a .NET Application with Microsoft Visual Studio 2010

The ADE that you can use to create applications using Microsoft Visual C# or VB .NET is Microsoft Visual Studio 2010 or later.

To develop an RFmx SpecAn application in Microsoft Visual C# or VB .NET, follow these general steps:

  1. Open an existing or new Microsoft Visual C# or VB .NET project to manage your application code.
  2. Create source code files of type .cs (C#) or .vb (VB .NET).
  3. Add the source code files to the project.
  4. Use the following RFmx namespaces in the source code files:
    • using NationalInstruments.Common;
    • using NationalInstruments.RFmx.InstrMX;
    • using NationalInstruments.RFmx.SpecAnMX;
  5. Set the target .NET Framework of your .NET project to 4.0 or higher.
    • In Solution Explorer, right click on your project name and click Properties.
    • Click on the Application tab and choose .NET Framework 4.0 or higher from the Target Framework list.
    • Note Note: Client Profile is not supported.
  6. Add the following .NET Class Libraries to the project.
    Tip Tip  You can modify an existing RFmx C# or VB .NET example to create an application, and all required .NET class libraries added to the project for you.
    Select Project»Add References, navigate to the .NET tab and add the following files to your project references:
    • NationalInstruments.Common.dll
    • NationalInstruments.RFmx.InstrMX.Fx40.dll
    • NationalInstruments.RFmx.SpecAnMX.Fx40.dll
  7. Note Note: For Visual Studio 2012 and above, navigate to the Assemblies»Extensions tab.
  8. Build your application using the appropriate programming flow steps as described in the RFmx Overview topic.

WAS THIS ARTICLE HELPFUL?

Not Helpful