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
So (just once, during initialization) I set up an appropriate
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, ...);
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??
Cox Realtime Corp.
Los Gatos, CA
- RE: Arrays and portable channel access server Jeff Hill
- Navigate by Date:
Re: workQPanic! Oh no! Tim Mooney
Re: One CA server problem Ralph Lange
- Navigate by Thread:
RE: One CA server question and one CA server problem Jeff Hill
RE: Arrays and portable channel access server Jeff Hill