Skip to content

.NET Wrapper Solution Build Process

smooresni edited this page Feb 20, 2020 · 39 revisions

This guide is intended to show one way that the set of WLAN Toolkit C# wrappers can be converted into a Python invocable DLL utilized by pythonnet for WLAN test applications on the NI platform. This is an unofficial guide and should be used as a starting point for test developers who are tasked with keeping their Python code up to date with the latest version of WLAN Toolkit (abbreviated WLAN TK). Once created and called from code, it is recommended that the process described below be repeated for future releases to ensure that the latest features and enhancements become accessible to the program developer.

The National Instruments WLAN Toolkit for Generation and Analysis is published at the following location on the NI website: National Instruments .NET Support. The WLAN TK wrapper can be found in the table titled “Download .NET Source Code Wrapper APIs” and should reflect the latest released version.

Once downloaded, the following steps should be taken to build the final DLL that will be used in the Python script via pythonnet.

  1. Unzip the contents of the .zip file that contains the WLAN TK wrapper. You should have the following contents:
    • niWLAN_DotNETWrapper_19.1>>DotNetWrappers
    • common – contains shipping example using both generation and analysis
    • NI-WLANA – contains all shipping examples and source files for WLAN Analysis TK
    • NI-WLANG – contains all shipping examples and source files for WLAN Generation TK

The WLAN TK wrappers ship with two instrument driver wrappers: niRFSA.cs and niRFSG.cs. These wrappers may not be the latest version and may need to be updated to expose the latest driver features. In that event, you can find the published instrument wrappers here: NI-RFSA and NI-RFSG

  1. Open a new Visual Studio project of the type “Class Library (.NET Framework) C#” and click “Next”:

  2. Configure the project by

    • Naming the project “ModularInstruments”
    • Selecting a good disk location for the source project to be maintained
    • Naming the solution “Wrappers”
    • Selecting “.NET Framework 4” from the drop-down list
    • And clicking “Create”
Clone this wiki locally