Retrieve WaveShaper device information
Description:
Retrieve information about the WaveShaper
HTTP method:
GET
URL:
http://<_ip_>/waveshaper/devinfo
Response:
JSON formatted response includes the following fields.
JSON FIELD
DESCRIPTION
model
WaveShaper model
sno
WaveShaper serial number
ver)
Firmware version
startfreq
(number)
Start frequency
stopfreq
(number)
Stop frequency
ip
Current IP address
portcount
(number)
Number of output port(s)
msg
Result in text format
Retrieve currently loaded WaveShaper profile
Description:
Retrieve currently loaded WaveShaper filter profile
HTTP method:
GET
URL:
http://<_ip_>/waveshaper/getprofile
Response:
Currently loaded WaveShaper filter profile encoded in WSP formatted string.
5.3
Programming Examples
Overview
The WaveShaper comes with a collection of programming examples for LabVIEW, MATLAB and Python. Each example
demonstrates a set of basic functions including: retrieving device information, uploading arbitrary filter shapes, and saving and
loading WSP filter files. These examples also demonstrate how HTTP commands and JSON strings work together to control your
instrument
Examples
Each example demonstrates a different commonly used WaveShaper function. A complete copy of the code examples may be
downloaded from within the help section of the WaveShaper Software. Here is an overview:
Example_UploadPredefinedProfile
Demonstrates how to program the WaveShaper with a predefined filter shape. This example configures the WaveShaper with a
bandpass filter with a center frequency of 194 THz; bandwidth 1 THz; 0 dB attenuation; and assigned to Port 1. Experiment with
changing the filter shape e.g. to a
gaussian, or bandstop filter. The WaveShaper may also be configured to a full transmit or a
blockall state with this mode.
Example_UploadProfile
Demonstrates how to upload an arbitrary filter shape to your WaveShaper. The code example achieves this by generating a WSP
string programmatically. It shows how device information can be retrieved from the device via the
/waveshaper/devinfo
API
command. Experiment with changing the attenuation or phase functions to see how powerful this feature is.
WaveShaper A Series User Manual
37