On Sat, Jul 03, 2021 at 04:49:34PM +0200, Gerhard Sittig wrote:
> On Thu, 2021-07-01 at 23:44 +0100, Martin Ling wrote:
> >
> > The current architecture of libsigrok makes this difficult at the
> > moment. Please see the following bugzilla entry for some previous
> > thoughts on this:
> > https://sigrok.org/bugzilla/show_bug.cgi?id=1276
> 
> Don't think that this is related (the Bugzilla item that you
> reference above is about unified or common SCPI device
> identification, which is totally not the issue here).

It is very relevant in my view.

>From the point of view of a Fluke 45 user, the potential pitfall of the
local echo feature was previously detected and addressed by the driver.

That detection had to be removed because it was being applied to other
devices (#1272). That is a problem with the current architecture, in
which every driver's scan routine is applied to every available device.

The current approach means that changes to any SCPI driver can break
other devices, in ways that an individual user/developer cannot
reasonably be expected to test.

I was responding specifically to this:

> > On Thu, Jul 01, 2021 at 07:12:45PM +0100, John wrote:
> > > Would be nice if we could have the best of all: other
> > > devices unaffected,_and_  reliable operation for the fluke-45
> > > device,_and_  helpful diagnostics to users when a known fatal
> > > condition is seen. Can we get there, please?

In my view, achieving that goal in a maintainable way requires making
the changes I proposed in #1276. Otherwise we will keep running into
this sort of issue without realising it.

If there was a central scan routine that got as far as an *IDN?
response, then work on any driver could proceed from that point without
any risk of breaking other hardware in the process.

For any device that could not be reliably detected by the central
routine, it would be clear manual selection is necessary.

And if changes were needed to the central routine, then it would then be
clear that these are risky and need extensive testing to be merged.

Anyway, returning to the specific issue, I believe that a fully
automated solution is possible for the Fluke 45. If local echo is
enabled, this can be detected by looking for the echo of the *IDN?
string itself.  There is no need to send a separate string such as the
"ECHO-TEST" used previously.

If local echo is detected, we could then expect and discard the echoes
of all subsequent commands. This would need support in the SCPI layer
but in principle is straightforward.

Then everything would just work, regardless of the echo setting. There
would be no need to tell the user to change the setting, neither in an
error nor in the wiki.

But I am firmly of the view that this logic belongs in a central *IDN?
probe routine which is tested on multiple devices.

Regards,


Martin


_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to