summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2013-07-19 18:11:45 -0400
committerTom Rondeau <tom@trondeau.com>2013-07-19 18:11:45 -0400
commit9bcf1feb9d73ff8cda72e9c0e6497d979b5471b3 (patch)
treec9929840820828b2e87a17e97dfc276e14f80a26
parent9c9b2545ccfc2502013fe60c1b5b718ba1430168 (diff)
grc: checks for virtual/pad source/sink and ignores them for affinity and buffer size fields.
-rw-r--r--grc/base/Block.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/grc/base/Block.py b/grc/base/Block.py
index 84cf187b80..9736c0ac44 100644
--- a/grc/base/Block.py
+++ b/grc/base/Block.py
@@ -126,7 +126,16 @@ class Block(Element):
self.back_ofthe_bus(self.get_sinks())
self.current_bus_structure = {'source':'','sink':''};
- if len(sources) or len(sinks):
+ # Virtual source/sink and pad source/sink blocks are
+ # indistinguishable from normal GR blocks. Make explicit
+ # checks for them here since they have no work function or
+ # buffers to manage.
+ is_not_virtual_or_pad = ((self._key != "virtual_source") \
+ and (self._key != "virtual_sink") \
+ and (self._key != "pad_source") \
+ and (self._key != "pad_sink"))
+
+ if (len(sources) or len(sinks)) and is_not_virtual_or_pad:
self.get_params().append(self.get_parent().get_parent().Param(
block=self,
n=odict({'name': 'Core Affinity',
@@ -135,7 +144,7 @@ class Block(Element):
'hide': 'part',
})
))
- if len(sources):
+ if len(sources) and is_not_virtual_or_pad:
self.get_params().append(self.get_parent().get_parent().Param(
block=self,
n=odict({'name': 'Min Output Buffer',