Class FieldValuesCache
java.lang.Object
org.epics.archiverappliance.engine.pv.FieldValuesCache
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 Summary
ConstructorsConstructorDescriptionFieldValuesCache(org.epics.pva.data.PVAStructure pvaStructure, boolean excludeV4Changes) Constructor of the FieldValuesCache of a PVAStructure -
Method Summary
Modifier and TypeMethodDescriptionReturn the currently cached flat map of string valuesGet the bitset of the timeStamp bits of the input pvaStructuregetUpdatedFieldValues(boolean getEverything, List<String> metaFieldNames) Get the updated field values of a pvaStructure as a flat map of strings.toString()voidupdateFieldValues(org.epics.pva.data.PVAStructure pvaStructure, BitSet changes) Updated the field values of a pvaStructure as a flat map of strings.
-
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 fromexcludeV4Changes- 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 mappedmetaFieldNames- 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 pvStructurechanges- The bitset containing the indexes of changes in the PVAStructure- Throws:
Exception- Throws when structure is invalid.
-
getCurrentFieldValues
Return the currently cached flat map of string values- Returns:
- flat map of string values
-
getTimeStampBits
Get the bitset of the timeStamp bits of the input pvaStructure- Returns:
- a bitset of timeStamp bits
-
toString
-