LANGUAGE
JSON SUPPORT
LabVIEW
natively via JSON VIs
Python
Natively via json library
MATLAB/Octave
JSONlab, 3rd party, (https://au.mathworks.com/matlabcentral/fileexchange/33381-jsonlab--a-toolbox-
to-encode-decode-json-files)
C++
Jsoncpp, 3rd party, (https://github.com/open-source-parsers/jsoncpp/wiki)
Plus several others…
Java
Gson, 3rd party, (https://github.com/google/gson)
Plus several others…
Javascript/Node.js
Natively via JSON.parse
C#/VB.NET
Several available…
5.2
HTTP API Basics
The WaveShaper uses HTTP GET/POST methods to configure the instrument and upload a filter function. The WaveShaper Web
server can be accessed via all available connection methods, with different approaches to defining its IP address.
The most common use case is uploading a filter profile to a WaveShaper. A Web browser can send an HTTP POST request to the
WaveShaper Web server, to send the filter profile. For more complex automation, modern programming languages support HTTP
requests through common libraries.
Upload Filter
Description:
Upload filter profile to the WaveShaper
HTTP method:
POST
URL:
http://<_ip_>/waveshaper/loadprofile
POST Data:
JSON formatted request includes the following fields.
JSON FIELD
DESCRIPTION
type
Filter type with one of the following options:
wsp, blockall, transmit, bandpass, bandstop, gaussian
wsp
wsp filter definition stringonly used when tye is
wsp
port
(number)
Port valueonly used when the type is
bandpass, bandstop or gaussian
center
(number)
Center frequency in THzonly used when the type is
bandpass, bandstop or gaussian
bandwidth
(number)
Filter bandwidth in THzonly used when the type is
bandpass, bandstop or gaussian
attn
(number)
Attenuation in dBonly used when the type is
bandpass, bandstop or gaussian
Response:
JSON formatted response includes the following fields.
JSON FIELD
DESCRIPTION
rc
(number)
Result code
msg
Result in text format
sno
WaveShaper serial number
WaveShaper A Series User Manual
36