On Mittwoch, 12. Dezember 2007, Jeff Hill wrote:
> > Then a question:
> > Can somebody explain the relationship between.
> > ca_flush_io
> > ca_poll
> > ca_pend_io
> > ca_pend_event
>
> My intent was that this is documented in the manual, but I should reread
> that section. CA is an asynchronous batch oriented communication system.
> This tends to allow for high performance, but its interactions are
> somewhat more complex compared to round trip blocking communications
> interfaces.
>
> In summary, the ca_pend_io function blocks until all ordinary
> (non-callback) get requests (issued since the last call to ca_pend_io)
> complete or its timeout expires. If, when creating a channel, one does
> not specify a connection callback, then ca_pend_io will also block for
> this type of channel to connect (if the channel is created after the last
> call to ca_pend_io). This is the _only_ purpose of ca_pend_io.
>
> The ca_flush_io function blocks until it finishes forcing all requests in
> the output queue to be delivered to the client side input of the TCP
> circuit. This is the _only_ purpose of ca_flush_io.
>
> The ca_pend_event function is for use only in non-preemptive mode
> clients. Its sole purpose is for periodically processing CA client
> library background activities that wouldn't get a chance to run if the
> single thread of control does not pass periodically through the CA client
> library. CA client library background activities include, but are not
> limited to, sending search requests, receiving search responses,
> receiving beacon messages, receiving TCP messages, and calling callbacks.
> The ca_pend_event function waits for a specified interval. If there is CA
> related labor to do it will use CPU otherwise it will sleep for the
> specified interval. If the interval parameter is zero it will be taken as
> a shortcut for an infinite interval. The ca_poll function calls
> ca_pend_event with a very short, but not zero, delay interval.
>
> > And which ones of these I don't have to call in a enabled pre-emptive
> > callback environment?
>
> No polling is required if preemptive callback mode is enabled so the
> ca_pend_event (and ca_poll) functions aren't useful for that type of
> client. The ca_pend_io function is only useful to short lifespan types of
> clients and is therefore not particularly useful in preemptive mode
> clients, and certainly never useful other than in the main thread (the
> thread that created the ca context). The ca_flush_io function will be
> quite useful in preemptive mode (serving exactly the same function it
> serves in the other mode).
Hi Jeff
this is a very concise and clear explanation that you could include verbatim
in the CA Client Lib manual. Or maybe create a CA FAQ, starting with the
above two questions and their answers? On the epics wiki, perhaps?
Cheers
Ben
- References:
- CA wishlist :) Heinrich du Toit
- RE: CA wishlist :) Jeff Hill
- Navigate by Date:
- Prev:
First announcement on the next EPICS collaboration meeting /EPICS seminar SQLiu
- Next:
EPICS Codeathon, 14-18 April 2008 Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: CA wishlist :) J. Lewis Muir
- Next:
vxworks driver 4 realtek 8139? marco_hair
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|