home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 July & August / PCWorld_2006-07-08_cd.bin / system / rivatuner / RivaTuner20RC16.exe / SDK / Include / RTHMSharedMemory.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-21  |  4.0 KB  |  95 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // This header file defines hardware monitoring shared memory format
  4. //
  5. /////////////////////////////////////////////////////////////////////////////
  6. #ifndef _RTHM_SHARED_MEMORY_INCLUDED_
  7. #define _RTHM_SHARED_MEMORY_INCLUDED_
  8. /////////////////////////////////////////////////////////////////////////////
  9. // v1.0 header
  10. typedef struct RTHM_SHARED_MEMORY_HEADER_V_1_0
  11. {
  12.     DWORD    dwSignature;
  13.         //signature allows applications to verify status of shared memory
  14.  
  15.         //The signature can be set to:
  16.         //'RTHM'    - hardware monitoring memory is initialized and contains 
  17.         //            valid data 
  18.         //0xDEAD    - hardware monitoring memory is marked for deallocation and
  19.         //            no longer contain valid data
  20.         //otherwise the memory is not initialized
  21.     DWORD    dwVersion;
  22.         //header version ((major<<16) + minor)
  23.         //must be set to 0x00010000 for v1.0 header
  24.     DWORD    dwNumEntries;
  25.         //number of subsequent RTHM_SHARED_MEMORY_ENTRY_V_1_0 entries
  26.     time_t    time;
  27.         //last polling time
  28. } RTHM_SHARED_MEMORY_HEADER_V_1_0, *LPRTHM_SHARED_MEMORY_HEADER_V_1_0;
  29. /////////////////////////////////////////////////////////////////////////////
  30. // v1.0 entry structure (array of entries follows immediately by the header)
  31. typedef struct RTHM_SHARED_MEMORY_ENTRY_V_1_0
  32. {
  33.     char    czSrc[32];
  34.         //data source name (e.g. "Core temperature")
  35.     char    czDim[8];
  36.         //data source dimansion (e.g. "░C")
  37.     float    data;
  38.         //last polled data (e.g. 50░C)
  39.         //(this field can be set to FLT_MAX if data is not available)
  40. } RTHM_SHARED_MEMORY_ENTRY_V_1_0, *LPRTHM_SHARED_MEMORY_ENTRY_V_1_0;
  41. /////////////////////////////////////////////////////////////////////////////
  42. // v1.1+ header
  43. typedef struct RTHM_SHARED_MEMORY_HEADER
  44. {
  45.     DWORD    dwSignature;
  46.         //signature allows applications to verify status of shared memory
  47.  
  48.         //The signature can be set to:
  49.         //'RTHM'    - hardware monitoring memory is initialized and contains 
  50.         //            valid data 
  51.         //0xDEAD    - hardware monitoring memory is marked for deallocation and
  52.         //            no longer contain valid data
  53.         //otherwise the memory is not initialized
  54.     DWORD    dwVersion;
  55.         //header version ((major<<16) + minor)
  56.         //must be set to 0x00010001 or greater to use this structure
  57.     DWORD    dwNumEntries;
  58.         //number of subsequent RTHM_SHARED_MEMORY_ENTRY entries
  59.     time_t    time;
  60.         //last polling time
  61.     DWORD    dwEntrySize;
  62.         //size of entries in subsequent RTHM_SHARED_MEMORY_ENTRY entries array
  63. } RTHM_SHARED_MEMORY_HEADER, *LPRTHM_SHARED_MEMORY_HEADER;
  64. /////////////////////////////////////////////////////////////////////////////
  65. #define RTHM_SHARED_MEMORY_ENTRY_FLAG_SHOW_IN_TOOLTIP                0x00000001
  66. #define    RTHM_SHARED_MEMORY_ENTRY_FLAG_SHOW_IN_ICON                    0x00000002
  67. #define    RTHM_SHARED_MEMORY_ENTRY_FLAG_SHOW_IN_OSD                    0x00000004
  68. /////////////////////////////////////////////////////////////////////////////
  69. // v1.1+ entry structure (array of entries follows immediately by the header)
  70. typedef struct RTHM_SHARED_MEMORY_ENTRY
  71. {
  72.     char    czSrc[32];
  73.         //data source name (e.g. "Core temperature")
  74.     char    czDim[16];
  75.         //data source dimansion (e.g. "░C")
  76.     float    data;
  77.         //last polled data in raw format (e.g. 50░C)
  78.         //(this field can be set to FLT_MAX if data is not available)
  79.  
  80.         //take a note that the user can enable raw data transforming mode and
  81.         //display different values on the graph (e.g. raw core VID values can
  82.         //be translated to mapped core voltages).
  83.         //In this case you may use dataTransformed field to get transformed value
  84.     float    offset;
  85.         //user specified data offset (e.g. +10░C temerature compensation)
  86.  
  87.         //take a note that this value is not automatically added to transformed
  88.         //data, it is up to you to add offset to it
  89.     float    dataTransformed;
  90.         //last polled data in transformed format
  91.     DWORD    flags;
  92.         //bitmask, containing combination of RTHM_SHARED_MEMORY_ENTRY_FLAG_... flags
  93. } RTHM_SHARED_MEMORY_ENTRY, *LPRTHM_SHARED_MEMORY_ENTRY;
  94. /////////////////////////////////////////////////////////////////////////////
  95. #endif //_RTHM_SHARED_MEMORY_INCLUDED_