Sample API Programs

Sample programs are placed in these default locations when you install the software:

C:\Users\<my account>\AppData\Roaming\Keysight\Signal Studio\PA Test\Samples\SimpleControl

Using Microsoft Visual C# .NET or a similar IDE, you can modify these sample projects to develop your own API programs.

Basic Program Flow

You can create an API program by performing the following general steps. This sequence is demonstrated in the Main.cs file (C:\Users\<my account>\AppData\Roaming\Keysight\Signal Studio\PA Test\Samples\SimpleControl\Main.cs).

  1. Create an API object.

  2. Configuration the software, including

  3. Run the software.

Before editing the sample programs, make backup copies of all files. To save the edited files, right-click each file, select Properties, and de-select the Read-only attribute.

Simple Control Project

The Simple Control project (...\SimpleControl\ConsoleApplication1.sln) provides a basic program for applying an ET only use case.

To view the code, open the ConsoleApplication1.sln file using the Microsoft Visual C# .NET IDE, or open the Main.cs file using a text editor, such as Notepad. Since the ConsoleApplication1.sln program flow does not use the API GUI, you will see only the code contained in the Program.cs file in the Code Editor.

static void Main(string[] args)

{

Api api = new Api();

api.PATestApplication.WaveformModel.FileName = @"C:\Program Files\Keysight\Signal Studio\PA Test\Waveforms\LTE_FDD_5M_QPSK_FullRB.wfm";

api.PATestApplication.EnvelopeTrackingModel.Enabled = true;

api.PATestApplication.DigitalPredistortionModel.Enabled = false;

api.PATestApplication.SignalGeneratorModel.Address = "192.168.0.100";

api.PATestApplication.EnvelopeSignalGeneratorModel.Address = "192.168.0.101";

api.PATestApplication.Run();

api.PATestApplication.EnvelopeTrackingModel.Delay = -490e-9;

api.Close();

}

Figure 1. Main.cs displayed in the Microsoft Visual C# .NET IDE