Files

33 lines
1.1 KiB
TeX
Raw Permalink Normal View History

2018-12-06 16:01:56 +01:00
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,shapes.geometric,decorations,automata,shadows}
\tikzstyle{edge}=[draw,thick,->] \tikzset{state/.style={draw, text
centered, thick, rectangle split, rectangle split parts=2, rounded
corners,fill=blue!10}}
\newcommand{\STATE}[2]{\makebox[5em]{\vphantom{I}{\ttfamily #1}}\nodepart{second} \makebox[4em]{\vphantom{I}{\ttfamily #2}}}
\begin{document}
\begin{tikzpicture}[scale=1.25,
initial text={},
initial distance=2em,
every initial by arrow/.style={thick,*->}]
\node [state,initial] (s0) at (0,-1) {\STATE{NOMINAL}{O = I}};
\node [state] (s1) at (4,0) {\STATE{LOST}{O = Loss}};
\node [state] (s2) at (4,-2) {\STATE{ERROR}{O = Err}};
\path[edge] (s0) edge[bend left] node[below, yshift=-10pt]
{{\ttfamily fail\_loss}} (s1);
\path[edge] (s0) edge[bend right] node[right, yshift=5pt] {{\ttfamily fail\_err}} (s2);
\path[edge] (s2) edge node[right] {{\ttfamily fail\_loss}} (s1);
\end{tikzpicture}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End: