>>> On 1/31/2002 at 11:19:39 EST, Adam Jon DeGrush wrote:
>> First, are you "monitoring" your channels (using ca_add_event()) or
>> are you using ca_get() in your poll function ?
> I was using ca_sg_array_get() for polling in this case. I wasn't doing
> any monitoring of channels here but I was planning on installing
> monitors using ca_add_event() in the future. Why? Is there problems
> with this?
It's less efficient (for both the host and the IOCs) and it generates
unnecessary network traffic by doing gets on channels whose values have not
changed. How much that matters depends on how many channels you are
working with.
You also have to be careful about not doing a get from a channel that is
not connected. With monitors, you want to look at connection status and
maybe timestamps to see if the data is valid, but all of that info is on
the client side (in your application).
> ca_search_and_connect() was used at initialization with it returning
> cs_conn before replacing it with ca_change_connection_event().
Are you using two connection handlers (as in the example at LANL), with one
for the initial connection and then another to handle subsequent
disconnect/connect events ? This may not be necessary, as you can
determine which type of event caused the handler to be called by looking at
the "op" member of the connection_handler_args structure passed to your
routine. Look in cadef.h for "External OP codes for CA operations".
> I still see a seg fault if I replace myHandler with NULL or I just have
> myHandler printing out the name of the channel via
> ca_name(connect_args.chid). The name is printed correctly before
> aborting.
Have you tried using the debugger (i.e. gdb) to see where the seg fault is
occurring ? If your code was compiled with debugging on (-g), you should
be able to use the core file to get a stack trace, or you can run it under
the debugger, stop at the last part you know was executed (the printf() you
mention above, for instance), and then step through it until it dies.
- brian
- References:
- Re: CA client library and Connection handler Adam Jon DeGrush
- Navigate by Date:
- Prev:
RE: VXI shared memory transfer Jeff Hill
- Next:
Re: et_wish, threadInit and osiThread.h Janet
- 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 client library and Connection handler Adam Jon DeGrush
- Next:
RE: CA client library and Connection handler Jeff Hill
- 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
|