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); }
public Telemetry(TestingSystem context, IConfigSectionNode conf) : base(context, conf) { if (m_MeasurementsNumber < 1) m_MeasurementsNumber = 1; m_Data = TelemetryData.Make(m_MeasurementsNumber); }
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; }