Class MatlabResponse
java.lang.Object
org.epics.archiverappliance.retrieval.mimeresponses.MatlabResponse
- All Implemented Interfaces:
EventConsumer,MimeResponse
Generate a ".mat" matlab file
The response contains two objects, a header and a data object.
The header object is indexed by the string
header and is a MLStructure with fields for pvname, start and end times etc.
The data object is indexed by the string data and is a MLStructure with these fields.
epochSeconds- contains Java epoch seconds as a 1x1 uint64 array. The times are in UTC; so any conversion to local time needs to happen at the client.values- contains the values for the samples. All scalars come as a 1x1 double array. Waveforms come as a 1xelementcount double array where elementcount is the EPICS element count of the waveform.nanos- contains the nano second value of the EPICS record processing timestamp as a 1x1 uint64 array. Some installations embed the beam code/pulse id into this field; however, this is done at the IOC side and as far as this code are concerned, this is the nanoseconds.isDST- contains booleans that indicate if the time indicated byepochSecondswas in daylight savings time in the timezone of the server. This is an attempt to get around the deficiencies in Matlab w.r.t timezones.
- Author:
- mshankar
-
Field Summary
Fields inherited from interface org.epics.archiverappliance.retrieval.mimeresponses.MimeResponse
CONTENT_TYPE, PROXIED_HEADERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidvoidprocessingPV(BasicContext retrievalContext, String pv, Instant start, Instant end, EventStreamDesc streamDesc) Called when we swich to a new PV.voidvoidswicthingToStream(EventStream strm)
-
Constructor Details
-
MatlabResponse
public MatlabResponse()
-
-
Method Details
-
consumeEvent
- Specified by:
consumeEventin interfaceEventConsumer- Throws:
Exception
-
setOutputStream
- Specified by:
setOutputStreamin interfaceMimeResponse
-
processingPV
public void processingPV(BasicContext retrievalContext, String pv, Instant start, Instant end, EventStreamDesc streamDesc) Description copied from interface:MimeResponseCalled when we swich to a new PV.- Specified by:
processingPVin interfaceMimeResponse- Parameters:
pv- The name of PVstart- Instantend- InstantstreamDesc- Could be null if we have no data in first store we hit.
-
swicthingToStream
- Specified by:
swicthingToStreamin interfaceMimeResponse
-
close
public void close()- Specified by:
closein interfaceMimeResponse
-