This question has been cross-posted as issues on the GitHub repositories of the C# API and the python wrapper.
TL;DR Is there a way to start a capture and get an acknowledgment for when the capture starts?
The problem, roughly, is the following: If capture_start
is called and a signal arrives at the recording device, say, a nanosecond later, will that signal be recorded? Probably not. What about a second later? Probably. I would like to know for sure, in other words, I would like to get an acknowledgment which, one received by the host, guarantees that the recording is running. I’m fine with waiting a couple of seconds. So, for example:
handle = s.capture_start()
# The recording may or may not be running at this point.
handle.wait() # Blocks until the capture was acknowledged by the logic analyser.
# Now the recording is guaranteed to be running.
time.sleep(1.0)
s.capture_stop()
# The recording is at least 1.0 seconds long.
It appears to me that the socket/C# API does not offer this capability. For example, the docs have this to say about the capture command:
Socket Command: capture
This command starts a capture. It will return
NAK
if an error occurs.The function will return
ACK
when the capture is complete.
I find this quite frustrating, as the only alternative is to sleep for a fixed amount of time and hope that this is sufficient, essentially creating a race condition between the python wrapper and the device.
Is there any way to achieve this functionality? Does the logic analyzer send an acknowledgment when the capture starts?