Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. Independent Developers
  4. Interfacing Qt with SIMPL library
Forum Updated to NodeBB v4.3 + New Features

Interfacing Qt with SIMPL library

Scheduled Pinned Locked Moved Unsolved Independent Developers
3 Posts 2 Posters 2.2k 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.
  • B Offline
    B Offline
    bobicanprogram
    wrote on 31 Jul 2018, 13:01 last edited by
    #1

    I manage the SIMPL open source project (icanprogram.ca/simpl). This project has developed a QNX like synchronous Send/Receive/Reply messaging library. This project has been in existence for nearly 20 years and is very mature.

    Recently I had a request from one of the SIMPL users asking how to interface with the Qt library. I know of Qt but have never developed with it.

    The interfacing need is quite basic. SIMPL exposes a filedescriptor which is used to manage synchronization of messages. SIMPL uses a blocking method to ensure message continuity. We need to be able to multiplex on that file descriptor to avoid blocking the GUI while waiting for a message.

    Perhaps the easiest way to see what is required is to imagine a very simple test case. A Qt interface exposes a basic text box and in SIMPL terms blocks as a Receiver. Another SIMPL module (written in C) is the Sender. It sends a text string to the GUI which in turn displays in the text box.

    How would you go about designing this interface? Would you use the qsocketNotifier method? If so could you direct me to some good sample code. I know Qt uses slots and signals. Would this be the way forward?

    Thanks in advance for any suggestions or pointers to sample code.

    bob

    P 1 Reply Last reply 31 Jul 2018, 14:04
    0
    • B bobicanprogram
      31 Jul 2018, 13:01

      I manage the SIMPL open source project (icanprogram.ca/simpl). This project has developed a QNX like synchronous Send/Receive/Reply messaging library. This project has been in existence for nearly 20 years and is very mature.

      Recently I had a request from one of the SIMPL users asking how to interface with the Qt library. I know of Qt but have never developed with it.

      The interfacing need is quite basic. SIMPL exposes a filedescriptor which is used to manage synchronization of messages. SIMPL uses a blocking method to ensure message continuity. We need to be able to multiplex on that file descriptor to avoid blocking the GUI while waiting for a message.

      Perhaps the easiest way to see what is required is to imagine a very simple test case. A Qt interface exposes a basic text box and in SIMPL terms blocks as a Receiver. Another SIMPL module (written in C) is the Sender. It sends a text string to the GUI which in turn displays in the text box.

      How would you go about designing this interface? Would you use the qsocketNotifier method? If so could you direct me to some good sample code. I know Qt uses slots and signals. Would this be the way forward?

      Thanks in advance for any suggestions or pointers to sample code.

      bob

      P Offline
      P Offline
      Pablo J. Rogina
      wrote on 31 Jul 2018, 14:04 last edited by
      #2

      @bobicanprogram not that I have used it before, but using QSocketNotifier sounds a good idea. You may find this example as a guideline, specially how/when to read data that is available.

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      1
      • B Offline
        B Offline
        bobicanprogram
        wrote on 31 Jul 2018, 14:44 last edited by
        #3

        Thanks for the prompt response. I'll take a look at that example.

        Bob

        1 Reply Last reply
        0

        1/3

        31 Jul 2018, 13:01

        • Login

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