From 14357d3d4f4edfd1cbea72636089371a9159ed21 Mon Sep 17 00:00:00 2001 From: Matthias Jung Date: Sat, 28 Feb 2026 22:43:42 +0100 Subject: [PATCH] feature: add sourcecoder, channelcoder and mapper --- latex/settings.tex | 84 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/latex/settings.tex b/latex/settings.tex index a45482b..cb66eac 100644 --- a/latex/settings.tex +++ b/latex/settings.tex @@ -1063,3 +1063,87 @@ \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true} \makeatother + + +% Channel Coder +\makeatletter +\ctikzset{bipoles/channelcoder/width/.initial=.7} + +\pgfcirc@define@twoports{blocks} +{} +{\ctikzvalof{bipoles/channelcoder/width}} +{channelcoder} +{\ctikzvalof{bipoles/channelcoder/width}} +{\ctikzvalof{bipoles/channelcoder/width}} +{ + \pgfcirc@twoport@draw@splitline + % + \pgf@circ@text@strokecolor + \pgftext[center,x=0.55\pgf@circ@res@left,y=0.6\pgf@circ@res@up]{\tiny 01} + \pgftext[center,x=0.30\pgf@circ@res@right,y=0.6\pgf@circ@res@down]{\tiny 01+01} +} + +\pgfcirc@activate@bipole@simple{l}{channelcoder} +\makeatother + +% Source Coder +\makeatletter +\ctikzset{bipoles/sourcecoder/width/.initial=.7} + +\pgfcirc@define@twoports{blocks} +{} +{\ctikzvalof{bipoles/sourcecoder/width}} +{sourcecoder} +{\ctikzvalof{bipoles/sourcecoder/width}} +{\ctikzvalof{bipoles/sourcecoder/width}} +{ + \pgfcirc@twoport@draw@splitline + % + \pgf@circ@text@strokecolor + \pgftext[center,x=0.30\pgf@circ@res@left,y=0.6\pgf@circ@res@up]{\tiny 0101} + \pgftext[center,x=0.55\pgf@circ@res@right,y=0.6\pgf@circ@res@down]{\tiny 01} +} + +\pgfcirc@activate@bipole@simple{l}{sourcecoder} +\makeatother + +% Mapper +\makeatletter +\ctikzset{bipoles/mapper/width/.initial=.7} + +\pgfcirc@define@twoports{blocks} +{} +{\ctikzvalof{bipoles/mapper/width}} +{mapper} +{\ctikzvalof{bipoles/mapper/width}} +{\ctikzvalof{bipoles/mapper/width}} +{ + \pgfcirc@twoport@draw@splitline + % + \pgf@circ@text@strokecolor + \pgftext[center,x=0.55\pgf@circ@res@left,y=0.6\pgf@circ@res@up]{\tiny 01} + % + \pgfpathmoveto{\pgfpoint{0.50\pgf@circ@res@right}{-0.25\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.50\pgf@circ@res@right}{-0.75\pgf@circ@res@up}} + \pgfusepath{draw} + % + \pgfpathmoveto{\pgfpoint{0.25\pgf@circ@res@right}{-0.50\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@right}{-0.50\pgf@circ@res@up}} + \pgfusepath{draw} + % + \pgfpathcircle{\pgfpoint{0.65\pgf@circ@res@right}{-0.65\pgf@circ@res@up}}{0.05\pgf@circ@res@up} + \pgfusepath{fill} + % + \pgfpathcircle{\pgfpoint{0.35\pgf@circ@res@right}{-0.65\pgf@circ@res@up}}{0.05\pgf@circ@res@up} + \pgfusepath{fill} + % + \pgfpathcircle{\pgfpoint{0.65\pgf@circ@res@right}{-0.35\pgf@circ@res@up}}{0.05\pgf@circ@res@up} + \pgfusepath{fill} + % + \pgfpathcircle{\pgfpoint{0.35\pgf@circ@res@right}{-0.35\pgf@circ@res@up}}{0.05\pgf@circ@res@up} + \pgfusepath{fill} + % +} + +\pgfcirc@activate@bipole@simple{l}{mapper} +\makeatother \ No newline at end of file