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 888 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.
  • M Offline
    M Offline
    Mijaz
    wrote on 5 Jul 2021, 07:16 last edited by
    #1

    Hi everyone!
    Do I need your kind help in getting started with APIs in QtCreator?
    Kindly suggest good helping materials or examples start from basics to advance level?

    J 1 Reply Last reply 5 Jul 2021, 07:28
    0
    • M Mijaz
      5 Jul 2021, 07:16

      Hi everyone!
      Do I need your kind help in getting started with APIs in QtCreator?
      Kindly suggest good helping materials or examples start from basics to advance level?

      J Online
      J Online
      jsulm
      Lifetime Qt Champion
      wrote on 5 Jul 2021, 07:28 last edited by
      #2

      @Mijaz You question is not clear.
      What APIs do you mean?
      Are you asking how to design APIs?

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

      1 Reply Last reply
      1
      • M Offline
        M Offline
        Mijaz
        wrote on 5 Jul 2021, 09:08 last edited by
        #3

        @jsulm Yes, I need to design the custom API?

        J 1 Reply Last reply 5 Jul 2021, 09:14
        0
        • M Mijaz
          5 Jul 2021, 09:08

          @jsulm Yes, I need to design the custom API?

          J Online
          J Online
          jsulm
          Lifetime Qt Champion
          wrote on 5 Jul 2021, 09:14 last edited by
          #4

          @Mijaz This is a very broad topic. And you did not provide any details (is it a C++ API, REST API,...? Does it have to be synchronous or asynchronous?).
          One example of APIs is Qt itself.

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

          1 Reply Last reply
          1
          • M Offline
            M Offline
            Mijaz
            wrote on 5 Jul 2021, 09:22 last edited by
            #5

            @jsulm Thanks for your kind reply!. I want to design the API for AD9361 which is of the ADI brand. I want to use this API standalone to access the internal register for reading and writing values of frequency, RF bandwidth and hardware gain, etc. which will be written on the register inside the board.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 5 Jul 2021, 18:58 last edited by
              #6

              Hi,

              How do you connect to that device ?

              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
              2
              • M Offline
                M Offline
                Mijaz
                wrote on 6 Jul 2021, 10:48 last edited by
                #7

                @SGaist I connected the device via ethernet.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 6 Jul 2021, 19:40 last edited by SGaist 7 Jun 2021, 19:40
                  #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
                  • M Offline
                    M Offline
                    Mijaz
                    wrote on 7 Jul 2021, 04:56 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.

                    C 1 Reply Last reply 7 Jul 2021, 05:00
                    0
                    • M Mijaz
                      7 Jul 2021, 04:56

                      @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.

                      C Offline
                      C Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on 7 Jul 2021, 05:00 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
                      • M Offline
                        M Offline
                        Mijaz
                        wrote on 7 Jul 2021, 07:28 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?

                        J J 2 Replies Last reply 7 Jul 2021, 07:30
                        0
                        • M Mijaz
                          7 Jul 2021, 07:28

                          @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?

                          J Online
                          J Online
                          jsulm
                          Lifetime Qt Champion
                          wrote on 7 Jul 2021, 07:30 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
                          • M Offline
                            M Offline
                            Mijaz
                            wrote on 7 Jul 2021, 07:33 last edited by
                            #13

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

                            J J 2 Replies Last reply 7 Jul 2021, 07:35
                            0
                            • M Mijaz
                              7 Jul 2021, 07:28

                              @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?

                              J Online
                              J Online
                              JonB
                              wrote on 7 Jul 2021, 07:34 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
                              • M Mijaz
                                7 Jul 2021, 07:33

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

                                J Online
                                J Online
                                JonB
                                wrote on 7 Jul 2021, 07:35 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
                                • M Mijaz
                                  7 Jul 2021, 07:33

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

                                  J Online
                                  J Online
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on 7 Jul 2021, 07:35 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
                                  • M Offline
                                    M Offline
                                    Mijaz
                                    wrote on 7 Jul 2021, 07:38 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.

                                    J 1 Reply Last reply 7 Jul 2021, 07:39
                                    0
                                    • C Offline
                                      C Offline
                                      Christian Ehrlicher
                                      Lifetime Qt Champion
                                      wrote on 7 Jul 2021, 07:39 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
                                      • M Mijaz
                                        7 Jul 2021, 07:38

                                        @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.

                                        J Online
                                        J Online
                                        JonB
                                        wrote on 7 Jul 2021, 07:39 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

                                        7/19

                                        6 Jul 2021, 10:48

                                        topic:navigator.unread, 12
                                        • Login

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