From 30ff5da2bf36ebb98852f6be9c098447022818cd Mon Sep 17 00:00:00 2001
From: Sebastian Koslowski <koslowski@kit.edu>
Date: Tue, 2 Dec 2014 22:20:46 +0100
Subject: grc: add domain attribute to ports

---
 grc/python/Connection.py | 2 +-
 grc/python/block.dtd     | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

(limited to 'grc/python')

diff --git a/grc/python/Connection.py b/grc/python/Connection.py
index 7f235b190b..dff98c66a4 100644
--- a/grc/python/Connection.py
+++ b/grc/python/Connection.py
@@ -42,8 +42,8 @@ class Connection(_Connection, _GUIConnection):
         Validate the connections.
         The ports must match in io size.
         """
-        Element.validate(self)
         source_size = Constants.TYPE_TO_SIZEOF[self.get_source().get_type()] * self.get_source().get_vlen()
         sink_size = Constants.TYPE_TO_SIZEOF[self.get_sink().get_type()] * self.get_sink().get_vlen()
         if source_size != sink_size:
             self.add_error_message('Source IO size "%s" does not match sink IO size "%s".'%(source_size, sink_size))
+        _Connection.validate(self)
diff --git a/grc/python/block.dtd b/grc/python/block.dtd
index 576b428111..8cfd3dd392 100644
--- a/grc/python/block.dtd
+++ b/grc/python/block.dtd
@@ -32,8 +32,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 <!ELEMENT param_tab_order (tab+)>
 <!ELEMENT param (base_key?, name, key, value?, type?, hide?, option*, tab?)>
 <!ELEMENT option (name, key, opt*)>
-<!ELEMENT sink (name, type, vlen?, nports?, optional?, hide?)>
-<!ELEMENT source (name, type, vlen?, nports?, optional?, hide?)>
+<!ELEMENT sink (name, type, vlen?, domain?, nports?, optional?, hide?)>
+<!ELEMENT source (name, type, vlen?, domain?, nports?, optional?, hide?)>
 <!--
     Bottom level elements.
     Character data only.
@@ -53,6 +53,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 <!ELEMENT type (#PCDATA)>
 <!ELEMENT hide (#PCDATA)>
 <!ELEMENT vlen (#PCDATA)>
+<!ELEMENT domain (#PCDATA)>
 <!ELEMENT nports (#PCDATA)>
 <!ELEMENT bus_structure_sink (#PCDATA)>
 <!ELEMENT bus_structure_source (#PCDATA)>
-- 
cgit v1.2.3