moel@1: /*
moel@1:  
moel@344:   This Source Code Form is subject to the terms of the Mozilla Public
moel@344:   License, v. 2.0. If a copy of the MPL was not distributed with this
moel@344:   file, You can obtain one at http://mozilla.org/MPL/2.0/.
moel@1:  
moel@344:   Copyright (C) 2009-2012 Michael Möller <mmoeller@openhardwaremonitor.org>
moel@344: 	
moel@1: */
moel@1: 
moel@1: using System;
moel@1: using System.Collections.Generic;
moel@165: using OpenHardwareMonitor.Collections;
moel@1: 
moel@1: namespace OpenHardwareMonitor.Hardware {
moel@1: 
moel@1:   public enum SensorType {
moel@324:     Voltage, // V
moel@324:     Clock, // MHz
moel@324:     Temperature, // °C
moel@324:     Load, // %
moel@324:     Fan, // RPM
moel@324:     Flow, // L/h
moel@324:     Control, // %
moel@324:     Level, // %
moel@340:     Factor, // 1
moel@324:     Power, // W
moel@340:     Data, // GB = 2^30 Bytes    
moel@1:   }
moel@1: 
moel@159:   public struct SensorValue {
moel@195:     private readonly float value;
moel@195:     private readonly DateTime time;
moel@159: 
moel@159:     public SensorValue(float value, DateTime time) {
moel@159:       this.value = value;
moel@159:       this.time = time;
moel@159:     }
moel@159: 
moel@159:     public float Value { get { return value; } }
moel@159:     public DateTime Time { get { return time; } }
moel@1:   }
moel@1: 
moel@110:   public interface ISensor : IElement {
moel@63: 
moel@28:     IHardware Hardware { get; }
moel@63: 
moel@1:     SensorType SensorType { get; }
moel@109:     Identifier Identifier { get; }
moel@109: 
moel@1:     string Name { get; set; }
moel@1:     int Index { get; }
moel@63: 
moel@109:     bool IsDefaultHidden { get; }
moel@109: 
moel@63:     IReadOnlyArray<IParameter> Parameters { get; }
moel@63: 
moel@1:     float? Value { get; }
moel@1:     float? Min { get; }
moel@151:     float? Max { get; }
moel@151: 
moel@151:     void ResetMin();
moel@151:     void ResetMax();
moel@63: 
moel@159:     IEnumerable<SensorValue> Values { get; }
moel@247: 
moel@247:     IControl Control { get; }
moel@1:   }
moel@1: 
moel@1: }