Ejemplo n.º 1
0
        public static TelemetryData Make(int measurementsNumber)
        {
            TelemetryData data = new TelemetryData()
            {
                Id                  = Guid.NewGuid().ToString(),
                DataSource          = Guid.NewGuid().ToString(),
                TimeStamp           = DateTime.Now,
                Param1              = ExternalRandomGenerator.Instance.NextRandomInteger,
                Param2              = (uint)ExternalRandomGenerator.Instance.NextRandomInteger,
                Measurements        = new double[measurementsNumber],
                AssociatedProblemID = 123,
                AssociatedLogID     = 89032,
                WasProcessed        = true
            };

            for (var i = 0; i < measurementsNumber; i++)
            {
                data.Measurements[i] = ExternalRandomGenerator.Instance.NextRandomDouble;
            }
            return(data);
        }
Ejemplo n.º 2
0
 public Telemetry(TestingSystem context, IConfigSectionNode conf)
     : base(context, conf)
 {
     if (m_MeasurementsNumber < 1) m_MeasurementsNumber = 1;
     m_Data = TelemetryData.Make(m_MeasurementsNumber);
 }
Ejemplo n.º 3
0
 public static TelemetryData Make(int measurementsNumber)
 {
     TelemetryData data = new TelemetryData()
     {
         Id = Guid.NewGuid().ToString(),
         DataSource = Guid.NewGuid().ToString(),
         TimeStamp = DateTime.Now,
         Param1 = ExternalRandomGenerator.Instance.NextRandomInteger,
         Param2 = (uint)ExternalRandomGenerator.Instance.NextRandomInteger,
         Measurements = new double[measurementsNumber],
         AssociatedProblemID = 123,
         AssociatedLogID = 89032,
         WasProcessed = true
     };
     for (var i = 0; i < measurementsNumber; i++)
         data.Measurements[i] = ExternalRandomGenerator.Instance.NextRandomDouble;
     return data;
 }