Class MatlabResponse

  • All Implemented Interfaces:
    EventConsumer, MimeResponse

    public class MatlabResponse
    extends Object
    implements 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.
    1. 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.
    2. 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.
    3. 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.
    4. isDST - contains booleans that indicate if the time indicated by epochSeconds was 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.
    If needed, we can add separate fields for status and severity. Owing to the column-major nature, this response consumes a lot of memory. If we are serving large datasets using Matlab responses, we should increase the heap size for the retrieval war to large values.