| Visual Basic (Declaration) | |
|---|---|
Public Overridable Sub SaveWaveformToFile( _ ByVal carrierIndex As Integer, _ ByVal fileName As String _ ) | |
| C# | |
|---|---|
public virtual void SaveWaveformToFile( int carrierIndex, string fileName ) | |
| C++/CLI | |
|---|---|
public: virtual void SaveWaveformToFile( int carrierIndex, String^ fileName ) | |
Parameters
- carrierIndex
- Zero-based index of the component carrier to save. Use
-1to save all carriers; in that case, the method appends_CCkbefore the file extension for each carrierk. - fileName
- Destination file path. When carrierIndex is
-1, this is treated as a base path; per-carrier files are written as<baseName>_CCk<extension>in the same directory. The directory is created if it does not exist.
| Exception | Description |
|---|---|
| System.ObjectDisposedException | Thrown if the owning object has been disposed. |
| System.ArgumentNullException | Thrown when fileName is null. |
| System.ArgumentException | Thrown when fileName is empty or whitespace. |
| System.ArgumentOutOfRangeException | Thrown when carrierIndex is not in the valid range
(0..N-1) and is not -1. |
| System.InvalidOperationException | Thrown when no component carriers are configured; when the measurement subsystem or the file-utility service is unavailable; when no valid waveform data are present for the requested carrier(s); or when FlexFrame waveform generation is not licensed (if required). |
| System.IO.DirectoryNotFoundException | Thrown when the directory cannot be created or resolved. |
| System.IO.IOException | Thrown on I/O errors while writing or replacing the file. |
The method validates that measurement data
CC{k}_Generated_Time1 exist, are marked as valid, and contain at least one point. Files are written atomically: data are first written to a temporary file and then moved/replaced at the destination. If a destination file already exists, it is replaced. The MAT header includes the carrier center frequency and the time-step (XDelta).| C# | Copy Code |
|---|---|
// Save a single carrier SaveWaveformToFile(1, @"C:\Temp\wave.mat"); // writes C:\Temp\wave.mat // Save all carriers (e.g., 3 CCs) SaveWaveformToFile(-1, @"C:\Temp\wave.mat"); // writes: // C:\Temp\wave_CC0.mat // C:\Temp\wave_CC1.mat // C:\Temp\wave_CC2.mat | |
Target Platforms: Windows 11 Professional or Enterprise; Windows 10 Professional, Enterprise, or Education (64-bit)
Minimum Software Version Requirement: Keysight 89600 VSA Ver 30.00