Class PBVectorString
java.lang.Object
edu.stanford.slac.archiverappliance.PB.data.PBVectorString
- All Implemented Interfaces:
PartionedTime,AlarmInfo,DBRTimeEvent,FieldValues,SamplingInfo,Event,org.json.simple.JSONAware
A DBRTimeEvent for a vector string.
- Author:
- mshankar
-
Constructor Summary
ConstructorsConstructorDescriptionPBVectorString(short year, com.google.protobuf.Message.Builder message) PBVectorString(short year, ByteArray bar) PBVectorString(gov.aps.jca.dbr.DBR dbr) PBVectorString(org.epics.pva.data.PVAStructure v4Data) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFieldValue(String fieldName, String fieldValue) longGet java epoch seconds of the timestamp of this event.Get the epoch seconds and the nanos..Get the fields as a HashMap.getFieldValue(String fieldName) com.google.protobuf.MessageReturn the protobuf message.Class<? extends com.google.protobuf.Message> Return the protobuf message class.Return a serialized form of this event in the internal currency of the archiver appliance.intGet this event's value.intintbooleanNot all events have field values.booleanDo the field values in this event represent an actual change?Make a clone of this event free from the confines of its containing stream.voidMark this event as containing actual changes to field values.voidsetFieldValues(HashMap<String, String> fieldValues, boolean markAsActualChange) voidsetRepeatCount(int repeatCount) voidsetSeverity(int severity) voidsetStatus(int status) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.epics.archiverappliance.data.DBRTimeEvent
getYearSecondTimestamp, toJSONString
-
Constructor Details
-
PBVectorString
-
PBVectorString
public PBVectorString(short year, com.google.protobuf.Message.Builder message) -
PBVectorString
-
PBVectorString
public PBVectorString(gov.aps.jca.dbr.DBR dbr) -
PBVectorString
public PBVectorString(org.epics.pva.data.PVAStructure v4Data)
-
-
Method Details
-
makeClone
Description copied from interface:EventMake a clone of this event free from the confines of its containing stream. -
getEventTimeStamp
Description copied from interface:EventGet the epoch seconds and the nanos.. We use Instant as the main timestamp class. See TimeUtils for more time related utilities.- Specified by:
getEventTimeStampin interfaceEvent- Returns:
- The java epoch seconds and the nanos of this event
-
getEpochSeconds
public long getEpochSeconds()Description copied from interface:EventGet 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:
getEpochSecondsin interfaceEvent- Returns:
- The java epoch seconds of this event.
-
getRawForm
Description copied from interface:EventReturn 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:
getRawFormin interfaceEvent- Returns:
- A serialization of this event in the internal currency of the archiver appliance.
-
getSampleValue
Description copied from interface:EventGet 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:
getSampleValuein interfaceEvent- Returns:
- The valus of this event
-
getStatus
public int getStatus() -
getSeverity
public int getSeverity()- Specified by:
getSeverityin interfaceAlarmInfo
-
getRepeatCount
public int getRepeatCount()- Specified by:
getRepeatCountin interfaceSamplingInfo
-
setRepeatCount
public void setRepeatCount(int repeatCount) - Specified by:
setRepeatCountin interfaceSamplingInfo
-
setStatus
public void setStatus(int status) -
setSeverity
public void setSeverity(int severity) - Specified by:
setSeverityin interfaceAlarmInfo
-
hasFieldValues
public boolean hasFieldValues()Description copied from interface:FieldValuesNot all events have field values. Does this event have any field values?- Specified by:
hasFieldValuesin interfaceFieldValues- Returns:
- true or false
-
isActualChange
public boolean isActualChange()Description copied from interface:FieldValuesDo the field values in this event represent an actual change?- Specified by:
isActualChangein interfaceFieldValues- Returns:
- true or false
-
getFields
Description copied from interface:FieldValuesGet the fields as a HashMap. If we have more than one entry with the same key, one of the entries is returned.- Specified by:
getFieldsin interfaceFieldValues- Returns:
- The fields as a HashMap
-
getFieldValue
- Specified by:
getFieldValuein interfaceFieldValues- Parameters:
fieldName- the field name- Returns:
- The field value as a string
-
addFieldValue
- Specified by:
addFieldValuein interfaceFieldValues- Parameters:
fieldName- the field namefieldValue- the field value
-
markAsActualChange
public void markAsActualChange()Description copied from interface:FieldValuesMark this event as containing actual changes to field values.- Specified by:
markAsActualChangein interfaceFieldValues
-
setFieldValues
- Specified by:
setFieldValuesin interfaceFieldValues- Parameters:
fieldValues- the field values as HashMapmarkAsActualChange- true or false
-
getDBRType
- Specified by:
getDBRTypein interfaceEvent
-
getProtobufMessage
public com.google.protobuf.Message getProtobufMessage()Description copied from interface:EventReturn the protobuf message.- Specified by:
getProtobufMessagein interfaceEvent
-
getProtobufMessageClass
Description copied from interface:EventReturn the protobuf message class.- Specified by:
getProtobufMessageClassin interfaceEvent
-
toString
-