Class PVNameUtil

java.lang.Object
gda.epics.util.PVNameUtil

public class PVNameUtil extends Object
  • Method Details

    • getBasePvName

      public static String getBasePvName(String... pvNames)
      Returns the common base PV name of the given PV names, if one exists, otherwise null. This value returned consists of the common segments of the given PV names, where ':' is pv segment separator. For example, the base PV of BL05I-DI-PHDGN-07:IONC:Y:MP:SELECT.VAL and BL05I-DI-PHDGN-07:IONC:Y:MP:INPOS.VAL is BL05I-DI-PHDGN-07:IONC:Y:MP.

      Note that '-' is not treated as a separator, so the PVs BL18B-DI-PHDGN-01 and BL18B-DI-PHDGN-02 are not considered to have a common base PV. In that case this this method will return null rather than BL18B-DI-PHDGN.

      Parameters:
      pvNames -
      Returns:
      common base PV name or null