Author: derek Date: Thu Nov 9 19:48:19 2006 New Revision: 164 Added: sofaswitch/trunk/callflow/docs/helloworld.png (contents, props changed) Modified: sofaswitch/trunk/callflow/docs/executionflow.dxy Log: Extend docs, add hello world example. Modified: sofaswitch/trunk/callflow/docs/executionflow.dxy ============================================================================== --- sofaswitch/trunk/callflow/docs/executionflow.dxy (original) +++ sofaswitch/trunk/callflow/docs/executionflow.dxy Thu Nov 9 19:48:19 2006 @@ -1,19 +1,55 @@ /*! \page pageExecutionFlow Flow of execution through python code -\section secOverview Oversight +\section secIntro Introduction +We describe the operation of this utilitiy with a series of examples and +associated description. The first part of this document describes the +generation of the graph with the gui, and the second part describes the +running of the graph. + +\section secHelloWorld Hello World example +Perhaps the simplest example of a graph you can create is the standard "Hello +World" example, shown here. + +\image html helloworld.png + +Python will start executing at the very top box, process the code in the +middle, and then terminate at the bottom. Program flow is invariably top to +bottom. Arrows are drawn on the output and input of each box to indicate where +the flow is going. You will notice four black circles, filled, on this +graph. They indicate a connection between the different entitiy. The skull and +crossbones symbol indicates end this graph now. + +\section secForLoop For Loops + The flow of execution is to follow the graph on the screen. Thus, when given a graph like \image html forloop.png it will enter the for loop, and go around and around until the termination -condition is met. +condition is met. The for loop consists of the three boxes in the middle of +this image. On each iteration, a Python command is executed, which is defined +in the Python box in the very middle. You could, of course, put something +different in the middle of the for loop. +The loop variable, initialisation and termination condition are set at the +start of the for loop. To change these, right click on the for loop box and +adjust accordingly. It will generate an exception if you fail to provide an +entry to the Initialise, Test or Increment fields. If this Python code is +incorrect, it will except also. Notice too that the variables all have the +word "self." as the first half. This ensures that variables in one graph will +not interfere with those of another graph. If you wrote a nested for loop, +they should use different variables. + While processing each of the nodes in the supplied graph, it is ignoring all timer events. Execution continues until it falls of the end of the graph, -or passes through an Eventer type structure and goes nowhere. Consider the -following graph +or passes through an Eventer type structure and goes nowhere. + + +\section secEvent Event handling +We describe the handling of events in this section, with a simple example. +Consider the following graph \image html simpleevent.png Added: sofaswitch/trunk/callflow/docs/helloworld.png ============================================================================== Binary file. No diff available.
participants (1)
-
SofaSWITCH SVN