Can anyone give me an example how to draw this BLE-Stack with tikz?
EDIT
Now, I'm very close to my wished result :)
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[align=center,>=latex',font=\sffamily]
\tikzstyle{Dotted} = [draw=black,dashed,thick,rectangle,minimum width=120mm,minimum height=33mm]
\tikzstyle{Normal} = [draw=black,thick,rectangle,minimum width=108mm,minimum height=12mm]
\node[label=left:Controller,label={[label distance=5.5mm]},Dotted](Controller){};
\node[above left = 3mm and 6mm of Controller.south east,anchor=south east,Normal](PHY){LE Physical Layer\\(PHY)};
\node[above = 3mm of PHY,Normal](LL){Link Layer\\(LL)};
\node[above = 10mm of Controller.north west,anchor=north west](HCI0){};
\node[above = 10mm of Controller.north east,anchor=north east](HCI1){};
\draw[dash pattern={on 5mm off 3mm},line width=1.2mm,](HCI0) -- (HCI1) node[midway,fill=white]{Host Controller Interface\\(HCI)};
\node[above = 18mm of Controller,label=left:Host,label={[label distance=5.5mm]},Dotted,minimum height=48mm](Host){};
\node[above left = 3mm and 6mm of Host.south east,anchor=south east,Normal](L2CAP){Logical Link Control and Adaption Protocol\\(L2CAP)};
\node[above =15mm of L2CAP.north east,anchor=north east,Normal,minimum width=51mm](ATT){Attribute Protocol\\(ATT)};
\node[above = 15mm of ATT.east,anchor=east,Normal,minimum width=51mm](GATT){Generic Attribute Profile\\(GATT)};
\node[above = 15mm of L2CAP.north west,anchor=north west,Normal,minimum width=51mm](GAP){Generic Access Profile\\(GAP)};
\node[above = 15mm of GAP.north west,anchor=north west,Normal,minimum width=51mm](SMP){Security Manager Protocol\\(SMP)};
\node[above = 3mm of Host,label=left:Application,label={[label distance=5.5mm]},Normal,minimum width=120mm](Application){Application\\(APP)};
\end{tikzpicture}
\end{document}
This code results in this output
There are just two questions:
- How to start the dashed line from the left border and from the right to get a symmetrical dashed line?
- How to delete the insertion on the left and right of the dashed line?
\path[](HCI0) -- (HCI1) node[midway,fill=white](aux){Host Controller Interface\\(HCI)}; \draw [dash pattern={on 5mm off 3mm},line width=1.2mm](aux)--(HCI0)(aux)--(HCI1);