Hardware/Mainboard/SMBIOS.cs
author moel.mich
Sat, 06 Aug 2011 17:27:55 +0000
changeset 320 df3493f75225
parent 319 35cda448fc5f
child 332 19b1e150e7af
permissions -rw-r--r--
Added Added a mainboard specific configuration for the Shuttle SH67Hx barebones. Added the SMBIOS system information to the report.
moel@64
     1
/*
moel@64
     2
  
moel@64
     3
  Version: MPL 1.1/GPL 2.0/LGPL 2.1
moel@64
     4
moel@64
     5
  The contents of this file are subject to the Mozilla Public License Version
moel@64
     6
  1.1 (the "License"); you may not use this file except in compliance with
moel@64
     7
  the License. You may obtain a copy of the License at
moel@64
     8
 
moel@64
     9
  http://www.mozilla.org/MPL/
moel@64
    10
moel@64
    11
  Software distributed under the License is distributed on an "AS IS" basis,
moel@64
    12
  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
moel@64
    13
  for the specific language governing rights and limitations under the License.
moel@64
    14
moel@64
    15
  The Original Code is the Open Hardware Monitor code.
moel@64
    16
moel@64
    17
  The Initial Developer of the Original Code is 
moel@64
    18
  Michael Möller <m.moeller@gmx.ch>.
moel@265
    19
  Portions created by the Initial Developer are Copyright (C) 2009-2011
moel@64
    20
  the Initial Developer. All Rights Reserved.
moel@64
    21
moel@64
    22
  Contributor(s):
moel@64
    23
moel@64
    24
  Alternatively, the contents of this file may be used under the terms of
moel@64
    25
  either the GNU General Public License Version 2 or later (the "GPL"), or
moel@64
    26
  the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
moel@64
    27
  in which case the provisions of the GPL or the LGPL are applicable instead
moel@64
    28
  of those above. If you wish to allow use of your version of this file only
moel@64
    29
  under the terms of either the GPL or the LGPL, and not to allow others to
moel@64
    30
  use your version of this file under the terms of the MPL, indicate your
moel@64
    31
  decision by deleting the provisions above and replace them with the notice
moel@64
    32
  and other provisions required by the GPL or the LGPL. If you do not delete
moel@64
    33
  the provisions above, a recipient may use your version of this file under
moel@64
    34
  the terms of any one of the MPL, the GPL or the LGPL.
moel@64
    35
 
moel@64
    36
*/
moel@64
    37
moel@64
    38
using System;
moel@64
    39
using System.Collections.Generic;
moel@136
    40
using System.IO;
moel@64
    41
using System.Management;
moel@64
    42
using System.Text;
moel@64
    43
moel@64
    44
namespace OpenHardwareMonitor.Hardware.Mainboard {
moel@64
    45
moel@165
    46
  internal class SMBIOS {
moel@64
    47
moel@195
    48
    private readonly byte[] raw;
moel@195
    49
    private readonly Structure[] table;
moel@64
    50
moel@242
    51
    private readonly Version version;
moel@195
    52
    private readonly BIOSInformation biosInformation;
moel@320
    53
    private readonly SystemInformation systemInformation;
moel@195
    54
    private readonly BaseBoardInformation baseBoardInformation;
moel@64
    55
moel@167
    56
    private static string ReadSysFS(string path) {
moel@136
    57
      try {
moel@136
    58
        if (File.Exists(path)) {
moel@136
    59
          using (StreamReader reader = new StreamReader(path)) 
moel@136
    60
            return reader.ReadLine();
moel@136
    61
        } else {
moel@136
    62
          return null;
moel@136
    63
        }
moel@136
    64
      } catch {
moel@136
    65
        return null;
moel@136
    66
      }
moel@136
    67
    }
moel@136
    68
    
moel@64
    69
    public SMBIOS() {
moel@195
    70
      int p = (int)Environment.OSVersion.Platform;
moel@136
    71
      if ((p == 4) || (p == 128)) {
moel@136
    72
        this.raw = null;
moel@136
    73
        this.table = null;
moel@136
    74
        
moel@136
    75
        string boardVendor = ReadSysFS("/sys/class/dmi/id/board_vendor");
moel@136
    76
        string boardName = ReadSysFS("/sys/class/dmi/id/board_name");        
moel@136
    77
        string boardVersion = ReadSysFS("/sys/class/dmi/id/board_version");        
moel@136
    78
        this.baseBoardInformation = new BaseBoardInformation(
moel@136
    79
          boardVendor, boardName, boardVersion, null);
moel@320
    80
moel@320
    81
        string systemVendor = ReadSysFS("/sys/class/dmi/id/sys_vendor");
moel@320
    82
        string productName = ReadSysFS("/sys/class/dmi/id/product_name");
moel@320
    83
        string productVersion = ReadSysFS("/sys/class/dmi/id/product_version");    
moel@320
    84
        this.systemInformation = new SystemInformation(systemVendor, 
moel@320
    85
          productName, productVersion, null, null);
moel@320
    86
moel@136
    87
        string biosVendor = ReadSysFS("/sys/class/dmi/id/bios_vendor");
moel@136
    88
        string biosVersion = ReadSysFS("/sys/class/dmi/id/bios_version");
moel@136
    89
        this.biosInformation = new BIOSInformation(biosVendor, biosVersion);
moel@136
    90
        
moel@136
    91
      } else {              
moel@136
    92
        List<Structure> structureList = new List<Structure>();
moel@64
    93
moel@136
    94
        raw = null;
moel@242
    95
        byte majorVersion = 0;
moel@242
    96
        byte minorVersion = 0;
moel@136
    97
        try {
moel@167
    98
          ManagementObjectCollection collection;
moel@167
    99
          using (ManagementObjectSearcher searcher = 
moel@136
   100
            new ManagementObjectSearcher("root\\WMI", 
moel@242
   101
              "SELECT * FROM MSSMBios_RawSMBiosTables")) {
moel@167
   102
            collection = searcher.Get();
moel@167
   103
          }
moel@136
   104
         
moel@136
   105
          foreach (ManagementObject mo in collection) {
moel@136
   106
            raw = (byte[])mo["SMBiosData"];
moel@242
   107
            majorVersion = (byte)mo["SmbiosMajorVersion"];
moel@242
   108
            minorVersion = (byte)mo["SmbiosMinorVersion"];            
moel@89
   109
            break;
moel@136
   110
          }
moel@136
   111
        } catch { }
moel@242
   112
moel@242
   113
        if (majorVersion > 0 || minorVersion > 0)
moel@242
   114
          version = new Version(majorVersion, minorVersion);
moel@136
   115
  
moel@136
   116
        if (raw != null && raw.Length > 0) {
moel@136
   117
          int offset = 0;
moel@136
   118
          byte type = raw[offset];
moel@136
   119
          while (offset + 4 < raw.Length && type != 127) {
moel@136
   120
  
moel@136
   121
            type = raw[offset];
moel@136
   122
            int length = raw[offset + 1];
moel@136
   123
            ushort handle = (ushort)((raw[offset + 2] << 8) | raw[offset + 3]);
moel@136
   124
  
moel@136
   125
            if (offset + length > raw.Length)
moel@136
   126
              break;
moel@136
   127
            byte[] data = new byte[length];
moel@136
   128
            Array.Copy(raw, offset, data, 0, length);
moel@136
   129
            offset += length;
moel@136
   130
  
moel@136
   131
            List<string> stringsList = new List<string>();
moel@136
   132
            if (offset < raw.Length && raw[offset] == 0)
moel@136
   133
              offset++;
moel@136
   134
  
moel@89
   135
            while (offset < raw.Length && raw[offset] != 0) {
moel@136
   136
              StringBuilder sb = new StringBuilder();
moel@136
   137
              while (offset < raw.Length && raw[offset] != 0) {
moel@136
   138
                sb.Append((char)raw[offset]); offset++;
moel@136
   139
              }
moel@136
   140
              offset++;
moel@136
   141
              stringsList.Add(sb.ToString());
moel@64
   142
            }
moel@64
   143
            offset++;
moel@136
   144
            switch (type) {
moel@136
   145
              case 0x00:
moel@136
   146
                this.biosInformation = new BIOSInformation(
moel@136
   147
                  type, handle, data, stringsList.ToArray());
moel@136
   148
                structureList.Add(this.biosInformation); break;
moel@320
   149
              case 0x01:
moel@320
   150
                this.systemInformation = new SystemInformation(
moel@320
   151
                  type, handle, data, stringsList.ToArray());
moel@320
   152
                structureList.Add(this.systemInformation); break;
moel@136
   153
              case 0x02: this.baseBoardInformation = new BaseBoardInformation(
moel@136
   154
                  type, handle, data, stringsList.ToArray());
moel@136
   155
                structureList.Add(this.baseBoardInformation); break;
moel@136
   156
              default: structureList.Add(new Structure(
moel@136
   157
                type, handle, data, stringsList.ToArray())); break;
moel@136
   158
            }
moel@64
   159
          }
moel@64
   160
        }
moel@136
   161
              
moel@136
   162
        table = structureList.ToArray();
moel@89
   163
      }
moel@64
   164
    }
moel@64
   165
moel@64
   166
    public string GetReport() {
moel@136
   167
      StringBuilder r = new StringBuilder();
moel@64
   168
moel@242
   169
      if (version != null) {
moel@242
   170
        r.Append("SMBIOS Version: "); r.AppendLine(version.ToString(2));
moel@242
   171
        r.AppendLine();
moel@242
   172
      }
moel@242
   173
moel@167
   174
      if (BIOS != null) {
moel@167
   175
        r.Append("BIOS Vendor: "); r.AppendLine(BIOS.Vendor);
moel@167
   176
        r.Append("BIOS Version: "); r.AppendLine(BIOS.Version);
moel@64
   177
        r.AppendLine();
moel@64
   178
      }
moel@64
   179
moel@320
   180
      if (System != null) {
moel@320
   181
        r.Append("System Manufacturer: ");
moel@320
   182
        r.AppendLine(System.ManufacturerName);
moel@320
   183
        r.Append("System Name: ");
moel@320
   184
        r.AppendLine(System.ProductName);
moel@320
   185
        r.Append("System Version: ");
moel@320
   186
        r.AppendLine(System.Version);
moel@320
   187
        r.AppendLine();
moel@320
   188
      }
moel@320
   189
moel@167
   190
      if (Board != null) {
moel@136
   191
        r.Append("Mainboard Manufacturer: ");
moel@167
   192
        r.AppendLine(Board.ManufacturerName);
moel@136
   193
        r.Append("Mainboard Name: ");
moel@167
   194
        r.AppendLine(Board.ProductName);
moel@167
   195
        r.Append("Mainboard Version: ");
moel@167
   196
        r.AppendLine(Board.Version);
moel@64
   197
        r.AppendLine();
moel@64
   198
      }
moel@136
   199
moel@136
   200
      if (raw != null) {
moel@136
   201
        string base64 = Convert.ToBase64String(raw);
moel@136
   202
        r.AppendLine("SMBIOS Table");
moel@136
   203
        r.AppendLine();
moel@136
   204
moel@136
   205
        for (int i = 0; i < Math.Ceiling(base64.Length / 64.0); i++) {
moel@136
   206
          r.Append(" ");
moel@136
   207
          for (int j = 0; j < 0x40; j++) {
moel@136
   208
            int index = (i << 6) | j;
moel@136
   209
            if (index < base64.Length) {              
moel@136
   210
              r.Append(base64[index]);
moel@136
   211
            }
moel@136
   212
          }
moel@136
   213
          r.AppendLine();
moel@136
   214
        }
moel@136
   215
        r.AppendLine();
moel@136
   216
      }
moel@136
   217
moel@64
   218
      return r.ToString();
moel@64
   219
    }
moel@64
   220
moel@64
   221
    public BIOSInformation BIOS {
moel@64
   222
      get { return biosInformation; }
moel@64
   223
    }
moel@64
   224
moel@320
   225
    public SystemInformation System {
moel@320
   226
      get { return systemInformation; }
moel@320
   227
    }
moel@320
   228
moel@64
   229
    public BaseBoardInformation Board {
moel@64
   230
      get { return baseBoardInformation; }
moel@64
   231
    }
moel@64
   232
moel@64
   233
    public class Structure {
moel@195
   234
      private readonly byte type;
moel@195
   235
      private readonly ushort handle;
moel@64
   236
moel@195
   237
      private readonly byte[] data;
moel@195
   238
      private readonly string[] strings;
moel@64
   239
moel@64
   240
      protected string GetString(int offset) {
moel@64
   241
        if (offset < data.Length && data[offset] > 0 &&
moel@64
   242
         data[offset] <= strings.Length)
moel@64
   243
          return strings[data[offset] - 1];
moel@64
   244
        else
moel@64
   245
          return "";
moel@64
   246
      }
moel@64
   247
moel@64
   248
      public Structure(byte type, ushort handle, byte[] data, string[] strings) 
moel@64
   249
      {
moel@64
   250
        this.type = type;
moel@64
   251
        this.handle = handle;
moel@64
   252
        this.data = data;
moel@64
   253
        this.strings = strings;
moel@64
   254
      }
moel@64
   255
moel@64
   256
      public byte Type { get { return type; } }
moel@64
   257
moel@64
   258
      public ushort Handle { get { return handle; } }
moel@64
   259
    }
moel@136
   260
      
moel@64
   261
    public class BIOSInformation : Structure {
moel@64
   262
moel@195
   263
      private readonly string vendor;
moel@195
   264
      private readonly string version;
moel@136
   265
      
moel@136
   266
      public BIOSInformation(string vendor, string version) 
moel@136
   267
        : base (0x00, 0, null, null) 
moel@136
   268
      {
moel@136
   269
        this.vendor = vendor;
moel@136
   270
        this.version = version;
moel@136
   271
      }
moel@136
   272
      
moel@64
   273
      public BIOSInformation(byte type, ushort handle, byte[] data,
moel@64
   274
        string[] strings)
moel@136
   275
        : base(type, handle, data, strings) 
moel@136
   276
      {
moel@64
   277
        this.vendor = GetString(0x04);
moel@64
   278
        this.version = GetString(0x05);
moel@64
   279
      }
moel@64
   280
moel@64
   281
      public string Vendor { get { return vendor; } }
moel@64
   282
moel@64
   283
      public string Version { get { return version; } }
moel@64
   284
    }
moel@64
   285
moel@320
   286
    public class SystemInformation : Structure {
moel@320
   287
moel@320
   288
      private readonly string manufacturerName;
moel@320
   289
      private readonly string productName;
moel@320
   290
      private readonly string version;
moel@320
   291
      private readonly string serialNumber;
moel@320
   292
      private readonly string family;
moel@320
   293
moel@320
   294
      public SystemInformation(string manufacturerName, string productName, 
moel@320
   295
        string version, string serialNumber, string family) 
moel@320
   296
        : base (0x01, 0, null, null) 
moel@320
   297
      {
moel@320
   298
        this.manufacturerName = manufacturerName;
moel@320
   299
        this.productName = productName;
moel@320
   300
        this.version = version;
moel@320
   301
        this.serialNumber = serialNumber;
moel@320
   302
        this.family = family;
moel@320
   303
      }
moel@320
   304
moel@320
   305
      public SystemInformation(byte type, ushort handle, byte[] data,
moel@320
   306
        string[] strings)
moel@320
   307
        : base(type, handle, data, strings) 
moel@320
   308
      {
moel@320
   309
        this.manufacturerName = GetString(0x04);
moel@320
   310
        this.productName = GetString(0x05);
moel@320
   311
        this.version = GetString(0x06);
moel@320
   312
        this.serialNumber = GetString(0x07);
moel@320
   313
        this.family = GetString(0x1A);
moel@320
   314
      }
moel@320
   315
moel@320
   316
      public string ManufacturerName { get { return manufacturerName; } }
moel@320
   317
moel@320
   318
      public string ProductName { get { return productName; } }
moel@320
   319
moel@320
   320
      public string Version { get { return version; } }
moel@320
   321
moel@320
   322
      public string SerialNumber { get { return serialNumber; } }
moel@320
   323
moel@320
   324
      public string Family { get { return family; } }
moel@320
   325
moel@320
   326
    }
moel@320
   327
moel@64
   328
    public class BaseBoardInformation : Structure {
moel@64
   329
moel@195
   330
      private readonly string manufacturerName;
moel@195
   331
      private readonly string productName;
moel@195
   332
      private readonly string version;
moel@195
   333
      private readonly string serialNumber;
moel@195
   334
      private readonly Manufacturer manufacturer;
moel@195
   335
      private readonly Model model;
moel@64
   336
moel@195
   337
      private static Manufacturer GetManufacturer(string name) {               
moel@167
   338
        switch (name) {
moel@296
   339
          case "Alienware":
moel@296
   340
            return Manufacturer.Alienware;
moel@296
   341
          case "Apple Inc.":
moel@296
   342
            return Manufacturer.Apple;
moel@153
   343
          case "ASRock":
moel@195
   344
            return Manufacturer.ASRock;
moel@64
   345
          case "ASUSTeK Computer INC.":
moel@195
   346
            return Manufacturer.ASUS;
moel@152
   347
          case "Dell Inc.":
moel@195
   348
            return Manufacturer.Dell;
moel@64
   349
          case "DFI":
moel@72
   350
          case "DFI Inc.":            
moel@195
   351
            return Manufacturer.DFI;
moel@177
   352
          case "ECS":
moel@195
   353
            return Manufacturer.ECS;
moel@64
   354
          case "EPoX COMPUTER CO., LTD":
moel@195
   355
            return Manufacturer.EPoX;
moel@132
   356
          case "EVGA":
moel@195
   357
            return  Manufacturer.EVGA;
moel@152
   358
          case "First International Computer, Inc.":
moel@195
   359
            return Manufacturer.FIC;
moel@296
   360
          case "FUJITSU":
moel@296
   361
          case "FUJITSU SIEMENS":
moel@296
   362
            return Manufacturer.Fujitsu;
moel@64
   363
          case "Gigabyte Technology Co., Ltd.":
moel@195
   364
            return  Manufacturer.Gigabyte;
moel@152
   365
          case "Hewlett-Packard":
moel@195
   366
            return  Manufacturer.HP;
moel@72
   367
          case "IBM":
moel@195
   368
            return  Manufacturer.IBM;
moel@296
   369
          case "Intel":
moel@296
   370
          case "Intel Corp.":
moel@296
   371
          case "Intel Corporation":
moel@296
   372
          case "INTEL Corporation":
moel@296
   373
            return Manufacturer.Intel;   
moel@296
   374
          case "Lenovo":
moel@296
   375
          case "LENOVO":
moel@296
   376
            return Manufacturer.Lenovo;
moel@296
   377
          case "Micro-Star International":
moel@64
   378
          case "MICRO-STAR INTERNATIONAL CO., LTD":
moel@72
   379
          case "MICRO-STAR INTERNATIONAL CO.,LTD":
moel@296
   380
          case "MSI":
moel@319
   381
            return Manufacturer.MSI;
moel@319
   382
          case "Shuttle":
moel@319
   383
            return Manufacturer.Shuttle;
moel@296
   384
          case "Supermicro":
moel@296
   385
            return Manufacturer.Supermicro;
moel@296
   386
          case "TOSHIBA":
moel@296
   387
            return Manufacturer.Toshiba;
moel@152
   388
          case "XFX":
moel@195
   389
            return  Manufacturer.XFX;
moel@152
   390
          case "To be filled by O.E.M.":
moel@195
   391
            return  Manufacturer.Unknown;
moel@64
   392
          default:
moel@195
   393
            return  Manufacturer.Unknown;
moel@126
   394
        }
moel@136
   395
      }
moel@195
   396
moel@195
   397
      private static Model GetModel(string name) {
moel@167
   398
        switch (name) {
moel@153
   399
          case "880GMH/USB3":
moel@195
   400
            return Model._880GMH_USB3;
moel@220
   401
          case "ASRock AOD790GX/128M":
moel@220
   402
            return Model.AOD790GX_128M;
moel@221
   403
          case "P55 Deluxe":
moel@221
   404
            return Model.P55_Deluxe;
moel@133
   405
          case "Crosshair III Formula":
moel@195
   406
            return Model.Crosshair_III_Formula;
moel@133
   407
          case "M2N-SLI DELUXE":
moel@195
   408
            return Model.M2N_SLI_DELUXE;
moel@144
   409
          case "M4A79XTD EVO":
moel@195
   410
            return Model.M4A79XTD_EVO;
moel@130
   411
          case "P5W DH Deluxe":
moel@195
   412
            return Model.P5W_DH_Deluxe;
moel@152
   413
          case "P6X58D-E":
moel@195
   414
            return Model.P6X58D_E;
moel@312
   415
          case "P8P67":
moel@312
   416
            return Model.P8P67;
moel@311
   417
          case "P8P67 EVO":
moel@311
   418
            return Model.P8P67_EVO;
moel@265
   419
          case "P8P67 PRO":
moel@265
   420
            return Model.P8P67_PRO;
moel@276
   421
          case "P8P67-M PRO":
moel@276
   422
            return Model.P8P67_M_PRO;
moel@174
   423
          case "Rampage Extreme":
moel@195
   424
            return Model.Rampage_Extreme;
moel@174
   425
          case "Rampage II GENE":
moel@195
   426
            return Model.Rampage_II_GENE;
moel@126
   427
          case "LP BI P45-T2RS Elite":
moel@195
   428
            return Model.LP_BI_P45_T2RS_Elite;
moel@126
   429
          case "LP DK P55-T3eH9":
moel@195
   430
            return Model.LP_DK_P55_T3eH9;
moel@177
   431
          case "A890GXM-A":
moel@195
   432
            return Model.A890GXM_A;
moel@132
   433
          case "X58 SLI Classified":
moel@195
   434
            return Model.X58_SLI_Classified;
moel@130
   435
          case "965P-S3":
moel@195
   436
            return Model._965P_S3;
moel@126
   437
          case "EP45-DS3R":
moel@195
   438
            return Model.EP45_DS3R;
moel@130
   439
          case "EP45-UD3R":
moel@195
   440
            return Model.EP45_UD3R;
moel@133
   441
          case "EX58-EXTREME":
moel@195
   442
            return Model.EX58_EXTREME;
moel@154
   443
          case "GA-MA770T-UD3":
moel@195
   444
            return Model.GA_MA770T_UD3;
moel@126
   445
          case "GA-MA785GMT-UD2H":
moel@195
   446
            return Model.GA_MA785GMT_UD2H;
moel@290
   447
          case "H67A-UD3H-B3":
moel@290
   448
            return Model.H67A_UD3H_B3;
moel@126
   449
          case "P35-DS3":
moel@195
   450
            return Model.P35_DS3;
moel@133
   451
          case "P35-DS3L":
moel@195
   452
            return Model.P35_DS3L;
moel@148
   453
          case "P55-UD4":
moel@195
   454
            return Model.P55_UD4;
moel@168
   455
          case "P55M-UD4":
moel@195
   456
            return Model.P55M_UD4;
moel@278
   457
          case "P67A-UD4-B3":
moel@278
   458
            return Model.P67A_UD4_B3;
moel@130
   459
          case "X38-DS5":
moel@195
   460
            return Model.X38_DS5;
moel@138
   461
          case "X58A-UD3R":
moel@195
   462
            return Model.X58A_UD3R;
moel@305
   463
          case "Z68X-UD7-B3":
moel@305
   464
            return Model.Z68X_UD7_B3;
moel@320
   465
          case "FH67":
moel@320
   466
            return Model.FH67;
moel@296
   467
          case "Base Board Product Name":
moel@152
   468
          case "To be filled by O.E.M.":
moel@195
   469
            return Model.Unknown;
moel@126
   470
          default:
moel@195
   471
            return Model.Unknown;
moel@64
   472
        }
moel@64
   473
      }
moel@136
   474
      
moel@136
   475
      public BaseBoardInformation(string manufacturerName, string productName, 
moel@136
   476
        string version, string serialNumber) 
moel@136
   477
        : base(0x02, 0, null, null) 
moel@195
   478
      {
moel@195
   479
        this.manufacturerName = manufacturerName;
moel@195
   480
        this.manufacturer = GetManufacturer(manufacturerName);
moel@195
   481
        this.productName = productName;
moel@195
   482
        this.model = GetModel(productName);
moel@136
   483
        this.version = version;
moel@136
   484
        this.serialNumber = serialNumber;
moel@136
   485
      }
moel@136
   486
      
moel@136
   487
      public BaseBoardInformation(byte type, ushort handle, byte[] data,
moel@136
   488
        string[] strings)
moel@136
   489
        : base(type, handle, data, strings) {
moel@64
   490
moel@195
   491
        this.manufacturerName = GetString(0x04).Trim();
moel@195
   492
        this.manufacturer = GetManufacturer(this.manufacturerName);
moel@195
   493
        this.productName = GetString(0x05).Trim();
moel@195
   494
        this.model = GetModel(this.productName);
moel@136
   495
        this.version = GetString(0x06).Trim();
moel@136
   496
        this.serialNumber = GetString(0x07).Trim();               
moel@136
   497
      }
moel@136
   498
      
moel@64
   499
      public string ManufacturerName { get { return manufacturerName; } }
moel@64
   500
moel@64
   501
      public string ProductName { get { return productName; } }
moel@64
   502
moel@89
   503
      public string Version { get { return version; } }
moel@89
   504
moel@89
   505
      public string SerialNumber { get { return serialNumber; } }
moel@89
   506
moel@64
   507
      public Manufacturer Manufacturer { get { return manufacturer; } }
moel@89
   508
moel@126
   509
      public Model Model { get { return model; } }
moel@126
   510
moel@64
   511
    }
moel@64
   512
  }
moel@64
   513
}