首页 > 其他分享 >平台设备信息获取

平台设备信息获取

时间:2023-06-07 19:13:15浏览次数:37  
标签:VendorId return 平台 driver 获取 version Bits FString 设备

电池: FGenericPlatformMisc::GetBatteryLevel FAndroidMisc::GetBatteryLevel FIOSPlatformMisc::GetBatteryLevel 制造厂商: 都是FGenericPlatformMisc::GetDeviceMakeAndModel 操作系统 FPlatformMisc::GetOSVersion FAndroidMisc::GetOSVersion FIOSPlatformMisc::GetOSVersion 内存 都是FGenericPlatformMemory::GetPhysicalGBRam() cpuChipset 芯片 安卓:FAndroidMisc::GetcpuChipset 其他FGenericPlatformMisc::GetcpuChipset cpu品牌: FPlatformMisc::GetCPUBrand gpu驱动 FAndroidMisc::GetPrimaryGPUBrand FIOSPlatformMisc::GetPrimaryGPUBrand FPlatformMisc::GetPrimaryGPUBrand 设备模型 FAndroidMisc::GetDeviceModel FIOSPlatformMisc::GetDeviceModel 其他FString(); 网络类型 FGenericPlatformMisc::GetNetworkConnectionType FAndroidMisc::GetNetworkConnectionType FIOSPlatformMisc::GetNetworkConnectionType   mac地址: 安卓 IMobileUtils::Get().GetPlatformInterface()->GetDeviceId(); ios:FPlatformMisc::GetDeviceId(); Windows:FPlatformMisc::GetMacAddressString();     /**
* Uses cpuid instruction to get the vendor string
*
* @return CPU vendor name
*/
static FString GetCPUVendor();   //供应商

/**
* On x86(-64) platforms, uses cpuid instruction to get the CPU signature
*
* @return CPU info bitfield
*
* Bits 0-3 Stepping ID
* Bits 4-7 Model
* Bits 8-11 Family
* Bits 12-13 Processor type (Intel) / Reserved (AMD)
* Bits 14-15 Reserved
* Bits 16-19 Extended model
* Bits 20-27 Extended family
* Bits 28-31 Reserved
*/
static uint32 GetCPUInfo();     FGenericPlatformMisc里: static struct FGPUDriverInfo GetGPUDriverInfo(const FString& DeviceDescription);  
// video driver details
struct FGPUDriverInfo
{
FGPUDriverInfo()
: VendorId(0)
{
}

// DirectX VendorId, 0 if not set, use functions below to set/get
uint32 VendorId;
// e.g. "NVIDIA GeForce GTX 680" or "AMD Radeon R9 200 / HD 7900 Series"
FString DeviceDescription;
// e.g. "NVIDIA" or "Advanced Micro Devices, Inc."
FString ProviderName;
// e.g. "15.200.1062.1004"(AMD)
// e.g. "9.18.13.4788"(NVIDIA) first number is Windows version (e.g. 7:Vista, 6:XP, 4:Me, 9:Win8(1), 10:Win7), last 5 have the UserDriver version encoded
// also called technical version number (https://wiki.mozilla.org/Blocklisting/Blocked_Graphics_Drivers)
// TEXT("Unknown") if driver detection failed
FString InternalDriverVersion;
// e.g. "Catalyst 15.7.1"(AMD) or "Crimson 15.7.1"(AMD) or "347.88"(NVIDIA)
// also called commercial version number (https://wiki.mozilla.org/Blocklisting/Blocked_Graphics_Drivers)
FString UserDriverVersion;
// e.g. 3-13-2015
FString DriverDate;
// e.g. D3D11, D3D12
FString RHIName;

bool IsValid() const
{
return !DeviceDescription.IsEmpty()
&& VendorId
&& (InternalDriverVersion != TEXT("Unknown")) // if driver detection code fails
&& (InternalDriverVersion != TEXT("")); // if running on non Windows platform we don't fill in the driver version, later we need to check for the OS as well.
}

// set VendorId
void SetAMD() { VendorId = 0x1002; }
// set VendorId
void SetIntel() { VendorId = 0x8086; }
// set VendorId
void SetNVIDIA() { VendorId = 0x10DE; }
// get VendorId
bool IsAMD() const { return VendorId == 0x1002; }
// get VendorId
bool IsIntel() const { return VendorId == 0x8086; }
// get VendorId
bool IsNVIDIA() const { return VendorId == 0x10DE; }

FString GetUnifiedDriverVersion() const
{
// we use the internal version, not the user version to avoid problem where the name was altered
const FString& FullVersion = InternalDriverVersion;

if(IsNVIDIA())
{
// on the internal driver number: https://forums.geforce.com/default/topic/378546/confusion-over-driver-version-numbers/
// The first 7 shows u that is a Vista driver, 6 that is an XP and 4 that is Me
// we don't care about the windows version so we don't look at the front part of the driver version
// "9.18.13.4788" -> "347.88"
// "10.18.13.4788" -> "347.88"
// the following code works with the current numbering scheme, if needed we have to update that

// we don't care about the windows version so we don't look at the front part of the driver version
// e.g. 36.143
FString RightPart = FullVersion.Right(6);

// move the dot
RightPart = RightPart.Replace(TEXT("."), TEXT(""));
RightPart.InsertAt(3, TEXT("."));
return RightPart;
}
else if(IsAMD())
{
// examples for AMD: "13.12" "15.101.1007" "13.351"
}
else if(IsIntel())
{
}
return FullVersion;
}
};

标签:VendorId,return,平台,driver,获取,version,Bits,FString,设备
From: https://www.cnblogs.com/Shaojunping/p/17464302.html

相关文章

  • 后端获取TOKEN返oss上传地址,前端如何将字符串传给这个地址
    您也可以使用Axios库来发送请求,以下是发送表单请求的示例代码:constaxios=require('axios');functionuploadStringToOSS(ossPostData,content){constformData=newFormData();Object.keys(ossPostData.fields).forEach(key=>{formData.append(key,os......
  • 一体化协同平台助力企业回归生产本质,创造价值
    核心观点单点工具的串联无法有效解决研效痛点问题,企业需要通过一体化协同平台提高端到端价值流动效率。一体化协同平台的价值是软件工程理念最大化落地、数字化研发管理、沉浸式研发体验。一体化协同平台集成需要评估闭环效率杠杆,确定集成边界和集成深度。BizOps和FinOps......
  • EasyCVR接入国标设备后视频直播正常,设备录像无法播放是什么原因?
    EasyCVR基于云边端协同,具有强大的数据接入、处理及分发能力,平台可支持海量视频的轻量化接入与汇聚管理,可提供视频监控直播、视频轮播、视频录像、云存储、回放与检索、智能告警、服务器集群、语音对讲、云台控制、电子地图、平台级联等功能。在录像功能上,平台支持云端录像、设备录......
  • 视频融合EasyCVR平台接入RTSP流后设备显示离线是什么原因?
    EasyCVR视频融合平台基于云边端智能协同架构,具有强大的数据接入、处理及分发能力,平台支持海量视频汇聚管理、全网分发、按需调阅、鉴权播放、智能分析等视频能力与服务。平台开放度高、兼容性强、可支持灵活拓展与第三方集成,我们也提供了丰富的API接口供有需求的用户进行自由调用......
  • AI安防视频融合平台EasyCVR服务启动异常的原因排查与解决
    EasyCVR视频融合平台基于云边端一体化架构,具有强大的数据接入、处理及分发能力,平台支持多协议、多类型的设备接入,包括主流标准协议国标GB28181、RTSP/Onvif、RTMP等,以及厂家私有协议与SDK接入,包括海康Ehome、海大宇等设备的SDK等。有用户反馈,EasyCVR服务启动成功后,平台无法访问,......
  • .net低代码开发平台 快速实现组织架构数字化
    在数字化时代,企业面临着巨大的转型挑战。数字化赋予了企业极大的流程优化和高效性,提供了以前难以想象的效率。数字化让企业可以通过机器学习、大数据、自动化流程等手段,实现更快、更精确的决策和反应性。其中,企业组织架构数字化尤为重要。数字化转型是企业的整体转型,是对企业业务......
  • 奇安信设备问题(初中级)
    一、天眼设备1、在天眼设备中,sip、dip、sport、dport字段的含义?答:sip是源IP、dip是目的IP;sport是源端口、dport是目的端口。2、在天眼分析平台DNS协议中的dnstype字段的含义是什么?答:dnstype表示DNS请求类型;0表示DNS请求、1表示DNS响应。3、dns_type中的addr代表什么?答:表示......
  • Android获取当前连接的wifi名称
    首先AndroidMainfest.xml文件里加入权限: <uses-permissionandroid:name="android.permission.ACCESS_NETWORK_STATE"/><!--获取WIFI信息状态的权限--><uses-permissionandroid:name="android.permission.ACCESS_WIFI_STATE"/><!--获取网络状态改......
  • 直播预告 | 一体化智能可观测平台如何保障电商节大促
    ......
  • 武汉星起航:亚马逊平台未来发展趋势分析,卖家可做些什么
    作为全球领先的电商平台,亚马逊一直在积极寻求新的发展机遇和创新方向。以下是武汉星起航整理的亚马逊未来发展方向的一些关键观点和趋势:AI技术的广泛应用:亚马逊将进一步发展和应用人工智能(AI)技术,以提升用户体验和服务效率。通过AI技术,亚马逊可以实现更智能化的商品推荐、个性化的购......