Working with APIs in QT5?
-
@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.
-
@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.
-
@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?
-
@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...
-
@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 usingQTcpSocket
. 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.
-
@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.
-
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.