Esempio n. 1
0
        // Properly creates a SerializableFlatlinedMeasurement by sending in TimeSinceLastChange, attaching to the exception event, and setting device and signal type.
        private SerializableFlatlinedMeasurement CreateSerializableFlatlinedMeasurement(IMeasurement measurement)
        {
            SerializableFlatlinedMeasurement serializableMeasurement = new SerializableFlatlinedMeasurement(measurement, m_test.RealTime - measurement.Timestamp);

            serializableMeasurement.ProcessException += serializableMeasurement_ProcessException;
            serializableMeasurement.SetDeviceAndSignalType(m_test.DataSource);
            return(serializableMeasurement);
        }
Esempio n. 2
0
        // Reads all flatlined measurements.
        private SerializableFlatlineTest ReadFlatlinedMeasurements()
        {
            SerializableFlatlineTest   serializableTest      = new SerializableFlatlineTest();
            ICollection <IMeasurement> flatlinedMeasurements = m_test.GetFlatlinedMeasurements();

            List <SerializableFlatlinedMeasurement> serializableFlatlinedMeasurements = new List <SerializableFlatlinedMeasurement>();

            foreach (IMeasurement measurement in flatlinedMeasurements)
            {
                SerializableFlatlinedMeasurement serializableFlatlinedMeasurement = CreateSerializableFlatlinedMeasurement(measurement);
                serializableFlatlinedMeasurements.Add(serializableFlatlinedMeasurement);
            }

            serializableTest.FlatlinedMeasurements = serializableFlatlinedMeasurements.ToArray();
            return(serializableTest);
        }
Esempio n. 3
0
 // Properly creates a SerializableFlatlinedMeasurement by sending in TimeSinceLastChange, attaching to the exception event, and setting device and signal type.
 private SerializableFlatlinedMeasurement CreateSerializableFlatlinedMeasurement(IMeasurement measurement)
 {
     SerializableFlatlinedMeasurement serializableMeasurement = new SerializableFlatlinedMeasurement(measurement, m_test.RealTime - measurement.Timestamp);
     serializableMeasurement.ProcessException += serializableMeasurement_ProcessException;
     serializableMeasurement.SetDeviceAndSignalType(m_test.DataSource);
     return serializableMeasurement;
 }