Commands that provide access to oscilloscope instrument data and functions.
Get the current state of the instrument's channel
Command
Response
Command
{
"osc": {
"1": [
{
"command": "getCurrentState"
}
]
}
}
Response
{
"osc": {
"1": [
{
"command": "getCurrentState",
"statusCode": 0,
"wait": 0,
"state": "triggered",
"acqCount": 10,
"actualVOffset": 0,
"actualSampleFreq": 1000000,
"actualGain": 0.25,
"actualBufferSize": 32000,
"triggerDelay": 0
}
]
}
}
Read data from the device. Data will be returned if the device acqCount is greater or equal to the command acqCount. If the device acqCount is less than the command acqCount the device responds with it's trigger status and optionally a estimated time before a new buffer will be available.
Data is returned in chunked transfer format. The first chunk of data is a JSON object that describes the following chunk of binary data. The binary data type and resolution are defined in the device enumeration and units are in mV. The first byte in the binary data corresponds to the first sample in the buffer (the earliest sample chronologically).
Command
Response
Command
{
"osc":{
"1":[
{
"command":"read",
"acqCount":101
}
]
}
}
Response
160\r\n
{
"osc": {
"1": [
{
"command": "read",
"statusCode": 0,
"wait": 0,
"binaryOffset": 0,
"binaryLength": 1024,
"acqCount": 3,
"actualSampleFreq": 6250000000,
"pointOfInterest": 256,
"triggerIndex": 256,
"triggerDelay": 0
"actualVOffset": 48,
"actualGain": 1
}
]
}
}\r\n
400\r\n
<1024 Byte BLOB>
\r\n
0\r\n
\r\n
Set the specified parameter(s) of the specified oscilloscope channel(s).
Command
Response
Command
{
"osc":{
"1":[
{
"command":"setParameters",
"bufferSize": 32000,
"gain": 0.25,
"vOffset":3000,
"sampleFreq": 1000000,
"triggerDelay": 100000
}
]
}
}
Response
{
"osc":{
"1":[
{
"command":"setParameters",
"statusCode":0,
"actualVOffset":3100,
"actualSampleFreq": 1000000,
"wait":0
}
]
}
}