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. QStateMachine and SCXML

QStateMachine and SCXML

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 5.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
    s.amsellem
    wrote on last edited by
    #1

    Hello,

    I was using the State Machine Framework for my applications using QtStateMachine and QtState classes.
    Recently, I read some stuffs about SCXML and the possibility to do state machines using QtScriptedStateMachine.

    Then, I tried this in my applications:
    @
    // Load the SCXML file
    mStateMachine = QtScriptedStateMachine::load(_pathToScxmlFile);

    // register some objects
    mStateMachine->registerObject(mMyObject, "object1", true);
    @

    I load my scxml file using the QtScriptedStateMachine and register some objects and then I start the state machine.
    I use an editor to generate the scxml file (fsm-editor on http://code.google.com/p/scxmlgui/) and it seems to work properly (I've checked the scxml file).

    As soon as I want to add a transition in my state machine using the editor, it's not working anymore. The only think it does is to add one single line <transition event="..." target="..."> ... </transition>. The transition is working but then the state machine is blocked later in another state where no changes were done and everything was working before this modification.

    After a lot of tests and tries, I had the feeling that I was doing something wrong with the QtScriptedStateMachine.
    I wanted to try Qt 4.7.2 (I was using Qt 4.5.3 and the state machine framework 1.1) but I don't find any scripted state machine class anymore in this new release.

    Has something new been done in this field? Am I doing something wrong? Is there another way to use SCXML files?

    Thank you so much for helping,
    S. Amsellem

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

      bq. I was using Qt 4.5.3

      According to this:

      http://labs.qt.nokia.com/2009/08/10/introducing-scc-the-scxml-compiler-for-the-qt-state-machine-framework/

      bq. Thiago Macieira August 15, 2009 at 11:10 am
      The state machine code is in Qt 4.6

      So I would definitely try something newer than 4.5.3

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

        Did QtScriptedStateMachine make it to Qt 4.7. I cannot find it in the QtCreator help

        1 Reply Last reply
        0
        • N Offline
          N Offline
          noam
          wrote on last edited by
          #4

          [quote author="sriky27" date="1305543073"]Did QtScriptedStateMachine make it to Qt 4.7. I cannot find it in the QtCreator help[/quote]

          It's still a separate project; see http://qt.gitorious.org/qt-labs/scxml
          Since Qt is moving to being more modularized it will probably stay that way but would hopefully stay helpful.

          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