summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/pgf-umlsd/demo/single-thread-example.tex
blob: 5f3628e479d6855d10713081f317caca27964f3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
\begin{sequencediagram}
  \newthread{ss}{:SimulationServer}
  \newinst{ctr}{:SimControlNode}
  \newinst{ps}{:PhysicsServer}
  \newinst[1]{sense}{:SenseServer}
  
  \begin{call}{ss}{Initialize()}{sense}{}
  \end{call}
  \begin{sdblock}{Run Loop}{The main loop}
    \begin{call}{ss}{StartCycle()}{ctr}{}
      \begin{call}{ctr}{ActAgent()}{sense}{}
      \end{call}
    \end{call}
    \begin{call}{ss}{Update()}{ps}{}
      \begin{messcall}{ps}{PrePhysicsUpdate()}{sense}{state}
      \end{messcall}
      \begin{sdblock}{Physics Loop}{}
        \begin{call}{ps}{PhysicsUpdate()}{ps}{}
        \end{call}
      \end{sdblock}
      \begin{call}{ps}{PostPhysicsUpdate()}{sense}{}
      \end{call}
    \end{call}
    \begin{call}{ss}{EndCycle()}{ctr}{}
      \begin{call}{ctr}{SenseAgent()}{sense}{}
      \end{call}
    \end{call}
  \end{sdblock}
\end{sequencediagram}