Ejemplo n.º 1
0
        protected void AddReading(ReadingData data)
        {
            if (string.IsNullOrEmpty(data.Name))
                data.Name = ReadingName;

            FeatureDescriptor descriptor = GetFeatureDescriptor();
            var newReading = new Reading { FeatureName = descriptor.Name, FeatureGroup = descriptor.Group, Data = data };
            ReadingPublisher.PublishReading(newReading);
        }
        private static void SetValue(FeatureData data, ReadingData reading)
        {
            dynamic value = reading.GetValue();

            if (value is double)
            {
                data.DoubleValue = value;
            }
            else if (value is int)
            {
                data.IntValue = value;
            }
            else if (value != null)
            {
                data.Value = value.ToString();
            }
        }
Ejemplo n.º 3
0
		internal override void Aggregate(ReadingData other)
		{
			Values.Add((double)other.GetValue());
		}
Ejemplo n.º 4
0
		public override void Aggregate(ReadingData other)
		{
			Value = Math.Min(Value, (double)other.GetValue());
		}
 public void Add(ReadingData data)
 {
     AddReading(data);
 }
Ejemplo n.º 6
0
 public override void Aggregate(ReadingData other)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 7
0
		internal override void Aggregate(ReadingData other)
		{
			Value = Math.Max(Value, (double)other.GetValue());
		}