EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Arrays and portable channel access server
From: "Tony Cox - (415)926-3105" <[email protected]>
To: [email protected]
Date: Wed, 01 Sep 1999 15:39:37 -0700 (PDT)
Hello folks,

	I'm coding up a PCAS here at SSRL & I'm having trouble
returning a variable length array. 

	The array, maximum size 2000, is all floats. Whenever it changes,
I get called at my monitor routine, but sometimes not all 2000 elements
are available. I just want to return the data which is valid to waiting
clients.

	So (just once, during initialization) I set up an appropriate
	gddAtomic...

		gddAtomic( gddAppType_value, aitEnumFloat32, 1, 2000);

 	...permanently allocate myself a data area...

		aitFloat32* data = new aitFloat32[ 2000];

	...and do the normal referencing

		gdd->putRef( data, ...);
		gdd->reference();


	Now when the data comes in, I stuff as much of the data area
as I can with valid data, try to change characteristics on the gdd,
and then use 'postEvent' to inform the clients.

	It is the 'try to change characteristics...' bit which has me stumped.
My first quess was to change the bounds on the gdd to reflect the new
length. No joy. The second was to reset the gdd but that didn't seem to
produce results either. The nice Lansce documentation is silent on how to do
this, and the example server doesn't do it.

	Regardless of what I try, my clients get either as much data as they
have requested (all are using ca_add_array_event), or the whole 2000 elements
(if the 2nd parameter to ca_add_array_event is 0). I note, however, that 
my PV::maxBounds routine is being called at some point in the dispatching;
presumably, *this* is where it is getting the size to return. (Unfortunately,
maxBounds isn't being called from postEvent, or I'd dummy up the maxBounds in
an attempt to get the behaviour I want).


	So whats the buzz? Am I asking more of the pCAS than it's capable of
delivering, or am I misunderstanding what is going on here??


	Tony Cox
	Cox Realtime Corp.
	Los Gatos, CA
	[email protected]


Replies:
RE: Arrays and portable channel access server Jeff Hill

Navigate by Date:
Prev: Re: workQPanic! Oh no! Tim Mooney
Next: Re: One CA server problem Ralph Lange
Index: 1994  1995  1996  1997  1998  <19992000  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: One CA server question and one CA server problem Jeff Hill
Next: RE: Arrays and portable channel access server Jeff Hill
Index: 1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·