Imported Upstream version 3.2.2
[debian/gnuradio] / grc / blocks / blks2_selector.xml
1 <?xml version="1.0"?>
2 <!--
3 ###################################################
4 ##Selector:
5 ##      Custom blks2 block
6 ###################################################
7  -->
8 <block>
9         <name>Selector</name>
10         <key>blks2_selector</key>
11         <import>from grc_gnuradio import blks2 as grc_blks2</import>
12         <make>grc_blks2.selector(
13         item_size=$type.size*$vlen,
14         num_inputs=$num_inputs,
15         num_outputs=$num_outputs,
16         input_index=$input_index,
17         output_index=$output_index,
18 )</make>
19         <callback>set_input_index(int($input_index))</callback>
20         <callback>set_output_index(int($output_index))</callback>
21         <param>
22                 <name>Type</name>
23                 <key>type</key>
24                 <type>enum</type>
25                 <option>
26                         <name>Complex</name>
27                         <key>complex</key>
28                         <opt>size:gr.sizeof_gr_complex</opt>
29                 </option>
30                 <option>
31                         <name>Float</name>
32                         <key>float</key>
33                         <opt>size:gr.sizeof_float</opt>
34                 </option>
35                 <option>
36                         <name>Int</name>
37                         <key>int</key>
38                         <opt>size:gr.sizeof_int</opt>
39                 </option>
40                 <option>
41                         <name>Short</name>
42                         <key>short</key>
43                         <opt>size:gr.sizeof_short</opt>
44                 </option>
45                 <option>
46                         <name>Byte</name>
47                         <key>byte</key>
48                         <opt>size:gr.sizeof_char</opt>
49                 </option>
50         </param>
51         <param>
52                 <name>Num Inputs</name>
53                 <key>num_inputs</key>
54                 <value>2</value>
55                 <type>int</type>
56         </param>
57         <param>
58                 <name>Num Outputs</name>
59                 <key>num_outputs</key>
60                 <value>2</value>
61                 <type>int</type>
62         </param>
63         <param>
64                 <name>Input Index</name>
65                 <key>input_index</key>
66                 <value>0</value>
67                 <type>int</type>
68         </param>
69         <param>
70                 <name>Output Index</name>
71                 <key>output_index</key>
72                 <value>0</value>
73                 <type>int</type>
74         </param>
75         <param>
76                 <name>Vec Length</name>
77                 <key>vlen</key>
78                 <value>1</value>
79                 <type>int</type>
80         </param>
81         <check>$vlen &gt; 0</check>
82         <sink>
83                 <name>in</name>
84                 <type>$type</type>
85                 <vlen>$vlen</vlen>
86                 <nports>$num_inputs</nports>
87         </sink>
88         <source>
89                 <name>out</name>
90                 <type>$type</type>
91                 <vlen>$vlen</vlen>
92                 <nports>$num_outputs</nports>
93         </source>
94         <doc>
95 Connect the sink at input index to the source at output index. Leave all other ports disconnected.
96         </doc>
97 </block>