Its profinet communication(if still any doubt about PLC then please check details on internet for siemens s7-1214(1200) profinet/ethernet port). How can i define PLC's ip address in qt c++. To read any one PLC memory location, what should i write in qt C++. Also to write PLC location. I trying to read only 5 or 6 real(32bit) locations from PLC.
The following SQL, with the Chinook test database open will create a new file in the same directory named 'out.sqlite' holding all of the album information for artist 51 with the original table layout.
A Qt model is totally unnecessary. Just run the query and it will create your file. From there you can compress it and ship it.
ATTACH DATABASE 'out.sqlite' AS outdb;
CREATE TABLE outdb.album
SELECT * from album
WHERE ArtistId = 51;
DETACH DATABASE outdb;
It does use SQLite specific sql.
Note especially that the ATTACH DATABASE and DETACH DATABASE are sql to be sent to the database just like the CREATE TABLE..
BTW, I have never done this using Qt, only in batch files, but I see no reason for it not to work both ways.
Let's not do that. Let's call them a server and a client - it's much better and easier to follow the accepted terminology. A server will serve the requests presented by the clients (see the analogy with a busy restaurant?).
There can only be one "controller", but the number of "nodes" may vary (eg. different clients).
So you have one server and a few clients. So far so good.
I want to have the "controller" initiate the connection to each client such that arbitrary data is sent back and forth as it is ready (readyRead() signal? ).
How data flows between the client and the server is completely independent of who initiated the connection. You can still have the server sending data to the clients (what http servers mostly do), and still the client initiates the connection (i.e. your browser).
I have implemented the Fortune Client/Server example with the "controller" as the Client (since it would initially ask for a connection), and the Fortune Server as a test (eventually it would be a "node" sending data). This is where I'm stuck. Ignoring less-than-critical performance issues, how would I modify the Fortune example (or perhaps roll my own) to allow the Server to accept data from the "controller" without the use of any buttons/etc, but to get it as it is "ready"? Ideally, this needs to scale up to a max of 15 "nodes".
Just write from the appropriate side (application). The server should stay the server, and the client should stay a client, don't switch their roles.
Does the if else statement not prevent a the null pointer?
Well, not really, no. QTcpServer::listen doesn't block, its return value just indicates whether or not your request to listen to a port was successful. This doesn't at all guarantee that you have pending connections for that server socket. As @koahnig pointed out, you should use signals and slots to connect to the interesting events generated by your server socket and handle them appropriately. Do follow his suggestion, and look at the server/client examples, which will give you a good overview on how to setup a TCP server/client application properly.
Widzę, że nie ma zbytniego zainteresowania tym postem, ale jakoś sobie radzę. :)
Doszedłem do etapu w którym mailowy serwer google (gmail) odmawia mi połączenia się ze sobą z powodu niskiego poziomu bezpieczeństwa zapewnianego przez moją aplikację. Rozwiązanie tego problemu przyszło łatwo. Zezwoliłem na łączenie się z moją skrzynką mailową mniej bezpiecznym aplikacjom. [https://support.google.com/accounts/answer/6010255]
Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.