检测在Linux OS上使用C ++在哪个USB集线器中连接的设备 [英] Detect device coneected in which USB hub using C++ on linux OS

查看:105
本文介绍了检测在Linux OS上使用C ++在哪个USB集线器中连接的设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



从过去几周开始,我试图在我的C ++程序中显示USB和集线器信息。我需要使用C ++找到在USB集线器中连接的设备使用C ++

Hi,
From the last several weeks I am trying to display my USB and hub infimation in my C++ program. I nee to find the devices connected in USB hub in a tree structure using C++

推荐答案

我没有任何编码的个人经验但你可以搜索关于INotify的文档。我知道如何在Linux上的用户空间中获取设备通知。我已经看到了它产生的数据类型,你必须解析一堆字符串并自己构建任何所需的树结构。
I don''t have any personal experience of coding this but you could search for documentation on INotify. I understand that''s how to get device notifications in user space on Linux. I have seen the kind of data it produces, you will have to parse a bunch of strings and build any required tree structure yourself.


这篇关于检测在Linux OS上使用C ++在哪个USB集线器中连接的设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆