Class FieldValuesCache

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

public class FieldValuesCache extends Object
Main purpose is to hold a cache of a pvaStructure as a flat map from string to string.

Maps v4 field names to v3 field names in getters. Via:

display.limitLow, "LOPR" display.limitHigh, "HOPR" display.description, "DESC" display.units, "EGU" control.limitLow, "DRVL" control.limitHigh, "DRVH" control.minStep, "PREC" valueAlarm.lowAlarmLimit, "LOLO" valueAlarm.lowWarningLimit, "LOW" valueAlarm.highWarningLimit, "HIGH" valueAlarm.highAlarmLimit, "HIHI" valueAlarm.hysteresis, "HYST"

Provides calculation of field values to update in a DBRTimeEvent.

  • Constructor Details

    • FieldValuesCache

      public FieldValuesCache(org.epics.pva.data.PVAStructure pvaStructure, boolean excludeV4Changes)
      Constructor of the FieldValuesCache of a PVAStructure
      Parameters:
      pvaStructure - Structure to make cache from
      excludeV4Changes - If to include pvaAccess extra values
  • Method Details

    • getUpdatedFieldValues

      public HashMap<String,String> getUpdatedFieldValues(boolean getEverything, List<String> metaFieldNames)
      Get the updated field values of a pvaStructure as a flat map of strings.
      Parameters:
      getEverything - If to retrieve every field value regardless if maps to a v3 type or not and keep not mapped
      metaFieldNames - Any fields that should always be archived if they change
      Returns:
      A flat map of String values
    • updateFieldValues

      public void updateFieldValues(org.epics.pva.data.PVAStructure pvaStructure, BitSet changes) throws Exception
      Updated the field values of a pvaStructure as a flat map of strings.
      Parameters:
      pvaStructure - input structure, must have same structure as input pvStructure
      changes - The bitset containing the indexes of changes in the PVAStructure
      Throws:
      Exception - Throws when structure is invalid.
    • getCurrentFieldValues

      public HashMap<String,String> getCurrentFieldValues()
      Return the currently cached flat map of string values
      Returns:
      flat map of string values
    • getTimeStampBits

      public BitSet getTimeStampBits()
      Get the bitset of the timeStamp bits of the input pvaStructure
      Returns:
      a bitset of timeStamp bits
    • toString

      public String toString()
      Overrides:
      toString in class Object