Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Use DMA with Qt
Forum Updated to NodeBB v4.3 + New Features

Use DMA with Qt

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 2.7k Views 2 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.
  • M Offline
    M Offline
    moravas
    wrote on last edited by
    #1

    Hi Folks,

    can anybody tell me, how can I access the OS's DMA form Qt framework on the most commonly architectures (like Pentium 4, Core Duos, Intel i3/5/7)? I'm designing a system, where I receive data via TCP and / or UDP sockets, and I would like to perform some transformation on that and put it into shared memory to be consumed by another process. As I plan, I have to copy the total amount of data twice that seems to be waste of time.

    Regards,
    Norbert

    K 1 Reply Last reply
    0
    • M moravas

      Hi Folks,

      can anybody tell me, how can I access the OS's DMA form Qt framework on the most commonly architectures (like Pentium 4, Core Duos, Intel i3/5/7)? I'm designing a system, where I receive data via TCP and / or UDP sockets, and I would like to perform some transformation on that and put it into shared memory to be consumed by another process. As I plan, I have to copy the total amount of data twice that seems to be waste of time.

      Regards,
      Norbert

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @moravas
      With QSharedMemory you can share the same memory between applications.

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

      M 1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by A Former User
        #3

        Hi,
        looks like you need to write a kernel module if you really want to access the kernels DMA structures.

        1 Reply Last reply
        0
        • K koahnig

          @moravas
          With QSharedMemory you can share the same memory between applications.

          M Offline
          M Offline
          moravas
          wrote on last edited by
          #4

          @koahnig

          Hi,

          yes, you are right, but what about coping data from the TCP / UDP connection? In this case it would be nice that I can specify a storage place, that is used by the connection to receives frames.

          Regards,
          Norbert

          K 1 Reply Last reply
          0
          • M moravas

            @koahnig

            Hi,

            yes, you are right, but what about coping data from the TCP / UDP connection? In this case it would be nice that I can specify a storage place, that is used by the connection to receives frames.

            Regards,
            Norbert

            K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            @moravas
            There is some information on the internal buffer used by UDP/TCP sockets. UDP relies on the OS as it looks. For TCP you can set the size, but not the location.
            I do not think that it is a good route to read this buffer from different applications at the same time. There are a lot of different handling implications (removing info already read and all those counters).
            Therefore, I would read the sockets with one application and share the data through QSharedMemory. However, you need to write your own management there.
            Finally the question is if it is worth the effort. Certainly it does not make sense to retrieve the same data through Internet several times for applications at the same time. There are a couple of reasons (e.g. throughput limit, but also accounting).
            I faced such situation and simply established a QTcpSocket for retrieving the information from Internet. This application has also a QTcpServer where my applications can hook up to with their sockets. It is essentially a fork of information implemented. Any byte received is copied to an out-going QTcpSocket. The rest is done by OS.
            For small amounts of information this is possible. For vast amounts you will probably kill your machine.

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

            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