KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sysinfo.h
Go to the documentation of this file.
1/*
2* This program source code file is part of KiCad, a free EDA CAD application.
3*
4* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
5*
6* This program is free software; you can redistribute it and/or
7* modify it under the terms of the GNU General Public License
8* as published by the Free Software Foundation; either version 2
9* of the License, or (at your option) any later version.
10*
11* This program is distributed in the hope that it will be useful,
12* but WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14* GNU General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License
17* along with this program; if not, you may find one here:
18* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19* or you may search the http://www.gnu.org website for the version 2 license,
20* or you may write to the Free Software Foundation, Inc.,
21* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22*/
23
24#ifndef SYSINFO_H
25#define SYSINFO_H
26
27#include <cstdint>
28#include <string>
29#include <vector>
30
31namespace KIPLATFORM
32{
34{
35public:
36 std::string Name;
37 long long MemorySize;
38 std::string DriverVersion;
39 std::string Manufacturer;
40};
41
43{
44public:
45 std::string Name;
46 std::string Manufacturer;
47 uint32_t NumberCores;
48 uint32_t NumberLogical;
49};
50
52{
53public:
54 uint32_t Usage;
55 uint64_t TotalPhysical;
56 uint64_t FreePhysical;
57 uint64_t TotalPaging;
58 uint64_t FreePaging;
59 uint64_t TotalVirtual;
60 uint64_t FreeVirtual;
61};
62
64{
65public:
73 virtual bool GetGPUInfo( std::vector<GPU_INFO>& aGpuInfos ) = 0;
74
82 virtual bool GetCPUInfo( std::vector<CPU_INFO>& aCpuInfos ) = 0;
83
91 virtual bool GetMemoryInfo( MEMORY_INFO& aMemoryInfo ) = 0;
92};
93} // namespace KIPLATFORM
94
95#if defined( _WIN32 )
97#elif defined( __unix__ ) || defined( __unix )
99#elif defined( __APPLE__ )
101#else
102
103#endif
104#endif // SYSINFO_H
virtual bool GetGPUInfo(std::vector< GPU_INFO > &aGpuInfos)=0
Retrieve GPU info for the system.
virtual bool GetCPUInfo(std::vector< CPU_INFO > &aCpuInfos)=0
Retrieve CPU info for the system.
virtual bool GetMemoryInfo(MEMORY_INFO &aMemoryInfo)=0
Retrieve memory info for the system.
Definition: app.h:28
std::string Name
Definition: sysinfo.h:45
uint32_t NumberCores
Definition: sysinfo.h:47
uint32_t NumberLogical
Definition: sysinfo.h:48
std::string Manufacturer
Definition: sysinfo.h:46
std::string Name
Definition: sysinfo.h:36
std::string DriverVersion
Definition: sysinfo.h:38
long long MemorySize
Definition: sysinfo.h:37
std::string Manufacturer
Definition: sysinfo.h:39
uint64_t FreePhysical
Definition: sysinfo.h:56
uint64_t FreeVirtual
Definition: sysinfo.h:60
uint64_t TotalPaging
Definition: sysinfo.h:57
uint64_t TotalVirtual
Definition: sysinfo.h:59
uint64_t TotalPhysical
Definition: sysinfo.h:55