Exemplo n.º 1
0
        private static SensorRead[] CreateSomeFakeSensorReads(string sensorId, int startSequence, int count)
        {
            var sequenceNo = startSequence;
            var random     = new Random();

            var data = new SensorRead[count];

            for (int i = 0; i < count; i++)
            {
                data[i] = new SensorRead
                {
                    SensorId   = sensorId,
                    SequenceNo = sequenceNo,
                    Value      = random.Next(),
                    UtcTime    = DateTime.UtcNow,
                    LocalTime  = DateTime.Now,
                    TimeCode   = DateTime.UtcNow.Ticks,
                    StatusCode = sequenceNo
                };

                sequenceNo++;
            }

            return(data);
        }
Exemplo n.º 2
0
        private static SensorRead[] CreateSomeFakeSensorReads(string sensorId, int startSequence, int count)
        {
            var sequenceNo = startSequence;
            var random = new Random();

            var data = new SensorRead[count];
            for (int i = 0; i < count; i++)
            {
                data[i] = new SensorRead
                {
                    SensorId = sensorId,
                    SequenceNo = sequenceNo,
                    Value = random.Next(),
                    UtcTime = DateTime.UtcNow,
                    LocalTime = DateTime.Now,
                    TimeCode = DateTime.UtcNow.Ticks,
                    StatusCode = sequenceNo
                };

                sequenceNo++;
            }

            return data;
        }