Hardware/Mainboard/SuperIOHardware.cs
author moel.mich
Mon, 11 Oct 2010 20:37:37 +0000
changeset 220 e51749b206ee
parent 202 551243a66b32
child 221 a950ba30d4dd
permissions -rw-r--r--
Added a mainboard specific configuration for the ASRock AOD790GX-128M
moel@135
     1
/*
moel@130
     2
  
moel@130
     3
  Version: MPL 1.1/GPL 2.0/LGPL 2.1
moel@130
     4
moel@130
     5
  The contents of this file are subject to the Mozilla Public License Version
moel@130
     6
  1.1 (the "License"); you may not use this file except in compliance with
moel@130
     7
  the License. You may obtain a copy of the License at
moel@130
     8
 
moel@130
     9
  http://www.mozilla.org/MPL/
moel@130
    10
moel@130
    11
  Software distributed under the License is distributed on an "AS IS" basis,
moel@130
    12
  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
moel@130
    13
  for the specific language governing rights and limitations under the License.
moel@130
    14
moel@130
    15
  The Original Code is the Open Hardware Monitor code.
moel@130
    16
moel@130
    17
  The Initial Developer of the Original Code is 
moel@130
    18
  Michael Möller <m.moeller@gmx.ch>.
moel@130
    19
  Portions created by the Initial Developer are Copyright (C) 2009-2010
moel@130
    20
  the Initial Developer. All Rights Reserved.
moel@130
    21
moel@130
    22
  Contributor(s):
moel@130
    23
moel@130
    24
  Alternatively, the contents of this file may be used under the terms of
moel@130
    25
  either the GNU General Public License Version 2 or later (the "GPL"), or
moel@130
    26
  the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
moel@130
    27
  in which case the provisions of the GPL or the LGPL are applicable instead
moel@130
    28
  of those above. If you wish to allow use of your version of this file only
moel@130
    29
  under the terms of either the GPL or the LGPL, and not to allow others to
moel@130
    30
  use your version of this file under the terms of the MPL, indicate your
moel@130
    31
  decision by deleting the provisions above and replace them with the notice
moel@130
    32
  and other provisions required by the GPL or the LGPL. If you do not delete
moel@130
    33
  the provisions above, a recipient may use your version of this file under
moel@130
    34
  the terms of any one of the MPL, the GPL or the LGPL.
moel@130
    35
 
moel@130
    36
*/
moel@130
    37
moel@130
    38
using System.Collections.Generic;
moel@166
    39
using System.Globalization;
moel@130
    40
using OpenHardwareMonitor.Hardware.LPC;
moel@130
    41
moel@130
    42
namespace OpenHardwareMonitor.Hardware.Mainboard {
moel@165
    43
  internal class SuperIOHardware : Hardware {
moel@130
    44
moel@195
    45
    private readonly Mainboard mainboard;
moel@195
    46
    private readonly ISuperIO superIO;
moel@195
    47
    private readonly string name;
moel@130
    48
moel@195
    49
    private readonly List<Sensor> voltages = new List<Sensor>();
moel@195
    50
    private readonly List<Sensor> temperatures = new List<Sensor>();
moel@195
    51
    private readonly List<Sensor> fans = new List<Sensor>();
moel@167
    52
moel@130
    53
moel@176
    54
    public SuperIOHardware(Mainboard mainboard, ISuperIO superIO, 
moel@176
    55
      Manufacturer manufacturer, Model model, ISettings settings) 
moel@130
    56
    {
moel@176
    57
      this.mainboard = mainboard;
moel@130
    58
      this.superIO = superIO;
moel@167
    59
      this.name = ChipName.GetName(superIO.Chip);
moel@130
    60
moel@130
    61
      List<Voltage> v = new List<Voltage>();
moel@130
    62
      List<Temperature> t = new List<Temperature>();
moel@130
    63
      List<Fan> f = new List<Fan>();
moel@130
    64
moel@130
    65
      switch (superIO.Chip) {
moel@130
    66
        case Chip.IT8712F:
moel@130
    67
        case Chip.IT8716F:
moel@130
    68
        case Chip.IT8718F:
moel@177
    69
        case Chip.IT8720F: 
moel@130
    70
        case Chip.IT8726F:
moel@130
    71
          switch (manufacturer) {
moel@133
    72
            case Manufacturer.ASUS:
moel@133
    73
              switch (model) {
moel@168
    74
                case Model.Crosshair_III_Formula: // IT8720F
moel@133
    75
                  v.Add(new Voltage("VBat", 8));
moel@133
    76
                  t.Add(new Temperature("CPU", 0));
moel@133
    77
                  for (int i = 0; i < superIO.Fans.Length; i++)
moel@133
    78
                    f.Add(new Fan("Fan #" + (i + 1), i));
moel@133
    79
                  break;
moel@144
    80
                case Model.M2N_SLI_DELUXE:                
moel@133
    81
                  v.Add(new Voltage("CPU VCore", 0));
moel@133
    82
                  v.Add(new Voltage("+3.3V", 1));
moel@195
    83
                  v.Add(new Voltage("+5V", 3, 6.8f, 10));
moel@195
    84
                  v.Add(new Voltage("+12V", 4, 30, 10));
moel@195
    85
                  v.Add(new Voltage("+5VSB", 7, 6.8f, 10));
moel@133
    86
                  v.Add(new Voltage("VBat", 8));
moel@133
    87
                  t.Add(new Temperature("CPU", 0));
moel@133
    88
                  t.Add(new Temperature("Motherboard", 1));
moel@133
    89
                  f.Add(new Fan("CPU Fan", 0));
moel@133
    90
                  f.Add(new Fan("Chassis Fan #1", 1));
moel@133
    91
                  f.Add(new Fan("Power Fan", 2));
moel@133
    92
                  break;
moel@168
    93
                case Model.M4A79XTD_EVO: // IT8720F           
moel@195
    94
                  v.Add(new Voltage("+5V", 3, 6.8f, 10));
moel@144
    95
                  v.Add(new Voltage("VBat", 8));
moel@144
    96
                  t.Add(new Temperature("CPU", 0));
moel@144
    97
                  t.Add(new Temperature("Motherboard", 1));
moel@144
    98
                  f.Add(new Fan("CPU Fan", 0));
moel@144
    99
                  f.Add(new Fan("Chassis Fan #1", 1));
moel@144
   100
                  f.Add(new Fan("Chassis Fan #2", 2));
moel@144
   101
                  break;
moel@133
   102
                default:
moel@133
   103
                  v.Add(new Voltage("CPU VCore", 0));
moel@133
   104
                  v.Add(new Voltage("Voltage #2", 1, true));
moel@133
   105
                  v.Add(new Voltage("Voltage #3", 2, true));
moel@133
   106
                  v.Add(new Voltage("Voltage #4", 3, true));
moel@133
   107
                  v.Add(new Voltage("Voltage #5", 4, true));
moel@133
   108
                  v.Add(new Voltage("Voltage #6", 5, true));
moel@133
   109
                  v.Add(new Voltage("Voltage #7", 6, true));
moel@133
   110
                  v.Add(new Voltage("Voltage #8", 7, true));
moel@133
   111
                  v.Add(new Voltage("VBat", 8));
moel@133
   112
                  for (int i = 0; i < superIO.Temperatures.Length; i++)
moel@133
   113
                    t.Add(new Temperature("Temperature #" + (i + 1), i));
moel@133
   114
                  for (int i = 0; i < superIO.Fans.Length; i++)
moel@133
   115
                    f.Add(new Fan("Fan #" + (i + 1), i));
moel@133
   116
                  break;
moel@133
   117
              }
moel@133
   118
              break;
moel@130
   119
            case Manufacturer.DFI:
moel@130
   120
              switch (model) {
moel@168
   121
                case Model.LP_BI_P45_T2RS_Elite: // IT8718F
moel@130
   122
                  v.Add(new Voltage("CPU VCore", 0));
moel@130
   123
                  v.Add(new Voltage("FSB VTT", 1));
moel@130
   124
                  v.Add(new Voltage("+3.3V", 2));
moel@195
   125
                  v.Add(new Voltage("+5V", 3, 6.8f, 10));
moel@195
   126
                  v.Add(new Voltage("+12V", 4, 30, 10));
moel@130
   127
                  v.Add(new Voltage("NB Core", 5));
moel@130
   128
                  v.Add(new Voltage("VDIMM", 6));
moel@195
   129
                  v.Add(new Voltage("+5VSB", 7, 6.8f, 10));
moel@130
   130
                  v.Add(new Voltage("VBat", 8));
moel@130
   131
                  t.Add(new Temperature("CPU", 0));
moel@130
   132
                  t.Add(new Temperature("System", 1));
moel@130
   133
                  t.Add(new Temperature("Chipset", 2));
moel@130
   134
                  f.Add(new Fan("Fan #1", 0));
moel@130
   135
                  f.Add(new Fan("Fan #2", 1));
moel@130
   136
                  f.Add(new Fan("Fan #3", 2));
moel@130
   137
                  break;
moel@168
   138
                case Model.LP_DK_P55_T3eH9: // IT8720F
moel@130
   139
                  v.Add(new Voltage("CPU VCore", 0));
moel@130
   140
                  v.Add(new Voltage("VTT", 1));
moel@130
   141
                  v.Add(new Voltage("+3.3V", 2));
moel@195
   142
                  v.Add(new Voltage("+5V", 3, 6.8f, 10));
moel@195
   143
                  v.Add(new Voltage("+12V", 4, 30, 10));
moel@130
   144
                  v.Add(new Voltage("CPU PLL", 5));
moel@130
   145
                  v.Add(new Voltage("DRAM", 6));
moel@195
   146
                  v.Add(new Voltage("+5VSB", 7, 6.8f, 10));
moel@130
   147
                  v.Add(new Voltage("VBat", 8));
moel@130
   148
                  t.Add(new Temperature("Chipset", 0));
moel@130
   149
                  t.Add(new Temperature("CPU PWM", 1));
moel@130
   150
                  t.Add(new Temperature("CPU", 2));
moel@130
   151
                  f.Add(new Fan("Fan #1", 0));
moel@130
   152
                  f.Add(new Fan("Fan #2", 1));
moel@130
   153
                  f.Add(new Fan("Fan #3", 2));
moel@130
   154
                  break;
moel@130
   155
                default:
moel@130
   156
                  v.Add(new Voltage("CPU VCore", 0));
moel@130
   157
                  v.Add(new Voltage("VTT", 1, true));
moel@130
   158
                  v.Add(new Voltage("+3.3V", 2, true));
moel@130
   159
                  v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
moel@130
   160
                  v.Add(new Voltage("+12V", 4, 30, 10, 0, true));
moel@130
   161
                  v.Add(new Voltage("Voltage #6", 5, true));
moel@130
   162
                  v.Add(new Voltage("DRAM", 6, true));
moel@130
   163
                  v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0, true));
moel@130
   164
                  v.Add(new Voltage("VBat", 8));
moel@130
   165
                  for (int i = 0; i < superIO.Temperatures.Length; i++)
moel@130
   166
                    t.Add(new Temperature("Temperature #" + (i + 1), i));
moel@130
   167
                  for (int i = 0; i < superIO.Fans.Length; i++)
moel@130
   168
                    f.Add(new Fan("Fan #" + (i + 1), i));
moel@130
   169
                  break;
moel@130
   170
              }
moel@130
   171
              break;
moel@130
   172
moel@130
   173
            case Manufacturer.Gigabyte:
moel@130
   174
              switch (model) {
moel@168
   175
                case Model._965P_S3: // IT8718F
moel@130
   176
                  v.Add(new Voltage("CPU VCore", 0));
moel@130
   177
                  v.Add(new Voltage("DRAM", 1));
moel@130
   178
                  v.Add(new Voltage("+3.3V", 2));
moel@195
   179
                  v.Add(new Voltage("+5V", 3, 6.8f, 10));
moel@195
   180
                  v.Add(new Voltage("+12V", 7, 27, 9.1f));
moel@130
   181
                  v.Add(new Voltage("VBat", 8));
moel@130
   182
                  t.Add(new Temperature("System", 0));
moel@130
   183
                  t.Add(new Temperature("CPU", 1));
moel@130
   184
                  f.Add(new Fan("CPU Fan", 0));
moel@130
   185
                  f.Add(new Fan("System Fan", 1));
moel@130
   186
                  break;
moel@168
   187
                case Model.EP45_DS3R: // IT8718F
moel@130
   188
                case Model.EP45_UD3R: 
moel@138
   189
                case Model.X38_DS5:    
moel@130
   190
                  v.Add(new Voltage("CPU VCore", 0));
moel@130
   191
                  v.Add(new Voltage("DRAM", 1));
moel@130
   192
                  v.Add(new Voltage("+3.3V", 2));
moel@195
   193
                  v.Add(new Voltage("+5V", 3, 6.8f, 10));
moel@195
   194
                  v.Add(new Voltage("+12V", 7, 27, 9.1f));
moel@130
   195
                  v.Add(new Voltage("VBat", 8));
moel@130
   196
                  t.Add(new Temperature("System", 0));
moel@130
   197
                  t.Add(new Temperature("CPU", 1));
moel@130
   198
                  f.Add(new Fan("CPU Fan", 0));
moel@130
   199
                  f.Add(new Fan("System Fan #2", 1));
moel@130
   200
                  f.Add(new Fan("Power Fan", 2));
moel@130
   201
                  f.Add(new Fan("System Fan #1", 3));
moel@130
   202
                  break;
moel@168
   203
                case Model.EX58_EXTREME: // IT8720F 
moel@133
   204
                  v.Add(new Voltage("CPU VCore", 0));
moel@133
   205
                  v.Add(new Voltage("DRAM", 1));
moel@195
   206
                  v.Add(new Voltage("+5V", 3, 6.8f, 10));
moel@133
   207
                  v.Add(new Voltage("VBat", 8));
moel@133
   208
                  t.Add(new Temperature("System", 0));
moel@133
   209
                  t.Add(new Temperature("CPU", 1));
moel@138
   210
                  t.Add(new Temperature("Northbridge", 2));
moel@133
   211
                  f.Add(new Fan("CPU Fan", 0));
moel@133
   212
                  f.Add(new Fan("System Fan #2", 1));
moel@133
   213
                  f.Add(new Fan("Power Fan", 2));
moel@133
   214
                  f.Add(new Fan("System Fan #1", 3));
moel@133
   215
                  break;
moel@168
   216
                case Model.P35_DS3: // IT8718F 
moel@168
   217
                case Model.P35_DS3L: // IT8718F
moel@130
   218
                  v.Add(new Voltage("CPU VCore", 0));
moel@130
   219
                  v.Add(new Voltage("DRAM", 1));
moel@130
   220
                  v.Add(new Voltage("+3.3V", 2));
moel@195
   221
                  v.Add(new Voltage("+5V", 3, 6.8f, 10));
moel@195
   222
                  v.Add(new Voltage("+12V", 7, 27, 9.1f));
moel@130
   223
                  v.Add(new Voltage("VBat", 8));
moel@130
   224
                  t.Add(new Temperature("System", 0));
moel@130
   225
                  t.Add(new Temperature("CPU", 1));
moel@130
   226
                  f.Add(new Fan("CPU Fan", 0));
moel@130
   227
                  f.Add(new Fan("System Fan #1", 1));
moel@130
   228
                  f.Add(new Fan("System Fan #2", 2));
moel@130
   229
                  f.Add(new Fan("Power Fan", 3));
moel@130
   230
                  break;
moel@168
   231
                case Model.P55_UD4: // IT8720F
moel@168
   232
                case Model.P55M_UD4: // IT8720F
moel@148
   233
                  v.Add(new Voltage("CPU VCore", 0));
moel@148
   234
                  v.Add(new Voltage("DRAM", 1));
moel@148
   235
                  v.Add(new Voltage("+3.3V", 2));
moel@195
   236
                  v.Add(new Voltage("+5V", 3, 6.8f, 10));
moel@195
   237
                  v.Add(new Voltage("+12V", 5, 27, 9.1f));
moel@148
   238
                  v.Add(new Voltage("VBat", 8));
moel@148
   239
                  t.Add(new Temperature("System", 0));
moel@148
   240
                  t.Add(new Temperature("CPU", 2));
moel@148
   241
                  f.Add(new Fan("CPU Fan", 0));
moel@148
   242
                  f.Add(new Fan("System Fan #2", 1));
moel@148
   243
                  f.Add(new Fan("Power Fan", 2));
moel@148
   244
                  f.Add(new Fan("System Fan #1", 3));
moel@148
   245
                  break;
moel@168
   246
                case Model.GA_MA770T_UD3: // IT8720F
moel@154
   247
                  v.Add(new Voltage("CPU VCore", 0));
moel@154
   248
                  v.Add(new Voltage("DRAM", 1));
moel@154
   249
                  v.Add(new Voltage("+3.3V", 2));
moel@195
   250
                  v.Add(new Voltage("+5V", 3, 6.8f, 10));
moel@195
   251
                  v.Add(new Voltage("+12V", 4, 27, 9.1f));
moel@154
   252
                  v.Add(new Voltage("VBat", 8));
moel@154
   253
                  t.Add(new Temperature("System", 0));
moel@154
   254
                  t.Add(new Temperature("CPU", 1));
moel@154
   255
                  f.Add(new Fan("CPU Fan", 0));
moel@154
   256
                  f.Add(new Fan("System Fan #1", 1));
moel@154
   257
                  f.Add(new Fan("System Fan #2", 2));
moel@154
   258
                  f.Add(new Fan("Power Fan", 3));
moel@154
   259
                  break;
moel@168
   260
                case Model.GA_MA785GMT_UD2H: // IT8718F
moel@130
   261
                  v.Add(new Voltage("CPU VCore", 0));
moel@130
   262
                  v.Add(new Voltage("DRAM", 1));
moel@130
   263
                  v.Add(new Voltage("+3.3V", 2));
moel@195
   264
                  v.Add(new Voltage("+5V", 3, 6.8f, 10));
moel@195
   265
                  v.Add(new Voltage("+12V", 4, 27, 9.1f));
moel@130
   266
                  v.Add(new Voltage("VBat", 8));
moel@130
   267
                  t.Add(new Temperature("System", 0));
moel@130
   268
                  t.Add(new Temperature("CPU", 1));
moel@130
   269
                  f.Add(new Fan("CPU Fan", 0));
moel@130
   270
                  f.Add(new Fan("System Fan", 1));
moel@130
   271
                  f.Add(new Fan("NB Fan", 2));
moel@130
   272
                  break;
moel@168
   273
                case Model.X58A_UD3R: // IT8720F 
moel@138
   274
                  v.Add(new Voltage("CPU VCore", 0));
moel@138
   275
                  v.Add(new Voltage("DRAM", 1));
moel@138
   276
                  v.Add(new Voltage("+3.3V", 2));
moel@195
   277
                  v.Add(new Voltage("+5V", 3, 6.8f, 10));
moel@195
   278
                  v.Add(new Voltage("+12V", 5, 27, 9.1f));
moel@138
   279
                  v.Add(new Voltage("VBat", 8));
moel@138
   280
                  t.Add(new Temperature("System", 0));
moel@138
   281
                  t.Add(new Temperature("CPU", 1));
moel@138
   282
                  t.Add(new Temperature("Northbridge", 2));
moel@138
   283
                  f.Add(new Fan("CPU Fan", 0));
moel@138
   284
                  f.Add(new Fan("System Fan #2", 1));
moel@138
   285
                  f.Add(new Fan("Power Fan", 2));
moel@138
   286
                  f.Add(new Fan("System Fan #1", 3));
moel@138
   287
                  break;
moel@130
   288
                default:
moel@130
   289
                  v.Add(new Voltage("CPU VCore", 0));
moel@130
   290
                  v.Add(new Voltage("DRAM", 1, true));
moel@130
   291
                  v.Add(new Voltage("+3.3V", 2, true));
moel@130
   292
                  v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
moel@130
   293
                  v.Add(new Voltage("Voltage #5", 4, true));
moel@130
   294
                  v.Add(new Voltage("Voltage #6", 5, true));
moel@130
   295
                  v.Add(new Voltage("Voltage #7", 6, true));
moel@130
   296
                  v.Add(new Voltage("+12V", 7, 27, 9.1f, 0, true));
moel@130
   297
                  v.Add(new Voltage("VBat", 8));
moel@130
   298
                  for (int i = 0; i < superIO.Temperatures.Length; i++)
moel@130
   299
                    t.Add(new Temperature("Temperature #" + (i + 1), i));
moel@130
   300
                  for (int i = 0; i < superIO.Fans.Length; i++)
moel@130
   301
                    f.Add(new Fan("Fan #" + (i + 1), i));
moel@130
   302
                  break;
moel@130
   303
              }
moel@130
   304
              break;
moel@130
   305
moel@130
   306
            default:
moel@130
   307
              v.Add(new Voltage("CPU VCore", 0));
moel@130
   308
              v.Add(new Voltage("Voltage #2", 1, true));
moel@130
   309
              v.Add(new Voltage("Voltage #3", 2, true));
moel@130
   310
              v.Add(new Voltage("Voltage #4", 3, true));
moel@130
   311
              v.Add(new Voltage("Voltage #5", 4, true));
moel@130
   312
              v.Add(new Voltage("Voltage #6", 5, true));
moel@130
   313
              v.Add(new Voltage("Voltage #7", 6, true));
moel@130
   314
              v.Add(new Voltage("Voltage #8", 7, true));
moel@130
   315
              v.Add(new Voltage("VBat", 8));
moel@130
   316
              for (int i = 0; i < superIO.Temperatures.Length; i++)
moel@130
   317
                t.Add(new Temperature("Temperature #" + (i + 1), i));
moel@130
   318
              for (int i = 0; i < superIO.Fans.Length; i++)
moel@130
   319
                f.Add(new Fan("Fan #" + (i + 1), i));
moel@130
   320
              break;
moel@130
   321
          }
moel@130
   322
          break;
moel@170
   323
moel@170
   324
        case Chip.IT8721F:
moel@177
   325
          switch (manufacturer) {
moel@177
   326
            case Manufacturer.ECS:
moel@177
   327
              switch (model) {
moel@177
   328
                case Model.A890GXM_A: // IT8721F
moel@177
   329
                  v.Add(new Voltage("CPU VCore", 0));
moel@177
   330
                  v.Add(new Voltage("VDIMM", 1));
moel@177
   331
                  v.Add(new Voltage("NB Voltage", 2));
moel@195
   332
                  v.Add(new Voltage("Analog +3.3V", 3, 10, 10));
moel@177
   333
                  // v.Add(new Voltage("VDIMM", 6, true));
moel@195
   334
                  v.Add(new Voltage("Standby +3.3V", 7, 10, 10));
moel@195
   335
                  v.Add(new Voltage("VBat", 8, 10, 10));
moel@177
   336
                  t.Add(new Temperature("CPU", 0));
moel@177
   337
                  t.Add(new Temperature("System", 1));
moel@177
   338
                  t.Add(new Temperature("Northbridge", 2));
moel@177
   339
                  f.Add(new Fan("CPU Fan", 0));
moel@177
   340
                  f.Add(new Fan("System Fan", 1));
moel@177
   341
                  f.Add(new Fan("Power Fan", 2));
moel@177
   342
                  break;
moel@177
   343
                default:
moel@177
   344
                  v.Add(new Voltage("Voltage #1", 0, true));
moel@177
   345
                  v.Add(new Voltage("Voltage #2", 1, true));
moel@177
   346
                  v.Add(new Voltage("Voltage #3", 2, true));
moel@177
   347
                  v.Add(new Voltage("Analog +3.3V", 3, 10, 10, 0, true));
moel@177
   348
                  v.Add(new Voltage("Voltage #5", 4, true));
moel@177
   349
                  v.Add(new Voltage("Voltage #6", 5, true));
moel@177
   350
                  v.Add(new Voltage("Voltage #7", 6, true));
moel@177
   351
                  v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
moel@195
   352
                  v.Add(new Voltage("VBat", 8, 10, 10));
moel@177
   353
                  for (int i = 0; i < superIO.Temperatures.Length; i++)
moel@177
   354
                    t.Add(new Temperature("Temperature #" + (i + 1), i));
moel@177
   355
                  for (int i = 0; i < superIO.Fans.Length; i++)
moel@177
   356
                    f.Add(new Fan("Fan #" + (i + 1), i));
moel@177
   357
                  break;
moel@177
   358
              }
moel@177
   359
              break;
moel@177
   360
            default:
moel@177
   361
              v.Add(new Voltage("Voltage #1", 0, true));
moel@177
   362
              v.Add(new Voltage("Voltage #2", 1, true));
moel@177
   363
              v.Add(new Voltage("Voltage #3", 2, true));
moel@177
   364
              v.Add(new Voltage("Analog +3.3V", 3, 10, 10, 0, true));
moel@177
   365
              v.Add(new Voltage("Voltage #5", 4, true));
moel@177
   366
              v.Add(new Voltage("Voltage #6", 5, true));
moel@177
   367
              v.Add(new Voltage("Voltage #7", 6, true));
moel@177
   368
              v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
moel@195
   369
              v.Add(new Voltage("VBat", 8, 10, 10));
moel@177
   370
              for (int i = 0; i < superIO.Temperatures.Length; i++)
moel@177
   371
                t.Add(new Temperature("Temperature #" + (i + 1), i));
moel@177
   372
              for (int i = 0; i < superIO.Fans.Length; i++)
moel@177
   373
                f.Add(new Fan("Fan #" + (i + 1), i));
moel@177
   374
              break;
moel@177
   375
          }
moel@170
   376
          break;
moel@130
   377
          
moel@130
   378
        case Chip.F71858:
moel@195
   379
          v.Add(new Voltage("VCC3V", 0, 150, 150));
moel@195
   380
          v.Add(new Voltage("VSB3V", 1, 150, 150));
moel@195
   381
          v.Add(new Voltage("Battery", 2, 150, 150));
moel@130
   382
          for (int i = 0; i < superIO.Temperatures.Length; i++)
moel@130
   383
            t.Add(new Temperature("Temperature #" + (i + 1), i));
moel@130
   384
          for (int i = 0; i < superIO.Fans.Length; i++)
moel@130
   385
            f.Add(new Fan("Fan #" + (i + 1), i));
moel@130
   386
          break;
moel@130
   387
        case Chip.F71862: 
moel@130
   388
        case Chip.F71869: 
moel@130
   389
        case Chip.F71882:
moel@130
   390
        case Chip.F71889ED: 
moel@130
   391
        case Chip.F71889F:
moel@132
   392
          switch (manufacturer) {
moel@132
   393
            case Manufacturer.EVGA:
moel@132
   394
              switch (model) {
moel@168
   395
                case Model.X58_SLI_Classified: // F71882 
moel@195
   396
                  v.Add(new Voltage("VCC3V", 0, 150, 150));
moel@195
   397
                  v.Add(new Voltage("CPU VCore", 1, 47, 100));
moel@195
   398
                  v.Add(new Voltage("DIMM", 2, 47, 100));
moel@195
   399
                  v.Add(new Voltage("CPU VTT", 3, 24, 100));
moel@195
   400
                  v.Add(new Voltage("IOH Vcore", 4, 24, 100));
moel@195
   401
                  v.Add(new Voltage("+5V", 5, 51, 12));
moel@195
   402
                  v.Add(new Voltage("+12V", 6, 56, 6.8f));
moel@195
   403
                  v.Add(new Voltage("3VSB", 7, 150, 150));
moel@195
   404
                  v.Add(new Voltage("VBat", 8, 150, 150));
moel@132
   405
                  t.Add(new Temperature("CPU", 0));
moel@132
   406
                  t.Add(new Temperature("VREG", 1));
moel@132
   407
                  t.Add(new Temperature("System", 2));
moel@132
   408
                  f.Add(new Fan("CPU Fan", 0));
moel@132
   409
                  f.Add(new Fan("Power Fan", 1));
moel@132
   410
                  f.Add(new Fan("Chassis Fan", 2));
moel@132
   411
                  break;
moel@132
   412
                default:
moel@195
   413
                  v.Add(new Voltage("VCC3V", 0, 150, 150));
moel@132
   414
                  v.Add(new Voltage("CPU VCore", 1));
moel@132
   415
                  v.Add(new Voltage("Voltage #3", 2, true));
moel@132
   416
                  v.Add(new Voltage("Voltage #4", 3, true));
moel@132
   417
                  v.Add(new Voltage("Voltage #5", 4, true));
moel@132
   418
                  v.Add(new Voltage("Voltage #6", 5, true));
moel@132
   419
                  v.Add(new Voltage("Voltage #7", 6, true));
moel@195
   420
                  v.Add(new Voltage("VSB3V", 7, 150, 150));
moel@195
   421
                  v.Add(new Voltage("VBat", 8, 150, 150));
moel@132
   422
                  for (int i = 0; i < superIO.Temperatures.Length; i++)
moel@132
   423
                    t.Add(new Temperature("Temperature #" + (i + 1), i));
moel@132
   424
                  for (int i = 0; i < superIO.Fans.Length; i++)
moel@132
   425
                    f.Add(new Fan("Fan #" + (i + 1), i));
moel@132
   426
                  break;
moel@132
   427
              }
moel@132
   428
              break;
moel@132
   429
            default:
moel@195
   430
              v.Add(new Voltage("VCC3V", 0, 150, 150));
moel@132
   431
              v.Add(new Voltage("CPU VCore", 1));
moel@132
   432
              v.Add(new Voltage("Voltage #3", 2, true));
moel@132
   433
              v.Add(new Voltage("Voltage #4", 3, true));
moel@132
   434
              v.Add(new Voltage("Voltage #5", 4, true));
moel@132
   435
              v.Add(new Voltage("Voltage #6", 5, true));
moel@132
   436
              v.Add(new Voltage("Voltage #7", 6, true));
moel@195
   437
              v.Add(new Voltage("VSB3V", 7, 150, 150));
moel@195
   438
              v.Add(new Voltage("VBat", 8, 150, 150));
moel@132
   439
              for (int i = 0; i < superIO.Temperatures.Length; i++)
moel@132
   440
                t.Add(new Temperature("Temperature #" + (i + 1), i));
moel@132
   441
              for (int i = 0; i < superIO.Fans.Length; i++)
moel@132
   442
                f.Add(new Fan("Fan #" + (i + 1), i));
moel@132
   443
              break;
moel@132
   444
          }
moel@130
   445
          break;
moel@130
   446
moel@220
   447
        case Chip.W83627EHF:
moel@220
   448
          switch (manufacturer) {
moel@220
   449
            case Manufacturer.ASRock:
moel@220
   450
              switch (model) {
moel@220
   451
                case Model.AOD790GX_128M: // W83627EHF
moel@220
   452
                  v.Add(new Voltage("CPU VCore", 0));
moel@220
   453
                  v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
moel@220
   454
                  v.Add(new Voltage("+3.3V", 4, 10, 10));
moel@220
   455
                  v.Add(new Voltage("+5V", 5, 20, 10));
moel@220
   456
                  v.Add(new Voltage("+12V", 6, 28, 5));
moel@220
   457
                  v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
moel@220
   458
                  v.Add(new Voltage("VBAT", 8, 34, 34));
moel@220
   459
                  t.Add(new Temperature("CPU", 0));
moel@220
   460
                  t.Add(new Temperature("Motherboard", 2));
moel@220
   461
                  f.Add(new Fan("Chassis Fan", 0));
moel@220
   462
                  f.Add(new Fan("CPU Fan", 1));
moel@220
   463
                  f.Add(new Fan("NB Fan", 2));
moel@220
   464
                  f.Add(new Fan("Power Fan", 4));
moel@220
   465
                  break;
moel@220
   466
                default:
moel@220
   467
                  v.Add(new Voltage("CPU VCore", 0));
moel@220
   468
                  v.Add(new Voltage("Voltage #2", 1, true));
moel@220
   469
                  v.Add(new Voltage("AVCC", 2, 34, 34));
moel@220
   470
                  v.Add(new Voltage("3VCC", 3, 34, 34));
moel@220
   471
                  v.Add(new Voltage("Voltage #5", 4, true));
moel@220
   472
                  v.Add(new Voltage("Voltage #6", 5, true));
moel@220
   473
                  v.Add(new Voltage("Voltage #7", 6, true));
moel@220
   474
                  v.Add(new Voltage("3VSB", 7, 34, 34));
moel@220
   475
                  v.Add(new Voltage("VBAT", 8, 34, 34));
moel@220
   476
                  v.Add(new Voltage("Voltage #10", 9, true));
moel@220
   477
                  t.Add(new Temperature("CPU", 0));
moel@220
   478
                  t.Add(new Temperature("Auxiliary", 1));
moel@220
   479
                  t.Add(new Temperature("System", 2));
moel@220
   480
                  f.Add(new Fan("System Fan", 0));
moel@220
   481
                  f.Add(new Fan("CPU Fan", 1));
moel@220
   482
                  f.Add(new Fan("Auxiliary Fan", 2));
moel@220
   483
                  f.Add(new Fan("CPU Fan #2", 3));
moel@220
   484
                  f.Add(new Fan("Auxiliary Fan #2", 4));
moel@220
   485
                  break;
moel@220
   486
              } break;
moel@220
   487
            default:
moel@220
   488
              v.Add(new Voltage("CPU VCore", 0));
moel@220
   489
              v.Add(new Voltage("Voltage #2", 1, true));
moel@220
   490
              v.Add(new Voltage("AVCC", 2, 34, 34));
moel@220
   491
              v.Add(new Voltage("3VCC", 3, 34, 34));
moel@220
   492
              v.Add(new Voltage("Voltage #5", 4, true));
moel@220
   493
              v.Add(new Voltage("Voltage #6", 5, true));
moel@220
   494
              v.Add(new Voltage("Voltage #7", 6, true));
moel@220
   495
              v.Add(new Voltage("3VSB", 7, 34, 34));
moel@220
   496
              v.Add(new Voltage("VBAT", 8, 34, 34));
moel@220
   497
              v.Add(new Voltage("Voltage #10", 9, true));
moel@220
   498
              t.Add(new Temperature("CPU", 0));
moel@220
   499
              t.Add(new Temperature("Auxiliary", 1));
moel@220
   500
              t.Add(new Temperature("System", 2));
moel@220
   501
              f.Add(new Fan("System Fan", 0));
moel@220
   502
              f.Add(new Fan("CPU Fan", 1));
moel@220
   503
              f.Add(new Fan("Auxiliary Fan", 2));
moel@220
   504
              f.Add(new Fan("CPU Fan #2", 3));
moel@220
   505
              f.Add(new Fan("Auxiliary Fan #2", 4));
moel@220
   506
              break;
moel@220
   507
          }
moel@130
   508
          break;
moel@130
   509
        case Chip.W83627DHG: 
moel@130
   510
        case Chip.W83627DHGP:                      
moel@130
   511
        case Chip.W83667HG:
moel@130
   512
        case Chip.W83667HGB:
moel@152
   513
          switch (manufacturer) {
moel@153
   514
            case Manufacturer.ASRock:
moel@153
   515
              switch (model) {
moel@168
   516
                case Model._880GMH_USB3: // W83627DHG-P
moel@153
   517
                  v.Add(new Voltage("CPU VCore", 0));
moel@195
   518
                  v.Add(new Voltage("+3.3V", 3, 34, 34));
moel@195
   519
                  v.Add(new Voltage("+5V", 5, 15, 7.5f));
moel@195
   520
                  v.Add(new Voltage("+12V", 6, 56, 10));
moel@195
   521
                  v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
moel@195
   522
                  v.Add(new Voltage("VBAT", 8, 34, 34));
moel@153
   523
                  t.Add(new Temperature("CPU", 0));
moel@153
   524
                  t.Add(new Temperature("Motherboard", 2));
moel@153
   525
                  f.Add(new Fan("Chassis Fan", 0));
moel@153
   526
                  f.Add(new Fan("CPU Fan", 1));
moel@153
   527
                  f.Add(new Fan("Power Fan", 2));
moel@153
   528
                  break;
moel@153
   529
                default:
moel@153
   530
                  v.Add(new Voltage("CPU VCore", 0));
moel@153
   531
                  v.Add(new Voltage("Voltage #2", 1, true));
moel@195
   532
                  v.Add(new Voltage("AVCC", 2, 34, 34));
moel@195
   533
                  v.Add(new Voltage("3VCC", 3, 34, 34));
moel@153
   534
                  v.Add(new Voltage("Voltage #5", 4, true));
moel@153
   535
                  v.Add(new Voltage("Voltage #6", 5, true));
moel@153
   536
                  v.Add(new Voltage("Voltage #7", 6, true));
moel@195
   537
                  v.Add(new Voltage("3VSB", 7, 34, 34));
moel@195
   538
                  v.Add(new Voltage("VBAT", 8, 34, 34));
moel@153
   539
                  t.Add(new Temperature("CPU", 0));
moel@153
   540
                  t.Add(new Temperature("Auxiliary", 1));
moel@153
   541
                  t.Add(new Temperature("System", 2));
moel@153
   542
                  f.Add(new Fan("System Fan", 0));
moel@153
   543
                  f.Add(new Fan("CPU Fan", 1));
moel@153
   544
                  f.Add(new Fan("Auxiliary Fan", 2));
moel@153
   545
                  f.Add(new Fan("CPU Fan #2", 3));
moel@153
   546
                  f.Add(new Fan("Auxiliary Fan #2", 4));
moel@153
   547
                  break;
moel@153
   548
              }
moel@153
   549
              break;
moel@152
   550
            case Manufacturer.ASUS:
moel@152
   551
              switch (model) {
moel@174
   552
                case Model.P6X58D_E: // W83667HG                 
moel@174
   553
                case Model.Rampage_II_GENE: // W83667HG 
moel@152
   554
                  v.Add(new Voltage("CPU VCore", 0));
moel@195
   555
                  v.Add(new Voltage("+12V", 1, 11.5f, 1.91f));
moel@195
   556
                  v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
moel@195
   557
                  v.Add(new Voltage("+3.3V", 3, 34, 34));
moel@195
   558
                  v.Add(new Voltage("+5V", 4, 15, 7.5f));
moel@195
   559
                  v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
moel@195
   560
                  v.Add(new Voltage("VBAT", 8, 34, 34));
moel@174
   561
                  t.Add(new Temperature("CPU", 0));
moel@174
   562
                  t.Add(new Temperature("Motherboard", 2));
moel@174
   563
                  f.Add(new Fan("Chassis Fan #1", 0));
moel@174
   564
                  f.Add(new Fan("CPU Fan", 1));
moel@174
   565
                  f.Add(new Fan("Power Fan", 2));
moel@174
   566
                  f.Add(new Fan("Chassis Fan #2", 3));
moel@174
   567
                  f.Add(new Fan("Chassis Fan #3", 4));
moel@174
   568
                  break;
moel@174
   569
                case Model.Rampage_Extreme: // W83667HG 
moel@174
   570
                  v.Add(new Voltage("CPU VCore", 0));
moel@195
   571
                  v.Add(new Voltage("+12V", 1, 12, 2));
moel@195
   572
                  v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
moel@195
   573
                  v.Add(new Voltage("+3.3V", 3, 34, 34));
moel@195
   574
                  v.Add(new Voltage("+5V", 4, 15, 7.5f));
moel@195
   575
                  v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
moel@195
   576
                  v.Add(new Voltage("VBAT", 8, 34, 34));
moel@152
   577
                  t.Add(new Temperature("CPU", 0));
moel@152
   578
                  t.Add(new Temperature("Motherboard", 2));
moel@152
   579
                  f.Add(new Fan("Chassis Fan #1", 0));
moel@153
   580
                  f.Add(new Fan("CPU Fan", 1));
moel@153
   581
                  f.Add(new Fan("Power Fan", 2));
moel@152
   582
                  f.Add(new Fan("Chassis Fan #2", 3));
moel@152
   583
                  f.Add(new Fan("Chassis Fan #3", 4));
moel@152
   584
                  break;
moel@152
   585
                default:
moel@152
   586
                  v.Add(new Voltage("CPU VCore", 0));
moel@152
   587
                  v.Add(new Voltage("Voltage #2", 1, true));
moel@195
   588
                  v.Add(new Voltage("AVCC", 2, 34, 34));
moel@195
   589
                  v.Add(new Voltage("3VCC", 3, 34, 34));
moel@152
   590
                  v.Add(new Voltage("Voltage #5", 4, true));
moel@152
   591
                  v.Add(new Voltage("Voltage #6", 5, true));
moel@152
   592
                  v.Add(new Voltage("Voltage #7", 6, true));
moel@195
   593
                  v.Add(new Voltage("3VSB", 7, 34, 34));
moel@195
   594
                  v.Add(new Voltage("VBAT", 8, 34, 34));
moel@152
   595
                  t.Add(new Temperature("CPU", 0));
moel@152
   596
                  t.Add(new Temperature("Auxiliary", 1));
moel@152
   597
                  t.Add(new Temperature("System", 2));
moel@153
   598
                  f.Add(new Fan("System Fan", 0));
moel@153
   599
                  f.Add(new Fan("CPU Fan", 1));
moel@153
   600
                  f.Add(new Fan("Auxiliary Fan", 2));
moel@153
   601
                  f.Add(new Fan("CPU Fan #2", 3));
moel@153
   602
                  f.Add(new Fan("Auxiliary Fan #2", 4));
moel@152
   603
                  break;
moel@152
   604
              }
moel@152
   605
              break;
moel@152
   606
            default:
moel@152
   607
              v.Add(new Voltage("CPU VCore", 0));
moel@152
   608
              v.Add(new Voltage("Voltage #2", 1, true));
moel@195
   609
              v.Add(new Voltage("AVCC", 2, 34, 34));
moel@195
   610
              v.Add(new Voltage("3VCC", 3, 34, 34));
moel@152
   611
              v.Add(new Voltage("Voltage #5", 4, true));
moel@152
   612
              v.Add(new Voltage("Voltage #6", 5, true));
moel@152
   613
              v.Add(new Voltage("Voltage #7", 6, true));
moel@195
   614
              v.Add(new Voltage("3VSB", 7, 34, 34));
moel@195
   615
              v.Add(new Voltage("VBAT", 8, 34, 34));
moel@152
   616
              t.Add(new Temperature("CPU", 0));
moel@152
   617
              t.Add(new Temperature("Auxiliary", 1));
moel@152
   618
              t.Add(new Temperature("System", 2));
moel@153
   619
              f.Add(new Fan("System Fan", 0));
moel@153
   620
              f.Add(new Fan("CPU Fan", 1));
moel@153
   621
              f.Add(new Fan("Auxiliary Fan", 2));
moel@153
   622
              f.Add(new Fan("CPU Fan #2", 3));
moel@153
   623
              f.Add(new Fan("Auxiliary Fan #2", 4));
moel@152
   624
              break;
moel@152
   625
          } 
moel@130
   626
          break;
moel@130
   627
        case Chip.W83627HF: 
moel@130
   628
        case Chip.W83627THF: 
moel@130
   629
        case Chip.W83687THF:
moel@130
   630
          v.Add(new Voltage("CPU VCore", 0));
moel@130
   631
          v.Add(new Voltage("Voltage #2", 1, true));
moel@130
   632
          v.Add(new Voltage("Voltage #3", 2, true));
moel@195
   633
          v.Add(new Voltage("AVCC", 3, 34, 51));
moel@130
   634
          v.Add(new Voltage("Voltage #5", 4, true));
moel@195
   635
          v.Add(new Voltage("5VSB", 5, 34, 51));
moel@130
   636
          v.Add(new Voltage("VBAT", 6));
moel@130
   637
          t.Add(new Temperature("CPU", 0));
moel@130
   638
          t.Add(new Temperature("Auxiliary", 1));
moel@130
   639
          t.Add(new Temperature("System", 2));
moel@153
   640
          f.Add(new Fan("System Fan", 0));
moel@153
   641
          f.Add(new Fan("CPU Fan", 1));
moel@153
   642
          f.Add(new Fan("Auxiliary Fan", 2));
moel@130
   643
          break;
moel@130
   644
        default:
moel@130
   645
          for (int i = 0; i < superIO.Voltages.Length; i++)
moel@130
   646
            v.Add(new Voltage("Voltage #" + (i + 1), i, true));
moel@130
   647
          for (int i = 0; i < superIO.Temperatures.Length; i++)
moel@130
   648
            t.Add(new Temperature("Temperature #" + (i + 1), i));
moel@130
   649
          for (int i = 0; i < superIO.Fans.Length; i++)
moel@130
   650
            f.Add(new Fan("Fan #" + (i + 1), i));
moel@130
   651
          break;
moel@130
   652
      }
moel@130
   653
moel@195
   654
      const string formula = "Voltage = value + (value - Vf) * Ri / Rf.";
moel@130
   655
      foreach (Voltage voltage in v) 
moel@130
   656
        if (voltage.Index < superIO.Voltages.Length) {
moel@130
   657
          Sensor sensor = new Sensor(voltage.Name, voltage.Index, 
moel@195
   658
            voltage.Hidden, SensorType.Voltage, this, new [] {
moel@130
   659
            new ParameterDescription("Ri [kΩ]", "Input resistance.\n" + 
moel@130
   660
              formula, voltage.Ri),
moel@130
   661
            new ParameterDescription("Rf [kΩ]", "Reference resistance.\n" + 
moel@130
   662
              formula, voltage.Rf),
moel@130
   663
            new ParameterDescription("Vf [V]", "Reference voltage.\n" + 
moel@130
   664
              formula, voltage.Vf)
moel@165
   665
            }, settings);
moel@130
   666
          voltages.Add(sensor);
moel@130
   667
      }
moel@130
   668
moel@130
   669
      foreach (Temperature temperature in t) 
moel@130
   670
        if (temperature.Index < superIO.Temperatures.Length) {
moel@134
   671
        Sensor sensor = new Sensor(temperature.Name, temperature.Index,
moel@195
   672
          SensorType.Temperature, this, new [] {
moel@130
   673
          new ParameterDescription("Offset [°C]", "Temperature offset.", 0)
moel@165
   674
        }, settings);
moel@130
   675
        temperatures.Add(sensor);
moel@130
   676
      }
moel@130
   677
moel@130
   678
      foreach (Fan fan in f)
moel@130
   679
        if (fan.Index < superIO.Fans.Length) {
moel@134
   680
          Sensor sensor = new Sensor(fan.Name, fan.Index, SensorType.Fan,
moel@165
   681
            this, settings);
moel@130
   682
          fans.Add(sensor);
moel@130
   683
        }
moel@130
   684
    }
moel@130
   685
moel@130
   686
    public override Identifier Identifier {
moel@166
   687
      get { 
moel@166
   688
        return new Identifier("lpc", 
moel@166
   689
          superIO.Chip.ToString().ToLower(CultureInfo.InvariantCulture)); 
moel@166
   690
      }
moel@130
   691
    }
moel@130
   692
moel@165
   693
    public override HardwareType HardwareType {
moel@165
   694
      get { return HardwareType.SuperIO; }
moel@130
   695
    }
moel@130
   696
moel@176
   697
    public override IHardware Parent {
moel@176
   698
      get { return mainboard; }
moel@176
   699
    }
moel@176
   700
moel@130
   701
    public override string Name {
moel@130
   702
      get { return name; }
moel@130
   703
    }
moel@130
   704
moel@130
   705
    public override string GetReport() {
moel@130
   706
      return superIO.GetReport();
moel@130
   707
    }
moel@130
   708
moel@130
   709
    public override void Update() {
moel@130
   710
      superIO.Update();
moel@130
   711
moel@130
   712
      foreach (Sensor sensor in voltages) {
moel@130
   713
        float? value = superIO.Voltages[sensor.Index];
moel@130
   714
        if (value.HasValue) {
moel@130
   715
          sensor.Value = value + (value - sensor.Parameters[2].Value) *
moel@130
   716
            sensor.Parameters[0].Value / sensor.Parameters[1].Value;
moel@130
   717
          ActivateSensor(sensor);
moel@130
   718
        }
moel@130
   719
      }
moel@130
   720
moel@130
   721
      foreach (Sensor sensor in temperatures) {
moel@130
   722
        float? value = superIO.Temperatures[sensor.Index];
moel@130
   723
        if (value.HasValue) {
moel@130
   724
          sensor.Value = value + sensor.Parameters[0].Value;
moel@130
   725
          ActivateSensor(sensor);
moel@130
   726
        }
moel@130
   727
      }
moel@130
   728
moel@130
   729
      foreach (Sensor sensor in fans) {
moel@130
   730
        float? value = superIO.Fans[sensor.Index];
moel@130
   731
        if (value.HasValue) {
moel@130
   732
          sensor.Value = value;
moel@130
   733
          if (value.Value > 0)
moel@130
   734
            ActivateSensor(sensor);
moel@130
   735
        }
moel@130
   736
      }
moel@130
   737
    }
moel@130
   738
moel@130
   739
    private class Voltage {
moel@130
   740
      public readonly string Name;
moel@130
   741
      public readonly int Index;
moel@130
   742
      public readonly float Ri;
moel@130
   743
      public readonly float Rf;
moel@130
   744
      public readonly float Vf;
moel@130
   745
      public readonly bool Hidden;
moel@130
   746
moel@202
   747
      public Voltage(string name, int index) :
moel@202
   748
        this(name, index, false) { }
moel@202
   749
      
moel@130
   750
      public Voltage(string name, int index, bool hidden) :
moel@130
   751
        this(name, index, 0, 1, 0, hidden) { }
moel@202
   752
      
moel@202
   753
      public Voltage(string name, int index, float ri, float rf) :
moel@202
   754
        this(name, index, ri, rf, 0, false) { }
moel@202
   755
      
moel@202
   756
      // float ri = 0, float rf = 1, float vf = 0, bool hidden = false) 
moel@202
   757
      
moel@195
   758
      public Voltage(string name, int index, 
moel@202
   759
        float ri, float rf, float vf, bool hidden) 
moel@195
   760
      {
moel@130
   761
        this.Name = name;
moel@130
   762
        this.Index = index;
moel@130
   763
        this.Ri = ri;
moel@130
   764
        this.Rf = rf;
moel@130
   765
        this.Vf = vf;
moel@130
   766
        this.Hidden = hidden;
moel@130
   767
      }
moel@130
   768
    }
moel@130
   769
moel@130
   770
    private class Temperature {
moel@130
   771
      public readonly string Name;
moel@130
   772
      public readonly int Index;
moel@130
   773
moel@167
   774
      public Temperature(string name, int index) {
moel@130
   775
        this.Name = name;
moel@130
   776
        this.Index = index;
moel@130
   777
      }
moel@130
   778
    }
moel@130
   779
moel@130
   780
    private class Fan {
moel@130
   781
      public readonly string Name;
moel@130
   782
      public readonly int Index;
moel@130
   783
moel@130
   784
      public Fan(string name, int index) {
moel@130
   785
        this.Name = name;
moel@130
   786
        this.Index = index;
moel@130
   787
      }
moel@130
   788
    }
moel@130
   789
  }
moel@130
   790
}