Hardware/ISensor.cs
author moel.mich
Mon, 02 Jul 2012 21:14:40 +0000
changeset 357 fb8dc26f65a4
parent 340 600962f8a298
permissions -rw-r--r--
Added mainboard specific configurations for the following Gigabyte mainboards: EX58-UD3R, G41M-Combo, G41MT-S2, G41MT-S2P, GA-MA770T-UD3P, GA-MA785GM-US2H, GA-MA78LM-S2H, GA-MA790X-UD3P, H55-USB3, H55N-USB3, H61M-DS2 REV 1.2, H61M-USB3-B3 REV 2.0, H67A-USB3-B3, P55A-UD3, P67A-UD3-B3, P67A-UD3R-B3, Z68A-D3H-B3, Z68AP-D3, Z68X-UD3H-B3.
moel@1
     1
/*
moel@1
     2
 
moel@344
     3
  This Source Code Form is subject to the terms of the Mozilla Public
moel@344
     4
  License, v. 2.0. If a copy of the MPL was not distributed with this
moel@344
     5
  file, You can obtain one at http://mozilla.org/MPL/2.0/.
moel@1
     6
 
moel@344
     7
  Copyright (C) 2009-2012 Michael Möller <mmoeller@openhardwaremonitor.org>
moel@344
     8
	
moel@1
     9
*/
moel@1
    10
moel@1
    11
using System;
moel@1
    12
using System.Collections.Generic;
moel@165
    13
using OpenHardwareMonitor.Collections;
moel@1
    14
moel@1
    15
namespace OpenHardwareMonitor.Hardware {
moel@1
    16
moel@1
    17
  public enum SensorType {
moel@324
    18
    Voltage, // V
moel@324
    19
    Clock, // MHz
moel@324
    20
    Temperature, // °C
moel@324
    21
    Load, // %
moel@324
    22
    Fan, // RPM
moel@324
    23
    Flow, // L/h
moel@324
    24
    Control, // %
moel@324
    25
    Level, // %
moel@340
    26
    Factor, // 1
moel@324
    27
    Power, // W
moel@340
    28
    Data, // GB = 2^30 Bytes    
moel@1
    29
  }
moel@1
    30
moel@159
    31
  public struct SensorValue {
moel@195
    32
    private readonly float value;
moel@195
    33
    private readonly DateTime time;
moel@159
    34
moel@159
    35
    public SensorValue(float value, DateTime time) {
moel@159
    36
      this.value = value;
moel@159
    37
      this.time = time;
moel@159
    38
    }
moel@159
    39
moel@159
    40
    public float Value { get { return value; } }
moel@159
    41
    public DateTime Time { get { return time; } }
moel@1
    42
  }
moel@1
    43
moel@110
    44
  public interface ISensor : IElement {
moel@63
    45
moel@28
    46
    IHardware Hardware { get; }
moel@63
    47
moel@1
    48
    SensorType SensorType { get; }
moel@109
    49
    Identifier Identifier { get; }
moel@109
    50
moel@1
    51
    string Name { get; set; }
moel@1
    52
    int Index { get; }
moel@63
    53
moel@109
    54
    bool IsDefaultHidden { get; }
moel@109
    55
moel@63
    56
    IReadOnlyArray<IParameter> Parameters { get; }
moel@63
    57
moel@1
    58
    float? Value { get; }
moel@1
    59
    float? Min { get; }
moel@151
    60
    float? Max { get; }
moel@151
    61
moel@151
    62
    void ResetMin();
moel@151
    63
    void ResetMax();
moel@63
    64
moel@159
    65
    IEnumerable<SensorValue> Values { get; }
moel@247
    66
moel@247
    67
    IControl Control { get; }
moel@1
    68
  }
moel@1
    69
moel@1
    70
}