Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Attaching drivers for sensors to Qt
Qt 6.11 is out! See what's new in the release blog

Attaching drivers for sensors to Qt

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 3 Posters 3.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Luc4
    wrote on last edited by
    #1

    Hi! I'm working on a device using the Qt for Embedded Linux framework. I'm facing the problem of implementing drivers to read and implement events from various sensors, like the g-sensor and similar. What way would you suggest to do this?

    I was thinking to use dbus to propagate the events, using signals. Is this the best way to go?
    Thanks!

    1 Reply Last reply
    1
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      you could use also "Qt's signal-slot mechanism":http://doc.qt.nokia.com/4.7/signalsandslots.html

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Luc4
        wrote on last edited by
        #3

        I know the signal and slot mechanism, but either I don't know everything related to that or I was not clear.

        What I need to do is writing drivers to provide the QWS with events generated from the hardware. The events should be then propagated to all the processes that require to be informed. As far as I know signal and slots are used for communication among objects. The concept can be used as a IPC by using dbus. So, are you confirming that dbus is a good way to go? Isn't there any other way to send events using Qt event propagation? Is this the way used by Qt mobility sensor module?

        Thanks for your answer!

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          Sorry, that is going beyond my experience. I am certainly no help in that respect.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jbarron
            wrote on last edited by
            #5

            Internally QWS uses a UNIX domain socket to send events to the clients, but unfortunately it doesn't look like there is any way to create custom events using the public interface:

            http://doc.trolltech.com/4.7/qwsevent.html

            You could create your own server though that each client would connect to (in addition to the QWS server). QLocalServer could talk directly to the sensor and forward the events to clients who connect with QLocalSocket. DBus is also an option of course.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved