Priority by channel? I don't know. The priority sets the task
priorities for the TCP task pair on the server (IOC) side. which is
only one pair per client. So - does CA even allow different priorities
between one client and the IOC? (I don't think so, but I might be wrong.)
Even if it did, what should the gateway do if ten different clients
ask for the same channel with ten different priorities? Average? Take
the lowest? The highest? Open ten connections?
We have to find the right compromise for the gateway between
transparency, performance, and security.
Best regards from my vacation (it's a rainy day, though),
Ralph
Andrew Johnson wrote:
Hi Ernest,
On Tuesday 21 July 2009 11:29:37 Ernest L. Williams Jr. wrote:
Shouldn't connection that the PV gateway has to IOCs be attached with a
high CA Priority?
Not necessarily, that probably depends on the design of your control
system. If you only have OPI connections coming through the gateway
the current setting is probably right.
How do we change this?
The priority of any CA channel connection is controlled by the client
when it connects to the PV, so the gateway could request a higher
priority for the channels on its client-side if it was coded to do
so. However both the calls to ca_create_channel() in the gateway
code currently specify the fixed value CA_PRIORITY_DEFAULT for their
priority. Note that changing the priority of your clients can have
undesirable effects within the IOCs though if you're not careful.
One quick way to raise the priority of your gateway channels would be
to rebuild the gateway to use something like CA_PRIORITY_ARCHIVE
instead, although this would then affect all PVs on all IOCs that the
gateway connects to.
Better solutions might be to add a command-line argument to configure
that fixed value (similar to the -p <prio> option Ralph recently
added to the caget, caput, camonitor and cainfo programs in Base), or
even to make it controllable through the gateway's configuration file
on a per-channel (regexp) basis.
I believe CosyLab has experience in making changes to the gateway
code if you don't have any effort available to do that in-house.
- Andrew