Results 1 to 7 of 7

Thread: Read a device driver/Script

  1. #1
    Join Date
    Mar 2011
    Posts
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Read a device driver/Script

    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.

  2. #2
    Join Date
    Mar 2008
    Location
    Houston, Texas, USA
    Posts
    277
    Thanks
    9
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: Read a device driver/Script

    I think you will need to use a library for that device or something similar to achieved that.
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

  3. #3
    Join Date
    Mar 2011
    Posts
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Read a device driver/Script

    Ok, but how do i can do it?

    what function i used for read a external file?

    Qprocess??

    Thanks

  4. #4
    Join Date
    Mar 2008
    Location
    Houston, Texas, USA
    Posts
    277
    Thanks
    9
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: Read a device driver/Script

    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.
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

  5. #5
    Join Date
    Mar 2011
    Posts
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Read a device driver/Script

    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

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Read a device driver/Script

    Use QFile to open your /dev entry and perform read/write as on a regular file.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Mar 2011
    Posts
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Read a device driver/Script

    Ok,

    I'll do some testing here and I'll post the results later

    already very grateful

Similar Threads

  1. source code for odbc driver or MySql driver in arm-embedded-linux
    By sattu in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 24th January 2011, 10:11
  2. Calling QT dll from device driver
    By AmolShinde_8 in forum Newbie
    Replies: 7
    Last Post: 14th September 2010, 07:56
  3. Making new gfxscreen driver for my device
    By albatros in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 10th August 2010, 12:24
  4. Can I include a script from script?
    By yycking in forum Qt Programming
    Replies: 1
    Last Post: 24th April 2009, 03:01
  5. Replies: 1
    Last Post: 19th September 2008, 15:43

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.