MasterScan
Lab_Matlab_control Master Branch
|
Make topsStateMachine state diagrams with the Graphviz tool.
StateDiagramGrapher summarizes states, actions, inputs, and transitions for a topsStateMachine object. It allows for input "hints" that specify possible transitions without having to run the state machine. It configures a DataGrapher to graph which states may transition to which.
Properties and Events | |
Property | stateMachine |
a topsStateMachine object to summarize | |
Property | stateInfo |
struct of state data and input "hints" to graph | |
Property | inputHints |
struct of state names and representative input values | |
Property | dataGrapher |
a DataGrapher object for graphing the profiler output | |
Methods | |
self | StateDiagramGrapher () |
Constructor takes no arguments. | |
addInputHint (self, stateName, inputValue) | |
Add a transition not in the state list to the graph. More... | |
parseStates (self) | |
Parse the state list of stateMachine to prepare for graphing. | |
writeDotFile (self) | |
Write a GraphViz ".dot" file that specifies the state diagram. | |
generateGraph (self) | |
Generate an image with GraphVis, based on the ".dot" file. | |
Static Methods | |
static description | statePropertySummary (inputData, index) |
Create a cell array of strings that summarizes some state data. | |
static edgeIndexes edgeNames | edgesFromState (inputData, index) |
Find edges leading away from a given state. | |
addInputHint | ( | self | , |
stateName | , | ||
inputValue | |||
) |
Add a transition not in the state list to the graph.
stateName | the name of the state to transition from |
inputValue | the name of the state to transation to (also the value returned from an input function which causes the transation to that state) |
Adds a transition to the state diagram which was is not obvious from parsing the state list alone. Allows graphing of representative conditional transitions.