On 2013-04-23 email@example.com wrote:
> I've finally isolated the issue when calling ca_context_create(1) late ...
> and it's something to do with how the zero count is handled in
> ca_array_get_callback -- to be precise, when calling
> ca_array_get_callback(dbrcode, 0, channel, callback, context)
> the size of the returned array differs, depending on whether
> ca_context_create(1) was called before or after iocInit! Note that this
> problem only occurs with internal PVs, for external PVs the correct count
> is returned in both cases.
Ok, this explains it, but hopefully Jeff will chime in too and look into a
solution for the underlying problem. If you call ca_context_create() before
iocInit() your client then doesn't know about the server's local channels,
because the server hasn't registered as a local channel provider with libCa
yet. Local channels allows the client library to search the local server for
channel names directly before broadcasting them on the network.
Unfortunately there is a known and rather long-standing bug related to using
local channels with an array count of zero:
> I've attached a complete example IOC
... and you thereby discovered by I don't recommend sending st.cmd files to
tech-talk as attachments, even embedded inside a compressed tarfile or
zipfile. Spam filters are terrified of files with a .cmd extension in case
they contain instructions that Windows will execute. Just paste the contents
of any st.cmd file into the message in the future.
> I can't find documentation for the expected behaviour of calling
> ca_array_get_callback() with a zero count, but I've never encountered
> problems with this before: up to now I've expected to get the "natural"
> record size.
The CA documentation does actually say (briefly!) what a count of zero is
supposed to mean; look for COUNT under the Arguments detail.
Prior to 3.14.12 we didn't support dynamic array sizes and specifying a zero
size was supposed to always give you the maximum size of the array; after
3.14.12 it should give you just the number of elements the array currently
It is difficult to get a man to understand something, when his salary
depends upon his not understanding it. -- Upton Sinclair
- Calling ca_context_create(1) too late michael.abbott
- Re: Calling ca_context_create(1) too late Andrew Johnson
- RE: Calling ca_context_create(1) too late michael.abbott
- Navigate by Date:
Re: Add choice to dbd file Andrew Johnson
asynPrint to print asyn port name ulrik.pedersen
- Navigate by Thread:
RE: Calling ca_context_create(1) too late michael.abbott
RE: Calling ca_context_create(1) too late Hill, Jeff