Class PVContext

java.lang.Object
org.epics.archiverappliance.engine.pv.PVContext

public class PVContext extends Object
Handle PV context, pool PVs by name. When using the pure java CA client implementation, it returns the same 'channel' when trying to access the same PV name multiple times. That's good, but I don't know how to determine if the channel for this EPICS_V3_PV is actually shared. Calling destroy() on such a shared channel creates problems.
The PVContext adds its own hash map of channels and keeps a reference count.
Version:
4-Jun-2012, Luofeng Li:added codes to support for the new archiver
Author:
Kay Kasemir s@version Initial version:CSS
  • Constructor Details

    • PVContext

      public PVContext()
  • Method Details

    • setConfigservice

      public static void setConfigservice(ConfigService configservice)
    • getChannel

      public static gov.aps.jca.Channel getChannel(String name, int jcaCommandThreadId, gov.aps.jca.event.ConnectionListener conn_callback) throws Exception
      Get a new channel, or a reference to an existing one.
      Parameters:
      name - Channel name
      jcaCommandThreadId - The JCA Command thread.
      conn_callback -  
      Returns:
      reference to channel
      Throws:
      Exception - on error
      See Also:
      • releaseChannel(gov.aps.jca.Channel, gov.aps.jca.event.ConnectionListener)
    • scheduleCommand

      public static void scheduleCommand(String pvName, int jcaCommandThreadId, gov.aps.jca.Channel theChannel, String msg, Runnable command)
      Add a command to the JCACommandThread.
      Parameters:
      pvName - The name of the PV that this applies to
      jcaCommandThreadId - The JCA Command thread for this PV.
      theChannel - this can be null
      msg -  
      command - The runnable that will run in the specified command thread