EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: asyn for synchronous devices
From: Emmanuel Mayssat <[email protected]>
To: Mark Rivers <[email protected]>
Cc: [email protected]
Date: Mon, 10 Sep 2007 14:24:12 -0700
Mark, all,

On Mon, 2007-09-10 at 15:04 -0500, Mark Rivers wrote:
> If you make it
> synchronous, then it will block other EPICS devices while it is
> processing.  If the computation takes more than a msec or so you should
> make it asynchronous.

I am a little confused, and cannot find a clear way to define
synchronous devices. Are PCI devices (ADC/DAC, frame grabber) all
synchronous devices? I would think so, but after all maybe not...

> In general the advantage of asyn for synchronous devices is:
> 
> - You can use generic device support, no need to write specialized
> device support.

Not sure I understand. Are you saying that as long as I use supported
asyn records, then I can use asyn?

> - Your driver architecture will work when you port to a device that is
> asynchronous (or decide later it should be asynchronous).

What would be the difference in the implementation? 
For async devices, use callback, timed-out operations, hardware/software
interrupts.
For sync devices, scan is set to a specific value. Is that it?

So if that is the case, because I intend to use asyn/software interrupts
does that make my driver asynchronous? And possibly I could use a PCI
card (frame grabber) as an asynchronous device...

> - You have well-defined interfaces between device support and your
> driver.  The alternative is to create your own interfaces, with
> associated debugging.

Does that mean that the way I want to use the asyn interfaces ( as
described in an earlier email) is appropriate?

> I am not sure what you mean the "the upper asyn layer does all of the
> image processing".  Is this actually in an asyn port driver?
I meant something like triggering the image processing in the asyn
interrupt routine (for ex callInt32Interrupt), prior to the
interruptStart call. 
That way, the image is captured in the asyn interface and all the
processing is done at a higher level (in the asyn interrupt). 


Regards,

--
E


> > The design could be as follow:
> > If I use a PCI frame grabber I instantiate the PCI interface.
> > If I use a streaming server (AXIS), I instantiate the axis network
> > interface.
> > If I want a set of test images, I instantiate a dummy interface, etc.
> >  
> > The upper asyn layer does all the image processing (such as profile
> > calculation, etc). The interface is actually the "hardware driver" and
> > its purpose is only the acquisition of a snapshot (in a 
> > specific format)
> > and the generation of software interrupts.
> > 
> > Is this a good design for asyn sync drivers?
> > Should the profile calculation be part of the interface and the
> > interrupt be generated when all the processing has been completed?
> > 


Replies:
RE: asyn for synchronous devices Mark Rivers
References:
RE: asyn for synchronous devices Mark Rivers

Navigate by Date:
Prev: RE: asyn for synchronous devices Mark Rivers
Next: RE: asyn for synchronous devices Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: asyn for synchronous devices Mark Rivers
Next: RE: asyn for synchronous devices Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·