Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo 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;
 }