Vision™ MX280001A Spectrum Monitoring Application Programming Interface : Vision API Reference : FileViewer Class
 
FileViewer Class
Properties
FileViewer.CPMChannelDescriptionList Property
Gets the channel description list for the currently loaded CPM file.
VB
Public ReadOnly Property CPMChannelDescriptionList() As List(Of String)
C#
public List<string> CPMChannelDescriptionList {get;}
C++
public List<string> CPMChannelDescriptionList {get;}
Property Value
Returns an array of strings.
Remarks
Use this property to return a list of valid Channel descriptions. Items from this list can then be feed back using the ChannelDescription Property to select a particular channel from a loaded CPM file.
FileViewer.ChannelDescription Property
Gets or sets a property to channel selection in CPM files..
VB
Public Property ChannelDescription() As String
C#
public string ChannelDescription {get; set;}
C++
public string ChannelDescription {get; set;}
Property Value
Type: String. Default is Null.
Remarks
When setting the ChannelDescription Property, a search is done in the channel list for the currently loaded CPM file. A matching channel is selected and the traces loaded into the trace view graph and the spectrogram.
To get a list of valid channel descriptions for the current file, use the CPMChannelDescriptionList method. This will return a list of valid descriptions. Selecting from this list will choose one of the current channels.
FileViewer.FileList Property
Gets the local file list as an array of strings.
VB
Public ReadOnly Property FileList() As List(Of String)
C#
public List<string> FileList {get;}
C++
public List<string> FileList {get;}
Property Value
Type: Array of strings. Default is Null
Remarks
Returns the list of target receiver (*.RSM) files listed in the File list under the LocalFile LocationType. Choosing from this list allows a valid entry for setting the Filename property to load the file and display the trace data.
FileViewer.Filename Property
Gets or sets the name of the current file loaded for display.
VB
Public Property Filename() As String
C#
public string Filename {get; set;}
C++
public string Filename {get; set;}
Property Value
Type: String. Null is no file is loaded; otherwise, the current filename.
Remarks
Setting the filename will load the file, choosing automatically the target receiver file mode, either RSM or CPM, based on the file extension.
When set, the file will be loaded into system memory. For target receiver RSM files, the trace will automatically display. For CPM files, the channel list will be populated. Selecting a channel from the list will display the trace(s) for the selected file and channel.
FileViewer.Folder Property
Gets or sets the default folder for target receiver RSM files on the local file system.
VB
Public Property Folder() As String
C#
public string Folder {get; set;}
C++
public string Folder {get; set;}
Property Value
Type: String. Defaults to the current user's document folder.
Remarks
The Folder property is also set in the User Control by pressing the Path button and selecting a folder in the browser dialog.
FileViewer.GetRemoteFolderList Property
Returns a list of of folders on the remote specturm monitor
VB
Public ReadOnly Property GetRemoteFolderList() As List(Of String)
C#
public List<string> GetRemoteFolderList {get;}
C++
public List<string> GetRemoteFolderList {get;}
Remarks
Return list contains all subfolders of the current folder on the remote spectrum monitor. To navigate, get the list, find the folder in the list you want, then set that location using the RemoteFolder Property. This is an iterative process to go deep into the folder structure. You can set the full path at once, without the steps, if the full path is known before hand.
 
FileViewer.Hostname Property
Gets or sets the hostname or URL of a remote spectrum monitor.
VB
Public Property Hostname() As String
C#
public string Hostname {get; set;}
C++
public string Hostname {get; set;}
Property Value
Type: String. Default is null reference (Nothing in Visual Basic); otherwise, contains the hostname of the current remote spectrum monitor
Remarks
Use the Hostname property to set the host name or URL for a remote spectrum monitor. Setting this property allows FileViewer to retrieve remote file lists and remote trace files. If an invalid hostname is entered, or the host cannot be reached, connection efforts will time out.
FileViewer.LocationType Property
Gets or sets the location type. This is a value that indicates what type of files are to be loaded.
VB
Public Property LocationType() As FileModes
C#
public FileModes LocationType {get; set;}
C++
public FileModes LocationType {get; set;}
Property Value
Type: Vision.RSM.FileModes
Values: FileModes.CPMFile, FileModes.LocalFolder, and FileModes.RemoteRSM.
Remarks
This property has three values:
FileModes.CPMFile is used to load and display traces stored using the Vision High-Speed Port Scanner. These files typically contain many thousands of traces and may take several seconds to several minutes to load, depending on the size. Because CPM files contain traces collected from multiple probes and antenna ports, a channel list will be shown after the file has been loaded. Choosing a channel is necessary to display traces.
When choosing FileModes.LocalFolder, the side panel will display target receiver RSM files in the currently selected folder of the local file system. You can select one or more files in the file list to display the trace data.
Choosing FileModes.RemoteRSM sets the side panel controls for selecting a remote folder and file on a remote spectrum monitor. This can be used to view select files, or to download all of the files to the local file system.
FileViewer.RemoteFileList Property
Gets a complete list of all files in the current folder on the active remote spectrum monitor.
VB
Public ReadOnly Property RemoteFileList() As List(Of String)
C#
public List<string> RemoteFileList {get;}
C++
public List<string> RemoteFileList {get;}
Remarks
This list includes both measurement files (*.RSM) and setup files (*.stp)
FileViewer.RemoteFolder Property
Gets or sets the current folder on the active remote spectrum montior.
VB
Public Property RemoteFolder() As String
C#
public string RemoteFolder {get; set;}
C++
public string RemoteFolder {get; set;}
Property Value
Type: String
Remarks
Remote folders on remote spectrum monitors always begin with a location specifier. For internal system memory, this is '/Internal'. For removable USB memory, the device name is assigned by the probe operation system when it is inserted. So you may have to query the probe for the USB memory device name using the GetRemoteFolderList method.
FileViewer.SelectAllRemote Property
Sets or clears the selection state of all files in the remote file list.
VB
Public Property SelectAllRemote() As Boolean
C#
public bool SelectAllRemote {get; set;}
C++
public bool SelectAllRemote {get; set;}
Property Value
true if all files in the list are selected; otherwise, false.
Remarks
Selected files are downloaded when the DownloadRemoteFiles method is called.
FileViewer.ShowSidePanel Property
Gets or sets a value indicating whether the side panel is shown in the User Control UI.
VB
Public Property ShowSidePanel() As Boolean
C#
public bool ShowSidePanel {get; set;}
C++
public bool ShowSidePanel {get; set;}
Property Value
Type: Boolean, true if the side panel is visible; otherwise, false.
Remarks
The side panel shows the location type and provides an interface for the user to select path and files for viewing traces. You will need to hide the side panel if you want to restrict the user from navigating the file system. This is useful in cases where the host program already provides file system browsing and you only want to use the File Viewer control for trace and spectrogram display.
FileViewer.ShowSpectrogram Property
Gets or sets a value indicating whether to the Spectrogram graph is displayed.
VB
Public Property ShowSpectrogram() As Boolean
C#
public bool ShowSpectrogram {get; set;}
C++
public bool ShowSpectrogram {get; set;}
Property Value
Type: Boolean, true if the spectrogram graph is displayed; otherwise, false.
Remarks
If the spectrogram graph is hidden, the Trace display fills the entire user control area right of the side panel. If the side panel is also hidden, then the control is just a trace viewer.
FileViewer.SnapShot Property
Takes a snap shot of the user control screen image and returns as a bitmap.
VB
Public ReadOnly Property SnapShot() As Bitmap
C#
public Bitmap SnapShot {get;}
C++
public Bitmap SnapShot {get;}
Property Value
Type: Bitmap
Remarks
Image includes everything shown in the User Control, but not the containing application or form window. It is copied and returned as a standard Windows Bitmap.
Methods
FileViewer.Close Method
Programmatically close the FileViewer control.
VB
Public Sub Close()
C#
public System.Void Close()
C++
public System.Void Close()
Remarks
Using Close stops any current action, saves current settings, and prepares the user control for program shutdown. If you do not call Close, current settings are not saved.
FileViewer.DownloadRemoteFiles Method
Initiates a download of files from the remote spectrum monitor to the location set in parameters.
VB
Public Sub DownloadRemoteFiles(ByVal SaveFolder As String)
C#
public System.Void DownloadRemoteFiles(string SaveFolder)
C++
public System.Void DownloadRemoteFiles(string SaveFolder)
Parameters
SaveFolder: Save location in the local file system for downloaded target receiver RSM files.
Remarks
Using Close stops any current action, saves current settings, and prepares the user control for program shutdown. If you do not call Close, current settings are not saved.
FileViewer.SetTraceData Method
Sets the trace data for viewing.
VB
Public Sub SetTraceData(ByVal StartFrequency As Long,ByVal StopFrequency As Long,ByVal RefLevel As Integer,ByVal TraceArray As String(),ByVal TimeStamp As Date(),ByVal GPS As PointF())
C#
public System.Void SetTraceData(long StartFrequency,long StopFrequency,int RefLevel,string[] TraceArray,DateTime[] TimeStamp,PointF[] GPS)
C++
public System.Void SetTraceData(long StartFrequency,long StopFrequency,int RefLevel,string[] TraceArray,DateTime[] TimeStamp,PointF[] GPS)
Parameters
StartFrequency: Start frequency in Hz for the traces.
StopFrequency: Stop frequency in Hz for the traces.
RefLevel: Reference Level in dBm.
TraceArray: An array of strings. Each element in the array is a list of powers describing the trace data. The power values can be delimited by comma, semicolon or tab characters. Comma is the expected delimiter, as this is what is returned by a remote spectrum monitor. However, the other delimiters are supported.
TraceArray(0) = "-89.54,-91.34,86.87,-79.19,...."
TraceArray(1) = "-87.14,-90.74,91.79,-84.39,...."
TraceArray(n) = "-90.43,-90.37,89.72,-87.39,...."
TimeStamp: An array of timestamps, each element corresponding to date and time of capture for the corresponding trace data element in the TraceArray array. If date and time are not available for the traces, this array may be empty. The time stamp is shown on the trace data plot if the information is provided.
GPS: An array of GPS coordinates, each element corresponding to location of capture for the corresponding trace data element in the TraceArray array. If GPS coordinates are not available for the traces, this array may be empty.
Remarks
The FileViewer object is typically used to display trace data in saved measurement files; either RSM files saved on a target receiver, or a collection of traces saved using the Vision High-Speed Port Scanner. TraceArray is used to circumvent the File requirement and display a list of traces from another source. This allows the FileViewer to be used as trace display object for traces acquired without using the standard Vision UI components.
Enumerations
FileModes Enumeration
Designates the file mode for the Vision FileViewer class.
Value
 
FileModes Values and Definitions
Value
Definition
RemoteRSM
File list comes for a remote spectrum analyzer. A URL must be provided.
LocalFolder
File list comes from the local disk space. Displays RSM files that have already been downloaded.
CPMFile
Trace list comes from a CPM file. CPM files are capture files from the Vision High-Speed Port Scanner. A CPM file may contain many traces acquired from multiple remote spectrum analyzers. The trace list lets the user select a particular remote probe/channel combination.