diff options
Diffstat (limited to 'grc')
-rw-r--r-- | grc/CMakeLists.txt | 2 | ||||
-rw-r--r-- | grc/base/Block.py | 1 | ||||
-rw-r--r-- | grc/base/Platform.py | 4 | ||||
-rw-r--r-- | grc/blocks/block_tree.xml | 7 | ||||
-rw-r--r-- | grc/blocks/gr_endian_swap.xml | 41 | ||||
-rw-r--r-- | grc/blocks/gr_keep_m_in_n.xml | 76 | ||||
-rw-r--r-- | grc/blocks/gr_message_burst_source.xml | 58 | ||||
-rw-r--r-- | grc/blocks/gr_pack_k_bits_bb.xml | 30 | ||||
-rw-r--r-- | grc/blocks/gr_sub_xx.xml | 2 | ||||
-rw-r--r-- | grc/blocks/gr_tag_debug.xml | 82 | ||||
-rw-r--r-- | grc/blocks/gr_vector_insert_x.xml | 80 | ||||
-rw-r--r-- | grc/blocks/options.xml | 17 | ||||
-rw-r--r-- | grc/gui/ActionHandler.py | 12 | ||||
-rw-r--r-- | grc/gui/Actions.py | 10 | ||||
-rw-r--r-- | grc/gui/Bars.py | 3 | ||||
-rw-r--r-- | grc/gui/BlockTreeWindow.py | 5 | ||||
-rw-r--r-- | grc/gui/FlowGraph.py | 1 | ||||
-rw-r--r-- | grc/gui/MainWindow.py | 5 | ||||
-rw-r--r-- | grc/python/Port.py | 4 | ||||
-rw-r--r-- | grc/python/block.dtd | 3 | ||||
-rw-r--r-- | grc/python/convert_hier.py | 1 | ||||
-rw-r--r-- | grc/python/flow_graph.tmpl | 16 |
22 files changed, 456 insertions, 4 deletions
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt index f54aa4f80..219bbe164 100644 --- a/grc/CMakeLists.txt +++ b/grc/CMakeLists.txt @@ -75,7 +75,7 @@ configure_file( install( FILES ${CMAKE_CURRENT_BINARY_DIR}/grc.conf - DESTINATION ${GR_PKG_CONF_DIR} + DESTINATION ${GR_PREFSDIR} COMPONENT "grc" ) diff --git a/grc/base/Block.py b/grc/base/Block.py index fe7ad3c2f..a20be9db9 100644 --- a/grc/base/Block.py +++ b/grc/base/Block.py @@ -67,6 +67,7 @@ class Block(Element): self._name = n.find('name') self._key = n.find('key') self._category = n.find('category') or '' + self._grc_source = n.find('grc_source') or '' self._block_wrapper_path = n.find('block_wrapper_path') #create the param objects self._params = list() diff --git a/grc/base/Platform.py b/grc/base/Platform.py index 94d0077ea..d4b09088b 100644 --- a/grc/base/Platform.py +++ b/grc/base/Platform.py @@ -61,6 +61,10 @@ class Platform(_Element): #create a dummy flow graph for the blocks self._flow_graph = _Element(self) #search for *.xml files in the given search path + + self.loadblocks(); + + def loadblocks(self): xml_files = list() for block_path in self._block_paths: if os.path.isfile(block_path): xml_files.append(block_path) diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml index 18bc050ba..d7ec82e4a 100644 --- a/grc/blocks/block_tree.xml +++ b/grc/blocks/block_tree.xml @@ -20,6 +20,7 @@ <block>gr_udp_source</block> <block>gr_wavfile_source</block> <block>gr_message_source</block> + <block>gr_message_burst_source</block> <block>pad_source</block> <block>virtual_source</block> </cat> @@ -34,6 +35,7 @@ <block>gr_message_sink</block> <block>pad_sink</block> <block>virtual_sink</block> + <block>gr_tag_debug</block> </cat> <cat> <name>Operators</name> @@ -61,6 +63,9 @@ <block>gr_fft_vxx</block> <block>blks2_logpwrfft_x</block> + <block>gr_vector_insert_x</block> + + <block>gr_endian_swap</block> </cat> <cat> <name>Type Conversions</name> @@ -114,6 +119,7 @@ <block>gr_unpacked_to_packed_xx</block> <block>gr_packed_to_unpacked_xx</block> <block>gr_unpack_k_bits_bb</block> + <block>gr_pack_k_bits_bb</block> <block>gr_chunks_to_symbols_xx</block> <block>gr_map_bb</block> </cat> @@ -183,6 +189,7 @@ <block>blks2_rational_resampler_xxx</block> <block>gr_fractional_interpolator_xx</block> <block>gr_keep_one_in_n</block> + <block>gr_keep_m_in_n</block> <block>gr_moving_average_xx</block> <block>gr_iqcomp_cc</block> <block>gr_dc_blocker</block> diff --git a/grc/blocks/gr_endian_swap.xml b/grc/blocks/gr_endian_swap.xml new file mode 100644 index 000000000..aa564026c --- /dev/null +++ b/grc/blocks/gr_endian_swap.xml @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Add Block: +## all types, 1 output, 2 to inf inputs +################################################### + --> +<block> + <name>Endian Swap</name> + <key>gr_endian_swap</key> + <import>from gnuradio import gr</import> + <make>gr.endian_swap($type.size)</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:8</opt> + </option> + <option> + <name>Int</name> + <key>s32</key> + <opt>size:4</opt> + </option> + <option> + <name>Short</name> + <key>s16</key> + <opt>size:2</opt> + </option> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_keep_m_in_n.xml b/grc/blocks/gr_keep_m_in_n.xml new file mode 100644 index 000000000..35a156176 --- /dev/null +++ b/grc/blocks/gr_keep_m_in_n.xml @@ -0,0 +1,76 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Keep M in N +################################################### + --> +<block> + <name>Keep M in N</name> + <key>gr_keep_m_in_n</key> + <import>from gnuradio import gr</import> + <make>gr.keep_m_in_n($type.size, $m, $n, $offset)</make> + <callback>set_offset($offset)</callback> + <callback>set_m($m)</callback> + <callback>set_n($n)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>M</name> + <key>m</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>N</name> + <key>n</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>initial offset</name> + <key>offset</key> + <value>0</value> + <type>int</type> + </param> + <check>$n > 0</check> + <check>$m > 0</check> + <check>$m < $n</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>1</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>1</vlen> + </source> +</block> diff --git a/grc/blocks/gr_message_burst_source.xml b/grc/blocks/gr_message_burst_source.xml new file mode 100644 index 000000000..e835d2a2c --- /dev/null +++ b/grc/blocks/gr_message_burst_source.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Message Burst Source (the sink port is a message) +################################################### + --> +<block> + <name>Message Burst Source</name> + <key>gr_message_burst_source</key> + <import>from gnuradio import gr</import> + <make>gr.message_burst_source($type.size*$vlen, $(id)_msgq_in)</make> + <param> + <name>Output Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>msg</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_pack_k_bits_bb.xml b/grc/blocks/gr_pack_k_bits_bb.xml new file mode 100644 index 000000000..34e64a5d9 --- /dev/null +++ b/grc/blocks/gr_pack_k_bits_bb.xml @@ -0,0 +1,30 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Pack K Bits +################################################### + --> +<block> + <name>Pack K Bits</name> + <key>gr_pack_k_bits_bb</key> + <import>from gnuradio import gr</import> + <make>gr.pack_k_bits_bb($k)</make> + <param> + <name>K</name> + <key>k</key> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> + + <doc> + Pack K unpacked bits (one bit per byte) into a single packed byte containing k bits and 8 - k zeros. + </doc> + +</block> diff --git a/grc/blocks/gr_sub_xx.xml b/grc/blocks/gr_sub_xx.xml index f1f4797e0..c677747da 100644 --- a/grc/blocks/gr_sub_xx.xml +++ b/grc/blocks/gr_sub_xx.xml @@ -48,7 +48,7 @@ <type>int</type> </param> <check>$vlen > 0</check> - <check>$num_inputs >= 2</check> + <check>$num_inputs >= 1</check> <sink> <name>in</name> <type>$type</type> diff --git a/grc/blocks/gr_tag_debug.xml b/grc/blocks/gr_tag_debug.xml new file mode 100644 index 000000000..4af7729be --- /dev/null +++ b/grc/blocks/gr_tag_debug.xml @@ -0,0 +1,82 @@ +<?xml version="1.0"?> +<!-- +################################################### +## Tag Debug +################################################### + --> +<block> + <name>Tag Debug</name> + <key>gr_tag_debug</key> + <import>from gnuradio import gr</import> + <make>gr.tag_debug($type.size*$vlen, $name)</make> + <callback>set_display($display)</callback> + <param> + <name>Input Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Name</name> + <key>name</key> + <type>string</type> + </param> + <param> + <name>Num Inputs</name> + <key>num_inputs</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Display</name> + <key>display</key> + <value>True</value> + <type>bool</type> + <option> + <name>On</name> + <key>True</key> + </option> + <option> + <name>Off</name> + <key>False</key> + </option> + </param> + <check>$num_inputs >= 1</check> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_inputs</nports> + </sink> +</block> diff --git a/grc/blocks/gr_vector_insert_x.xml b/grc/blocks/gr_vector_insert_x.xml new file mode 100644 index 000000000..f9ce1f654 --- /dev/null +++ b/grc/blocks/gr_vector_insert_x.xml @@ -0,0 +1,80 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Vector Source +################################################### + --> +<block> + <name>Vector Insert</name> + <key>gr_vector_insert_x</key> + <import>from gnuradio import gr</import> + <make>gr.vector_insert_$(type.fcn)($vector, $period, $offset)</make> + <param> + <name>Output Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:b</opt> + <opt>vec_type:int_vector</opt> + </option> + <option> + <name>Complex</name> + <key>complex</key> + <opt>fcn:c</opt> + <opt>vec_type:complex_vector</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>fcn:f</opt> + <opt>vec_type:real_vector</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:i</opt> + <opt>vec_type:int_vector</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:s</opt> + <opt>vec_type:int_vector</opt> + </option> + </param> + <param> + <name>Vector</name> + <key>vector</key> + <value>0, 0, 0</value> + <type>$type.vec_type</type> + </param> + <param> + <name>Periodicity</name> + <key>period</key> + <value>100</value> + <type>int</type> + </param> + <param> + <name>Offset</name> + <key>offset</key> + <value>0</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> + + <doc> + Periodicity, the length of the periodicity at which the vector should be inserted at the output. + (i.e. one vector for every N output items) + + Offset sepcifies where in the cycle period we should begin at. + </doc> +</block> diff --git a/grc/blocks/options.xml b/grc/blocks/options.xml index b27ea900c..1cf0b7707 100644 --- a/grc/blocks/options.xml +++ b/grc/blocks/options.xml @@ -125,6 +125,19 @@ else: self.stop(); self.wait()</callback> </option> </param> <param> + <name>Max Number of Output</name> + <key>max_nouts</key> + <value>0</value> + <type>int</type> + <hide>#if $generate_options() == 'hb' +all#slurp +#elif $max_nouts() +none#slurp +#else +part#slurp +#end if</hide> + </param> + <param> <name>Realtime Scheduling</name> <key>realtime_scheduling</key> <value></value> @@ -169,5 +182,9 @@ For example, an id of my_block will generate the file my_block.py and class my_b The category parameter determines the placement of the block in the block selection window. \ The category only applies when creating hier blocks. \ To put hier blocks into the root category, enter / for the category. + +The Max Number of Output is the maximum number of output items allowed for any block \ +in the flowgraph; to disable this set the max_nouts equal to 0.\ +Use this to adjust the maximum latency a flowgraph can exhibit. </doc> </block> diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py index 476c82b4f..d1491db0b 100644 --- a/grc/gui/ActionHandler.py +++ b/grc/gui/ActionHandler.py @@ -53,6 +53,7 @@ class ActionHandler: self.clipboard = None for action in Actions.get_all_actions(): action.connect('activate', self._handle_action) #setup the main window + self.platform = platform; self.main_window = MainWindow(platform) self.main_window.connect('delete-event', self._quit) self.main_window.connect('key-press-event', self._handle_key_press) @@ -302,6 +303,15 @@ class ActionHandler: except: print "could not kill process: %d"%self.get_page().get_proc().pid elif action == Actions.PAGE_CHANGE: #pass and run the global actions pass + elif action == Actions.RELOAD_BLOCKS: + self.platform.loadblocks() + self.main_window.btwin.clear(); + self.platform.load_block_tree(self.main_window.btwin); + elif action == Actions.OPEN_HIER: + bn = []; + for b in self.get_flow_graph().get_selected_blocks(): + if b._grc_source: + self.main_window.new_page(b._grc_source, show=True); else: print '!!! Action "%s" not handled !!!'%action ################################################## # Global Actions for all States @@ -319,6 +329,8 @@ class ActionHandler: #update enable/disable Actions.BLOCK_ENABLE.set_sensitive(bool(self.get_flow_graph().get_selected_blocks())) Actions.BLOCK_DISABLE.set_sensitive(bool(self.get_flow_graph().get_selected_blocks())) + Actions.OPEN_HIER.set_sensitive(bool(self.get_flow_graph().get_selected_blocks())) + Actions.RELOAD_BLOCKS.set_sensitive(True) #set the exec and stop buttons self.update_exec_stop() #saved status diff --git a/grc/gui/Actions.py b/grc/gui/Actions.py index 4d196477e..03aa43057 100644 --- a/grc/gui/Actions.py +++ b/grc/gui/Actions.py @@ -273,3 +273,13 @@ BLOCK_INC_TYPE = Action( BLOCK_DEC_TYPE = Action( keypresses=(gtk.keysyms.Up, NO_MODS_MASK), ) +RELOAD_BLOCKS = Action( + label='Reload _Blocks', + tooltip='Reload Blocks', + stock_id=gtk.STOCK_REFRESH +) +OPEN_HIER = Action( + label='Open H_ier', + tooltip='Open the source of the selected hierarchical block', + stock_id=gtk.STOCK_JUMP_TO, +) diff --git a/grc/gui/Bars.py b/grc/gui/Bars.py index 8fd167869..d95d23f1f 100644 --- a/grc/gui/Bars.py +++ b/grc/gui/Bars.py @@ -49,6 +49,9 @@ TOOLBAR_LIST = ( None, Actions.BLOCK_ENABLE, Actions.BLOCK_DISABLE, + None, + Actions.RELOAD_BLOCKS, + Actions.OPEN_HIER, ) ##The list of actions and categories for the menu bar. diff --git a/grc/gui/BlockTreeWindow.py b/grc/gui/BlockTreeWindow.py index 0175c8bec..62afb6205 100644 --- a/grc/gui/BlockTreeWindow.py +++ b/grc/gui/BlockTreeWindow.py @@ -90,6 +90,11 @@ class BlockTreeWindow(gtk.VBox): #initialize self._update_add_button() + def clear(self): + self.treestore.clear(); + self._categories = {tuple(): None} + + ############################################################ ## Block Tree Methods ############################################################ diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py index 9f3326ada..0f69d4878 100644 --- a/grc/gui/FlowGraph.py +++ b/grc/gui/FlowGraph.py @@ -63,6 +63,7 @@ class FlowGraph(Element): Actions.BLOCK_ENABLE, Actions.BLOCK_DISABLE, Actions.BLOCK_PARAM_MODIFY, + Actions.OPEN_HIER, ]: self._context_menu.append(action.create_menu_item()) ########################################################################### diff --git a/grc/gui/MainWindow.py b/grc/gui/MainWindow.py index 2f761df1f..37a100c94 100644 --- a/grc/gui/MainWindow.py +++ b/grc/gui/MainWindow.py @@ -93,7 +93,8 @@ class MainWindow(gtk.Window): #flow_graph_box.pack_start(self.scrolled_window) self.flow_graph_vpaned.pack1(self.notebook) self.hpaned.pack1(self.flow_graph_vpaned) - self.hpaned.pack2(BlockTreeWindow(platform, self.get_flow_graph), False) #dont allow resize + self.btwin = BlockTreeWindow(platform, self.get_flow_graph); + self.hpaned.pack2(self.btwin, False) #dont allow resize #create the reports window self.text_display = TextDisplay() #house the reports in a scrolled window @@ -169,6 +170,8 @@ class MainWindow(gtk.Window): try: #try to load from file if file_path: Messages.send_start_load(file_path) flow_graph = self._platform.get_new_flow_graph() + flow_graph.grc_file_path = file_path; + #print flow_graph page = NotebookPage( self, flow_graph=flow_graph, diff --git a/grc/python/Port.py b/grc/python/Port.py index d0ef51b48..9f8b50d05 100644 --- a/grc/python/Port.py +++ b/grc/python/Port.py @@ -139,6 +139,10 @@ class Port(_Port, _GUIPort): self._type = '' self._vlen = '' + def resolve_virtual_source(self): + if self.get_parent().is_virtual_sink(): return _get_source_from_virtual_sink_port(self) + if self.get_parent().is_virtual_source(): return _get_source_from_virtual_source_port(self) + def resolve_empty_type(self): if self.is_sink(): try: diff --git a/grc/python/block.dtd b/grc/python/block.dtd index 41a744d07..292ea06cb 100644 --- a/grc/python/block.dtd +++ b/grc/python/block.dtd @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Top level element. A block contains a name, ...parameters list, and list of IO ports. --> -<!ELEMENT block (name, key, category?, throttle?, import*, var_make?, make, callback*, param*, check*, sink*, source*, doc?)> +<!ELEMENT block (name, key, category?, throttle?, import*, var_make?, make, callback*, param*, check*, sink*, source*, doc?, grc_source?)> <!-- Sub level elements. --> @@ -40,6 +40,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA <!ELEMENT category (#PCDATA)> <!ELEMENT import (#PCDATA)> <!ELEMENT doc (#PCDATA)> +<!ELEMENT grc_source (#PCDATA)> <!ELEMENT name (#PCDATA)> <!ELEMENT key (#PCDATA)> <!ELEMENT check (#PCDATA)> diff --git a/grc/python/convert_hier.py b/grc/python/convert_hier.py index c6ca5b769..f4d082d59 100644 --- a/grc/python/convert_hier.py +++ b/grc/python/convert_hier.py @@ -73,6 +73,7 @@ def convert_hier(flow_graph, python_file): block_n['source'].append(source_n) #doc data block_n['doc'] = "%s\n%s\n%s"%(block_author, block_desc, python_file) + block_n['grc_source'] = "%s"%(flow_graph.grc_file_path) #write the block_n to file xml_file = python_file + '.xml' ParseXML.to_file({'block': block_n}, xml_file) diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl index 0878be4ba..17feb01f6 100644 --- a/grc/python/flow_graph.tmpl +++ b/grc/python/flow_graph.tmpl @@ -244,12 +244,20 @@ if __name__ == '__main__': #end if #if $generate_options == 'wx_gui' tb = $(class_name)($(', '.join($params_eq_list))) + #if $flow_graph.get_option('max_nouts') + tb.Run($flow_graph.get_option('run'), $flow_graph.get_option('max_nouts')) + #else tb.Run($flow_graph.get_option('run')) + #end if #elif $generate_options == 'qt_gui' qapp = Qt.QApplication(sys.argv) tb = $(class_name)($(', '.join($params_eq_list))) #if $flow_graph.get_option('run') + #if $flow_graph.get_option('max_nouts') + tb.start($flow_graph.get_option('max_nouts')) + #else tb.start() + #end if #end if tb.show() qapp.exec_() @@ -258,11 +266,19 @@ if __name__ == '__main__': tb = $(class_name)($(', '.join($params_eq_list))) #set $run_options = $flow_graph.get_option('run_options') #if $run_options == 'prompt' + #if $flow_graph.get_option('max_nouts') + tb.start($flow_graph.get_option('max_nouts')) + #else tb.start() + #end if raw_input('Press Enter to quit: ') tb.stop() #elif $run_options == 'run' + #if $flow_graph.get_option('max_nouts') + tb.run($flow_graph.get_option('max_nouts')) + #else tb.run() + #end if #end if #end if #end if |