Class CSVEvent

java.lang.Object
org.epics.archiverappliance.utils.imprt.CSVEvent
All Implemented Interfaces:
PartionedTime, AlarmInfo, DBRTimeEvent, FieldValues, SamplingInfo, Event, org.json.simple.JSONAware

public class CSVEvent extends Object implements DBRTimeEvent
Author:
mshankar
  • Constructor Details

  • Method Details

    • makeClone

      public Event makeClone()
      Description copied from interface: Event
      Make a clone of this event free from the confines of its containing stream.
      Specified by:
      makeClone in interface Event
      Returns:
      A clone of this event
    • getStatus

      public int getStatus()
      Specified by:
      getStatus in interface AlarmInfo
    • getSeverity

      public int getSeverity()
      Specified by:
      getSeverity in interface AlarmInfo
    • getRepeatCount

      public int getRepeatCount()
      Specified by:
      getRepeatCount in interface SamplingInfo
    • setRepeatCount

      public void setRepeatCount(int repeatCount)
      Specified by:
      setRepeatCount in interface SamplingInfo
    • getEventTimeStamp

      public Instant getEventTimeStamp()
      Description copied from interface: Event
      Get the epoch seconds and the nanos.. We use Instant as the main timestamp class. See TimeUtils for more time related utilities.
      Specified by:
      getEventTimeStamp in interface Event
      Returns:
      The java epoch seconds and the nanos of this event
    • getEpochSeconds

      public long getEpochSeconds()
      Description copied from interface: Event
      Get java epoch seconds of the timestamp of this event. Note that we are skipping nanos. To get to the nanos use the getEventTimeStamp method.
      Specified by:
      getEpochSeconds in interface Event
      Returns:
      The java epoch seconds of this event.
    • getRawForm

      public ByteArray getRawForm()
      Description copied from interface: Event
      Return a serialized form of this event in the internal currency of the archiver appliance. For now, this is Google's Protocol Buffers Note that the raw form is always escaped according to the archiver specification. This is to have a minimum of conversion overhead when streaming data out to servers.
      Specified by:
      getRawForm in interface Event
      Returns:
      A serialization of this event in the internal currency of the archiver appliance.
    • getSampleValue

      public SampleValue getSampleValue()
      Description copied from interface: Event
      Get this event's value. The value for an EPICS sample is a complex thing and can be scalars and vectors of numbers and strings. With EPICS v4, this can get even more complicated.
      Specified by:
      getSampleValue in interface Event
      Returns:
      The valus of this event
    • hasFieldValues

      public boolean hasFieldValues()
      Description copied from interface: FieldValues
      Not all events have field values. Does this event have any field values?
      Specified by:
      hasFieldValues in interface FieldValues
      Returns:
      true or false
    • isActualChange

      public boolean isActualChange()
      Description copied from interface: FieldValues
      Do the field values in this event represent an actual change?
      Specified by:
      isActualChange in interface FieldValues
      Returns:
      true or false
    • getFields

      public HashMap<String,String> getFields()
      Description copied from interface: FieldValues
      Get the fields as a HashMap. If we have more than one entry with the same key, one of the entries is returned.
      Specified by:
      getFields in interface FieldValues
      Returns:
      The fields as a HashMap
    • getFieldValue

      public String getFieldValue(String fieldName)
      Specified by:
      getFieldValue in interface FieldValues
      Parameters:
      fieldName - the field name
      Returns:
      The field value as a string
    • addFieldValue

      public void addFieldValue(String fieldName, String fieldValue)
      Specified by:
      addFieldValue in interface FieldValues
      Parameters:
      fieldName - the field name
      fieldValue - the field value
    • markAsActualChange

      public void markAsActualChange()
      Description copied from interface: FieldValues
      Mark this event as containing actual changes to field values.
      Specified by:
      markAsActualChange in interface FieldValues
    • setFieldValues

      public void setFieldValues(HashMap<String,String> fieldValues, boolean markAsActualChange)
      Specified by:
      setFieldValues in interface FieldValues
      Parameters:
      fieldValues - the field values as HashMap
      markAsActualChange - true or false
    • toString

      public static String toString(SampleValue val, ArchDBRTypes type) throws IOException
      Throws:
      IOException
    • getDBRType

      public ArchDBRTypes getDBRType()
      Specified by:
      getDBRType in interface Event
    • setStatus

      public void setStatus(int status)
      Specified by:
      setStatus in interface AlarmInfo
    • setSeverity

      public void setSeverity(int severity)
      Specified by:
      setSeverity in interface AlarmInfo
    • getYearSecondTimestamp

      public YearSecondTimestamp getYearSecondTimestamp()
      Specified by:
      getYearSecondTimestamp in interface DBRTimeEvent
      Specified by:
      getYearSecondTimestamp in interface PartionedTime
    • getProtobufMessage

      public com.google.protobuf.Message getProtobufMessage()
      Description copied from interface: Event
      Return the protobuf message.
      Specified by:
      getProtobufMessage in interface Event
    • getProtobufMessageClass

      public Class<? extends com.google.protobuf.Message> getProtobufMessageClass()
      Description copied from interface: Event
      Return the protobuf message class.
      Specified by:
      getProtobufMessageClass in interface Event