Beispiel #1
0
        static void ProcessMeasurements(object state)
        {
            while (true)
            {
                List <Measurement> measurements = new List <Measurement>();

                Measurement measurement;

                for (int i = 1; i <= MeasurementCount; i++)
                {
                    measurement = new Measurement
                    {
                        Key       = MeasurementKey.LookUpOrCreate("DEVARCHIVE", (uint)i),
                        Value     = Random.Between(-65535.0D, 65536.0D),
                        Timestamp = DateTime.UtcNow.Ticks
                    };

                    measurements.Add(measurement);
                }

                publisher.QueueMeasurementsForProcessing(measurements);

                Thread.Sleep(33);
            }
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RadiusPacket"/> class.
 /// </summary>
 public RadiusPacket()
 {
     m_identifier    = (byte)(Random.Between(0, 255));
     m_authenticator = new byte[16];
     m_attributes    = new List <RadiusPacketAttribute>();
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RadiusPacket"/> class.
 /// </summary>
 public RadiusPacket()
 {
     Identifier      = (byte)Random.Between(0, 255);
     m_authenticator = new byte[16];
     Attributes      = new();
 }