Advertisement
Guest User

options.block.yml

a guest
Aug 13th, 2017
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.39 KB | None | 0 0
  1. # auto-generated by grc.converter
  2.  
  3. id: options
  4. label: Options
  5.  
  6. parameters:
  7. -   id: title
  8.     label: Title
  9.     dtype: string
  10.     hide: ${ ('none' if title else 'part') }
  11. -   id: author
  12.     label: Author
  13.     dtype: string
  14.     hide: ${ ('none' if author else 'part') }
  15. -   id: description
  16.     label: Description
  17.     dtype: string
  18.     hide: ${ ('none' if description else 'part') }
  19. -   id: window_size
  20.     label: Canvas Size
  21.     dtype: int_vector
  22.     hide: part
  23. -   id: output_language
  24.     label: Output Language
  25.     dtype: enum
  26.     default: python
  27.     options: [python, cpp]
  28.     option_labels: [Python, C++]
  29. -   id: generate_options
  30.     label: Generate Options
  31.     dtype: enum
  32.     default: qt_gui
  33.     options: [qt_gui, no_gui, hb, hb_qt_gui]
  34.     option_labels: [QT GUI, No GUI, Hier Block, Hier Block (QT GUI)]
  35. -   id: category
  36.     label: Category
  37.     dtype: string
  38.     default: '[GRC Hier Blocks]'
  39.     hide: ${ ('none' if generate_options.startswith('hb') else 'all') }
  40. -   id: run_options
  41.     label: Run Options
  42.     dtype: enum
  43.     default: prompt
  44.     options: [run, prompt]
  45.     option_labels: [Run to Completion, Prompt for Exit]
  46.     hide: ${ ('none' if generate_options == 'no_gui' else 'all') }
  47. -   id: run
  48.     label: Run
  49.     dtype: bool
  50.     default: 'True'
  51.     options: ['True', 'False']
  52.     option_labels: [Autostart, 'Off']
  53.     hide: ${ ('all' if generate_options != 'qt_gui' else ('part' if run else 'none'))
  54.         }
  55. -   id: max_nouts
  56.     label: Max Number of Output
  57.     dtype: int
  58.     default: '0'
  59.     hide: ${ ('all' if generate_options.startswith('hb') else ('none' if max_nouts
  60.         else 'part')) }
  61. -   id: realtime_scheduling
  62.     label: Realtime Scheduling
  63.     dtype: enum
  64.     options: ['', '1']
  65.     option_labels: ['Off', 'On']
  66.     hide: ${ ('all' if generate_options.startswith('hb') else ('none' if realtime_scheduling
  67.         else 'part')) }
  68. -   id: qt_qss_theme
  69.     label: QSS Theme
  70.     dtype: file_open
  71.     hide: ${ ('all' if generate_options != 'qt_gui' else ('none' if qt_qss_theme else
  72.         'part')) }
  73. -   id: thread_safe_setters
  74.     label: Thread-safe setters
  75.     category: Advanced
  76.     dtype: enum
  77.     options: ['', '1']
  78.     option_labels: ['Off', 'On']
  79.     hide: part
  80. -   id: run_command
  81.     label: Run Command
  82.     category: Advanced
  83.     dtype: string
  84.     default: '{python} -u {filename}'
  85.     hide: ${ ('all' if generate_options.startswith('hb') else 'part') }
  86. -   id: hier_block_src_path
  87.     label: Hier Block Source Path
  88.     category: Advanced
  89.     dtype: string
  90.     default: '.:'
  91.     hide: part
  92.  
  93. templates:
  94.     imports: |-
  95.         from gnuradio import gr
  96.         from gnuradio.filter import firdes
  97.         % if generate_options == 'qt_gui':
  98.         from PyQt5 import Qt
  99.         import sys
  100.         % endif
  101.         % if not generate_options.startswith('hb'):
  102.         from argparse import ArgumentParser
  103.         from gnuradio.eng_arg import eng_float, intx
  104.         from gnuradio import eng_notation
  105.         % endif
  106.     callbacks:
  107.     - 'if ${run}: self.start()
  108.  
  109.         else: self.stop(); self.wait()'
  110.  
  111. cpp_templates:
  112.     includes: '#include <gnuradio/top_block.h>'
  113.  
  114. documentation: |-
  115.     The options block sets special parameters for the flow graph. Only one option block is allowed per flow graph.
  116.  
  117.     Title, author, and description parameters are for identification purposes.
  118.  
  119.     The window size controls the dimensions of the flow graph editor. The window size (width, height) must be between (300, 300) and (4096, 4096).
  120.  
  121.     The generate options controls the type of code generated. Non-graphical flow graphs should avoid using graphical sinks or graphical variable controls.
  122.  
  123.     In a graphical application, run can be controlled by a variable to start and stop the flowgraph at runtime.
  124.  
  125.     The id of this block determines the name of the generated file and the name of the class. For example, an id of my_block will generate the file my_block.py and class my_block(gr....
  126.  
  127.     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.
  128.  
  129.     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.
  130.  
  131. file_format: 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement