From similar questions and given examples about how to calculate distances between two points in the TikZ manual, I was not able to figure out how to extract from them a solution for my (probably simpler) need. See, not exactly a MWE, below:
\documentclass[tikz,border=5mm]{standalone}
\usetikzlibrary{calc,positioning}
\begin{document}
\begin{tikzpicture}[node distance=7mm and 0mm,
N/.style 2 args = {name=n#1,
minimum width=#2mm,
shape=rectangle, draw, fill=white, align=center,
minimum height=9mm, inner sep=1mm, outer sep=0mm,
text width =\pgfkeysvalueof{/pgf/minimum width} - 2*\pgfkeysvalueof{/pgf/inner xsep}
},
]\small\sffamily
\node[N={1}{22},label=above:22mm] {sinhronizacija};
\node[N={2}{13},label=above:13mm,right=of n1] {SFD};
%---
\node[N={3}{13},label=above:13mm,right=of n2] {signal};
\node[N={4}{13},label=above:13mm,right=of n3] {storitev};
\node[N={5}{13},label=above:13mm,right=of n4] {dol\v{z}na};
\node[N={6}{13},label=above:13mm,right=of n5] {FSM};
%---
\node[N={7}{77},label=above:77mm,right=of n6] {PSDU};
%-------
\dimendef\mynodewidth=0
\pgfmathparse{22+5*13+77}
\pgfmathsetlength{\mynodewidth}{\pgfmathresult mm}
\node[N={8}{},minimum width=\mynodewidth,
below right=of n1.south west] {(22+5*13+77) mm = 164 mm = distance between n1.west and n7.west};
%-------
\end{tikzpicture}
It works, but I'd like to have a more general solution, where I do not need to manually set up a sum of minimum width of nodes of interest, and where \nodewidth is obtained from the distance between given two nodes, i.e.: the first is at the leftmost border of a set of nodes and the second one on the rightmost border. something like
\nodewidth = <macro for distance calculation between>(ni.west,nj.east)
