-
Notifications
You must be signed in to change notification settings - Fork 137
Description
ngscopeclient updates it's timebase (sample rate(s), memory depth(s), ...) configuration/possible values on some events [1], [2]
but there are other scenarios when the timebase info has to be pulled from the scope instance. Rigol oscilloscopes have timebase dependent also on number of channels enabled (more channels, less memory depth and lower available sample rates)
Thus, current solution with logic deciding when to pull an update, located in the scopehal client, proved to be not scalable. ^^
My proposal is to create function bool Oscilloscope::HasTimebaseChanged() and make the driver report if the timebase changed.
Clearing of this could be done by another function of bool clear argument of mentioned function.
The there are also multiple implementation approaches:
A) implement these functions in the oscilloscope and let the driver just set some variable, e.g.: m_timebaseChanged when needed
B) leave implementation fully on the scope driver
C) mix of both where default would be A), but overridable to allow B)
What do you think?
Let me know what you think. I can then submit PR with necessary changes to scopehal and scopehal-apps.
(Issue found during ngscopeclient/scopehal#1017)