EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: [PATCH 0/4] Adding dynamic arrays to EPICS Channel Access
From: Michael Abbott <[email protected]>
To: undisclosed-recipients:;
Date: Wed, 2 Jun 2010 14:17:59 +0100
Following on from last week's EPICS codeathon at Diamond I have
prepared the attached series of patches for review.

The basic idea is to extend the server's understanding of the EPICS CA
protocol with one further idea: a request for a zero length array is
interpreted as, instead, a request for an autoresizing array, where
the server sends the true "intrinsic" length of the data with each
update.

The motivation is to efficiently support the handling of large
waveforms such as images or long oscilloscope waveforms, where it is
undesirable to have to always send the entire data.  There are
workarounds involving monitoring the .NORD field and resubscribing on
changes, but I believe the approach described here is preferable.
Also, this new functionality opens up the possiblity of sending
complex structured data of unpredictable length packaged as EPICS
waveforms -- something that has already been started with support for
long strings.

It turns out that the implementation of this extension is reasonably
straightforward and that EPICS is mostly already ready for it.  The
following detailed changes are implemented:

* A zero length Data Count in a CA_PROTO_EVENT_ADD or CA_PROTO_READ
message is now interpreted so that the "intrinsic" data count is sent
in all replies.  A new minor protocol version, V4.12, is defined to
enable this behaviour.

* When processing the request for dynamically sized data the server is
able to make use of two items of information for each value: its
dynamic size, as returned by dbGetField(), and its maximum field size,
as stored in the no_elements field of the associated dbAddr structure.

* The channel access client now passes through a zero length request
to the server (if the server reports minor protocol >= 4.12), and the
true data size is now reported in the associated callbacks.  This
means that ca_array_get_callback and ca_create_subscription may now
receive variable size updates in response to a zero length request
count.

I have also updated the caget and camonitor tools to support this new
functionality.


The attached patches are based on bzr revision 12070.

Michael Abbott (4):
  Client side support for automatic resizing arrays.
  Update rsrv to support V4.12 protocol extension.
  Add autosizing array support for caget and camonitor.
  Drive-by refactoring in caserverio.c

 src/ca/caProto.h            |    3 +
 src/ca/db_access.h          |    6 +-
 src/ca/nciu.cpp             |    3 -
 src/ca/nciu.h               |    3 +-
 src/ca/netIO.h              |    6 +-
 src/ca/oldChannelNotify.cpp |    3 +
 src/ca/tcpiiu.cpp           |   11 +-
 src/catools/caget.c         |   30 ++--
 src/catools/camonitor.c     |   11 +-
 src/catools/tool_lib.c      |    6 +-
 src/catools/tool_lib.h      |    4 +-
 src/db/db_access.c          |  345 +++++++++++--------------------------------
 src/db/db_access_routines.h |    3 +
 src/rsrv/camessage.c        |   85 ++++++-----
 src/rsrv/caserverio.c       |   55 ++++---
 src/rsrv/server.h           |    3 +-
 16 files changed, 214 insertions(+), 363 deletions(-)


Replies:
[PATCH 1/4] Client side support for automatic resizing arrays. Michael Abbott
[PATCH 2/4] Update rsrv to support V4.12 protocol extension. Michael Abbott
[PATCH 4/4] Drive-by refactoring in caserverio.c Michael Abbott
[PATCH 3/4] Add autosizing array support for caget and camonitor. Michael Abbott

Navigate by Date:
Prev: [PATCH 3/4] Add autosizing array support for caget and camonitor. Michael Abbott
Next: Re: Hacking rsrv/camessage.c Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: EPICS protocol header Jeff Hill
Next: [PATCH 1/4] Client side support for automatic resizing arrays. Michael Abbott
Index: 2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·