I am trying to achieve the chart as in the image attached.
I tried with this code but I have difficult to insert the texts.
Please suggest me if there is a more elegant way to achieve this.
Regards Leo
the code is:
\documentclass{article}
\usepackage{pgf}
\usepackage{tikz}
\usepackage{inputenc}
\usetikzlibrary{arrows,automata,shadows}
\usetikzlibrary{positioning}
\usetikzlibrary{calc}
\tikzset{
state/.style={
rectangle,
draw=black,
minimum height=2em,
inner sep=2pt,
text centered,
drop shadow
},
}
\begin{document}
\begin{tikzpicture}[]
\node[state,
text width=3cm,
fill=red!20,
] (RRC)
{
\textbf{RRC}
};
\node[state,
yshift=-1.5cm,
right of=RRC,
node distance=3cm,
fill=yellow!20,
anchor=center] (PDCP)
{
\textbf{PDCP}
};
\node[state, % layout (defined above)
yshift=-0.5cm, % move 2cm in y
right of=PDCP, % Position is to the right of RRC
node distance=1.5cm, % distance to QUERY
fill=yellow!20,
anchor=center] (BMC)
{
\textbf{BMC}
};
\node[state,
text width=8cm,
fill=blue!20,
below of=RRC,
xshift=2.5cm,
yshift=-2.5cm,
] (RLC)
{
\textbf{RLC}
};
\node[state,
text width=8cm,
fill=blue!20,
below of=RLC,
yshift=-0.5cm,
] (MAC)
{
\textbf{MAC}
};
\node[state,
text width=8cm,
below of=MAC,
fill=green!20,
yshift=-0.5cm,
] (PHY)
{
\textbf{PHY}
};
\node[state, % layout (defined above)
xshift=7.2cm, % move 2cm in y
fill=red!20,
anchor=center] (L3)
{
\textbf{L3}
};
\node[state, % layout (defined above)
xshift=7.2cm, % move x
yshift=-3.25cm,
minimum height=5.4cm,
fill=blue!20,
anchor=center] (L2)
{
\textbf{L2}
};
\node[state, % layout (defined above)
xshift=7.2cm, % move x
yshift=-6.5cm,
fill=green!20,
anchor=center] (L1)
{
\textbf{L1}
};
\draw [<->](RRC.west)-| ++(-0.6,-1)|-(PDCP.west);
\draw [->](RRC.west)-| ++(-0.8,-1)|-(BMC.west);
\draw [->](RRC.west)-| ++(-1.2,-1)|-(RLC.west);
\draw [->](RRC.west)-| ++(-1.4,-1)|-(MAC.west);
\draw [->](RRC.west)-| ++(-1.6,-1)|-(PHY.west);
\draw (0,0.35) -- (0,1);
\draw (0,-0.35) -- (0,-3.15);
\draw (-0.5,-0.35) -- (-0.5,-3.15);
\draw (0.5,-0.35) -- (0.5,-3.15);
\draw(0,-3.85)--(0,-4.65);
\draw(-0.5,-3.85)--(-0.5,-4.65);
\draw(0.5,-3.85)--(0.5,-4.65);
\draw(2.5,-5.35)--(2.5,-6.15);
\draw(1.5,-5.35)--(1.5,-6.15);
\draw(3.5,-5.35)--(3.5,-6.15);
\draw(3,-1.15)--(3,1);
\draw(3,-1.85)--(3,-3.15);
\draw(4.5,-1.65)--(4.5,1);
\draw(4.5,-2.35)--(4.5,-3.15);
\draw(5.25,1)--(5.25,-3.15);
\draw(6,1)--(6,-3.15);
\draw(3,-3.85)--(3,-4.65);
\draw(4.5,-3.85)--(4.5,-4.65);
\draw(5.25,-3.85)--(5.25,-4.65);
\draw(6,-3.85)--(6,-4.65);
\end{tikzpicture}
\end{document}