Results 1 to 3 of 3

Thread: TCP/IP interrupts || MAC address || Client-Server relationship || Arranging packets

  1. #1
    Join Date
    Jan 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question TCP/IP interrupts || MAC address || Client-Server relationship || Arranging packets

    Hi, guys.

    First post here so I hope I didn't put this in the wrong section of the forum. Before starting with what I need to do and what's what, I'd like to ask you not to use some freakish terminology, because I'm new to Qt (yet not a total newbie). The questions below are not in any particular order.

    Now let's start with the thing I'm doing. I'm working on a school-project and have a pressure sensor that is connected to some kind of a signal converter that actually does all the low-level transformations of the signals coming from the sensor and sends all the data via TCP/IP. Now I've programmed sensors before but using C, interrupts and low-level programming. But never done something like this in Qt and what's more - using TCP or whatever. Sooo...

    First question: is it possible to collect data via interrupts from a certain device via TCP/IP. I've seen this but with Java. If someone can give me some rough guideline or even an example, it'll be greatly appreciated.

    The next question is the following. The computer I'm using has 2 network cards. I seem not to be able to find any information about how to retrieve the MAC address of each network card and use one by choice that is - program detects X network cards (via MAC addresses) and gives the user the opportunity to choose which card to use (and the corresponding ports of course), so that the first network card can be used to receive the data from the sensor and using the program display it on the screen and at the same time the other card can be used to do something else (playing some pocker online ).

    Third question is about the client-server relationship between the sensor and the program I'm writing. I still can't quite figure out what should play as server and what - as client. Both sides send and recieve. The program receives numbers (the pressure applied on the sensor) but and the same time using buttons the user can send kill-signal, reset-signal etc. The sensor sends numbers but also receives singals (hexadecimal numbers) from the program. I think that the program should be the client (especially if you want to start it on more than one PCs and receive data from one sensor) and the senor should be the server. But probably that's all nonsense.

    Forth and last: the sensor has tree pressure points. Each of them send data (say Fx, Fy, Fz). When I make my program how can I distinguish which number (applied pressure) came first, second and third? Can I put the whole data in one packet looking like this -> [Fx, Fy, Fz] and so that I can tell my program to look the first part [here - Fx] and put it inside field A on the GUI, than look the second [Fy] and put it inside B, and finally look at the third [Fz] and put it inside field C (these fields will show the exact pressure using numbers).

    Hope you understand what I mean.
    Thank you very much for sparing some time with my problems.
    rbaleksandar
    Last edited by rbaleksandar; 27th January 2010 at 17:58.

  2. #2
    Join Date
    Jan 2009
    Location
    The Netherlands and Spain
    Posts
    150
    Thanks
    6
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: TCP/IP interrupts || MAC address || Client-Server relationship || Arranging packe

    Take a look at tcpserver and tcpsocket.
    You don't have to know anything about mac-addresses because connections are made based on ip-address.
    The answer to the rest of your questions can be found in the docs and Qt-examples.

  3. #3
    Join Date
    Jan 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: TCP/IP interrupts || MAC address || Client-Server relationship || Arranging packe

    Thanks. Will keep looking.

Similar Threads

  1. TCP server-client app problem
    By pogostick in forum Newbie
    Replies: 6
    Last Post: 25th January 2010, 08:13
  2. Client Server
    By electronicboy in forum General Programming
    Replies: 3
    Last Post: 29th October 2009, 10:10
  3. [PyQt4] SSL server and client example
    By JoelG90 in forum Newbie
    Replies: 1
    Last Post: 24th May 2009, 09:09
  4. Dual TCP/IP Client/Server
    By jimroos in forum Qt Programming
    Replies: 1
    Last Post: 29th June 2007, 21:58
  5. client-server how?
    By nongentesimus in forum Newbie
    Replies: 6
    Last Post: 28th November 2006, 09:25

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.