EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: pend_io
From: Steve Hunt <[email protected]>
To: [email protected]
Date: Tue, 26 Jun 2012 15:49:00 +0200
I have a problem running a trivial (too trivial it seems) ca client
program.

I fact I just generated the ca example using makeBaseApp.

I changed caget to caput :)

The value was not written to my ioc

I am running 3.14.12.2, on linux_x86_64 but the behavior seems the same
in older versions (at least 3.14.9(

I am sending this to core-talk rather than tech-talk as this seems to be
a real ca problem


#################################################################################3
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include <cadef.h>

int main (int argc, char *argv[])
{
        double  data=86;
        chid        mychid;

        SEVCHK(ca_create_channel(argv[1], NULL, NULL, 10,
&mychid),"failure");
        SEVCHK(ca_pend_io(10.0),"failure");

        SEVCHK(ca_array_put(DBR_DOUBLE, 1, mychid, &data),"failure");
        SEVCHK(ca_pend_io(10.0),"failure");
//      SEVCHK(ca_array_get(DBR_DOUBLE, 1, mychid, &data),"failure");
//      SEVCHK(ca_pend_io(10.0),"failure");
//      SEVCHK(ca_flush_io(),"failure");
//      SEVCHK(ca_poll(),"failure");

//      sleep(10);
//      ca_context_destroy();

//      return result;
}


When I un-comment ca_poll, ca_context_destroy, ca_get (plus its
pend_io), or sleep!!!  it works!!!

so  a ca_poll, a ca_context_destroy, or a ca_pend_io AFTER a ca_get,
seems to flush the send buffer - but just ca_pend_io, nor ca_flush_io
seem not to do so.

At least the client example generated from makebaseApp should have a
ca_put added, and made to work without the ca_get, but perhaps this
could be considered a bug.







Replies:
RE: pend_io Hill, Jeff

Navigate by Date:
Prev: Re: [Merge] lp:~epics-core/epics-base/thread-pool into lp:epics-base mdavidsaver
Next: RE: pend_io Hill, Jeff
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: [Merge] lp:~dirk.zimoch/epics-base/non-val-attributes into lp:epics-base/3.14 Andrew Johnson
Next: RE: pend_io Hill, Jeff
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 26 Nov 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·