Package org.epics.archiverappliance
Interface Event
- All Known Subinterfaces:
DBRTimeEvent
- All Known Implementing Classes:
CSVEvent,HashMapEvent,PBScalarByte,PBScalarDouble,PBScalarEnum,PBScalarFloat,PBScalarInt,PBScalarShort,PBScalarString,PBV4GenericBytes,PBVectorByte,PBVectorDouble,PBVectorEnum,PBVectorFloat,PBVectorInt,PBVectorShort,PBVectorString,POJOEvent,SimulationEvent
public interface Event
An event represents an archiver sample.
An actual sample has much more info; this interface outlines the minimum needed for the archiver appliance server side code.
Additional information can be gathered by using one of the other event related interfaces in org.epics.archiverappliance.data.
All the implementations of Event so far also implement DBRTimeEvent; this may change in the future.
- Author:
- mshankar
-
Method Summary
Modifier and TypeMethodDescriptionlongGet java epoch seconds of the timestamp of this event.Get the epoch seconds and the nanos..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.Get this event's value.Make a clone of this event free from the confines of its containing stream.
-
Method Details
-
getEpochSeconds
long getEpochSeconds()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.- Returns:
- The java epoch seconds of this event.
-
getEventTimeStamp
Instant getEventTimeStamp()Get the epoch seconds and the nanos.. We use Instant as the main timestamp class. See TimeUtils for more time related utilities.- Returns:
- The java epoch seconds and the nanos of this event
-
getRawForm
ByteArray getRawForm()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.- Returns:
- A serialization of this event in the internal currency of the archiver appliance.
-
getSampleValue
SampleValue getSampleValue()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.- Returns:
- The valus of this event
-
makeClone
Event makeClone()Make a clone of this event free from the confines of its containing stream.- Returns:
- A clone of this event
-
getDBRType
ArchDBRTypes getDBRType() -
getProtobufMessage
com.google.protobuf.Message getProtobufMessage()Return the protobuf message. -
getProtobufMessageClass
Class<? extends com.google.protobuf.Message> getProtobufMessageClass()Return the protobuf message class.
-