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. Working with APIs in QT5?
Forum Updated to NodeBB v4.3 + New Features

Working with APIs in QT5?

Scheduled Pinned Locked Moved Unsolved General and Desktop
19 Posts 5 Posters 915 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.
  • MijazM Offline
    MijazM Offline
    Mijaz
    wrote on last edited by
    #7

    @SGaist I connected the device via ethernet.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by SGaist
      #8

      So you want to provide an API that will interface with your device through a TCP/IP connection ?

      How do you get the data out of it ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • MijazM Offline
        MijazM Offline
        Mijaz
        wrote on last edited by
        #9

        @SGaist Yes I will interface the device with API through TCP/IP and will get the data through it inside API and change the settings of the device using API like TX and RX LO frequencies and RF bandwidth discussed in this link (https://wiki.analog.com/resources/tools-software/linux-drivers/iio-transceiver/ad9361). Now come to my point on how I will start designing the API for the above-said topic.

        Christian EhrlicherC 1 Reply Last reply
        0
        • MijazM Mijaz

          @SGaist Yes I will interface the device with API through TCP/IP and will get the data through it inside API and change the settings of the device using API like TX and RX LO frequencies and RF bandwidth discussed in this link (https://wiki.analog.com/resources/tools-software/linux-drivers/iio-transceiver/ad9361). Now come to my point on how I will start designing the API for the above-said topic.

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #10

          @Mijaz said in Working with APIs in QT5?:

          Now come to my point on how I will start designing the API for the above-said topic.

          How should we tell you how your api should look like? Think about what you want to do and then create the corresponding functions for them.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          1
          • MijazM Offline
            MijazM Offline
            Mijaz
            wrote on last edited by
            #11

            @Christian-Ehrlicher I need to store the data like frequencies values in qt and want to load these values onto the devices when needed? Tell me how I can do it in my qt application for storage and reuse of them?

            jsulmJ JonBJ 2 Replies Last reply
            0
            • MijazM Mijaz

              @Christian-Ehrlicher I need to store the data like frequencies values in qt and want to load these values onto the devices when needed? Tell me how I can do it in my qt application for storage and reuse of them?

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #12

              @Mijaz said in Working with APIs in QT5?:

              Tell me how I can do it in my qt application for storage and reuse of them?

              What is the problem with that? Use some data structures and variables to store all needed information. There is nothing special...

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • MijazM Offline
                MijazM Offline
                Mijaz
                wrote on last edited by
                #13

                @jsulm Thanks for your reply! Kindly give me some sort of example?

                JonBJ jsulmJ 2 Replies Last reply
                0
                • MijazM Mijaz

                  @Christian-Ehrlicher I need to store the data like frequencies values in qt and want to load these values onto the devices when needed? Tell me how I can do it in my qt application for storage and reuse of them?

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by
                  #14

                  @Mijaz
                  He can't. You have to design this yourself, it's called programming. Read/write the data between the device and the Qt program over TCP/IP. Presumably using QTcpSocket. Although it's not the same case as yours, there is a TCP client example at https://doc.qt.io/qt-5/qtnetwork-fortuneclient-example.html which should illustrate the principles.

                  If you only want data in memory you need to design suitable structures to hold the data received/sent.

                  1 Reply Last reply
                  1
                  • MijazM Mijaz

                    @jsulm Thanks for your reply! Kindly give me some sort of example?

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by
                    #15

                    @Mijaz said in Working with APIs in QT5?:

                    @jsulm Thanks for your reply! Kindly give me some sort of example?

                    Example of a data structure? Here's one:

                    struct Data
                    {
                        int something;
                    };
                    
                    1 Reply Last reply
                    1
                    • MijazM Mijaz

                      @jsulm Thanks for your reply! Kindly give me some sort of example?

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #16

                      @Mijaz said in Working with APIs in QT5?:

                      Kindly give me some sort of example?

                      What example? How to declare a data structure? How to define a variable? Sorry, but this is Qt forum and you're asking absolute basic programming questions.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • MijazM Offline
                        MijazM Offline
                        Mijaz
                        wrote on last edited by
                        #17

                        @JonB I have no problem with TCP/IP communication. I am facing the problem to store the data and reuse from the qt application with the device.

                        JonBJ 1 Reply Last reply
                        0
                        • Christian EhrlicherC Offline
                          Christian EhrlicherC Offline
                          Christian Ehrlicher
                          Lifetime Qt Champion
                          wrote on last edited by
                          #18

                          Again: this is nothing Qt specific on how you store your data. It's basic, plain C(++) on how to create a structure and store/access data in there.

                          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                          Visit the Qt Academy at https://academy.qt.io/catalog

                          1 Reply Last reply
                          0
                          • MijazM Mijaz

                            @JonB I have no problem with TCP/IP communication. I am facing the problem to store the data and reuse from the qt application with the device.

                            JonBJ Offline
                            JonBJ Offline
                            JonB
                            wrote on last edited by
                            #19

                            @Mijaz
                            You asked for an example of a data structure so I gave you one.

                            Storing data and reusing it (in memory) is just C++. Qt is not a programming language, so do whatever you would do in C++.

                            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