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. Dependent Parallel states in Qt Statemachine
Forum Updated to NodeBB v4.3 + New Features

Dependent Parallel states in Qt Statemachine

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 3.9k 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.
  • S Offline
    S Offline
    sriky27
    wrote on last edited by
    #1

    Hi,

    I would like to design a dependent parallel states using qt statemachine.
    I was try to understand the mechanism used in http://www.archivum.info/qt-interest@trolltech.com/2010-05/00713/Re-(Qt-interest)-Resolving-nearly-orthogonal-paralle-states.html

    I have a similar situation. I didnot understand how the author was able to determine the state in which the statemachine was. Unlike in the heirarchial statemachine where you know precisely in which state you are, how is it determined using the parallel states.

    Case I am trying to solve at the moment is
    I have two switches A, B like explained above in the link however the difference is B is dependent on A. And A and B are listening to signals which could change the state in which they are. Is there a possibility to use heirarchial parallel states. I tried modelling but could not understand the behaviour of it.

    The situation is i want the statemachine to be responsive without the need to add transitions to every possible state from each state.

    Please advise.

    -Srikanth

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      If B is dependent on A, they are not parallel. Simple as that.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sriky27
        wrote on last edited by
        #3

        Hi Andre,

        Thanks for the quick answer. If A is not dependent on B, they are parallel and four possible state combinations assuming each state has two stages. How to determine in which state or comibination of states the state machine is in, like explained in here http://www.archivum.info/qt-interest@trolltech.com/2010-05/00713/Re-(Qt-interest)-Resolving-nearly-orthogonal-paralle-states.html

        -Srikanth

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          No, if you need that information, that is, if the combination of the values of A and B results in differences to what you need to do, that what next state you can move, you do not encode the states of A and B in separate states, but instead make four states that indeed encode their combination: ab, aB, Ab, and AB (where an uppercase is ON and a lowercase OFF), and you end up with possible transitions between all of them.

          At least, that is my understanding of state machines.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sriky27
            wrote on last edited by
            #5

            Hi Andre,

            Thanks for answer. That increases the number states but it answers my dilemma.

            -Srikanth

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              Funny thing is, that in the 2x2 case (two options that each can have only two values) it actually decreases the number of possible states (as also explained in the link you posted).

              1 Reply Last reply
              0
              • S Offline
                S Offline
                sriky27
                wrote on last edited by
                #7

                Hi Andre,
                One more question from the link, the author was talking about the extended state data, how it could help in solving the exponential increasing states. Could you help me understanding it. I meant the below conversation

                "
                Second, regarding guarded transitions:

                If you need to scale, i.e., m and/or n can get big, guarded
                transitions (by which
                I mean transitions that depend on "extended state data" -- data other than
                the
                formal states of the state machine) are the way to go. But in this
                case, I would
                not make the items that have settings (m) and their possible settings (n)
                actual
                formal states of the state machine -- I would make it all "extended state
                data."
                (If scaling is important to you, we could discuss this approach in more
                detail.)"

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sriky27
                  wrote on last edited by
                  #8

                  Actually I was looking at possible structure as mentioned here "Parallel structure":http://easycsm.sourceforge.net/SM_5.png .

                  1 Reply Last reply
                  0

                  • Login

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