From f21c7b1eeed46a2edf5b082d86d5386790e99f98 Mon Sep 17 00:00:00 2001 From: jblum Date: Wed, 4 Feb 2009 21:25:49 +0000 Subject: rt sched option in grc git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10389 221aa14e-8319-0410-a670-987f0aec2ac5 --- grc/data/platforms/python/blocks/options.xml | 26 ++++++++++++++++++++++---- grc/data/platforms/python/flow_graph.tmpl | 4 ++++ 2 files changed, 26 insertions(+), 4 deletions(-) (limited to 'grc/data/platforms') diff --git a/grc/data/platforms/python/blocks/options.xml b/grc/data/platforms/python/blocks/options.xml index 3a73050ae..11e46bbe6 100644 --- a/grc/data/platforms/python/blocks/options.xml +++ b/grc/data/platforms/python/blocks/options.xml @@ -49,17 +49,14 @@ import wx @@ -67,7 +64,28 @@ import wx category Custom string - $generate_options.hide_category + #if $generate_options.eval == 'hb' then 'none' else 'all'# + + + Realtime Scheduling + realtime_scheduling + + enum + #if $generate_options.eval == 'hb' +all#slurp +#elif $realtime_scheduling.eval +none#slurp +#else +part#slurp +#end if + + len($window_size) == 2 300 <= $(window_size)[0] <= 2048 diff --git a/grc/data/platforms/python/flow_graph.tmpl b/grc/data/platforms/python/flow_graph.tmpl index 4cd4411a7..a84b4eb0a 100644 --- a/grc/data/platforms/python/flow_graph.tmpl +++ b/grc/data/platforms/python/flow_graph.tmpl @@ -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() -- cgit