Re #1: See the GetTimeString()
helper function from the SampleAnalyzer API docs on GitHub. This function will calculate the timestamp for a given sample
point (as a string) based on the GetTriggerSample()
and the GetSampleRate()
functions. Note: this provides a result only as a text string, not as a numeric value.
Re #2: I’m not sure if you can output directly to console; you can see the SampleAnalyzer readme.md file for some other debugging suggestions. For High-Level Analyzers (HLAs), you can output python print()
statements to the in-app terminal view, as per the HLA Debugging Tips on Saleae’s support pages.
Unfortunately for your request, I think the command-line console output might be used by Saleae to provide their own internal debug & logging information for the Logic application itself – at least that’s what I’m inferring based on a response in another thread discussing STDOUT and STDERR with the Python API.
Meanwhile, did you try sending to stdout
or stderr
(using fprintf()
from <cstdio>
) and/or to std::cout
or std::cerr
(via <iostream>
)? Otherwise, hopefully Saleae can comment on best practice recommendations and whether your requested feature is actually supported