Experimental Physics and
| |||||||||||||||||
|
All is fine and good to be able to use this, -except-, in the case of Actually I think you can already put something like this in your code: System.setProperty("com.cosylab.epics.caj.CAJContext.addr_list", ... your value ...); System.setProperty ("com.cosylab.epics.caj.CAJContext.auto_addr_list", ... "YES" or "NO" ...); Meaning: All that's usually loaded from the JCALibrary.properties can be initialized in your code. So you can hardcode it in your application, or have your application read that info from some jar file location as you suggest and copy it to System.setProperty(). Also, is there a way to create a channel and then 'add' a connection Listener as a separate function? Maybe not. But not a show stopper: Just always create the channel with your 'Forwarding Listener', and then those later listeners register with your 'Forwarding Listener'. Of course you'll have to implement that 'Forwarding Listener'. Or a way to close a channel? There is a Channel.destroy() as well as a Channel.dispose(). I don't know the difference, but I use the 'destroy()' call and that works nicely. Beware, though: If you have listeners, the 'JNI' version will completely remove the channel and all listener information, while the 'CAJ' version might still invoke your listener with another value update, where the status is actually indicating "channel was destroyed", so it makes some sense, it's just that most people who've used the JNI (C/C++) based CA client lib might not expect another event from the destroyed channel. -Kay
| ||||||||||||||||
ANJ, 10 Nov 2011 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |