View Full Version : Read a device driver/Script
Juliano.eng
26th March 2011, 01:18
Hello my friends,
I'm a new on qt, and a need of your help, In my Qt aplication i need to read a information on a device driver in the /dev this is possible? if not i can read a information from a script in shell.
Thanks for your help.:D
ComaWhite
26th March 2011, 02:39
I think you will need to use a library for that device or something similar to achieved that.
Juliano.eng
26th March 2011, 02:59
Ok, but how do i can do it?
what function i used for read a external file?
Qprocess??
Thanks
ComaWhite
26th March 2011, 03:04
QProcess is for running programme/commands in shell. You need QFile/QTextStream/QDataStream, but you will probably need hardware access to it. I'm not really too familiar with it.
Juliano.eng
26th March 2011, 03:15
In my specific case, the device driver is wrote by me, and I work with a embedded system, the Qt app has acess the driver for read a value of a A/D converter that is used in my project.
You hope that classes that you indicated for me, work well for this case?
Or is better work acessing a script shell that acess the driver?
Thanks
wysota
26th March 2011, 03:36
Use QFile to open your /dev entry and perform read/write as on a regular file.
Juliano.eng
26th March 2011, 03:40
Ok,
I'll do some testing here and I'll post the results later
already very grateful
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.