====== Logic Analyzer ======
Commands that provide access to the logic analyzer instrument data and functions.
\\
\\
===== Get Current State =====
----
Get the current state of the instrument's channel
* **state**: "armed", "acquiring", "idle", or "triggered"
* **acqCount**: number or null
* **mode**: "la" or "gpio"
* **actualSampleFreq**: number or null
* **actualBufferSize**: number or null
* **triggerDelay**: number or null
=== Example ===
**Command**
{
"la": {
"1": [
{
"command": "getCurrentState"
}
]
}
}
**Response**
{
"la": {
"1": [
{
"command": "getCurrentState",
"statusCode": 0,
"state": "triggered",
"acqCount": 10,
"bitmask": 1023,
"actualSampleFreq": 1000000,
"actualBufferSize": 32000,
"triggerDelay": 0,
"wait": 0
}
]
}
}
\\
===== Set Parameters=====
----
Set the specified parameter(s) of the specified LA channel(s).
**sampleFreq** - mHz
**bufferSize** - in samples
===Example:===
**Command**
{
"la":{
"1":[
{
"command":"setParameters",
"bitmask": 1023,
"sampleFreq": 1000000,
"bufferSize": 32000,
"triggerDelay": 0
}
]
}
}
**Response**
{
"la":{
"1":[
{
"command":"setParameters",
"statusCode":0,
"actualSampleFreq": 6250000000,
"actualTriggerDelay": 0,
"wait":0
}
]
}
}
\\
\\
===== Read =====
----
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. Data type information for the binary chunk is defined under **bufferDataType** in the device enumeration response for the instrument. **numDataBits** defines the maximum number of bits that may contain LA data. Data bits are right justified. For example if bufferDataType is u8 and numDataBits is 3 and all LA channels are high the resulting binary data would be 0b00000111. **bitMask** defines which bits within the binary data are valid LA channels.
**Command**
* **#** - (ASCII Hexadecimal) - The number of bytes in the chunk in ASCII hexadecimal followed by '\r\n'.
* **la** - (Object) - The logic analyzer object.
* **#** - (Array