ZNA Custom DLL SDK
Version1.0.0
Network Analyser Extensions
|
This file defines the interface for custom DLLs which can be used with the ZNX firmware. The mechanism for adding and removing DLLs is described in the manual of the firmware. The DLL is installed in the firmware as *.zip file. This file must include the *.dll file with the functions defined in this header. Additionally this *.zip file is allowed to contain further files. These are stored with the DLL in an internal folder. The firmware will not access these files directly. The files are kept until the package is removed again. Files with the extension *.json are used by the firmware to create customized buttons if possible (see chapter 6).
The interface consists of a set of functions which must be implemented. They can be divided into four groups:
These functions are used to control external devices and provide the results to the firmware. Calls are explained in the next part. All these functions have in common that the firmware expects that the same input results to the same output. The only exception is RsVnaInterruptCallback (for details see function description).
To understand the impact of the "Trace Calculation" (2.3) functions and the "Device Control" (2.4) functions a more detailed understanding of the processes in the firmware is required. Three general parts exist:
This part of the firmware directly interacts with the user. The task is to setup the measurements. This part of the firmware also contains the functionality which computes the trace from the complex data including math operations, statistics, etc.. In this part of the firmware, the functions from the "DLL Handling" (2.1) and "General Properties" (2.2) are called as needed by the firmware.
In this part of the firmware the required wave measurements are computed from the settings made in "GUI/Parser/Internal Logic" (3.1) and passed to the hardware for execution. This process is triggered when settings change. In this process the following steps occur in this order:
In this part of the firmware the data from the actual measurement is processed and further measurements are controlled. In continuous sweep mode this part of the firmware is permanently working to process the incoming measurements. The speed of this code can have a big impact on the device performance. The following steps occur in this order:
Another concept to have in mind when implementing this interface is different drive ports. The interface uses the "Number of Sweep Points" as it is used by the user interface of the firmware. However, the actual steps required during the measurement might be higher due to the fact that one measurement is using a different drive port (e.g. forward and backwards measurement). To associate a task with a drive port this drive port is part of the task type usually denoted "PX" or "DX". This is the same for tasks requested from the DLL. Especially for the control of external devices this can have a big impact.
For all functions in this interface the ZNX firmware allocates and deletes the required memory. The pointers provided already have the required memory. This memory can be accessed and the values can be read or written according to the description of the function.
As part of the package installed with the DLL it is possible to add customized buttons to the firmware. This is done by *.json files. Simply add such a file to the *.zip container with the following content:
Optionally also a Menu.json can be added with the following content
As the VNA Firmware translates structured exceptions into C++ Exception any structured exception usage inside your dll may be translated to an unspecified c++ exception. This is subject to change and as a user you shouldn't rely on it.