rt sched option in grc
authorjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 4 Feb 2009 21:25:49 +0000 (21:25 +0000)
committerjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 4 Feb 2009 21:25:49 +0000 (21:25 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10389 221aa14e-8319-0410-a670-987f0aec2ac5

grc/data/platforms/python/blocks/options.xml
grc/data/platforms/python/flow_graph.tmpl

index 3a73050ae5a46ee211a75e0d775a0dbc9275910c..11e46bbe6595602715f962c8eefdd1e7782cea35 100644 (file)
@@ -49,17 +49,14 @@ import wx
                <option>
                        <name>WX GUI</name>
                        <key>wx_gui</key>
-                       <opt>hide_category:all</opt>
                </option>
                <option>
                        <name>No GUI</name>
                        <key>no_gui</key>
-                       <opt>hide_category:all</opt>
                </option>
                <option>
                        <name>Hier Block</name>
                        <key>hb</key>
-                       <opt>hide_category:</opt>
                </option>
        </param>
        <param>
@@ -67,7 +64,28 @@ import wx
                <key>category</key>
                <value>Custom</value>
                <type>string</type>
-               <hide>$generate_options.hide_category</hide>
+               <hide>#if $generate_options.eval == 'hb' then 'none' else 'all'#</hide>
+       </param>
+       <param>
+               <name>Realtime Scheduling</name>
+               <key>realtime_scheduling</key>
+               <value></value>
+               <type>enum</type>
+               <hide>#if $generate_options.eval == 'hb'
+all#slurp
+#elif $realtime_scheduling.eval
+none#slurp
+#else
+part#slurp
+#end if</hide>
+               <option>
+                       <name>Off</name>
+                       <key></key>
+               </option>
+               <option>
+                       <name>On</name>
+                       <key>1</key>
+               </option>
        </param>
        <check>len($window_size) == 2</check>
        <check>300 &lt;= $(window_size)[0] &lt;= 2048</check>
index 4cd4411a7a62e54df35a9c73fcfaf6e8fb03fb5c..a84b4eb0ae8f73855946ad395d18a993669b8b2e 100644 (file)
@@ -191,6 +191,10 @@ if __name__ == '__main__':
                #end for
        (options, args) = parser.parse_args()
        #end if
+       #if $flow_graph.get_option('realtime_scheduling')
+       if gr.enable_realtime_scheduling() != gr.RT_OK:
+               print "Error: failed to enable realtime scheduling."
+       #end if
        tb = $(class_name)($(', '.join($args)))
        #if $generate_options == 'wx_gui'
        tb.Run()