#ifndef _HW_H_
#define _HW_H_
#include <string>
#include <vector>
using namespace std;
namespace hw
{
typedef enum
{
system,
bridge,
memory,
processor,
address,
storage,
disk,
tape,
bus,
network,
display,
input,
printer,
multimedia,
communication,
power,
volume,
generic
} hwClass;
typedef enum { none, iomem, ioport, mem, irq, dma }
hwResourceType;
typedef enum { nil, boolean, integer, text }
hwValueType;
string strip(const string &);
string asString(long);
string reportSize(unsigned long long);
class value
{
public:
value();
~value();
value(const value &);
value(long long);
value(const string &);
value & operator =(const value &);
bool operator ==(const value &) const;
string asString() const;
bool defined() const;
private:
struct value_i * This;
};
} // namespace hw
class hwNode
{
public:
hwNode(const string & id,
hw::hwClass c = hw::generic,
const string & vendor = "",
const string & product = "",
const string & version = "");
hwNode(const hwNode & o);
~hwNode();
hwNode & operator =(const hwNode & o);
string getId() const;
void setHandle(const string & handle);
string getHandle() const;
bool enabled() const;
bool disabled() const;
void enable();
void disable();
bool claimed() const;
void claim(bool claimchildren=false);
void unclaim();
hw::hwClass getClass() const;
const char * getClassName() const;
void setClass(hw::hwClass c);
string getDescription() const;
void setDescription(const string & description);
string getVendor() const;
void setVendor(const string & vendor);
string getProduct() const;
void setProduct(const string & product);
string getVersion() const;
void setVersion(const string & version);
string getDate() const;
void setDate(const string &);
string getSerial() const;
void setSerial(const string & serial);
unsigned long long getStart() const;
void setStart(unsigned long long start);
unsigned long long getSize() const;
void setSize(unsigned long long size);
unsigned long long getCapacity() const;
void setCapacity(unsigned long long capacity);
unsigned long long getClock() const;
void setClock(unsigned long long clock);
unsigned int getWidth() const;
void setWidth(unsigned int width);
string getSlot() const;
void setSlot(const string & slot);
unsigned int countChildren(hw::hwClass c = hw::generic) const;
hwNode * getChild(unsigned int);
hwNode * getChildByPhysId(long);
hwNode * getChildByPhysId(const string &);
hwNode * getChild(const string & id);
hwNode * findChildByHandle(const string & handle);
hwNode * findChildByLogicalName(const string & handle);
hwNode * findChildByBusInfo(const string & businfo);
hwNode * findChild(bool(*matchfunction)(const hwNode &));
hwNode * addChild(const hwNode & node);
bool isBus() const
{
return countChildren()>0;
}
bool isCapable(const string & feature) const;
void addCapability(const string & feature, const string & description = "");
void describeCapability(const string & feature, const string & description);
string getCapabilities() const;
vector<string> getCapabilitiesList() const;
string getCapabilityDescription(const string & feature) const;
void attractHandle(const string & handle);
void setConfig(const string & key, const string & value);
void setConfig(const string & key, unsigned long long value);
string getConfig(const string & key) const;
vector<string> getConfigKeys() const;
vector<string> getConfigValues(const string & separator = "") const;
vector<string> getLogicalNames() const;
string getLogicalName() const;
void setLogicalName(const string &);
string getDev() const;
void setDev(const string &);
string getBusInfo() const;
void setBusInfo(const string &);
string getPhysId() const;
void setPhysId(long);
void setPhysId(unsigned, unsigned);
void setPhysId(unsigned, unsigned, unsigned);
void setPhysId(const string &);
void assignPhysIds();
void addHint(const string &, const hw::value &);
hw::value getHint(const string &) const;
vector<string> getHints() const;
void merge(const hwNode & node);
void fixInconsistencies();
string asXML(unsigned level = 0);
private:
void setId(const string & id);
bool attractsHandle(const string & handle) const;
bool attractsNode(const hwNode & node) const;
struct hwNode_i * This;
};
#endif
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
【项目资源】: 包含前端、后端、移动开发、操作系统、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源、音视频、网站开发等各种技术项目的源码。 包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。 【项目质量】: 所有源码都经过严格测试,可以直接运行。 功能在确认正常工作后才上传。 【适用人群】: 适用于希望学习不同技术领域的小白或进阶学习者。 可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。 【附加价值】: 项目具有较高的学习借鉴价值,也可直接拿来修改复刻。 对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。 【沟通交流】: 有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 鼓励下载和使用,并欢迎大家互相学习,共同进步。
资源推荐
资源详情
资源评论
收起资源包目录
Linux下的设备管理器(支持硬件信息检测、设备驱动安装和硬件性能测试).zip (324个子文件)
AUTHORS 183B
dmi.cc 53KB
pci.cc 34KB
hw.cc 33KB
pcmcia-legacy.cc 26KB
scsi.cc 24KB
network.cc 18KB
usb.cc 17KB
cpuid.cc 15KB
smp.cc 9KB
osutils.cc 8KB
cpuinfo.cc 8KB
gears.cc 7KB
sysfs.cc 6KB
heuristics.cc 3KB
mem.cc 3KB
sensors.cc 3KB
main.cc 2KB
cdrom.cc 2KB
jedec.cc 2KB
disk.cc 2KB
cpufreq.cc 1KB
status.cc 1KB
pcmcia.cc 1KB
options.cc 1KB
stream.cc 1KB
lshw.cc 1006B
abi.cc 926B
super.cc 674B
com.startos.ydm.conf 523B
COPYING 18KB
ydm.desktop 316B
ydms.desktop 290B
wait.gif 10KB
hw.h 5KB
osutils.h 1KB
gears.h 819B
sysfs.h 663B
stream.h 517B
heuristics.h 283B
options.h 249B
lshw.h 200B
sensors.h 149B
super.h 136B
pci.h 118B
jedec.h 112B
pcmcia-legacy.h 111B
cpuinfo.h 96B
network.h 96B
cpufreq.h 96B
main.h 94B
pcmcia.h 93B
cpuid.h 90B
cdrom.h 90B
mem.h 87B
disk.h 87B
scsi.h 87B
smp.h 84B
usb.h 84B
abi.h 84B
dmi.h 84B
status.h 72B
PIXART.jpg 23KB
BROADCOM.jpg 23KB
VIMICRO.jpg 22KB
ETRON.jpg 21KB
RALINK.jpg 20KB
CANON.jpg 19KB
LG.jpg 19KB
EXCELSTOR.jpg 19KB
TRUST.jpg 19KB
EMPIA.jpg 18KB
MARVELL.jpg 18KB
AVAGO.jpg 18KB
PLDS.jpg 18KB
PANASONIC.jpg 18KB
CHICONY.jpg 17KB
SYNTEK.jpg 17KB
EAGET.jpg 17KB
TSSTCORP.jpg 17KB
PRIMAX.jpg 17KB
ASINT.jpg 17KB
APPLE.jpg 17KB
OMNIVISION.jpg 17KB
AVEO.jpg 17KB
SMP.jpg 17KB
AUTHENTEC.jpg 16KB
RAPOO.jpg 16KB
SUNPLUS.jpg 16KB
HP.jpg 8KB
COLORFUL.jpg 8KB
COMEON.jpg 8KB
SIS.jpg 8KB
SAPPHIRE.jpg 7KB
SOYO.jpg 7KB
INTEL.jpg 7KB
CISCO.jpg 7KB
M-ONE.jpg 7KB
MAYA.jpg 7KB
ATI.jpg 7KB
共 324 条
- 1
- 2
- 3
- 4
资源评论
妄北y
- 粉丝: 1w+
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Python爬取大众点评数据.zip
- 计算机视觉(CV)open CV 人脸识别程序.docx
- python 端午节游戏,选择三个传统的端午节活动之一:包粽子、赛龙舟或挂艾草 根据玩家的选择,游戏会描述相应的情节,并在完成后
- C语言各版块实验题库、实验汇报以及实验教学案例资源
- 数据库连接(MySQL与VS2022)_vs2022 mysql-CSDN博客 (2024_6_1 19_11_34).html
- Flappy bird小游戏
- 数电实验五:555单稳态触发电路、555单稳态触发电路、555构成的施密特触发器
- MySQLTuner,一个用Perl编写的脚本,它允许你快速审查MySQL安装情况,并进行调整以提高性能和稳定性
- 冒泡排序 基础排序 插入排序 快速排序 双路快速排序 三路快速排序 堆排序.zip
- 数电实验四:加法计数器、减法计数器、加法器、建议数字钟、74LS192功能测试
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功