SCXML Wiki | Forum |
---|
This project is a set of header-only files that help you to monitor your SCXML state machine written in Qt. Monitor events could be watched in ScxmlEditor with pause-resume and breakpoints options.
Qt SCXML Debug Via SVG
It was an old dream to monitor state machine workflow without any external dependencies in Qt and finally it comes true. We prepared some native SCXML SVG monitors:
- scxmlsvgview.h - for widgets (based on QGraphicsView)
- see how to use it in Dining Philosophers Example
- scxmlsvgqmlitem.h - for QML (based on QQuickPaintedItem)
- see how to use it in Stopwatch Example
Since ScxmlEditor 2.2.1 you can export SCXML to SVG, include only monitor headers in your app and create monitor instances any time.
NOTICE: While state machine pointer is not set, the monitor does nothing and can be left in Release.
Qt SCXML External Debugging Monitor
Native QtCreator's scxml designer does not allow user to debug SCXML statecharts and observe statemachine work flow, so we offer to use ScxmlEditor as an instrument for debugging complex SCXML state charts
We implemented Qt SCXML monitor in a single header ScxmlExternMonitor2.h as UDPScxmlExternMonitor. It has public a property QScxmlStateMachine *scxmlStateMachine
. While scxmlStateMachine is not assigned it does nothing and you may leave it even in a release versions of your applications. When you need to observe statemachine work flow, just assign a valid QScxmlStateMachine pointer to the property, and monitor will start send UDP debug packages to the ScxmlEditor. And you will be able to observe when state is entered and when is exited, etc.
There is an option to export and import active states configuration. It may be useful when you are unable to use a remote debugger. You can export active states configuration to file and open it later with ScxmlEditor Import states configuration
menu option.
Suppose that your deployed application does not work properly on the remote device.
-
You can implement calling
IScxmlExternMonitor
methodQStringList dumpAllActiveStates()
into your application. And it will save active states configuration by demand. -
Later you can transfer dump file to your working place
-
Open the corresponding project with ScxmlEditor
TOP | SCXML Wiki | Forum |
---|