-
Notifications
You must be signed in to change notification settings - Fork 3
/
MonitoringSourceDesc.cs
84 lines (72 loc) · 2.91 KB
/
MonitoringSourceDesc.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace LibreHardwareMonitorAfterburnerPlugin
{
/// <summary>
/// Converted from MSIAfterburnerMonitoringSourceDesc.h found in the SDK included with MSI Afterburner 4.6.3
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 8)]
public struct MonitoringSourceDesc
{
const int MaxPath = 260;
/// <summary>
/// descriptor version ((major<<16) + minor)
/// must be set to 0x00010000 or greater by host to use this structure
///
/// Don't change this field when filling the descriptor!
/// </summary>
public uint dwVersion;
/// <summary>
/// data source name (e.g. "GPU temperature")
/// </summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxPath)]
public string szName;
/// <summary>
/// data source units (e.g. "°C")
/// </summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxPath)]
public string szUnits;
/// <summary>
/// optional output format, may be empty to specify default %.0f format
/// </summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxPath)]
public string szFormat;
/// <summary>
/// data source group name used for grouping data by it in OSD, Logitech keyboard LCD etc
/// </summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxPath)]
public string szGroup;
/// <summary>
/// data source ID, MONITORING_SOURCE_ID_...
/// </summary>
public uint dwID;
/// <summary>
// zero based data source instance index, e.g. 0 for "GPU1 temperature" in multiGPU system, 1 for "GPU2 temperature" in multiGPU system etc
/// </summary>
public uint dwInstance;
/// <summary>
/// default maximum graph limit (e.g. 100°C)
/// </summary>
public float fltMaxLimit;
/// <summary>
/// default minimum graph limit (e.g. 0°C)
/// </summary>
public float fltMinLimit;
/// <summary>
/// optional data source name template for multiGPU system, e.g. "GPU%d temperature" for "GPU1 temperature" name
/// the template is used to allow the host to extract GPU/CPU/etc index from the name
/// </summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxPath)]
public string szNameTemplate;
/// <summary>
/// optional data source group name template for multiGPU system, e.g. "GPU%d" for "GPU1" group name
/// the template is used to allow the host to extract GPU/CPU/etc index from the group name
/// </summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxPath)]
public string szGroupTemplate;
}
}