Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev.cfg
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev.cfg	(revision 9912)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev.cfg	(revision 9912)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<owdconfiguration>
+    <version>Version 0.8.1</version>
+    <relativepath></relativepath>
+    <installpath>/sdr/</installpath>
+    <stdidlpath>/usr/local/include/standardinterfaces/</stdidlpath>
+    <customidlpath>/usr/local/include/custominterfaces/</customidlpath>
+    <ossieincludepath>/usr/local/include/ossie/</ossieincludepath>
+    <homedir>/home/</homedir>
+    <sourcepreamble>/generate/generic_preamble</sourcepreamble>
+    <licensefile></licensefile>
+    <developer>OSSIE</developer>
+</owdconfiguration>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/ComponentClass.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/ComponentClass.py	(revision 8112)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/ComponentClass.py	(revision 8112)
@@ -0,0 +1,162 @@
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import uuidgen
+
+# Component Class
+class Component:
+  def __init__(self, name="",AC=False,type="resource",description="",generate=True):
+    self.name = name        # this refers to the instance name
+    self.baseName = name    # this refers to the component that the instance is based on
+    self.connections = []
+    self.ports = []
+    self.mutable_params = []
+    self.device = None
+    self.node = None
+    self.uuid = uuidgen.uuidgen()
+    self.file_uuid = uuidgen.uuidgen()
+    self.ace = False
+    self.timing = False
+    self.AssemblyController = AC
+    self.type = type
+    self.generate = generate
+    self.xmlName = name     #if imported from component library - this may change
+    self.properties = []
+    self.description = description
+
+  def __getitem__(self,i):
+      return self.connections[i]
+
+  def setUUID(self):
+      self.uuid = uuidgen.uuidgen()
+
+  def changeName(self,newname):
+      self.name = newname
+      if self.generate == True:
+          self.baseName = newname
+          self.xmlName = newname
+
+class Node:
+  def __init__(self, name="", path="", description="", generate=True):
+    self.name = name
+    self.path = path
+    self.Devices = []
+    self.type = "node"
+    self.generate = generate
+    self.description = description
+    self.id = ""
+
+  def addDevice(self, in_dev=None):
+    if in_dev != None:
+      self.Devices.append(in_comp)
+
+
+class Port:
+  def __init__(self, name, interface, type="Uses",portType="data"):#,dataType="ShortSequence",interface_ns="standardInterfaces"):
+    self.name = name
+    self.interface = interface
+    self.portType = portType    #control or data
+    self.type = type            #Uses or Provides
+    self.u_cname = "dataOut_" + interface.name + "_i"
+    self.p_cname = "dataIn_" + interface.name + "_i"
+    if type == "Uses":
+        self.cname = self.u_cname
+    if type == "Provides":
+        self.cname = self.p_cname
+
+class Connection:
+    def __init__(self, LP, RP, RC):
+        self.localPort = LP
+        self.remotePort = RP
+        self.remoteComp = RC
+
+class Interface:
+    def __init__(self,name,nameSpace="standardInterfaces",operations=[],filename="",fullpath=""):
+        self.name = name
+        self.nameSpace = nameSpace
+        self.operations = []
+        self.filename = filename    #does not include the '.idl' suffix
+        self.fullpath = fullpath
+
+    def __eq__(self,other):
+        if isinstance(other, Interface):
+            return (other.nameSpace == self.nameSpace ) and (other.name == self.name)
+        else:
+            return False
+
+    def __ne__(self,other):
+        if isinstance(other, Interface):
+            return (other.nameSpace != self.nameSpace ) and (other.name != self.name)
+        else:
+            return True
+
+
+class Operation:
+    def __init__(self,name,returnType,params=[]):
+        self.name = name
+        self.returnType = returnType
+        self.cxxReturnType = ''
+        self.params = []
+
+class Param:
+    def __init__(self,name,dataType='',direction=''):
+        """
+        Exampleinterface complexShort {
+            void pushPacket(in PortTypes::ShortSequence I, in PortTypes::ShortSequence Q);
+        };
+        """
+
+        self.name = name            # The actual argument name: 'I'
+        self.dataType = dataType    # The type of the argument: 'PortTypes::ShortSequence'
+        self.cxxType = ""
+        self.direction = direction  # Flow of data: 'in'
+
+class Property:
+    def __init__(self,elementType,name,mode,description=''):
+        self.elementType = elementType
+        self.name = name
+        self.mode = mode
+        self.id = 'DCE:' + uuidgen.uuidgen()
+
+class SimpleProperty(Property):
+    def __init__(self,name,mode,type,description='',value=None,defaultValue=None,units=None,
+                range=(-1,-1),enum='',kind='configure',action=None):
+        Property.__init__(self,"Simple",name,mode,description)
+        self.type = type
+        self.description = description
+        self.value = value
+        self.defaultValue = defaultValue
+        self.units = units
+        self.range = range
+        self.enum = enum
+        self.kind = kind
+        self.action = action
+
+class SimpleSequenceProperty(Property):
+    def __init__(self,name,mode,type,description='',values=[],defaultValues=[],units=None,range=(-1,-1),kind='configure',action=None):
+        Property.__init__(self,"SimpleSequence",name,mode,description)
+        self.type = type
+        self.description = description
+        self.values = values
+        self.defaultValues = defaultValues
+        self.units = units
+        self.range = range
+        self.kind = kind
+        self.action = action
+
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/AboutDialog.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/AboutDialog.py	(revision 8161)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/AboutDialog.py	(revision 8161)
@@ -0,0 +1,82 @@
+#Boa:Dialog:Dialog1
+
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import os
+import wx
+
+def create(parent):
+    return Dialog1(parent)
+
+[wxID_DIALOG1, wxID_DIALOG1BUTTON1, wxID_DIALOG1STATICBITMAP1, 
+ wxID_DIALOG1STATICTEXT1, wxID_DIALOG1STATICTEXT2, wxID_DIALOG1STATICTEXT3, 
+] = [wx.NewId() for _init_ctrls in range(6)]
+
+class Dialog1(wx.Dialog):
+    def _init_ctrls(self, prnt):
+        # generated method, don't edit
+        wx.Dialog.__init__(self, id=wxID_DIALOG1, name='', parent=prnt,
+              pos=wx.Point(893, 355), size=wx.Size(306, 385),
+              style=wx.DEFAULT_DIALOG_STYLE, title='About')
+        self.SetClientSize(wx.Size(306, 385))
+        self.Center(wx.BOTH)
+
+        self.staticText1 = wx.StaticText(id=wxID_DIALOG1STATICTEXT1,
+              label='OSSIE Waveform Developer', name='staticText1', parent=self,
+              pos=wx.Point(21, 16), size=wx.Size(252, 24),
+              style=wx.ALIGN_CENTRE)
+        self.staticText1.SetFont(wx.Font(14, wx.SWISS, wx.NORMAL, wx.NORMAL,
+              False, 'Microsoft Sans Serif'))
+
+        self.staticText2 = wx.StaticText(id=wxID_DIALOG1STATICTEXT2,
+              label='MPRG at Virginia Tech', name='staticText2', parent=self,
+              pos=wx.Point(80, 42), size=wx.Size(135, 17), style=0)
+        self.staticText2.SetBackgroundColour(wx.Colour(128, 128, 255))
+        self.staticText2.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL,
+              False, 'Microsoft Sans Serif'))
+        self.staticText2.SetMinSize(wx.Size(-1, -1))
+
+        root = __file__
+        if os.path.islink (root):
+              root = os.path.realpath (root)
+        root = os.path.dirname (os.path.abspath (root))
+        self.staticBitmap1 = wx.StaticBitmap(bitmap=wx.Bitmap(root + '/images/ossieLogo.bmp',
+              wx.BITMAP_TYPE_BMP), id=wxID_DIALOG1STATICBITMAP1,
+              name='staticBitmap1', parent=self, pos=wx.Point(48, 93),
+              size=wx.Size(199, 227), style=0)
+        self.staticBitmap1.SetMinSize(wx.Size(199, 227))
+
+        self.button1 = wx.Button(id=wxID_DIALOG1BUTTON1, label='Close',
+              name='button1', parent=self, pos=wx.Point(172, 339),
+              size=wx.Size(75, 26), style=0)
+        self.button1.Bind(wx.EVT_BUTTON, self.OnButton1Button,
+              id=wxID_DIALOG1BUTTON1)
+
+        self.staticText3 = wx.StaticText(id=wxID_DIALOG1STATICTEXT3, label='',
+              name='staticText3', parent=self, pos=wx.Point(87, 63),
+              size=wx.Size(120, 19), style=0)
+        self.staticText3.SetFont(wx.Font(9, wx.SWISS, wx.NORMAL, wx.NORMAL,
+              False, 'Arial'))
+
+    def __init__(self, parent):
+        self._init_ctrls(parent)
+        self.staticText3.SetLabel(parent.version)
+
+    def OnButton1Button(self, event):
+        self.Close()
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/chmod.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/chmod.py	(revision 9723)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/chmod.py	(revision 9723)
@@ -0,0 +1,37 @@
+## Copyright 2009 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import os
+
+##-------------------------------------------------------------------------
+## Doc
+##-------------------------------------------------------------------------
+"""
+This module provides a function that wraps the os.chmod function.  It is
+here primarily to make it much easier to replace calls to chmod on
+platforms where it is not supported or where it is provided via a
+different operation.
+"""
+
+##-------------------------------------------------------------------------
+## Public functions
+##-------------------------------------------------------------------------
+
+def chmod(file, permissions):
+    # chmod is not available in Jython
+    pass
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/MainFrame.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/MainFrame.py	(revision 9661)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/MainFrame.py	(revision 9661)
@@ -0,0 +1,2077 @@
+#Boa:Frame:Frame1
+
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+import ComponentFrame, ConnectDialog, AboutDialog
+from wx.lib.anchors import LayoutAnchors
+import ComponentClass, WaveformClass, PlatformClass
+import sys, os, copy
+import WaveDev.wavedev.generate.templates.custom_ports.genStructure as genStruct
+import WaveDev.wavedev.XML_gen.application_gen as xml_gen
+from errorMsg import *
+import cPickle
+import importResource
+import importNode
+import NodeDialog
+import cfg
+from xml.dom.minidom import Node
+import generate.genNode as genNode
+import webbrowser
+#import WaveDev.wavedev.uuidgen
+from WaveDev.wavedev.uuidgen import uuidgen
+def create(parent):
+    return Frame1(parent)
+
+[wxID_FRAME1, wxID_FRAME1COMPBOX, wxID_FRAME1NODEBOX, wxID_FRAME1RESOURCEBOX,
+ wxID_FRAME1SASHWINDOW1, wxID_FRAME1SASHWINDOW2, wxID_FRAME1SASHWINDOW3,
+ wxID_FRAME1SASHWINDOW4, wxID_FRAME1SPLITTERWINDOW1,
+ wxID_FRAME1SPLITTERWINDOW2, wxID_FRAME1STATICTEXT1, wxID_FRAME1STATICTEXT2,
+ wxID_FRAME1STATICTEXT3, wxID_FRAME1STATUSBAR1, wxID_FRAME1WAVENAMEBOX,
+ wxID_REFRESHRESOURCEBTN, wxID_FRAME1COMPDESCRBOX, wxID_FRAME1STATICTEXT4
+] = [wx.NewId() for _init_ctrls in range(18)]
+
+[wxID_FRAME1MENUFILEEXIT, wxID_FRAME1MENUFILENEW, wxID_FRAME1MENUFILEOPEN,
+ wxID_FRAME1MENUFILESAVE, wxID_FRAME1MENUFILESAVEPLATFORM,
+ wxID_FRAME1MENUFILESAVEPLATFORMAS, wxID_FRAME1MENUFILESAVEWAVEFORM,
+ wxID_FRAME1MENUFILESAVEWAVEFORMAS, wxID_FRAME1MENUFILESAVE_AS,
+] = [wx.NewId() for _init_coll_menuFile_Items in range(9)]
+
+[wxID_FRAME1COMPBOXPOPUPCONNECT, wxID_FRAME1COMPBOXPOPUPEDIT,
+ wxID_FRAME1COMPBOXPOPUPEXPAND, wxID_FRAME1COMPBOXPOPUPREFRESH,
+ wxID_FRAME1COMPBOXPOPUPREMOVE, wxID_FRAME1COMPBOXPOPUPRENAME,
+ wxID_FRAME1COMPBOXPOPUPSET_AC,
+] = [wx.NewId() for _init_coll_compBoxPopup_Items in range(7)]
+
+[wxID_FRAME1MENUWAVEFORMACESUPPORT, wxID_FRAME1MENUWAVEFORMADDCOMP,
+ wxID_FRAME1MENUWAVEFORMCONNECTCOMP, wxID_FRAME1MENUWAVEFORMEDITCOMP,
+ wxID_FRAME1MENUWAVEFORMGENWAV, wxID_FRAME1MENUWAVEFORMREMOVECOMP,
+] = [wx.NewId() for _init_coll_menuWaveform_Items in range(6)]
+
+[wxID_FRAME1MENUHELPABOUT, wxID_FRAME1MENUHELPSAMPLEWAVEFORM,
+] = [wx.NewId() for _init_coll_menuHelp_Items in range(2)]
+
+[wxID_FRAME1RESOURCEBOXPOPUPDEVADD] = [wx.NewId() for _init_coll_resourceBoxPopupDev_Items in range(1)]
+
+[wxID_FRAME1RESOURCEBOXPOPUPADD, wxID_FRAME1RESOURCEBOXPOPUPADDDEV, wxID_FRAME1RESOURCEBOXPOPUPADDNODE,
+ wxID_FRAME1RESOURCEBOXPOPUPGETDESCR, wxID_FRAME1RESOURCEBOXPOPUPGETDOXYGENREFMAN,
+] = [wx.NewId() for _init_coll_resourceBoxPopup_Items in range(5)]
+
+[wxID_FRAME1NODEBOXPOPUPADDNODE, wxID_FRAME1NODEBOXPOPUPLOADNODE, wxID_FRAME1NODEBOXPOPUPEXPAND,
+ wxID_FRAME1NODEBOXPOPUPREFRESH, wxID_FRAME1NODEBOXPOPUPREMOVE, wxID_FRAME1NODEBOXPOPUPGENERATE,
+ wxID_FRAME1NODEBOXPOPUPCONNECT, wxID_FRAME1NODEBOXPOPUPRENAME,
+] = [wx.NewId() for _init_coll_nodeBoxPopup_Items in range(8)]
+
+[wxID_FRAME1NEWMENUNEWPLATFORM, wxID_FRAME1NEWMENUNEWPROJECT,
+ wxID_FRAME1NEWMENUNEWWAVEFORM,
+] = [wx.NewId() for _init_coll_newMenu_Items in range(3)]
+
+[wxID_FRAME1MENUPLATFORMADDNODE, wxID_FRAME1MENUPLATFORMGENERATENODE] = [wx.NewId() for _init_coll_menuPlatform_Items in range(2)]
+
+class Frame1(wx.Frame):
+    def _init_coll_menuBar1_Menus(self, parent):
+        # generated method, don't edit
+
+        parent.Append(menu=self.menuFile, title='File')
+        parent.Append(menu=self.menuWaveform, title=u'Waveform')
+        parent.Append(menu=self.menuPlatform, title=u'Platform')
+        parent.Append(menu=self.menuHelp, title='Help')
+
+    def _init_coll_newMenu_Items(self, parent):
+        # generated method, don't edit
+
+        parent.Append(help='', id=wxID_FRAME1NEWMENUNEWPROJECT,
+              kind=wx.ITEM_NORMAL, text=u'Project')
+        parent.Append(help='', id=wxID_FRAME1NEWMENUNEWWAVEFORM,
+              kind=wx.ITEM_NORMAL, text=u'Waveform')
+        parent.Append(help='', id=wxID_FRAME1NEWMENUNEWPLATFORM,
+              kind=wx.ITEM_NORMAL, text=u'Platform')
+        self.Bind(wx.EVT_MENU, self.OnNewMenuNewprojectMenu,
+              id=wxID_FRAME1NEWMENUNEWPROJECT)
+        self.Bind(wx.EVT_MENU, self.OnNewMenuNewwaveformMenu,
+              id=wxID_FRAME1NEWMENUNEWWAVEFORM)
+        self.Bind(wx.EVT_MENU, self.OnNewMenuNewplatformMenu,
+              id=wxID_FRAME1NEWMENUNEWPLATFORM)
+
+    def _init_coll_menuFile_Items(self, parent):
+        # generated method, don't edit
+
+        parent.AppendMenu(help='', id=wxID_FRAME1MENUFILENEW,
+              submenu=self.newMenu, text=u'New')
+        parent.Append(help='Open an existing design',
+              id=wxID_FRAME1MENUFILEOPEN, kind=wx.ITEM_NORMAL, text=u'Open')
+        parent.Append(help='Save current project', id=wxID_FRAME1MENUFILESAVE,
+              kind=wx.ITEM_NORMAL, text=u'Save Project')
+        parent.Append(help=u'Save current project to a new file',
+              id=wxID_FRAME1MENUFILESAVE_AS, kind=wx.ITEM_NORMAL,
+              text=u'Save Project As...')
+        parent.AppendSeparator()
+#        parent.Append(help='', id=wxID_FRAME1MENUFILESAVEWAVEFORM,
+#              kind=wx.ITEM_NORMAL, text=u'Save Waveform')
+#        parent.Append(help='', id=wxID_FRAME1MENUFILESAVEWAVEFORMAS,
+#              kind=wx.ITEM_NORMAL, text=u'Save Waveform As...')
+#        parent.AppendSeparator()
+#        parent.Append(help='', id=wxID_FRAME1MENUFILESAVEPLATFORM,
+#              kind=wx.ITEM_NORMAL, text=u'Save Platform')
+#        parent.Append(help='', id=wxID_FRAME1MENUFILESAVEPLATFORMAS,
+#              kind=wx.ITEM_NORMAL, text=u'Save Platform As...')
+#        parent.AppendSeparator()
+        parent.Append(help='Close the waveform developer',
+              id=wxID_FRAME1MENUFILEEXIT, kind=wx.ITEM_NORMAL, text='Exit')
+        self.Bind(wx.EVT_MENU, self.OnMenuFileOpenMenu,
+              id=wxID_FRAME1MENUFILEOPEN)
+        self.Bind(wx.EVT_MENU, self.OnMenuFileSaveMenu,
+              id=wxID_FRAME1MENUFILESAVE)
+        self.Bind(wx.EVT_MENU, self.OnMenuFileSave_asMenu,
+              id=wxID_FRAME1MENUFILESAVE_AS)
+        self.Bind(wx.EVT_MENU, self.OnMenuFileExitMenu,
+              id=wxID_FRAME1MENUFILEEXIT)
+        self.Bind(wx.EVT_MENU, self.OnMenuFileSavewaveformMenu,
+              id=wxID_FRAME1MENUFILESAVEWAVEFORM)
+        self.Bind(wx.EVT_MENU, self.OnMenuFileSavewaveformasMenu,
+              id=wxID_FRAME1MENUFILESAVEWAVEFORMAS)
+        self.Bind(wx.EVT_MENU, self.OnMenuFileSaveplatformMenu,
+              id=wxID_FRAME1MENUFILESAVEPLATFORM)
+        self.Bind(wx.EVT_MENU, self.OnMenuFileSaveplatformasMenu,
+              id=wxID_FRAME1MENUFILESAVEPLATFORMAS)
+
+    def _init_coll_menuPlatform_Items(self, parent):
+        # generated method, don't edit
+
+        parent.Append(help='', id=wxID_FRAME1MENUPLATFORMADDNODE,
+              kind=wx.ITEM_NORMAL, text=u'Add Deployment Node')
+        self.Bind(wx.EVT_MENU, self.OnMenuPlatformAddnodeMenu,
+              id=wxID_FRAME1MENUPLATFORMADDNODE)
+
+    def _init_coll_compBoxPopup_Items(self, parent):
+        # generated method, don't edit
+
+        parent.Append(help='', id=wxID_FRAME1COMPBOXPOPUPEDIT,
+              kind=wx.ITEM_NORMAL, text=u'Edit')
+        parent.Append(help='', id=wxID_FRAME1COMPBOXPOPUPCONNECT,
+              kind=wx.ITEM_NORMAL, text=u'Connect')
+        parent.Append(help='', id=wxID_FRAME1COMPBOXPOPUPREMOVE,
+              kind=wx.ITEM_NORMAL, text=u'Remove')
+        parent.AppendSeparator()
+        parent.Append(help='', id=wxID_FRAME1COMPBOXPOPUPREFRESH,
+              kind=wx.ITEM_NORMAL, text=u'Refresh')
+        parent.Append(help=u'', id=wxID_FRAME1COMPBOXPOPUPRENAME,
+              kind=wx.ITEM_NORMAL, text=u'Rename')
+        parent.Append(help=u'', id=wxID_FRAME1COMPBOXPOPUPEXPAND,
+              kind=wx.ITEM_NORMAL, text=u'Expand All')
+        parent.AppendSeparator()
+        parent.Append(help='', id=wxID_FRAME1COMPBOXPOPUPSET_AC,
+              kind=wx.ITEM_NORMAL, text=u'Set Assembly Controller')
+        self.Bind(wx.EVT_MENU, self.OnCompBoxPopupSet_acMenu,
+              id=wxID_FRAME1COMPBOXPOPUPSET_AC)
+        self.Bind(wx.EVT_MENU, self.OnCompBoxPopupEditMenu,
+              id=wxID_FRAME1COMPBOXPOPUPEDIT)
+        self.Bind(wx.EVT_MENU, self.OnCompBoxPopupConnectMenu,
+              id=wxID_FRAME1COMPBOXPOPUPCONNECT)
+        self.Bind(wx.EVT_MENU, self.OnCompBoxPopupRemoveMenu,
+              id=wxID_FRAME1COMPBOXPOPUPREMOVE)
+        self.Bind(wx.EVT_MENU, self.OnCompBoxPopupExpandMenu,
+              id=wxID_FRAME1COMPBOXPOPUPEXPAND)
+        self.Bind(wx.EVT_MENU, self.OnCompBoxPopupRenameMenu,
+              id=wxID_FRAME1COMPBOXPOPUPRENAME)
+        self.Bind(wx.EVT_MENU, self.OnCompBoxPopupRefreshMenu,
+              id=wxID_FRAME1COMPBOXPOPUPREFRESH)
+
+    def _init_coll_menuWaveform_Items(self, parent):
+        # generated method, don't edit
+
+        parent.Append(help='', id=wxID_FRAME1MENUWAVEFORMADDCOMP,
+              kind=wx.ITEM_NORMAL, text=u'New or Saved Component')
+        parent.Append(help='', id=wxID_FRAME1MENUWAVEFORMREMOVECOMP,
+              kind=wx.ITEM_NORMAL, text=u'Remove Component')
+        parent.AppendSeparator()
+        parent.Append(help='', id=wxID_FRAME1MENUWAVEFORMEDITCOMP,
+              kind=wx.ITEM_NORMAL, text=u'Edit Component')
+        parent.Append(help='', id=wxID_FRAME1MENUWAVEFORMCONNECTCOMP,
+              kind=wx.ITEM_NORMAL, text=u'Connect Component')
+        parent.AppendSeparator()
+        parent.Append(help='', id=wxID_FRAME1MENUWAVEFORMACESUPPORT,
+              kind=wx.ITEM_CHECK, text=u'ACE Support')
+        parent.AppendSeparator()
+        parent.Append(help='', id=wxID_FRAME1MENUWAVEFORMGENWAV,
+              kind=wx.ITEM_NORMAL, text=u'Generate')
+        self.Bind(wx.EVT_MENU, self.OnMenuWaveformAddcompMenu,
+              id=wxID_FRAME1MENUWAVEFORMADDCOMP)
+        self.Bind(wx.EVT_MENU, self.OnMenuWaveformRemovecompMenu,
+              id=wxID_FRAME1MENUWAVEFORMREMOVECOMP)
+        self.Bind(wx.EVT_MENU, self.OnMenuWaveformConnectcompMenu,
+              id=wxID_FRAME1MENUWAVEFORMCONNECTCOMP)
+        self.Bind(wx.EVT_MENU, self.OnMenuWaveformEditcompMenu,
+              id=wxID_FRAME1MENUWAVEFORMEDITCOMP)
+        self.Bind(wx.EVT_MENU, self.OnMenuWaveformGenwavMenu,
+              id=wxID_FRAME1MENUWAVEFORMGENWAV)
+        self.Bind(wx.EVT_MENU, self.OnMenuWaveformAcesupportMenu,
+              id=wxID_FRAME1MENUWAVEFORMACESUPPORT)
+
+    def _init_coll_nodeBoxPopup_Items(self, parent):
+        # generated method, don't edit
+
+        parent.Append(help='', id=wxID_FRAME1NODEBOXPOPUPADDNODE,
+              kind=wx.ITEM_NORMAL, text=u'Add Node')
+        parent.Append(help='', id=wxID_FRAME1NODEBOXPOPUPREMOVE,
+              kind=wx.ITEM_NORMAL, text=u'Remove')
+        parent.Append(help='', id=wxID_FRAME1NODEBOXPOPUPGENERATE,
+              kind=wx.ITEM_NORMAL, text=u'Generate')
+        parent.AppendSeparator()
+        parent.Append(help='', id=wxID_FRAME1NODEBOXPOPUPCONNECT,
+              kind=wx.ITEM_NORMAL, text=u'Connect')
+        parent.AppendSeparator()
+        parent.Append(help='', id=wxID_FRAME1NODEBOXPOPUPREFRESH,
+              kind=wx.ITEM_NORMAL, text=u'Refresh')
+        parent.Append(help='', id=wxID_FRAME1NODEBOXPOPUPRENAME,
+              kind=wx.ITEM_NORMAL, text=u'Rename')
+        parent.Append(help='', id=wxID_FRAME1NODEBOXPOPUPEXPAND,
+              kind=wx.ITEM_NORMAL, text=u'Expand All')
+        self.Bind(wx.EVT_MENU, self.OnNodeBoxPopupAddnodeMenu,
+              id=wxID_FRAME1NODEBOXPOPUPADDNODE)
+        self.Bind(wx.EVT_MENU, self.OnNodeBoxPopupRemoveMenu,
+              id=wxID_FRAME1NODEBOXPOPUPREMOVE)
+        self.Bind(wx.EVT_MENU, self.OnNodeBoxPopupGenerateMenu,
+              id=wxID_FRAME1NODEBOXPOPUPGENERATE)
+        self.Bind(wx.EVT_MENU, self.OnNodeBoxPopupConnectMenu,
+              id=wxID_FRAME1NODEBOXPOPUPCONNECT)
+        self.Bind(wx.EVT_MENU, self.OnNodeBoxPopupExpandMenu,
+              id=wxID_FRAME1NODEBOXPOPUPEXPAND)
+        self.Bind(wx.EVT_MENU, self.OnNodeBoxPopupRefreshMenu,
+              id=wxID_FRAME1NODEBOXPOPUPREFRESH)
+        self.Bind(wx.EVT_MENU, self.OnNodeBoxPopupRenameMenu,
+              id=wxID_FRAME1NODEBOXPOPUPRENAME)
+
+    def _init_coll_resourceBoxPopup_Items(self, parent):
+        # generated method, don't edit
+
+        parent.Append(help='', id=wxID_FRAME1RESOURCEBOXPOPUPADD,
+              kind=wx.ITEM_NORMAL, text=u'Add to Waveform')
+        parent.Append(help='', id=wxID_FRAME1RESOURCEBOXPOPUPADDDEV,
+              kind=wx.ITEM_NORMAL, text=u'Add to Node')
+        parent.Append(help='', id=wxID_FRAME1RESOURCEBOXPOPUPADDNODE,
+              kind=wx.ITEM_NORMAL, text=u'Add to Platform')
+        #parent.Append(help='', id=wxID_FRAME1RESOURCEBOXPOPUPGETDESCR,
+        #      kind=wx.ITEM_NORMAL, text=u'Display Description Below')
+        parent.Append(help='', id=wxID_FRAME1RESOURCEBOXPOPUPGETDOXYGENREFMAN,
+              kind=wx.ITEM_NORMAL, text=u'View Manual from Doxygen')
+        self.Bind(wx.EVT_MENU, self.OnResourceBoxPopupAddMenu,
+              id=wxID_FRAME1RESOURCEBOXPOPUPADD)
+        #self.Bind(wx.EVT_MENU, self.OnResourceBoxPopupGetDescr,
+        #      id=wxID_FRAME1RESOURCEBOXPOPUPGETDESCR)
+        self.Bind(wx.EVT_MENU, self.OnResourceBoxPopupGetDoxygenRefMan,
+              id=wxID_FRAME1RESOURCEBOXPOPUPGETDOXYGENREFMAN)
+        self.Bind(wx.EVT_MENU, self.OnResourceBoxPopupAdddevMenu,
+              id=wxID_FRAME1RESOURCEBOXPOPUPADDDEV)
+        self.Bind(wx.EVT_MENU, self.OnResourceBoxPopupAddnodeMenu,
+              id=wxID_FRAME1RESOURCEBOXPOPUPADDNODE)
+
+    def _init_coll_menuHelp_Items(self, parent):
+        # generated method, don't edit
+
+        parent.Append(help='', id=wxID_FRAME1MENUHELPSAMPLEWAVEFORM,
+              kind=wx.ITEM_NORMAL, text=u'Sample Waveform')
+        parent.AppendSeparator()
+        parent.Append(help='Display general information about OSSIE Waveform Developer',
+              id=wxID_FRAME1MENUHELPABOUT, kind=wx.ITEM_NORMAL, text='About')
+        self.Bind(wx.EVT_MENU, self.OnMenuHelpAboutMenu,
+              id=wxID_FRAME1MENUHELPABOUT)
+        self.Bind(wx.EVT_MENU, self.OnMenuHelpSamplewaveformMenu,
+              id=wxID_FRAME1MENUHELPSAMPLEWAVEFORM)
+
+    def _init_coll_statusBar1_Fields(self, parent):
+        # generated method, don't edit
+        parent.SetFieldsCount(1)
+
+        parent.SetStatusText(number=0, text='status')
+
+        parent.SetStatusWidths([-1])
+
+    def _init_utils(self):
+        # generated method, don't edit
+        self.menuFile = wx.Menu(title='')
+
+        self.menuHelp = wx.Menu(title='')
+
+        self.menuBar1 = wx.MenuBar()
+
+        self.compBoxPopup = wx.Menu(title='')
+
+        self.menuWaveform = wx.Menu(title='')
+
+        self.resourceBoxPopup = wx.Menu(title=u'')
+
+        self.menuPlatform = wx.Menu(title='')
+
+        self.nodeBoxPopup = wx.Menu(title='')
+
+        self.newMenu = wx.Menu(title=u'')
+
+        self._init_coll_menuFile_Items(self.menuFile)
+        self._init_coll_menuHelp_Items(self.menuHelp)
+        self._init_coll_menuBar1_Menus(self.menuBar1)
+        self._init_coll_compBoxPopup_Items(self.compBoxPopup)
+        self._init_coll_menuWaveform_Items(self.menuWaveform)
+        self._init_coll_resourceBoxPopup_Items(self.resourceBoxPopup)
+        self._init_coll_menuPlatform_Items(self.menuPlatform)
+        self._init_coll_nodeBoxPopup_Items(self.nodeBoxPopup)
+        self._init_coll_newMenu_Items(self.newMenu)
+
+    def _init_ctrls(self, prnt):
+        # generated method, don't edit
+        wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
+              pos=wx.Point(574, 283), size=wx.Size(594, 560),
+              style=wx.DEFAULT_FRAME_STYLE, title='OSSIE Waveform Developer')
+        self._init_utils()
+        self.SetClientSize(wx.Size(594, 560))
+        self.SetMenuBar(self.menuBar1)
+        self.SetAutoLayout(True)
+        self.Center(wx.BOTH)
+
+        self.statusBar1 = wx.StatusBar(id=wxID_FRAME1STATUSBAR1,
+              name='statusBar1', parent=self, style=wx.VSCROLL)
+        self._init_coll_statusBar1_Fields(self.statusBar1)
+        self.SetStatusBar(self.statusBar1)
+
+        self.waveNameBox = wx.TextCtrl(id=wxID_FRAME1WAVENAMEBOX,
+              name='waveNameBox', parent=self, pos=wx.Point(7, 9),
+              size=wx.Size(175, 25), style=0, value='')
+
+        self.staticText2 = wx.StaticText(id=wxID_FRAME1STATICTEXT2,
+              label='Waveform Name', name='staticText2', parent=self,
+              pos=wx.Point(190, 13), size=wx.Size(99, 17), style=0)
+
+        self.splitterWindow1 = wx.SplitterWindow(id=wxID_FRAME1SPLITTERWINDOW1,
+              name='splitterWindow1', parent=self, point=wx.Point(7, 75),
+              size=wx.Size(580, 365), style=wx.SP_3D)
+        self.splitterWindow1.SetConstraints(LayoutAnchors(self.splitterWindow1,
+              True, True, True, True))
+  #      self.splitterWindow1.SetBestFittingSize(wx.Size(580, 366))
+
+        self.sashWindow1 = wx.SashWindow(id=wxID_FRAME1SASHWINDOW1,
+              name='sashWindow1', parent=self.splitterWindow1, pos=wx.Point(0,
+              0), size=wx.Size(175, 365),
+              style=wx.SIMPLE_BORDER | wx.CLIP_CHILDREN | wx.SW_3D)
+
+        self.sashWindow2 = wx.SashWindow(id=wxID_FRAME1SASHWINDOW2,
+              name='sashWindow2', parent=self.splitterWindow1, pos=wx.Point(180,
+              0), size=wx.Size(400, 365), style=wx.CLIP_CHILDREN | wx.SW_3D)
+        self.splitterWindow1.SplitVertically(self.sashWindow1, self.sashWindow2,
+              175)
+
+        self.resourceBox = wx.TreeCtrl(id=wxID_FRAME1RESOURCEBOX,
+              name=u'resourceBox', parent=self.sashWindow1, pos=wx.Point(0, 0),
+              size=wx.Size(175, 365),
+              style=wx.TR_HAS_BUTTONS | wx.TR_HIDE_ROOT)
+        self.resourceBox.SetMinSize(wx.Size(-1, -1))
+        self.resourceBox.SetBestFittingSize(wx.Size(175, 365))
+        self.resourceBox.Bind(wx.EVT_RIGHT_UP, self.OnResourceBoxRightUp)
+        self.resourceBox.Bind(wx.EVT_LEFT_UP, self.OnResourceBoxLeftUp)
+        self.resourceBox.Bind(wx.EVT_LEFT_DCLICK, self.OnResourceBoxLeftDoubleClick)
+        self.staticText1 = wx.StaticText(id=wxID_FRAME1STATICTEXT1,
+              label=u'Available Resources', name='staticText1', parent=self,
+              pos=wx.Point(7, 46), size=wx.Size(120, 17), style=0)
+
+        self.staticText3 = wx.StaticText(id=wxID_FRAME1STATICTEXT3,
+              label=u'Waveform Layout', name='staticText3', parent=self,
+              pos=wx.Point(327, 46), size=wx.Size(103, 17), style=0)
+
+        self.splitterWindow2 = wx.SplitterWindow(id=wxID_FRAME1SPLITTERWINDOW2,
+              name='splitterWindow2', parent=self.sashWindow2, point=wx.Point(0,
+              -32), size=wx.Size(200, 100), style=wx.SP_3D)
+        self.splitterWindow2.SetSashSize(5)
+
+        self.sashWindow3 = wx.SashWindow(id=wxID_FRAME1SASHWINDOW3,
+              name='sashWindow3', parent=self.splitterWindow2, pos=wx.Point(0,
+              0), size=wx.Size(400, 200),
+              style=wx.SIMPLE_BORDER | wx.CLIP_CHILDREN | wx.SW_3D)
+
+        self.sashWindow4 = wx.SashWindow(id=wxID_FRAME1SASHWINDOW4,
+              name='sashWindow4', parent=self.splitterWindow2, pos=wx.Point(0,
+              205), size=wx.Size(400, 191),
+              style=wx.SIMPLE_BORDER | wx.CLIP_CHILDREN | wx.SW_3D)
+        self.sashWindow4.SetSashVisible(wx.SASH_TOP, False)
+        self.sashWindow4.SetMinSize(wx.Size(-1, -1))
+        self.splitterWindow2.SplitHorizontally(self.sashWindow3,
+              self.sashWindow4, 200)
+
+        self.compBox = wx.TreeCtrl(id=wxID_FRAME1COMPBOX, name=u'compBox',
+              parent=self.sashWindow3, pos=wx.Point(0, 0), size=wx.Size(399,
+              200),
+              style=wx.TR_EDIT_LABELS | wx.TR_HAS_BUTTONS | wx.TR_HIDE_ROOT)
+        self.compBox.SetBestFittingSize(wx.Size(399, 200))
+        self.compBox.Bind(wx.EVT_RIGHT_UP, self.OnCompBoxRightUp)
+        self.compBox.Bind(wx.EVT_TREE_END_LABEL_EDIT,
+              self.OnCompBoxTreeEndLabelEdit, id=wxID_FRAME1COMPBOX)
+        self.compBox.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT,
+              self.OnCompBoxTreeBeginLabelEdit, id=wxID_FRAME1COMPBOX)
+        self.compBox.Bind(wx.EVT_LEFT_DCLICK, self.OnCompBoxLeftDclick)
+
+        self.nodeBox = wx.TreeCtrl(id=wxID_FRAME1NODEBOX, name=u'nodeBox',
+              parent=self.sashWindow4, pos=wx.Point(0, 0), size=wx.Size(400,
+              191),
+              style=wx.TR_EDIT_LABELS | wx.TR_HAS_BUTTONS | wx.TR_HIDE_ROOT)
+        self.nodeBox.Bind(wx.EVT_RIGHT_UP, self.OnNodeBoxRightUp)
+        self.nodeBox.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT,
+              self.OnNodeBoxTreeBeginLabelEdit, id=wxID_FRAME1NODEBOX)
+        self.nodeBox.Bind(wx.EVT_TREE_END_LABEL_EDIT,
+              self.OnNodeBoxTreeEndLabelEdit, id=wxID_FRAME1NODEBOX)
+
+        self.RefreshResourceBtn = wx.Button(id=wxID_REFRESHRESOURCEBTN, label='Refresh',
+              name='RefreshResourceBtn', parent=self, pos=wx.Point(170, 40),
+              size=wx.Size(70, 27), style=0)
+        self.RefreshResourceBtn.Bind(wx.EVT_BUTTON, self.OnRefreshResourceBtnButton,
+              id=wxID_REFRESHRESOURCEBTN)
+
+        self.resDescrBox = wx.TextCtrl(id=wxID_FRAME1COMPDESCRBOX,
+              name='resDescrBox', parent=self, pos=wx.Point(90, 445),
+              size=wx.Size(497, 55), style= wx.TE_BESTWRAP | wx.TE_MULTILINE | wx.TE_READONLY)
+        self.resDescrBox.SetConstraints(LayoutAnchors(self.resDescrBox,
+              True, False, True, True))
+        self.resDescrBox.SetMinSize(wx.Size(-1,-1))
+        self.resDescrBox.SetBackgroundColour("lightgray")
+
+        self.staticText4 = wx.StaticText (id=wxID_FRAME1STATICTEXT4,
+              label='Resource Description', name='staticText4', parent=self,
+              pos=wx.Point(7, 445), size=wx.Size (80, 40), style= wx.TE_BESTWRAP | wx.TE_MULTILINE)
+        self.staticText4.SetConstraints(LayoutAnchors(self.staticText4,
+              True, False, False, True))
+
+
+
+    def __init__(self, parent):
+        self.name = "owd"   # in case anybody asks
+
+        # Constructor for MainFrame
+        self._init_ctrls(parent)
+
+        #read in the configuration information
+        cfg.LoadConfiguration(self)
+        if cfg.ossieInstallDir() == None:
+            cfg.overrideCfgValue('installpath', '/sdr/')
+
+        #setup the environment
+        self.active_comp = None
+        self.CompFrame = ComponentFrame.create(self)
+        self.active_wave = WaveformClass.Waveform()
+        self.active_plat = PlatformClass.Platform()
+        self.displayComps()
+        self.loadResources()
+        self.saveWaveformPath = None
+        self.savePlatformPath = None
+        self.saveProjectPath = None
+        self.description = None
+#        self.wavedevPath = os.getcwd() + "/"
+# NOTE The wavedevPath string should be constructed, not hard-coded
+#        self.wavedevPath = "/usr/lib/python2.5/site-packages/WaveDev/wavedev/"
+        self.wavedevPath = __file__
+        if os.path.islink (self.wavedevPath):
+            self.wavedevPath = os.path.realpath (self.wavedevPath)
+        self.wavedevPath = os.path.dirname (os.path.abspath (self.wavedevPath)) + '/'
+
+################################################################################
+## File/Help Menu Functionality
+################################################################################
+    def OnMenuFileNewMenu(self, event):
+        self.active_comp = None
+        self.active_wave = WaveformClass.Waveform()
+        self.displayComps()
+        event.Skip()
+
+    def OnNewMenuNewprojectMenu(self, event):
+        if len(self.active_wave.components)>0 or len(self.active_plat.nodes)>0 or self.saveProjectPath != None:
+            tmpstr = 'Do you want to save the current project first?\n'
+            dlg = wx.MessageDialog(self, tmpstr,
+                  'OSSIE Waveform Developer', wx.YES_NO | wx.CANCEL | wx.ICON_INFORMATION)
+            try:
+                returnCode = dlg.ShowModal()
+                if returnCode == wx.ID_YES:
+                    sflag = True
+                if returnCode == wx.ID_NO:
+                    sflag = False
+                elif returnCode == wx.ID_CANCEL:
+                    dlg.Destroy()
+                    event.Skip()
+                    return
+            finally:
+                dlg.Destroy()
+
+            if sflag == True:
+                tempLn = self.waveNameBox.GetLineText(0)
+                if tempLn != self.active_wave.name and self.saveProjectPath != None:
+                    tmpstr = 'The waveform name has changed.\n'
+                    tmpstr += 'Do you want to overwrite the existing project file?\n'
+                    tmpstr += self.saveProjectPath
+                    dlg = wx.MessageDialog(self, tmpstr,
+                          'OSSIE Waveform Developer', wx.YES_NO | wx.CANCEL | wx.ICON_INFORMATION)
+                    try:
+                        returnCode = dlg.ShowModal()
+                        if returnCode == wx.ID_YES:
+                            self.active_wave.name = tempLn
+                            if self.ProjectSave(False) == False:
+                                return
+                        if returnCode == wx.ID_NO:
+                            if self.ProjectSave(True) == False:
+                                return
+                        elif returnCode == wx.ID_CANCEL:
+                            dlg.Destroy()
+                            event.Skip()
+                            return
+                    finally:
+                        dlg.Destroy()
+
+                else:
+                    if self.saveProjectPath != None:
+                        if self.ProjectSave(False) == False:
+                            return
+                    else:
+                        if self.ProjectSave(True) == False:
+                            return
+
+        self.active_wave = WaveformClass.Waveform()
+        self.active_plat = PlatformClass.Platform()
+        self.saveProjectPath = None
+        self.waveNameBox.Clear()
+        self.displayComps()
+        self.displayNodes()
+
+
+        event.Skip()
+
+    def OnNewMenuNewwaveformMenu(self, event):
+        if len(self.active_wave.components)>0 or self.saveWaveformPath != None:
+            tmpstr = 'Do you want to save the current waveform first?\n'
+            dlg = wx.MessageDialog(self, tmpstr,
+                  'OSSIE Waveform Developer', wx.YES_NO | wx.CANCEL | wx.ICON_INFORMATION)
+            try:
+                returnCode = dlg.ShowModal()
+                if returnCode == wx.ID_YES:
+                    sflag = True
+                if returnCode == wx.ID_NO:
+                    sflag = False
+                elif returnCode == wx.ID_CANCEL:
+                    dlg.Destroy()
+                    event.Skip()
+                    return
+            finally:
+                dlg.Destroy()
+
+            if sflag == True:
+                tempLn = self.waveNameBox.GetLineText(0)
+                if tempLn != self.active_wave.name and self.saveWaveformPath != None:
+                    tmpstr = 'The waveform name has changed.\n'
+                    tmpstr += 'Do you want to overwrite the existing waveform file?\n'
+                    tmpstr += self.saveWaveformPath
+                    dlg = wx.MessageDialog(self, tmpstr,
+                          'OSSIE Waveform Developer', wx.YES_NO | wx.CANCEL | wx.ICON_INFORMATION)
+                    try:
+                        returnCode = dlg.ShowModal()
+                        if returnCode == wx.ID_YES:
+                            self.active_wave.name = tempLn
+                            if self.WaveformSave(False) == False:
+                                return
+                        if returnCode == wx.ID_NO:
+                            if self.WaveformSave(True) == False:
+                                return
+                        elif returnCode == wx.ID_CANCEL:
+                            dlg.Destroy()
+                            event.Skip()
+                            return
+                    finally:
+                        dlg.Destroy()
+
+                else:
+                    if self.saveWaveformPath != None:
+                        if self.WaveformSave(False) == False:
+                            return
+                    else:
+                        if self.WaveformSave(True) == False:
+                            return
+
+        self.active_wave = WaveformClass.Waveform()
+        self.saveWaveformPath = None
+        self.waveNameBox.Clear()
+        self.displayComps()
+
+        event.Skip()
+
+    def OnNewMenuNewplatformMenu(self, event):
+        if len(self.active_plat.nodes)>0 or self.savePlatformPath != None:
+            tmpstr = 'Do you want to save the current platform first?\n'
+            dlg = wx.MessageDialog(self, tmpstr,
+                  'OSSIE Waveform Developer', wx.YES_NO | wx.CANCEL | wx.ICON_INFORMATION)
+            try:
+                returnCode = dlg.ShowModal()
+                if returnCode == wx.ID_YES:
+                    sflag = True
+                if returnCode == wx.ID_NO:
+                    sflag = False
+                elif returnCode == wx.ID_CANCEL:
+                    dlg.Destroy()
+                    event.Skip()
+                    return
+            finally:
+                dlg.Destroy()
+
+            if sflag == True:
+                if self.savePlatformPath != None:
+                    tmpstr = 'Do you want to overwrite the existing platform file?\n'
+                    tmpstr += self.savePlatformPath
+                    dlg = wx.MessageDialog(self, tmpstr,
+                          'OSSIE Waveform Developer', wx.YES_NO | wx.CANCEL | wx.ICON_INFORMATION)
+                    try:
+                        returnCode = dlg.ShowModal()
+                        if returnCode == wx.ID_YES:
+                            if self.PlatformSave(False) == False:
+                                return
+                        if returnCode == wx.ID_NO:
+                            if self.PlatformSave(True) == False:
+                                return
+                        elif returnCode == wx.ID_CANCEL:
+                            dlg.Destroy()
+                            event.Skip()
+                            return
+                    finally:
+                        dlg.Destroy()
+
+                else:
+                    if self.PlatformSave(True) == False:
+                        return
+
+        self.active_plat = PlatformClass.Platform()
+        self.savePlatformPath = None
+        self.displayNodes()
+
+        event.Skip()
+
+    def OnMenuFileOpenMenu(self, event):
+        if len(self.homeDir) > 0:
+            tmpdir = self.homeDir
+        else:
+            tmpdir = os.path.expanduser("~")
+            if tmpdir == "~":
+                tmpdir = "/home"
+
+        tmpwildcard = "Project Files (*.owd)|*.owd|Waveform Designs (*.sca)|*.sca|Platform Layouts (*.plt)|*.plt"
+        dlg = wx.FileDialog(self, "Choose a file", tmpdir, "", tmpwildcard, wx.OPEN)
+        try:
+            returnCode = dlg.ShowModal()
+            if returnCode == wx.ID_OK:
+                tmpPath = dlg.GetPath()
+            elif returnCode == wx.ID_CANCEL:
+                dlg.Destroy()
+                return
+        finally:
+            dlg.Destroy()
+
+        f = open(tmpPath,'r')
+        tmpObject = cPickle.load(f)
+        if tmpObject[0] == 'waveform':
+            self.WaveformOpen(tmpPath,tmpObject[1])
+        elif tmpObject[0] == 'platform':
+            self.PlatformOpen(tmpPath,tmpObject[1])
+        elif tmpObject[0] == 'project':
+            self.ProjectOpen(tmpPath,tmpObject[1],tmpObject[2])
+
+        event.Skip()
+
+    def OnMenuFileSaveMenu(self, event):
+        if self.saveProjectPath != None:
+            tempLn = self.waveNameBox.GetLineText(0)
+            if tempLn != self.active_wave.name:
+                tmpstr = 'The waveform name has changed.\n'
+                tmpstr += 'Do you want to overwrite the existing project file?\n'
+                tmpstr += self.saveProjectPath
+                dlg = wx.MessageDialog(self, tmpstr,
+                      'OSSIE Waveform Developer', wx.YES_NO | wx.CANCEL | wx.ICON_INFORMATION)
+                try:
+                    returnCode = dlg.ShowModal()
+                    if returnCode == wx.ID_YES:
+                        self.active_wave.name = tempLn
+                        self.ProjectSave(False)
+                    if returnCode == wx.ID_NO:
+                        self.ProjectSave(True)
+                    elif returnCode == wx.ID_CANCEL:
+                        dlg.Destroy()
+                        event.Skip()
+                        return
+                finally:
+                    dlg.Destroy()
+
+            else:
+                self.ProjectSave(False)
+        else:
+            self.ProjectSave(False)
+
+        event.Skip()
+
+    def OnMenuFileSave_asMenu(self, event):
+        self.ProjectSave(True)
+        event.Skip()
+
+    def OnMenuFileSavewaveformMenu(self, event):
+        if self.saveWaveformPath != None:
+            tempLn = self.waveNameBox.GetLineText(0)
+            if tempLn != self.active_wave.name:
+                tmpstr = 'The waveform name has changed.\n'
+                tmpstr += 'Do you want to overwrite the existing waveform file?\n'
+                tmpstr += self.saveWaveformPath
+                dlg = wx.MessageDialog(self, tmpstr,
+                      'OSSIE Waveform Developer', wx.YES_NO | wx.CANCEL | wx.ICON_INFORMATION)
+                try:
+                    returnCode = dlg.ShowModal()
+                    if returnCode == wx.ID_YES:
+                        self.active_wave.name = tempLn
+                        self.WaveformSave(False)
+                    if returnCode == wx.ID_NO:
+                        self.WaveformSave(True)
+                    elif returnCode == wx.ID_CANCEL:
+                        dlg.Destroy()
+                        event.Skip()
+                        return
+                finally:
+                    dlg.Destroy()
+
+            else:
+                self.WaveformSave(False)
+        else:
+            self.WaveformSave(False)
+
+        event.Skip()
+
+    def OnMenuFileSavewaveformasMenu(self, event):
+        self.WaveformSave(True)
+        event.Skip()
+
+    def OnMenuFileSaveplatformMenu(self, event):
+        self.PlatformSave(False)
+        event.Skip()
+
+    def OnMenuFileSaveplatformasMenu(self, event):
+        self.PlatformSave(True)
+        event.Skip()
+
+    def OnMenuFileExitMenu(self, event):
+        self.Close()
+        event.Skip()
+
+    def ProjectSave(self,saveasFlag):
+        if saveasFlag == True or self.saveProjectPath == None:
+            tempLn = self.waveNameBox.GetLineText(0)
+            if tempLn == '':
+                errorMsg(self,'Please enter a waveform name first')
+                return False
+            self.active_wave.name = tempLn
+
+            if len(self.homeDir) > 0:
+                tmpdir = self.homeDir
+            else:
+                tmpdir = os.path.expanduser("~")
+
+            dlg = wx.FileDialog(self, "Save As", tmpdir, tempLn + '.owd', "Project File (*.owd)|*.owd", wx.SAVE)
+            try:
+                returnCode = dlg.ShowModal()
+                if returnCode == wx.ID_OK:
+                    self.saveProjectPath = dlg.GetPath()
+                elif returnCode == wx.ID_CANCEL:
+                    dlg.Destroy()
+                    return False
+            finally:
+                dlg.Destroy()
+
+        f = open(self.saveProjectPath,'w')
+        cPickle.dump(('project',self.active_wave,self.active_plat),f)
+
+        return True
+
+    def WaveformSave(self,saveasFlag):
+        if saveasFlag == True or self.saveWaveformPath == None:
+            tempLn = self.waveNameBox.GetLineText(0)
+            if tempLn == '':
+                errorMsg(self,'Please enter a waveform name first')
+                return False
+            self.active_wave.name = tempLn
+
+            if len(self.homeDir) > 0:
+                tmpdir = self.homeDir
+            else:
+                tmpdir = os.path.expanduser("~")
+
+            dlg = wx.FileDialog(self, "Save As", tmpdir, tempLn + '.sca', "*.sca", wx.SAVE)
+            try:
+                returnCode = dlg.ShowModal()
+                if returnCode == wx.ID_OK:
+                    self.saveWaveformPath = dlg.GetPath()
+                elif returnCode == wx.ID_CANCEL:
+                    dlg.Destroy()
+                    return False
+            finally:
+                dlg.Destroy()
+
+        f = open(self.saveWaveformPath,'w')
+        cPickle.dump(('waveform',self.active_wave),f)
+
+        return True
+
+    def PlatformSave(self,saveasFlag):
+        if saveasFlag == True or self.savePlatformPath == None:
+            if self.active_plat.name != "":
+                tmpname = self.active_plat.name
+            else:
+                tmpname = 'Platform1'
+
+            if len(self.homeDir) > 0:
+                tmpdir = self.homeDir
+            else:
+                tmpdir = os.path.expanduser("~")
+
+            dlg = wx.FileDialog(self, "Save As", tmpdir, tmpname + '.plt', "Platform File (*.plt)|*.plt", wx.SAVE)
+            try:
+                returnCode = dlg.ShowModal()
+                if returnCode == wx.ID_OK:
+                    self.savePlatformPath = dlg.GetPath()
+                elif returnCode == wx.ID_CANCEL:
+                    dlg.Destroy()
+                    return False
+            finally:
+                dlg.Destroy()
+
+        f = open(self.savePlatformPath,'w')
+        cPickle.dump(('platform',self.active_plat),f)
+
+        return True
+
+    def WaveformOpen(self,newPath,newWav):
+        if newPath != None:
+            if self.saveWaveformPath != None:
+                dlg = wx.MessageDialog(self, 'Do you want to save your changes to the active waveform first?',
+                      'Error', wx.YES_NO | wx.ICON_INFORMATION)
+                try:
+                    returnCode = dlg.ShowModal()
+                    if returnCode == wx.ID_YES:
+                        self.WaveformSave(False)
+                    elif returnCode == wx.ID_CANCEL:
+                        dlg.Destroy()
+                        return
+                finally:
+                    dlg.Destroy()
+
+            self.saveWaveformPath = newPath
+
+        self.active_wave = newWav
+
+        # We must create new UUIDs for each instance and copy the file uuid from
+        # the base component to the instance
+        for c in self.active_wave.components:
+            found = False
+            for x in self.Available_Components:
+                c.setUUID()
+                if c.baseName == x.baseName:
+                    c.file_uuid = x.file_uuid
+                    found = True
+            if c.generate == False and found == False:
+                errorMsg(self,"Could not find " + c.baseName + " which " + c.name + " is an instance of.")
+
+
+        #Because device assignments are stored as python objects in each component
+        #we must refresh the assignment with the available platform devices
+
+        for c in self.active_wave.components:
+            if c.device == None:
+                continue
+            found = False
+            for n in self.active_plat.nodes:
+                for d in n.Devices:
+                    if c.device.name == d.name and c.device.node == d.node:
+                        c.device = d
+                        found = True
+                        break
+            if found == False:
+                tmpstr = 'ERROR! Cannot find the ' + c.device.name + ' device'
+                tmpstr += ' in this platform layout.\nThe ' + c.name + ' component was assigned to this device.\n'
+                tmpstr += 'Setting device assignment to None.'
+                errorMsg(self,tmpstr)
+                c.device = None
+
+        self.waveNameBox.Clear()
+        self.waveNameBox.WriteText(self.active_wave.name)
+        self.displayComps()
+
+        if self.active_wave.ace == True:
+            self.menuWaveform.Check(wxID_FRAME1MENUWAVEFORMACESUPPORT,True)
+            #self.ACEcheckBox.SetValue(True)
+        else:
+            self.menuWaveform.Check(wxID_FRAME1MENUWAVEFORMACESUPPORT,False)
+            #self.ACEcheckBox.SetValue(False)
+
+    def PlatformOpen(self,newPath,newPlat):
+        if newPath != None:
+            if self.savePlatformPath != None:
+                dlg = wx.MessageDialog(self, 'Do you want to save your changes to the active platform layout first?',
+                      'Error', wx.YES_NO | wx.ICON_INFORMATION)
+                try:
+                    returnCode = dlg.ShowModal()
+                    if returnCode == wx.ID_YES:
+                        self.PlatformSave(False)
+                    elif returnCode == wx.ID_CANCEL:
+                        dlg.Destroy()
+                        return
+                finally:
+                    dlg.Destroy()
+
+            self.savePlatformPath = newPath
+
+        self.active_plat = newPlat
+
+
+        # NOTE: The following comment does not hold true now that the nodes are installed
+        # once for the whole system -> hence, the d.setUUID() is also commented out
+
+        # We must create new UUIDs for each instance and copy the file uuid from
+        # the base component to the instance
+        for n in self.active_plat.nodes:
+            for d in n.Devices:
+                found = False
+                for ad in self.Available_Devices:
+                    if d.baseName == ad.baseName:
+                       # print d.baseName
+                        d.file_uuid = ad.file_uuid
+        #                d.setUUID()
+                        found = True
+                if found == False:
+                    errorMsg(self,"Could not find " + d.baseName + " which " + d.name + " is an instance of.")
+
+        self.displayNodes()
+
+
+    def ProjectOpen(self,newPath,newWav,newPlat):
+        if self.saveProjectPath != None:
+            dlg = wx.MessageDialog(self, 'Do you want to save your changes to the active project first?',
+                  'Error', wx.YES_NO | wx.ICON_INFORMATION)
+            try:
+                returnCode = dlg.ShowModal()
+                if returnCode == wx.ID_YES:
+                    self.ProjectSave(False)
+                elif returnCode == wx.ID_CANCEL:
+                    dlg.Destroy()
+                    return
+            finally:
+                dlg.Destroy()
+
+        self.saveProjectPath = newPath
+
+        self.PlatformOpen(None,newPlat)
+        self.WaveformOpen(None,newWav)
+        self.displayNodes()
+
+
+    #################################################################
+    ## Help Menu Stuff
+    #################################################################
+
+    def OnMenuHelpAboutMenu(self, event):
+        dlg = AboutDialog.Dialog1(self)
+        try:
+            dlg.ShowModal()
+        finally:
+            dlg.Destroy()
+        event.Skip()
+
+    def OnMenuHelpSamplewaveformMenu(self, event):
+        self.generateTestWF()
+        event.Skip()
+
+    def generateTestWF(self):
+        self.active_wave = WaveformClass.Waveform()
+        int1 = ComponentClass.Interface('complexShort')
+        op1 = ComponentClass.Operation('pushPacket','void')
+        param1 = ComponentClass.Param('I','PortTypes::ShortSequence','in')
+        param2 = ComponentClass.Param('Q','PortTypes::ShortSequence','in')
+        op1.params.extend([param1,param2])
+        int1.operations.append(op1)
+
+        t2 = ComponentClass.Component("Transmitter",AC=True)
+        p1 = ComponentClass.Port('inPortTx1',copy.deepcopy(int1),'Provides')
+        p2 = ComponentClass.Port('outPortTx1',copy.deepcopy(int1),'Uses')
+        t2.ports.append(p1); t2.ports.append(p2)
+        self.active_wave.components.append(t2)
+
+        t3 = ComponentClass.Component("Channel")
+        p1 = ComponentClass.Port('inPortCh1',copy.deepcopy(int1),'Provides')
+        p2 = ComponentClass.Port('inPortCh2',copy.deepcopy(int1),'Provides')
+        p3 = ComponentClass.Port('inPortCh3',copy.deepcopy(int1),'Provides')
+        p4 = ComponentClass.Port('outPortCh1',copy.deepcopy(int1),'Uses')
+        p5 = ComponentClass.Port('outPortCh2',copy.deepcopy(int1),'Uses')
+        p6 = ComponentClass.Port('outPortCh3',copy.deepcopy(int1),'Uses')
+        t3.ports.extend([p1,p2,p3,p4,p5,p6])
+        self.active_wave.components.append(t3)
+
+        t4 = ComponentClass.Component("Receiver")
+        p1 = ComponentClass.Port('inPortRx1',copy.deepcopy(int1),'Provides')
+        p2 = ComponentClass.Port('outPortRx1',copy.deepcopy(int1),'Uses')
+        t4.ports.append(p1); t4.ports.append(p2)
+        self.active_wave.components.append(t4)
+
+        temp_dev = ComponentClass.Component("GPP")
+        self.active_wave.devices.append(temp_dev)
+
+        self.displayComps()
+
+
+################################################################################
+## Waveform Layout Functionality
+################################################################################
+
+    def displayComps(self):
+        self.compBox.DeleteAllItems()
+        troot = self.compBox.AddRoot("the_root")
+        for c in self.active_wave:
+            t1 = self.compBox.AppendItem(troot,c.name)
+            self.compBox.SetPyData(t1,c)
+            if c.AssemblyController == True:
+                self.compBox.SetItemBold(t1,True)
+            else:
+                self.compBox.SetItemBold(t1,False)
+            for p in c.connections:
+                tnm = p.localPort.name + "::" + p.remoteComp.name + "(" + p.remotePort.name + ")"
+                t2 = self.compBox.AppendItem(t1,tnm)
+                self.compBox.SetPyData(t2,p)
+
+    def EditComponent(self):
+        self.CompFrame.calledByParent = True
+        self.CompFrame.MakeModal(True)
+        self.CompFrame.Show(True)
+
+    def ConnectComponent(self):
+        ## Assume active_comp is set to the appropriate component
+        dlg = ConnectDialog.create(self)
+        try:
+            dlg.ShowModal()
+        finally:
+            dlg.Destroy()
+            self.displayComps()
+
+    def RemoveCompBoxSelection(self):
+        dlg = wx.MessageDialog(self, '"Are you sure you want to remove this item?"',
+          'Error', wx.YES_NO | wx.NO_DEFAULT | wx.ICON_INFORMATION)
+        try:
+            if dlg.ShowModal() == wx.ID_NO:
+                return
+        finally:
+            dlg.Destroy()
+
+        sn = self.compBox.GetSelection()
+        if sn == self.compBox.GetRootItem():
+            return
+        elif self.compBox.GetItemParent(sn) == self.compBox.GetRootItem():
+            # a main level component
+            self.active_comp = self.compBox.GetPyData(sn)
+            ti = self.active_wave.components.index(self.active_comp)
+            # If any other component is connected to this component - connection must be removed
+            for c in self.active_wave.components:
+                for con in c.connections:
+                    if con.remoteComp == self.active_comp:
+                        ci = c.connections.index(con)
+                        del c.connections[ci]
+            del self.active_wave.components[ti]
+        else:
+            # a child component (connection)
+            tc = self.compBox.GetPyData(sn)
+            self.active_comp = self.compBox.GetPyData(self.compBox.GetItemParent(sn))
+            ti = self.active_comp.connections.index(tc)
+            del self.active_comp.connections[ti]
+
+        self.displayComps()
+        self.displayNodes()
+
+
+    #################################################################
+    ## Waveform Event Stuff
+    #################################################################
+
+    def OnCompBoxRightUp(self, event):
+        sn = self.compBox.GetSelection()
+        if sn == self.compBox.GetRootItem():
+            for x in self.compBoxPopup.GetMenuItems():
+                if x.GetLabel() == 'Expand All' or x.GetLabel() == 'Refresh':
+                    x.Enable(True)
+                else:
+                    x.Enable(False)
+        elif self.compBox.GetItemParent(sn) == self.compBox.GetRootItem():
+            # a main level component
+            self.active_comp = self.compBox.GetPyData(sn)
+            for x in self.compBoxPopup.GetMenuItems():
+                x.Enable(True)
+        else:
+            # a child component (connections in our case)
+            for x in self.compBoxPopup.GetMenuItems():
+                if x.GetLabel() != 'Remove':
+                    x.Enable(False)
+
+        self.compBox.PopupMenu(self.compBoxPopup)
+        event.Skip()
+
+    def OnCompBoxPopupSet_acMenu(self, event):
+        for c in self.active_wave.components:
+            c.AssemblyController = False
+        self.active_comp.AssemblyController = True
+        self.displayComps()
+        event.Skip()
+
+    def OnCompBoxPopupEditMenu(self, event):
+        self.EditComponent()
+        event.Skip()
+
+    def OnCompBoxPopupConnectMenu(self, event):
+        self.ConnectComponent()
+        event.Skip()
+
+    def OnNodeBoxPopupConnectMenu(self, event):
+        errorMsg(self, "Connection between two devices is not yet supported.  Please connect via the component.")
+
+        # what to do when the connections are supported :
+        #sn = self.nodeBox.GetSelection()
+        #self.active_comp = self.nodeBox.GetPyData(sn)  #active component is actually and active resource
+        #self.ConnectComponent()
+
+    def OnCompBoxPopupRemoveMenu(self, event):
+        self.RemoveCompBoxSelection()
+        event.Skip()
+
+    def OnCompBoxPopupExpandMenu(self, event):
+        troot = self.compBox.GetRootItem()
+        if self.compBox.GetChildrenCount(troot) > 0:
+            cid1,cookie1 = self.compBox.GetFirstChild(troot)
+            self.compBox.Expand(cid1)
+            for x in range(self.compBox.GetChildrenCount(troot,recursively=False)-1):
+                    cid2,cookie2 = self.compBox.GetNextChild(troot,cookie1)
+                    self.compBox.Expand(cid2)
+                    cid1 = cid2
+                    cookie1 = cookie2
+        event.Skip()
+
+    def OnCompBoxTreeEndLabelEdit(self, event):
+        if event.IsEditCancelled():
+            event.Veto()
+            return
+        sn = event.GetItem()
+        if sn == self.compBox.GetRootItem():
+            errorMsg(self,'You can not rename this element - root!')
+            even.Veto()
+        elif self.compBox.GetItemParent(sn) == self.compBox.GetRootItem():
+            # a main level component
+            self.active_comp = self.compBox.GetPyData(sn)
+            newname = event.GetLabel()
+
+        if len(newname) > 0:
+            for c in self.active_wave.components:
+                if c != self.active_comp and c.name == newname:
+                    errorMsg(self,'Invalid name - a component by that name already exists')
+                    event.Veto()
+                    return
+
+            #Component names with spaces do not work
+            if newname.find(' ') != -1:
+                errorMsg(self,'Resource names can not have spaces in them.')
+                event.Veto()
+                return
+                #newname = newname.replace(' ','_')
+                #self.compBox.SetItemText(sn,newname)
+
+            self.active_comp.changeName(newname)
+            #self.active_comp.name = newname
+            #if self.active_comp.generate == True:
+            #    self.active_comp.baseName = newname
+        else:
+            errorMsg(self,'Invalid name - must have at least one character!')
+            event.Veto()
+            return
+        event.Skip()
+
+    def OnCompBoxTreeBeginLabelEdit(self, event):
+        sn = self.compBox.GetSelection()
+        if sn == self.compBox.GetRootItem():
+            errorMsg(self,'You can not rename this element!')
+            event.Veto()
+            return
+        elif self.compBox.GetItemParent(sn) == self.compBox.GetRootItem():
+            # a main level component
+            self.active_comp = self.compBox.GetPyData(sn)
+        else:
+            # a child component (connection)
+            event.Veto()
+            return
+        event.Skip()
+
+    def OnCompBoxPopupRenameMenu(self, event):
+        sn = self.compBox.GetSelection()
+        self.compBox.EditLabel(sn)
+        event.Skip()
+
+    def OnCompBoxLeftDclick(self, event):
+        sn = self.compBox.GetSelection()
+        if sn == self.compBox.GetRootItem():
+            return
+        elif self.compBox.GetItemParent(sn) == self.compBox.GetRootItem():
+            # a main level component
+            self.active_comp = self.compBox.GetPyData(sn)
+            self.EditComponent()
+        else:
+            # a child component (connections in our case)
+            return
+
+        event.Skip()
+
+    def OnCompBoxPopupRefreshMenu(self, event):
+        self.displayComps()
+        event.Skip()
+
+    #################################################################
+    ## Waveform Menu Stuff
+    #################################################################
+
+    def OnMenuWaveformAddcompMenu(self, event):
+        ComponentFrame.newComponentFrame()
+
+    def OnMenuWaveformRemovecompMenu(self, event):
+        sn = self.compBox.GetSelection()
+        if sn == self.compBox.GetRootItem():
+            return
+        self.RemoveCompBoxSelection()
+        event.Skip()
+
+    def OnMenuWaveformConnectcompMenu(self, event):
+        sn = self.compBox.GetSelection()
+        if sn == self.compBox.GetRootItem():
+            errorMsg(self,'Please select a component first!')
+            return
+        elif self.compBox.GetItemParent(sn) == self.compBox.GetRootItem():
+            # a main level component
+            self.active_comp = self.compBox.GetPyData(sn)
+        else:
+            # a child component (connections in our case)
+            errorMsg(self,'Only top level components can be connected!')
+            return
+
+        self.ConnectComponent()
+        event.Skip()
+
+    def OnMenuWaveformEditcompMenu(self, event):
+        sn = self.compBox.GetSelection()
+        if sn == self.compBox.GetRootItem():
+            return
+        elif self.compBox.GetItemParent(sn) == self.compBox.GetRootItem():
+            # a main level component
+            self.active_comp = self.compBox.GetPyData(sn)
+            ti = self.active_wave.components.index(self.active_comp)
+        else:
+            # a child component (connection)
+            errorMsg(self,'Only top level components can be edited!')
+            return
+
+        self.EditComponent()
+        event.Skip()
+
+    def OnMenuWaveformGenwavMenu(self, event):
+        tempLn = self.waveNameBox.GetLineText(0)
+        if tempLn == '':
+            errorMsg(self,'Please enter a waveform name first')
+            return
+
+        nFlag = False
+        for c in self.active_wave.components:
+            if c.name == tempLn:
+                nFlag = True
+
+        if nFlag == True:
+            tmpstr = "One of the waveform components has the same name as the waveform.\n"
+            tmpstr += "This is not allowed."
+            errorMsg(self,tmpstr)
+            return
+
+        #check for duplicate node names
+        #get all the device instance ids and node names
+        device_ids = []
+        node_names = []
+        for n in self.active_plat.nodes:
+            node_names.append(n.name)
+            for d in n.Devices:
+                device_ids.append(d.uuid)
+
+        ##check for duplicate node names
+        #tmp = list(set(node_names))   #removes duplicates from the list
+        #if len(tmp) != len(node_names):
+        #    errorMsg(self,"Duplicate node names detected.  This is not allowed.")
+        #    return
+
+        #check for duplicates in the device uuids
+        tmp = list(set(device_ids))  #removes duplicates from the list
+        if len(tmp) != len(device_ids):  #if there were duplicates (multiple copies of same device instances)
+            errorMsg(self,"Duplicate nodes or device instantiation UUIDs have been detected.  This is not allowed.")
+            return
+
+        acFlag = False
+        noDevs = []
+        for c in self.active_wave.components:
+            if c.AssemblyController == True:
+                acFlag = True
+            if c.device == None:
+                noDevs.append(c.name)
+        if not acFlag:
+            #errorMsg(self,'Please set one component to be the Assebly Controller.')
+            dlg = wx.MessageDialog(self, 'Are you sure you want to generate this waveform without an Assembly Controller?',
+              'Caption', wx.YES_NO | wx.ICON_INFORMATION)
+            try:
+                returnCode = dlg.ShowModal()
+                if returnCode == wx.ID_YES:
+                    pass
+                else:
+                    dlg.Destroy()
+                    return
+            finally:
+                dlg.Destroy()
+            #return
+
+        if len(noDevs) > 0:
+            tmpstr = 'The following components are not assigned to a device. '
+            tmpstr += 'This will cause the DAS file to generated incorrectly.\n\n'
+            for x in noDevs:
+                tmpstr += x + '\n'
+            errorMsg(self,tmpstr)
+
+        self.waveName = tempLn
+        self.active_wave.name = tempLn
+
+        dlg = wx.DirDialog(self,"Please select the place to generate the code",style=wx.DD_NEW_DIR_BUTTON)
+        dlg.SetPath(os.path.expanduser('~'))
+        try:
+            if dlg.ShowModal() == wx.ID_OK:
+                self.path = dlg.GetPath()
+            else:
+                return
+        finally:
+            dlg.Destroy()
+
+        gen = genStruct.genAll(self.path, self.wavedevPath, copy.deepcopy(self.active_wave))
+        gen.genDirs()
+        # Only include the device manager files if there is just one node
+        if len(self.active_plat.nodes) == 1:
+            gen.writeMakefiles(True)
+        else:
+            gen.writeMakefiles(False)
+        # TODO: use different configure.ac file for application -JDG
+        gen.genConfigureACFiles(self.installPath)
+        for c in self.active_wave.components:
+            if c.generate:
+                gen.genCompFiles(c)
+
+        xml_gen.genxml(copy.deepcopy(self.active_wave.components), self.path, self.wavedevPath, self.active_wave.name)
+        xml_gen.genDAS(copy.deepcopy(self.active_wave.components), self.path, self.wavedevPath, self.active_wave.name)
+        xml_gen.writeWaveSetuppy(self.path, self.wavedevPath, self.active_wave.name)
+
+        #save the .owd file
+        f = open(self.path + "/" + self.waveName +  "/" + self.waveName + ".owd",'w')
+        cPickle.dump(('project',self.active_wave,self.active_plat),f)
+
+        #generate the dcd file for each node
+        #for n in self.active_plat.nodes:
+            #if len(self.active_plat.nodes) == 1:
+            #    tmpname = 'DeviceManager'
+            #    folderFlag = False
+            #else:
+            #    tmpname = 'DeviceManager' + n.name
+            #    folderFlag = True
+            #xml_gen.genDeviceManager(n, self.path, self.wavedevPath, self.active_wave.name, tmpname,folderFlag)
+
+        gen.cleanUp()
+
+    def OnMenuWaveformAcesupportMenu(self, event):
+        if self.menuWaveform.IsChecked(wxID_FRAME1MENUWAVEFORMACESUPPORT):
+            self.active_wave.ace = True
+            for x in self.active_wave.components:
+                if x.generate == True:
+                    x.ace = True
+        else:
+            self.active_wave.ace = False
+            for x in self.active_wave.components:
+                if x.generate == True:
+                    x.ace = False
+
+        event.Skip()
+
+
+################################################################################
+## Resource Functionality
+################################################################################
+
+    def displayResources(self):
+        self.resourceBox.DeleteAllItems()
+        troot = self.resourceBox.AddRoot("the_root")
+        compRoot = self.resourceBox.AppendItem(troot,'Components',image=0)
+        devRoot = self.resourceBox.AppendItem(troot,'Devices',image=1)
+        nodeRoot = self.resourceBox.AppendItem(troot,'Nodes',image=1)
+
+        for c in self.Available_Components:
+            t1 = self.resourceBox.AppendItem(compRoot,c.name)
+            self.resourceBox.SetPyData(t1,c)
+
+        for c in self.Available_Devices:
+            t1 = self.resourceBox.AppendItem(devRoot,c.name)
+            self.resourceBox.SetPyData(t1,c)
+
+        for n in self.Available_Nodes:
+            t1 = self.resourceBox.AppendItem(nodeRoot,n.name)
+            self.resourceBox.SetPyData(t1,n)
+
+
+        if self.resourceBox.GetChildrenCount(troot,recursively=False) > 0:
+            cid1,cookie1 = self.resourceBox.GetFirstChild(troot)
+            self.resourceBox.SortChildren(cid1)
+            for x in range(self.resourceBox.GetChildrenCount(troot,recursively=False)-1):
+                cid1,cookie1 = self.resourceBox.GetNextChild(troot,cookie1)
+                self.resourceBox.SortChildren(cid1)
+
+    def loadResources(self):
+        self.Available_Components = []
+        self.Available_Devices = []
+        self.Available_Nodes = []
+
+        resList = []
+	    # NOTE: use CF::FileManager to obtain file location
+        # List possible resource directories (components and device)
+        print "Install path = " + self.installPath
+        baseComponentPath = self.installPath + 'dom/xml/'
+        if os.path.isdir(baseComponentPath):
+            for r in os.listdir(baseComponentPath):
+                if r != 'dtd':  # ignore dtd directory
+                    resList.append( (baseComponentPath,r) )
+        else:
+            errorMsg(self,"No component resources could be found in: " + baseComponentPath)
+            return
+
+        baseDevicePath = self.installPath + 'dev/xml/'
+        if os.path.isdir(baseDevicePath):
+            for d in os.listdir(baseDevicePath):
+                if d != 'dtd':
+                    resList.append( (baseDevicePath,d) )
+        else:
+            errorMsg(self,"No devices could be found in the following directory: " + baseDevicePath)
+            return
+
+        # find the .scd.xml files for each resource
+        for r in resList:
+            tmpResName = r[1]
+            tmpResPath = r[0] + r[1]
+            tmpComp = importResource.getResource(tmpResPath,tmpResName,self)
+
+            if tmpComp == None:
+                continue
+            if tmpComp.type == 'resource':
+                self.Available_Components.append(tmpComp)
+            elif tmpComp.type == 'executabledevice':
+                self.Available_Devices.append(tmpComp)
+            elif tmpComp.type == 'loadabledevice':
+                self.Available_Devices.append(tmpComp)
+            elif tmpComp.type == 'device':
+                self.Available_Devices.append(tmpComp)
+
+        nodeList = []
+# NOTE: the use of hard coded dirs is bad juju
+# NOTE: use CF::FileManager to obtain file location
+        if os.path.isdir(self.installPath + 'dev/nodes'):
+            nodeList = os.listdir(self.installPath + 'dev/nodes')
+        else:
+            errorMsg(self, "No nodes could be found in: " + self.installPath)
+
+        # find the scd files for each node
+        for node_name in nodeList:
+
+            # check for existence of DomainManager XML files
+            nodes_root_path = self.installPath + os.path.sep + 'dev/nodes' + os.path.sep + node_name + os.path.sep
+            if not os.path.exists(nodes_root_path + 'DeviceManager.dcd.xml'):
+                errorMsg(self, "Could not find DeviceManager.dcd.xml in: " + nodes_root_path)
+                continue
+            elif not os.path.exists(nodes_root_path + 'DeviceManager.prf.xml'):
+                errorMsg(self, "Could not find DeviceManager.prf.xml in: " + nodes_root_path)
+                continue
+            elif not os.path.exists(nodes_root_path + 'DeviceManager.scd.xml'):
+                errorMsg(self, "Could not find DeviceManager.scd.xml in: " + nodes_root_path)
+                continue
+            elif not os.path.exists(nodes_root_path + 'DeviceManager.spd.xml'):
+                errorMsg(self, "Could not find DeviceManager.spd.xml in: " + nodes_root_path)
+                continue
+
+            nodeName = node_name
+            nodePath = self.installPath + 'dev/nodes/' + nodeName + '/'
+
+            tmpNode = importNode.getNode(nodePath,nodeName,self)
+            if tmpNode == None:
+                print "WARNING: possibly an error reading node " + nodePath + "/" + nodeName
+                continue
+            self.Available_Nodes.append(tmpNode)
+
+        self.displayResources()
+
+    def OnRefreshResourceBtnButton(self, event):
+        self.loadResources()
+
+
+    #################################################################
+    ## Resource Event Stuff
+    #################################################################
+
+    def OnResourceBoxPopupAddMenu(self, event):
+        sn = self.resourceBox.GetSelection()
+        tmpRes = None
+        if (sn != self.resourceBox.GetRootItem() and self.resourceBox.GetItemParent(sn) != self.resourceBox.GetRootItem()):
+            # a child component (Component or Device)
+            tmpRes =  self.resourceBox.GetPyData(sn)
+            if tmpRes.type == 'resource':
+#            errorMsg(self,'You cannot add this type of resource to a waveform.  Right click to add to platform or node')
+ #           return
+                tmpBaseName = tmpRes.name
+                tmpCount = 1
+                for c in self.active_wave.components:
+                    if c.baseName == tmpBaseName:
+                        tmpCount += 1
+
+                dlg = wx.TextEntryDialog(self, 'Please enter an instance name for this '\
+                + tmpRes.name + ' component.', 'Enter Name', tmpRes.name + str(tmpCount))
+                try:
+                    returnCode = dlg.ShowModal()
+                    if returnCode == wx.ID_OK:
+                        newname = dlg.GetValue()
+                        if len(newname) <= 0:
+                            errorMsg(self,'Invalid instance name.')
+                            dlg.Destroy()
+                            return
+
+                        for c in self.active_wave.components:
+                            if newname == c.name:
+                                errorMsg(self,'A component instance with this name already exists in your waveform.')
+                                dlg.Destroy()
+                                return
+                    elif returnCode == wx.ID_CANCEL:
+                        dlg.Destroy()
+                        return
+                finally:
+                    dlg.Destroy()
+
+
+                newRes = copy.deepcopy(tmpRes)
+                newRes.name = newname
+                newRes.baseName = tmpBaseName
+                newRes.setUUID()    # this gives the component instance a unique id
+        # we do not set the newRes.file_uuid because it is the same for all components of this type
+
+                self.active_wave.components.append(newRes)
+                self.displayComps()
+                self.resourceBox.Unselect()
+                event.Skip()
+
+    def OnResourceBoxRightUp(self, event):
+        self.OnResourceBoxPopupGetDescr(event)
+        sn = self.resourceBox.GetSelection()
+        tmpRes = None
+        if sn == self.resourceBox.GetRootItem():
+            for x in self.resourceBoxPopup.GetMenuItems():
+                x.Enable(False)
+        elif self.resourceBox.GetItemParent(sn) == self.resourceBox.GetRootItem():
+            for x in self.resourceBoxPopup.GetMenuItems():
+                x.Enable(False)
+        else:
+            # a child component (Component or Device)
+            for x in self.resourceBoxPopup.GetMenuItems():
+                    x.Enable(True)
+            tmpRes =  self.resourceBox.GetPyData(sn)
+            if tmpRes.type == 'resource':
+                x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPADDDEV)
+                x.Enable(False)
+                x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPADDNODE)
+                x.Enable(False)
+
+                #x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPGETDESCR)
+                #x.Enable(False)
+
+                #disable Doxygen docs display if no docs directory found
+                docsPath = self.installPath + 'docs/' + tmpRes.name
+                if os.path.isdir(docsPath) != 1:
+                    x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPGETDOXYGENREFMAN)
+                    x.Enable(False)
+            elif tmpRes.type == 'node':
+                x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPADDDEV)
+                x.Enable(False)
+                x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPADD)
+                x.Enable(False)
+                #x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPGETDESCR)
+                #x.Enable(False)
+                x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPGETDOXYGENREFMAN)
+                x.Enable(False)
+            else:
+                x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPADDNODE)
+                x.Enable(False)
+                x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPADD)
+                x.Enable(False)
+                #x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPGETDESCR)
+                #x.Enable(False)
+                x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPGETDOXYGENREFMAN)
+                x.Enable(False)
+
+        #if tmpRes != None:
+        self.resourceBox.PopupMenu(self.resourceBoxPopup)
+        event.Skip()
+
+    def OnResourceBoxLeftUp(self, event):
+        self.OnResourceBoxPopupGetDescr(event)
+
+    def OnResourceBoxLeftDoubleClick(self, event):
+        sn = self.resourceBox.GetSelection()
+        if (sn != self.resourceBox.GetRootItem() and self.resourceBox.GetItemParent(sn) != self.resourceBox.GetRootItem()):
+            # a child component (Component or Device)
+            tmpRes =  self.resourceBox.GetPyData(sn)
+            if tmpRes.type == 'resource':
+                self.OnResourceBoxPopupAddMenu(event)
+            elif tmpRes.type == 'node':
+                self.OnResourceBoxPopupAddnodeMenu(event)
+            elif (tmpRes.type == 'device' or tmpRes.type == 'loadabledevice' or tmpRes.type == 'executabledevice'):
+                self.OnResourceBoxPopupAdddevMenu(event)
+
+    def OnResourceBoxPopupAdddevMenu(self, event):
+        sn = self.resourceBox.GetSelection()
+        tmpRes =  self.resourceBox.GetPyData(sn)
+
+        if len(self.active_plat.nodes) == 0:
+            tmpstr = "There are no available nodes to add a device instance to.\n"
+            tmpstr += "Please add a node to your design.  Platform->Add Deployment Node"
+            errorMsg(self,tmpstr)
+            return
+
+        tmpBaseName = tmpRes.name
+        #tmpCount = 1
+        #for c in self.active_plat.nodes:
+        #    for x in c.Devices:
+        #        if x.baseName == tmpBaseName:
+        #            tmpCount += 1
+
+        #dlg = NodeDialog.create(self,self.active_plat.nodes,tmpBaseName + str(tmpCount))
+        dlg = NodeDialog.create(self,self.active_plat.nodes,tmpBaseName)
+
+        try:
+            returnCode = dlg.ShowModal()
+            if returnCode == wx.ID_OK:
+                tmpnode = dlg.DeploymentNode
+                newname = dlg.InstanceName
+                tmpCount = 1
+                iterator = 0
+                basename = newname
+                newname = newname+str(tmpCount)
+
+                while iterator < len(tmpnode.Devices):
+                    for c in tmpnode.Devices:
+                        if newname == c.name:
+                            tmpCount = tmpCount + 1
+                            newname = basename+str(tmpCount)
+                            iterator = 0
+                            break
+                        else:
+                            iterator = iterator + 1
+
+                        #errorMsg(self,'A device instance with this name already exists on ' + tmpnode.name + '.')
+                        #dlg.Destroy()
+                        #return
+                #for c in tmpnode.Devices:
+                #    if newname == c.name:
+                #        tmpCount = tmpCount + 1
+                        #errorMsg(self,'A device instance with this name already exists on ' + tmpnode.name + '.')
+                        #dlg.Destroy()
+                        #return
+            else:
+                dlg.Destroy()
+                return
+        finally:
+            dlg.Destroy()
+
+
+        newDev = copy.deepcopy(tmpRes)
+        newDev.name = newname
+        newDev.baseName = tmpBaseName
+        newDev.generate = False
+        newDev.node = tmpnode.name
+        newDev.setUUID()    # this gives the device instance a unique id
+        # we do not set the newDev.file_uuid because it is the same for all devices of this type
+
+        tmpnode.Devices.append(newDev)
+        self.displayNodes()
+        self.resourceBox.Unselect()
+        event.Skip()
+
+    def OnResourceBoxPopupGetDescr(self, event):
+        sn = self.resourceBox.GetSelection()
+        tmpRes = None
+        if (sn != self.resourceBox.GetRootItem() and self.resourceBox.GetItemParent(sn) != self.resourceBox.GetRootItem()):
+            # a child component (Component or Device)
+            tmpRes =  self.resourceBox.GetPyData(sn)
+            self.resDescrBox.Clear()
+            self.resDescrBox.WriteText(tmpRes.name + " (" + tmpRes.type + "):  " \
+                + tmpRes.description)
+        event.Skip()
+
+    def OnResourceBoxPopupGetDoxygenRefMan(self, event):
+        defaultHtml = 'index.html'
+        defaultPdf = 'refman.pdf'
+        docList = None
+        sn = self.resourceBox.GetSelection()
+        tmpRes = self.resourceBox.GetPyData(sn)
+        docsPath = self.installPath + 'docs/' + tmpRes.name
+        if os.path.isdir(docsPath):
+            docList = os.listdir(docsPath)
+            if os.path.isfile(docsPath + '/' + defaultHtml):
+                webbrowser.open_new('file://' + docsPath + '/' + defaultHtml)
+            elif os.path.isfile(docsPath + '/' + defaultPdf):
+                #find more portable way to view pdf?
+                try:
+                    os.system('evince ' + docsPath + '/' + defaultPdf + ' &')
+                finally:
+                    errorMsg(self,'evince pdf viewer threw exception or not found')
+                #webbrowser.open('file://' + docsPath + '/' + defaultPdf, 1)
+            else:
+                errorMsg(self,'Neither index.html nor refman.pdf found in ' + docsPath + ': directory listing: ' + str(docList))
+        else:
+            errorMsg(self,'No directory for ' + tmpRes.name + ' could be found in: ' + self.installPath + 'docs')
+            return
+
+    def OnResourceBoxPopupAddnodeMenu(self, event):
+        sn = self.resourceBox.GetSelection()
+        tmpNode =  self.resourceBox.GetPyData(sn)
+        self.active_plat.nodes.append(tmpNode)
+        self.displayNodes()
+        event.Skip()
+
+################################################################################
+## Platform Layout Functionality
+################################################################################
+
+    def displayNodes(self):
+        self.nodeBox.DeleteAllItems()
+        troot = self.nodeBox.AddRoot("the_root")
+
+        for n in self.active_plat.nodes:
+            t1 = self.nodeBox.AppendItem(troot,n.name)
+            self.nodeBox.SetPyData(t1,n)
+
+            for d in n.Devices:
+                t2 = self.nodeBox.AppendItem(t1,unicode(d.name))
+                self.nodeBox.SetPyData(t2,d)
+
+                for c in self.active_wave.components:
+                    if c.device == d:
+                        t3 = self.nodeBox.AppendItem(t2,c.name)
+                        self.nodeBox.SetPyData(t3,c)
+
+    def AddNode(self):
+        tmpCount = len(self.active_plat.nodes) + 1
+
+        dlg = wx.TextEntryDialog(self, 'Please enter a name for this node ',\
+         'Enter Name', 'Node' + str(tmpCount))
+        try:
+            returnCode = dlg.ShowModal()
+            if returnCode == wx.ID_OK:
+                newname = dlg.GetValue()
+                if len(newname) <= 0:
+                    errorMsg(self,'Invalid instance name.')
+                    dlg.Destroy()
+                    return
+
+                for c in self.active_plat.nodes:
+                    if newname == c.name:
+                        errorMsg(self,'A node with this name already exists in your design.')
+                        dlg.Destroy()
+                        return
+            elif returnCode == wx.ID_CANCEL:
+                dlg.Destroy()
+                return
+        finally:
+            dlg.Destroy()
+
+        #tmpNode = PlatformClass.Node(newname)
+        tmpNode = ComponentClass.Node(name=newname)
+        self.active_plat.nodes.append(tmpNode)
+        self.displayNodes()
+
+    def GenerateNodeBoxSelection(self):
+        errorMsg(self, 'WARNING: You will have to regenerate your waveform if you continue')
+        sn = self.nodeBox.GetSelection()
+
+        #generate the dcd file for the selected node
+        dlg = wx.DirDialog(self,"Please select the place to generate the code",style=wx.DD_NEW_DIR_BUTTON)
+        dlg.SetPath(os.path.expanduser('~'))
+        try:
+            if dlg.ShowModal() == wx.ID_OK:
+                self.path = dlg.GetPath()
+            else:
+                return
+        finally:
+            dlg.Destroy()
+        active_node = None
+
+        tmp_count = 0
+        duplicate_name_flag = False
+        for n in self.active_plat.nodes:
+            if n==self.nodeBox.GetPyData(sn):
+                dev_count = 0
+                while dev_count < len(self.active_plat.nodes[tmp_count].Devices):
+                    tmp_uuid = unicode(uuidgen())
+                    n.Devices[dev_count].uuid = tmp_uuid
+                    self.active_plat.nodes[tmp_count].Devices[dev_count].uuid = tmp_uuid
+                    dev_count = dev_count + 1
+                active_node = n
+                break
+            tmp_count = tmp_count + 1
+        if active_node == None:
+            print "This should never happen - the node names don't match"
+            return
+
+
+        gen = genNode.genAll(self.path, self.wavedevPath, copy.deepcopy(active_node))
+        gen.genDirs()
+        gen.writeMakefile()
+        # TODO: use different configure.ac file for node -JDG
+        gen.genConfigureACFiles(self.installPath)
+        xml_gen.genDeviceManager(n, self.path, self.wavedevPath, n.name, "DeviceManager", False)
+
+
+    def RemoveNodeBoxSelection(self):
+        sn = self.nodeBox.GetSelection()
+        snParent = self.nodeBox.GetItemParent(sn)
+        if snParent == self.nodeBox.GetRootItem():
+            # a platform node
+            tmpMsg = "        Are you sure you want to remove this Node?\n\n"
+            tmpMsg += "All device instances assigned to this node will be removed,\n"
+            tmpMsg += "and all components assignments to these devices will voided."
+            if owdMsg(self,tmpMsg) == False:
+                return
+            tmpNode = self.nodeBox.GetPyData(sn)
+            for n in self.active_plat.nodes:
+                if tmpNode == n:
+                    for d in n.Devices:
+                        # If any other component is connected to this device - connection must be removed
+                        for c in self.active_wave.components:
+                            for con in c.connections:
+                                if con.remoteComp == d:
+                                    ci = c.connections.index(con)
+                                    del c.connections[ci]
+                        for c in self.active_wave.components:
+                            if c.device == d:
+                                c.device = None
+                    dIndex = self.active_plat.nodes.index(tmpNode)
+                    del self.active_plat.nodes[dIndex]
+
+        elif self.nodeBox.GetItemParent(snParent) == self.nodeBox.GetRootItem():
+            # a device instance
+            tmpMsg = "Are you sure you want to remove this Device Instance?\n\n"
+            tmpMsg += "All component assignments to this devices will voided."
+            if owdMsg(self,tmpMsg) == False:
+                return
+            tmpDev = self.nodeBox.GetPyData(sn)
+            # If any other component is connected to this device - connection must be removed
+            for c in self.active_wave.components:
+                for con in c.connections:
+                    if con.remoteComp == tmpDev:
+                        ci = c.connections.index(con)
+                        del c.connections[ci]
+
+            for n in self.active_plat.nodes:
+                for d in n.Devices:
+                    if tmpDev == d:
+                        for c in self.active_wave.components:
+                            if c.device == d:
+                                c.device = None
+                        dIndex = n.Devices.index(tmpDev)
+                        del n.Devices[dIndex]
+        else:
+            # a component assignment
+            tmpMsg = "Are you sure you want to void this component assignment?\n\n"
+            if owdMsg(self,tmpMsg) == False:
+                return
+            tmpComp = self.nodeBox.GetPyData(sn)
+            tmpComp.device = None
+
+        self.displayNodes()
+        self.displayComps()
+
+
+    #################################################################
+    ## Platform Event Stuff
+    #################################################################
+
+    def OnNodeBoxRightUp(self, event):
+        sn = self.nodeBox.GetSelection()
+        if sn != self.nodeBox.GetRootItem():
+            snParent = self.nodeBox.GetItemParent(sn)
+        if sn == self.nodeBox.GetRootItem():
+            self.nodeBoxPopup.Enable(wxID_FRAME1NODEBOXPOPUPREMOVE,False)
+            self.nodeBoxPopup.Enable(wxID_FRAME1NODEBOXPOPUPRENAME,False)
+        elif snParent == self.nodeBox.GetRootItem():
+            # a platform node
+            for x in self.nodeBoxPopup.GetMenuItems():
+                x.Enable(True)
+            self.nodeBoxPopup.Enable(wxID_FRAME1NODEBOXPOPUPGENERATE,True)
+        elif self.nodeBox.GetItemParent(snParent) == self.nodeBox.GetRootItem():
+            # a device instance
+            for x in self.nodeBoxPopup.GetMenuItems():
+                x.Enable(True)
+            self.nodeBoxPopup.Enable(wxID_FRAME1NODEBOXPOPUPGENERATE,False)
+        else:
+            # a component assignment
+            for x in self.nodeBoxPopup.GetMenuItems():
+                x.Enable(True)
+            self.nodeBoxPopup.Enable(wxID_FRAME1NODEBOXPOPUPGENERATE,False)
+            self.nodeBoxPopup.Enable(wxID_FRAME1NODEBOXPOPUPRENAME,False)
+
+        self.nodeBox.PopupMenu(self.nodeBoxPopup)
+        event.Skip()
+
+    def OnNodeBoxPopupAddnodeMenu(self, event):
+        self.AddNode()
+        event.Skip()
+
+    def OnNodeBoxPopupRemoveMenu(self, event):
+        self.RemoveNodeBoxSelection()
+        event.Skip()
+
+    def OnNodeBoxPopupGenerateMenu(self, event):
+        self.GenerateNodeBoxSelection()
+        event.Skip()
+
+    def OnNodeBoxPopupExpandMenu(self, event):
+        troot = self.nodeBox.GetRootItem()
+        if self.nodeBox.ItemHasChildren(troot):
+            cid1,cookie1 = self.nodeBox.GetFirstChild(troot)
+            self.ExpandTreeNode(self.nodeBox,cid1)
+            cid1 = self.nodeBox.GetNextSibling(cid1)
+            while cid1.IsOk():
+                self.ExpandTreeNode(self.nodeBox,cid1)
+                cid1 = self.nodeBox.GetNextSibling(cid1)
+
+        event.Skip()
+
+    def OnNodeBoxPopupRefreshMenu(self, event):
+        self.displayNodes()
+        event.Skip()
+
+    def OnNodeBoxPopupRenameMenu(self, event):
+        sn = self.nodeBox.GetSelection()
+        self.nodeBox.EditLabel(sn)
+        event.Skip()
+
+    def OnNodeBoxTreeBeginLabelEdit(self, event):
+        sn = self.nodeBox.GetSelection()
+        snParent = self.nodeBox.GetItemParent(sn)
+        if snParent == self.nodeBox.GetRootItem():
+            # a platform node
+            pass
+        elif self.nodeBox.GetItemParent(snParent) == self.nodeBox.GetRootItem():
+            # a device instance
+            pass
+        else:
+            # a child component (connection)
+            event.Veto()
+            return
+        event.Skip()
+
+    def OnNodeBoxTreeEndLabelEdit(self, event):
+        if event.IsEditCancelled():
+            event.Veto()
+            return
+        sn = event.GetItem()
+        snParent = self.nodeBox.GetItemParent(sn)
+        if snParent == self.nodeBox.GetRootItem():
+            # a platform node
+            tempNode = self.nodeBox.GetPyData(sn)
+            newname = event.GetLabel()
+            if len(newname) > 0:
+                for n in self.active_plat.nodes:
+                    if n != tempNode and n.name == newname:
+                        errorMsg(self,'Invalid name - a node by that name already exists')
+                        event.Veto()
+                        return
+
+                #Node names with spaces do not work
+                if newname.find(' ') != -1:
+                    errorMsg(self,'Node names can not have spaces in them.')
+                    event.Veto()
+                    return
+
+                tempNode.name = newname
+            else:
+                errorMsg(self,'Invalid name - must have at least one character!')
+                event.Veto()
+                return
+        elif self.nodeBox.GetItemParent(snParent) == self.nodeBox.GetRootItem():
+            # a device instance
+            tempDev = self.nodeBox.GetPyData(sn)
+            snNode = self.nodeBox.GetItemParent(sn)
+            tempNode = self.nodeBox.GetPyData(snNode)
+            newname = event.GetLabel()
+            if len(newname) > 0:
+                for d in tempNode.Devices:
+                    if d != tempDev and d.name == newname:
+                        errorMsg(self,'Invalid name - a device instance with that name already exists')
+                        event.Veto()
+                        return
+
+                #Device names with spaces do not work
+                if newname.find(' ') != -1:
+                    errorMsg(self,'Device names can not have spaces in them.')
+                    event.Veto()
+                    return
+
+                tempDev.changeName(newname)
+
+        else:
+            # a child component (connection)
+            event.Veto()
+            return
+
+        event.Skip()
+
+    #################################################################
+    ## Platform Menu Stuff
+    #################################################################
+
+    def OnMenuPlatformAddnodeMenu(self, event):
+        self.AddNode()
+        event.Skip()
+
+
+################################################################################
+## General Environment Functionality
+################################################################################
+
+
+    def ExpandTreeNode(self, whichBox, nodeId):
+        if whichBox.ItemHasChildren(nodeId):
+            whichBox.Expand(nodeId)
+            cid1,cookie1 = whichBox.GetFirstChild(nodeId)
+            self.ExpandTreeNode(whichBox,cid1)
+            cid1 = whichBox.GetNextSibling(cid1)
+            while cid1.IsOk():
+                self.ExpandTreeNode(whichBox,cid1)
+                cid1 = self.nodeBox.GetNextSibling(cid1)
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/cfg.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/cfg.py	(revision 9979)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/cfg.py	(revision 9979)
@@ -0,0 +1,273 @@
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+##-------------------------------------------------------------------------
+## This file defines basic methods for retrieving information from the
+## wavedev.cfg file.
+##-------------------------------------------------------------------------
+import xml.dom.minidom
+import os
+import sys
+import traceback
+from WaveDev.wavedev.errorMsg import *
+##-------------------------------------------------------------------------
+## Doc
+##-------------------------------------------------------------------------
+"""
+This module provides functions for accessing configuration settings
+stored in the wavedev.cfg file (in xml).  The primary functions provided
+for use in other modules are defined in the "public" section of the
+module below.
+
+The configuration file is a simple XML file where values are stored
+in specialized tags.  Each value has a name, and is encoded in the
+XML file as a child tag of the top-level <owdconfiguration> tag that
+looks like this:
+    <name>value</name>
+
+To look up a configuration value, simply provide the corresponding name
+as an argument to ossieCfgValue().  The XML in the config file is parsed
+only once, and results are cached internally within this module.  Provisions
+are also made to override configuration settings loaded from the config
+file using the overrideCfgValue() function.  Special methods for retrieving
+the version() and ossieInstallDir() are provided as separate methods, since
+they are used more frequently.  These methods are shallow wrappers around
+ossieCfgValue().
+
+Names in this file that begin with double-underscores ("__") are intended
+to be private and should not be referenced outside this file.
+"""
+
+##-------------------------------------------------------------------------
+## Public functions
+##-------------------------------------------------------------------------
+
+def version():
+    """
+    Get the current OSSIE version by looking up the "version" key.
+    """
+    result = ossieCfgValue('version')
+    if result == None:
+        result = 'unknown'
+    return result
+
+
+def ossieInstallDir():
+    """
+    Get the location of the OSSIE installation directory by looking
+    up the "installpath" key.  This function ensures that the return
+    value always ends in a trailing slash.
+    """
+    return ensureDirHasTrailingSlash(ossieCfgValue('installpath'))
+
+
+def ossieCfgValue(key):
+    """
+    Look up a key in the configuration file and return its associated value.
+    """
+    global __overrides
+    if __overrides.has_key(key):
+        return __overrides[key]
+    else:
+        val = __keyFromXml(key)
+        # cache it
+        if val != None:
+            setCfgValueIfNecessary(key, val)
+        return val
+
+
+def overrideCfgValue(key, value):
+    """
+    Override a configuration value from the config file for the current
+    process, without rewriting the configuration file.
+    """
+    global __overrides
+    __overrides[key] = value
+
+
+def setCfgValueIfNecessary(key, value):
+    """
+    Set an override value for a configuration setting, if no override
+    value is already recorded.
+    """
+    global __overrides
+    if not __overrides.has_key(key):
+        overrideCfgValue(key, value)
+
+
+def ensureDirHasTrailingSlash(dir):
+    """
+    Add a trailing slash to the dir, if there isn't one there already.
+    """
+    if dir != None and dir[len(dir) - 1] != '/':
+        dir = dir + '/'
+    return dir
+
+
+def commentLine():
+    """
+    Generate an XML comment line containing the current version number
+    for use in automatically generated XML files.
+    """
+    global __commentLine
+    if __commentLine == None:
+        __commentLine = u'<!--Created with OSSIE WaveDev ' + version() \
+            + u'-->\n<!--Powered by Python-->\n'
+    return __commentLine
+
+def LoadConfiguration(frame_obj):
+    """
+    This function used to be located in MainFrame.py, but is used by
+    both MainFrame and ComponentFrame to load configuration settings
+    into fields within the provided frame_obj.  It was moved here, since
+    it is used by both of those other modules.
+    """
+    frame_obj.version = version()
+
+    # install path
+    frame_obj.installPath = ossieInstallDir()
+
+    # standard IDL path
+    frame_obj.stdIdlPath = ensureDirHasTrailingSlash(ossieCfgValue('stdidlpath'))
+    if frame_obj.stdIdlPath == None or not os.path.isdir(frame_obj.stdIdlPath):
+        if frame_obj.stdIdlPath == None:
+            print "warning: wavedev.cfg stdidl path is not set"
+        else:
+            print "warning: wavedev.cfg stdidl path " + frame_obj.stdIdlPath + " does not exist"
+        print "  => using default standard idl path instead"
+
+        # Attempt to use a default value
+        if os.path.isdir('/usr/include/standardinterfaces'):
+            frame_obj.stdIdlPath = '/usr/include/standardinterfaces/'
+        elif os.path.isdir('/usr/local/include/standardinterfaces'):
+            frame_obj.stdIdlPath = '/usr/local/include/standardinterfaces/'
+        else:
+            tmpstr = "StandardInterfaces does not appear to be installed!\n"
+            tmpstr += "You will not be able to add ports to components.\n\n"
+            tmpstr += "If you have standardinterfaces installed in a location\n"
+            tmpstr += "other than the default, please specify that location\n"
+            tmpstr += "in the wavedev.cfg file located in the top directory."
+            errorMsg(frame_obj,tmpstr)
+
+    # custom IDL path
+    frame_obj.customIdlPath = ensureDirHasTrailingSlash(ossieCfgValue('customidlpath'))
+    if frame_obj.customIdlPath == None or not os.path.isdir(frame_obj.customIdlPath):
+        if frame_obj.customIdlPath == None:
+            print "warning: wavedev.cfg customidl path is not set"
+        else:
+            print "warning: wavedev.cfg customidl path " + frame_obj.customIdlPath + " does not exist"
+        print "  => using default custom idl path instead"
+
+        # Attempt to use a default value
+        if os.path.isdir('/usr/include/custominterfaces'):
+            frame_obj.customIdlPath = '/usr/include/custominterfaces/'
+        elif os.path.isdir('/usr/local/include/custominterfaces'):
+            frame_obj.customIdlPath = '/usr/local/include/custominterfaces/'
+        else:
+            tmpstr = "CustomInterfaces does not appear to be installed!\n"
+            tmpstr += "You will not be able to add ports to components.\n\n"
+            tmpstr += "If you have standardinterfaces installed in a location\n"
+            tmpstr += "other than the default, please specify that location\n"
+            tmpstr += "in the wavedev.cfg file located in the top directory."
+            errorMsg(frame_obj,tmpstr)
+
+    # ossie include path
+    frame_obj.ossieIncludePath = ensureDirHasTrailingSlash(ossieCfgValue('ossieincludepath'))
+    if frame_obj.ossieIncludePath == None or not os.path.isdir(frame_obj.ossieIncludePath):
+        if os.path.isdir('/usr/include/ossie'):
+            frame_obj.ossieIncludePath = '/usr/include/ossie/'
+        elif os.path.isdir('/usr/local/include/ossie'):
+            frame_obj.ossieIncludePath = '/usr/local/include/ossie/'
+        else:
+            tmpstr = "OSSIE does not appear to be installed!\n"
+            tmpstr += "You will not be able to add ports to components\n"
+            tmpstr += "using CF interfaces.\n\n"
+            tmpstr += "If you have ossie installed in a location other than\n"
+            tmpstr += "the default please specify that location in the\n"
+            tmpstr += "wavedev.cfg file located in the top directory."
+            errorMsg(frame_obj,tmpstr)
+
+    # home directory
+    frame_obj.homeDir = ensureDirHasTrailingSlash(ossieCfgValue('homedir'))
+
+    # generate source preamble
+    frame_obj.sourcepreamble = ossieCfgValue('sourcepreamble')
+    if frame_obj.sourcepreamble == None or not os.path.exists(frame_obj.sourcepreamble):
+        #search for generate/generic_preamble in Wavedev/wavedev
+        frame_obj.sourcepreamble = __getPath('/WaveDev/wavedev/generate/generic_preamble')
+
+    # generate license file
+    frame_obj.licensefile = ossieCfgValue('licensefile')
+    if frame_obj.licensefile == None or not os.path.exists(frame_obj.licensefile):
+        frame_obj.licensefile = ''
+
+    # developer
+    frame_obj.developer = ossieCfgValue('developer')
+    if frame_obj.developer == None or not os.path.exists(frame_obj.developer):
+        frame_obj.developer = "your_name_or_organization"
+
+##-------------------------------------------------------------------------
+## Internal
+##-------------------------------------------------------------------------
+
+def __relativeRoot():
+    """
+    Locate the OSSIE WaveDev root directory by looking in the system path.
+    """
+    for i in sys.path:
+        root = i + "/WaveDev/"
+        if os.path.exists(root):
+            return root
+    print "Root install directory not found ... check sys.path selections"
+    return None
+
+def __getPath(toFile):
+    """Search for the given file in list of directories available in sys.path
+       and returns the absolute path
+    """
+    for dir in sys.path:
+        filePath = dir + toFile
+        if os.path.exists(filePath):
+            return filePath
+    return None
+
+__overrides = {'rootpath' : __relativeRoot() }
+__cachedXml = None
+__commentLine = None
+
+
+def __xml():
+    global __cachedXml
+    if __cachedXml == None:
+        fileName = __overrides['rootpath'] + 'wavedev.cfg'
+        if os.path.exists(fileName):
+            __cachedXml = xml.dom.minidom.parse(fileName)
+    return __cachedXml
+
+
+def __keyFromXml(key):
+    result = None
+    xml = __xml()
+    if xml != None:
+        try:
+            result = str(xml.getElementsByTagName(key)[0].firstChild.data)
+        except:
+            # ignore it--the config file is missing the given setting
+            pass
+    return result
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/uuidgen.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/uuidgen.py	(revision 8114)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/uuidgen.py	(revision 8114)
@@ -0,0 +1,27 @@
+## Copyright 2008 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import commands
+# UUID Generator
+def uuidgen():
+    result = commands.getoutput('uuidgen -t')
+    # On some linux-like OSes, uuidgen does not take any parameter to specify
+    # the kind of uuid to generate
+    if (result.find('usage:') >= 0):
+        result = commands.getoutput('uuidgen')
+    return result
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/errorMsg.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/errorMsg.py	(revision 5886)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/errorMsg.py	(revision 5886)
@@ -0,0 +1,38 @@
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+
+def errorMsg(self,msg):
+    dlg = wx.MessageDialog(self,msg,'Error', wx.OK | wx.ICON_INFORMATION)
+    try:
+        dlg.ShowModal()
+    finally:
+        dlg.Destroy()
+    return
+
+def owdMsg(self,msg):
+    dlg = wx.MessageDialog(self, msg,
+          'OSSIE Waveform Developer', wx.YES_NO | wx.NO_DEFAULT | wx.ICON_INFORMATION)
+    try:
+        if dlg.ShowModal() == wx.ID_NO:
+            return False
+    finally:
+        dlg.Destroy()
+        
+    return True
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/xmlBeautify.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/xmlBeautify.py	(revision 8114)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/xmlBeautify.py	(revision 8114)
@@ -0,0 +1,72 @@
+#! /usr/bin/env python
+
+## Copyright 2005, 2006 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import os,sys,re,string
+import gzip
+
+def beautify(data,output=""):
+    store_stdout = sys.stdout
+    if len(output) > 0:
+        sys.stdout = open(output,'w')
+
+    myprint = sys.stdout.write
+
+    fields = re.split('(<.*?>)',data)
+    #remove any lone instances of '\n' or '\t' or pure whitespace strings
+    for x in fields:
+        if '\n' in x or '\t' in x or x=='' or x.isspace():
+            fields.remove(x)
+    level = 0
+    f = fields
+    for x in range(len(f)):
+        if string.strip(f[x])=='': continue
+        if f[x][0]=='<' and f[x][1] != '/' and f[x][1] != '!':
+            if f[x][1]!='?':
+                print ''
+            myprint(' '*(level*4) + f[x])
+            if f[x][-2:] != "/>" and f[x][:2] != "<?":
+                level = level + 1
+        elif f[x][:2]=='</':
+            level = level - 1
+            if x>0 and len(f[x-1]) > 0 and f[x-1][0] !='<' and f[x-1][0] != '\n':
+                print f[x],
+            else:
+                print ''
+                myprint(' '*(level*4) + f[x])
+        elif f[x][:2]=='<!':
+            print ''
+            print ' '*(level*4) + f[x],
+        else:
+            if x>0 and len(f[x-1]) > 0 and f[x-1][0] =='<':
+                myprint(f[x])
+            else:
+                print ' '*(level*4) + f[x],
+
+    if len(output) > 0:
+        print ''
+        sys.stdout = store_stdout
+
+if __name__ == "__main__":
+    fname = sys.argv[1]
+    if fname[-2:] == 'gz':
+        data = gzip.GzipFile(fname,'r').read()
+    else:
+        data = open(fname,'r').read()
+    beautify(data)
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/component_gen.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/component_gen.py	(revision 9974)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/component_gen.py	(revision 9974)
@@ -0,0 +1,318 @@
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import sys
+import commands
+import os, copy
+import shutil
+
+import xml.dom.minidom
+from xml.dom.minidom import Node
+
+import xmlBeautify
+import WaveDev.wavedev.uuidgen as uuidgen 
+
+
+
+xmlpath = u'/xml/'
+binpath = u'/bin/'
+
+
+commentLine = u'<!--Created with OSSIE WaveDev-->\n<!--Powered by Python-->\n'
+
+def gen_scd(comp, waveformDir, wavedevPath):
+    # Generate the componentfile entries
+    doc_scd = xml.dom.minidom.parse(wavedevPath + '/XML_gen/templates/_scd.xml.tpl')
+
+    int_types = {}
+
+    portsNode = doc_scd.getElementsByTagName("ports")[0]
+
+    # add provides ports to .scd.xml file
+    for p in comp.ports:
+      if p.type == "Provides":
+        # create node for <provides> tag
+        tmp_repid = u'IDL:' + unicode(p.interface.nameSpace) + u'/' + unicode(p.interface.name) + u':1.0'
+        providesPortNode = doc_scd.createElement("provides")
+        providesPortNode.setAttribute("repid", tmp_repid)
+        providesPortNode.setAttribute("providesname", unicode(p.name))
+
+        # create node for <porttype/> tag
+        portTypeNode = doc_scd.createElement("porttype")
+        portTypeNode.setAttribute("type", unicode(p.portType))
+        providesPortNode.appendChild(portTypeNode)
+
+        # append new provides port to <ports>
+        portsNode.appendChild(providesPortNode)
+
+        if p.interface.name not in int_types:
+            int_types[p.interface.name] = copy.deepcopy(p.interface)
+
+        del providesPortNode, portTypeNode
+
+    # add uses ports to .scd.xml file
+    for p in comp.ports:
+      if p.type == "Uses":
+        # create node for <uses> tag
+        tmp_repid = u'IDL:' + unicode(p.interface.nameSpace) + u'/' + unicode(p.interface.name) + u':1.0'
+        usesPortNode = doc_scd.createElement("uses")
+        usesPortNode.setAttribute("repid", tmp_repid)
+        usesPortNode.setAttribute("usesname", unicode(p.name))
+
+        # create node for <porttype/> tag
+        portTypeNode = doc_scd.createElement("porttype")
+        portTypeNode.setAttribute("type", unicode(p.portType))
+        usesPortNode.appendChild(portTypeNode)
+
+        # append new uses port to <ports>
+        portsNode.appendChild(usesPortNode)
+
+        if p.interface.name not in int_types:
+            int_types[p.interface.name] = copy.deepcopy(p.interface)
+
+        del usesPortNode, portTypeNode
+
+    # Add interfaces
+    interfacesRootNode = doc_scd.getElementsByTagName("softwarecomponent")[0].getElementsByTagName("interfaces")[0]
+    for i in int_types.values():
+        tmp_repid = u'IDL:' + unicode(i.nameSpace) + u'/' + unicode(i.name) + u':1.0'
+        interfaceNode = doc_scd.createElement("interface")
+        interfaceNode.setAttribute("repid", tmp_repid)
+        interfaceNode.setAttribute("name", unicode(i.name))
+        interfacesRootNode.appendChild(interfaceNode)
+    del interfacesRootNode
+
+    # Now do final processing and write to file
+    compDir = waveformDir + comp.name + '/'
+    outputFileName_scd = comp.name + '.scd.xml'
+
+    data = doc_scd.toxml('UTF-8')
+    xmlBeautify.beautify(data,compDir + '.' + outputFileName_scd + '.tmp')
+
+    preProcessed_scd = open(compDir + '.' + outputFileName_scd + '.tmp', 'r')
+    postProcessed_scd = open(compDir + outputFileName_scd, 'w')
+
+    # Specify external DTD
+    line0 = preProcessed_scd.readline()
+    remaining = preProcessed_scd.readlines()
+    postProcessed_scd.writelines(line0)
+    #postProcessed_scd.writelines(u'<!DOCTYPE softwarecomponent SYSTEM \"../../dtd/softwarecomponent.dtd\">\n')
+    postProcessed_scd.writelines(commentLine)
+    postProcessed_scd.writelines(remaining)
+    postProcessed_scd.close()
+
+    # Remove temporary files
+    os.remove(compDir + '.' + outputFileName_scd + '.tmp')
+    data = doc_scd.toxml('UTF-8')
+    xmlBeautify.beautify(data,compDir + '.' + outputFileName_scd + '.tmp')
+
+    preProcessed_scd = open(compDir + '.' + outputFileName_scd + '.tmp', 'r')
+    postProcessed_scd = open(compDir + outputFileName_scd, 'w')
+
+    # Specify external DTD
+    line0 = preProcessed_scd.readline()
+    remaining = preProcessed_scd.readlines()
+    postProcessed_scd.writelines(line0)
+    postProcessed_scd.writelines(u'<!DOCTYPE softwarecomponent SYSTEM \"../dtd/softwarecomponent.dtd\">\n')
+    postProcessed_scd.writelines(commentLine)
+    postProcessed_scd.writelines(remaining)
+    postProcessed_scd.close()
+
+
+    # Remove temporary files
+    os.remove(compDir + '.' + outputFileName_scd + '.tmp')
+
+
+
+def gen_spd(comp, waveformDir, wavedevPath, isPyComp=False):
+    componentName = unicode(comp.name)
+    componentDescr = unicode(comp.description)
+
+    doc_spd = xml.dom.minidom.parse(wavedevPath + '/XML_gen/templates/_spd.xml.tpl')
+
+    #doc_spd.softpkg.name = u'ossie' + componentName + u'Resource'
+    softpkgNode = doc_spd.getElementsByTagName("softpkg")[0]
+    softpkgNode.setAttribute("name",componentName)
+    softpkgNode.setAttribute("id", u'DCE:' + unicode(uuidgen.uuidgen()) )
+
+    # set the general resource description
+    # note: this is NOT the description of the implementation
+    for tmpNode in softpkgNode.childNodes:
+        if tmpNode.nodeName == "description":
+            tmpTextNode = doc_spd.createTextNode(componentDescr)
+            tmpNode.appendChild(tmpTextNode)
+            break
+
+    # set the property file path
+    propertyfilePathNode = softpkgNode.getElementsByTagName("propertyfile")[0].getElementsByTagName("localfile")[0]
+    propertyfilePathNode.setAttribute("name", xmlpath + componentName  + '/' + componentName + u'.prf.xml')
+
+    # set the descriptor file path
+    descriptorPathNode = softpkgNode.getElementsByTagName("descriptor")[0].getElementsByTagName("localfile")[0]
+    descriptorPathNode.setAttribute("name", xmlpath + componentName + '/' + componentName + u'.scd.xml')
+
+    # set the implementation id
+    # NOTE: this supports only one implementation
+    implementationNode = softpkgNode.getElementsByTagName("implementation")[0]
+    implementationNode.setAttribute("id", u'DCE:' + unicode(uuidgen.uuidgen()) )
+    if (isPyComp):
+        #print "Gen spd fiel for python component " + componentName
+        componentName = componentName + "/" + componentName + ".py"
+    implementationNode.getElementsByTagName("code")[0].getElementsByTagName("localfile")[0].setAttribute( \
+        "name", binpath + componentName)
+
+    # Now do final processing and write to file
+    compDir = waveformDir + comp.name + '/'
+    outputFileName_spd = comp.name + '.spd.xml'
+    #outputFileName_spd = comp.name + 'Resource' + '.spd.xml'
+
+    data = doc_spd.toxml('UTF-8')
+    xmlBeautify.beautify(data,compDir + '.' + outputFileName_spd + '.tmp')
+    data = doc_spd.toxml('UTF-8')
+    xmlBeautify.beautify(data,compDir + '.' + outputFileName_spd + '.tmp')
+
+
+    preProcessed_spd = open(compDir + '.' + outputFileName_spd + '.tmp', 'r')
+    postProcessed_spd = open(compDir + outputFileName_spd, 'w')
+
+    # Specify external DTD
+    line0 = preProcessed_spd.readline()
+    remaining = preProcessed_spd.readlines()
+    postProcessed_spd.writelines(line0)
+    postProcessed_spd.writelines(u'<!DOCTYPE softpkg SYSTEM \"../dtd/softpkg.dtd\">\n')
+    postProcessed_spd.writelines(commentLine)
+    postProcessed_spd.writelines(remaining)
+    postProcessed_spd.close()
+
+    # Remove temporary files
+    os.remove(compDir + '.' + outputFileName_spd + '.tmp')
+
+
+def gen_prf(comp, waveformDir, wavedevPath):
+    componentName = unicode(comp.name)
+    doc_prf = xml.dom.minidom.parse(wavedevPath + '/XML_gen/templates/_prf.xml.tpl')
+
+    propertiesNode = doc_prf.getElementsByTagName("properties")[0]
+
+    for p in comp.properties:
+        if p.elementType == "Simple":
+            e = doc_prf.createElement("simple")
+
+            # Add the property value
+            valueNode = doc_prf.createElement("value")
+            valueText = doc_prf.createTextNode(unicode(p.value))
+            valueNode.appendChild(valueText)
+
+            e.appendChild(valueNode)
+
+        elif p.elementType == "SimpleSequence":
+            e = doc_prf.createElement("simplesequence")
+
+            # Add the property values
+            valuesNode = doc_prf.createElement("values")
+            for x in p.values:
+                valueNode = doc_prf.createElement("value")
+                valueText = doc_prf.createTextNode(x[0])
+                valueNode.appendChild(valueText)
+                valuesNode.appendChild(valueNode)
+
+            e.appendChild(valuesNode)
+
+        e.setAttribute("type", unicode(p.type))
+        e.setAttribute("id", unicode(p.id))
+        e.setAttribute("name", unicode(p.name))
+        e.setAttribute("mode", unicode(p.mode))
+
+        # Add the property description
+        descriptionNode = doc_prf.createElement("description")
+        descriptionText = doc_prf.createTextNode(unicode(p.description))
+        descriptionNode.appendChild(descriptionText)
+        e.appendChild(descriptionNode)
+
+        # Add the property kind
+        kindNode = doc_prf.createElement("kind")
+        kindNode.setAttribute("kindtype", unicode(p.kind))
+        e.appendChild(kindNode)
+
+        propertiesNode.appendChild(e)
+
+    # Create a simplesequence of string type that lists each Provides port in the component
+    # Used for connecting to components from outside the framework (ex. control gui)
+    providesFlag = False
+    for p in comp.ports:
+        if p.type == "Provides":
+            providesFlag = True
+    if providesFlag:
+        e = doc_prf.createElement("simplesequence")
+        e.setAttribute("name", "port_list")
+        e.setAttribute("id", "port_list")
+        e.setAttribute("type", "string")
+        e.setAttribute("mode", "readonly")
+
+        # create description
+        ts = 'Returns a sequence of strings with the names of the available Provides ports'
+        descriptionNode = doc_prf.createElement("description")
+        descriptionText = doc_prf.createTextNode(unicode(ts))
+        descriptionNode.appendChild(descriptionText)
+        e.appendChild(descriptionNode)
+
+        # create kind
+        kindNode = doc_prf.createElement("kind")
+        kindNode.setAttribute("kindtype","configure")
+        e.appendChild(kindNode)
+
+        valuesNode = doc_prf.createElement("values")
+        for p in comp.ports:
+            if p.type == "Uses":
+                continue
+            ts = p.name + "::" + p.interface.nameSpace + "." + p.interface.name
+            valueNode = doc_prf.createElement("value")
+            valueText = doc_prf.createTextNode(unicode(ts))
+            valueNode.appendChild(valueText)
+            valuesNode.appendChild(valueNode)
+
+        e.appendChild(valuesNode)
+
+        propertiesNode.appendChild(e)
+
+    # Now do final processing and write to file
+    compDir = waveformDir + comp.name + '/'
+    outputFileName_prf = comp.name + '.prf.xml'
+    #outputFileName_prf = comp.name + 'Resource' + '.prf.xml'
+
+    data = doc_prf.toxml('UTF-8')
+    xmlBeautify.beautify(data,compDir + '.' + outputFileName_prf + '.tmp')
+    data = doc_prf.toxml('UTF-8')
+    xmlBeautify.beautify(data,compDir + '.' + outputFileName_prf + '.tmp')
+
+    preProcessed_prf = open(compDir + '.' + outputFileName_prf + '.tmp', 'r')
+    postProcessed_prf = open(compDir + outputFileName_prf, 'w')
+
+
+    # Specify external DTD
+    line0 = preProcessed_prf.readline()
+    remaining = preProcessed_prf.readlines()
+    postProcessed_prf.writelines(line0)
+    postProcessed_prf.writelines(u'<!DOCTYPE properties SYSTEM \"../dtd/properties.dtd\">\n')
+    postProcessed_prf.writelines(commentLine)
+    postProcessed_prf.writelines(remaining)
+    postProcessed_prf.close()
+
+
+    # Remove temporary files
+    os.remove(compDir + '.' + outputFileName_prf + '.tmp')
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/application_gen.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/application_gen.py	(revision 10363)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/application_gen.py	(revision 10363)
@@ -0,0 +1,573 @@
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import sys
+import commands
+import os
+import shutil
+import component_gen
+import xml.dom.minidom
+from xml.dom.minidom import Node
+import xmlBeautify
+import WaveDev.wavedev.ComponentClass as CC
+import WaveDev.wavedev.uuidgen as uuidgen
+
+
+
+
+commentLine = u'<!-- Created with OSSIE WaveDev-->\n<!--Powered by Python-->\n'
+
+xmlpath = u'/xml/'
+#######################################################################
+# genxml generates xml profiles for each component and the waveform
+#######################################################################
+def genxml(complist, genPath, wavedevPath, waveName):
+    if genPath[len(genPath)-1] != '/':
+        genPath = genPath + '/'
+    genPath = unicode(genPath)
+    if len(wavedevPath) > 0 and wavedevPath[len(wavedevPath)-1] != '/':
+        wavedevPath = wavedevPath + '/'
+    waveformDir = unicode(genPath + waveName + '/')
+
+
+    appName = unicode(waveName)
+    #namingServicePrefix = u'ossie'
+    outputFilename_sad = appName + u'.sad.xml'
+
+    # Generate the individual component xml files
+    for n in complist:
+        if n.generate:
+            component_gen.gen_scd(n, genPath, wavedevPath)
+            component_gen.gen_spd(n, genPath, wavedevPath)
+            component_gen.gen_prf(n, genPath, wavedevPath)
+
+    #----------------------------------------------------------------------------
+    # SAD Parser / Generator
+    #
+
+    # Use the minidom module to objectify and generate the SAD file
+    try:  #if running from wavedev
+        doc_sad = xml.dom.minidom.parse(wavedevPath + '/XML_gen/templates/_sad.xml.tpl')
+    except:   #if not being called from wavedev, try looking for the file
+        #doc_sad = xml.dom.minidom.parse('/sdr/tools/WaveDev/wavedev/XML_gen/_sad.xml.tpl')
+        templates = __import__('WaveDev').__file__
+        if os.path.islink (templates):
+            templates = os.path.realpath (templates)
+        templates = os.path.dirname (os.path.abspath (templates)) + '/wavedev/XML_gen/templates'
+        doc_sad = xml.dom.minidom.parse(templates + '/_sad.xml.tpl')
+
+    doc_sad.getElementsByTagName("softwareassembly")[0].setAttribute("name", u'OSSIE::' + appName )
+    doc_sad.getElementsByTagName("softwareassembly")[0].setAttribute("id", u'DCE:' + unicode(uuidgen.uuidgen()) )
+
+    # get root nodes for componentfiles, partitioning, assemblycontroller, and connections tags
+    componentfilesNode = doc_sad.getElementsByTagName("componentfiles")[0]
+    partitioningNode = doc_sad.getElementsByTagName("partitioning")[0]
+    assemblycontrollerNode = doc_sad.getElementsByTagName("assemblycontroller")[0]
+    connectionsNode = doc_sad.getElementsByTagName("connections")[0]
+
+    baseComponentList = []
+    for n in complist:
+        # Generate the componentfile entries
+        #tmpid = unicode(n.name) + u'_' + unicode(uuidgen.uuidgen())
+        tmpid = unicode(n.baseName) + u'_' + unicode(n.file_uuid)
+
+        if n.baseName not in baseComponentList:
+            baseComponentList.append(n.baseName)
+
+            # create component file tag node
+            componentfileNode = doc_sad.createElement("componentfile")
+            componentfileNode.setAttribute("type", "SPD")
+            componentfileNode.setAttribute("id", tmpid)
+
+            # create localfile tag node
+            localfileNode = doc_sad.createElement("localfile")
+            localfileNode.setAttribute("name", unicode(xmlpath + n.baseName + '/' + n.xmlName + '.spd.xml') )
+
+            # append nodes to .sad.xml file
+            componentfileNode.appendChild(localfileNode)
+            componentfilesNode.appendChild(componentfileNode)
+
+        # Generate the partitioning elements
+        componentplacementNode = doc_sad.createElement("componentplacement")
+        componentfilerefNode = doc_sad.createElement("componentfileref")
+        componentinstantiationNode = doc_sad.createElement("componentinstantiation")
+        usagenameNode = doc_sad.createElement("usagename")
+        usagenameTextNode = doc_sad.createTextNode(unicode(n.name))
+        usagenameNode.appendChild(usagenameTextNode)
+        findcomponentNode = doc_sad.createElement("findcomponent")
+
+        # Set attributes appropriately
+        componentfilerefNode.setAttribute("refid", tmpid)
+        n.instanceUUID = uuidgen.uuidgen()
+        componentinstantiationNode.setAttribute("id", u'DCE:' + unicode(n.instanceUUID))
+
+        # Check for overloaded properties
+        overload_flag = False
+        for tmp_prop in n.properties:
+            if tmp_prop.elementType == "Simple":
+                if tmp_prop.value != tmp_prop.defaultValue:
+                    overload_flag = True
+            if tmp_prop.elementType == "SimpleSequence":
+                try:
+                    if tmp_prop.values != tmp_prop.defaultValues:
+                        overload_flag = True
+                except:
+                    pass
+
+        if overload_flag:
+            componentpropertiesNode = doc_sad.createElement("componentproperties")
+            for tmp_prop in n.properties:
+                if tmp_prop.elementType == "Simple":
+                    if tmp_prop.value != tmp_prop.defaultValue:
+                        simplerefNode = doc_sad.createElement("simpleref")
+                        simplerefNode.setAttribute("refid", unicode(tmp_prop.id))
+                        simplerefNode.setAttribute("name", unicode(tmp_prop.name) )
+                        simplerefNode.setAttribute("description", unicode(tmp_prop.description))
+                        simplerefNode.setAttribute("value", unicode(tmp_prop.value))
+                        componentpropertiesNode.appendChild(simplerefNode)
+
+                if tmp_prop.elementType == "SimpleSequence":
+                    ssflag = False
+                    try:
+                        if tmp_prop.values != tmp_prop.defaultValues:
+                            ssflag = True
+                    except:
+                        pass
+
+                    if ssflag:
+                        simplesequencerefNode = doc_sad.createElement("simplesequenceref")
+                        simplesequencerefNode.setAttribute("refid", unicode(tmp_prop.id) )
+                        simplesequencerefNode.setAttribute("name", unicode(tmp_prop.name) )
+                        simplesequencerefNode.setAttribute("description", unicode(tmp_prop.description) )
+                        valuesNode = doc_sad.createElement("values")
+
+                        for tmp_v2 in tmp_prop.values:
+                            valueNode = doc_sad.createElement("value")
+                            valuetextNode = doc_sad.createTextNode(tmp_v2)
+                            valueNode.appendChild(valuetextNode)
+                            valuesNode.appendChild(valueNode)
+
+                        simplesequencerefNode.appendChild(valuesNode)
+                        componentpropertiesNode.appendChild(simplesequencerefNode)
+
+            # if there are overloaded properties, add to .sad.xml file
+            componentinstantiationNode.appendChild(componentpropertiesNode)
+
+
+        #NSname = u'DomainName1/' + namingServicePrefix + unicode(n.name) + u'Resource'
+#        NSname = u'DomainName1/' + unicode(n.name)
+        NSname = unicode(n.name)
+
+        namingserviceNode = doc_sad.createElement("namingservice")
+        namingserviceNode.setAttribute("name", NSname)
+        findcomponentNode.appendChild(namingserviceNode)
+
+        #TODO: append child nodes to componentplacement
+        componentinstantiationNode.appendChild(usagenameNode)
+        componentinstantiationNode.appendChild(findcomponentNode)
+        componentplacementNode.appendChild(componentfilerefNode)
+        componentplacementNode.appendChild(componentinstantiationNode)
+
+        partitioningNode.appendChild(componentplacementNode)
+
+        # Generate the connections entries
+        for i in n.connections:
+            cname = unicode(n.name)
+            devFlag = False
+
+#            print "Processing connection : "
+#            print "  component name  : " + cname
+#            print "  local comp type : " + n.type
+#            print "  local port type : " + i.localPort.type
+#            print "  local port name : " + unicode(i.localPort.name)
+#            print "  remote comp type: " + i.remoteComp.type
+#            print "  remote port type: " + i.remotePort.type
+#            print "  remote port name: " + unicode(i.remotePort.name)
+
+            if i.localPort.type == 'Uses':
+                uname = unicode(i.localPort.name)
+                pname = unicode(i.remotePort.name)
+#                c1name = u'DomainName1/' + cname
+#                c2name = u'DomainName1/' + unicode(i.remoteComp.name)
+                c1name = cname
+                c2name = unicode(i.remoteComp.name)
+                if i.remoteComp.type.lower() == "device" \
+                or i.remoteComp.type.lower() == "executabledevice" \
+                or i.remoteComp.type.lower() == "aggregatedevice":
+                    dev_pname = u'DomainName1/' + pname
+                    devFlag = True
+            else:
+                pname = unicode(i.localPort.name)
+                uname = unicode(i.remotePort.name)
+ #               c2name = u'DomainName1/' + cname
+ #               c1name = u'DomainName1/' + unicode(i.remoteComp.name)
+                c2name = cname
+                c1name = unicode(i.remoteComp.name)
+                if n.type.lower() == "device" \
+                or n.type.lower() == "executabledevice" \
+                or n.type.lower() == "aggregatedevice":
+                    dev_pname = u'DomainName1/' + pname
+                    devFlag = True
+
+            connectinterfaceNode = doc_sad.createElement("connectinterface")
+            connectinterfaceNode.setAttribute("id",u'DCE:' + unicode(uuidgen.uuidgen()))
+
+            usesportNode = doc_sad.createElement("usesport")
+            usesidentifierNode = doc_sad.createElement("usesidentifier")
+            usesidentifierTextNode = doc_sad.createTextNode(uname)
+            findbyUsesNode = doc_sad.createElement("findby")
+            namingserviceUsesNode = doc_sad.createElement("namingservice")
+            # TODO: this is a dirty hack that needs to be fixed!
+            if c1name == "USRP1":
+                c1name = "DomainName1/USRP1"
+            namingserviceUsesNode.setAttribute("name", c1name)
+
+            # Append child nodes
+            usesidentifierNode.appendChild(usesidentifierTextNode)
+            findbyUsesNode.appendChild(namingserviceUsesNode)
+            usesportNode.appendChild(usesidentifierNode)
+            usesportNode.appendChild(findbyUsesNode)
+
+            if devFlag != True:
+                providesportNode = doc_sad.createElement("providesport")
+                providesidentifierNode = doc_sad.createElement("providesidentifier")
+                providesidentifierTextNode = doc_sad.createTextNode(pname)
+                findbyProvidesNode = doc_sad.createElement("findby")
+                namingserviceProvidesNode = doc_sad.createElement("namingservice")
+                namingserviceProvidesNode.setAttribute("name", c2name)
+
+                # Make connections
+                providesidentifierNode.appendChild(providesidentifierTextNode)
+                findbyProvidesNode.appendChild(namingserviceProvidesNode)
+                providesportNode.appendChild(providesidentifierNode)
+                providesportNode.appendChild(findbyProvidesNode)
+                connectinterfaceNode.appendChild(providesportNode)
+                connectinterfaceNode.appendChild(usesportNode)
+
+            else:
+                findbyProvidesNode = doc_sad.createElement("findby")
+                namingserviceProvidesNode = doc_sad.createElement("namingservice")
+                namingserviceProvidesNode.setAttribute("name", dev_pname)
+
+                # Make connections
+                # TODO: validate this XML
+                findbyProvidesNode.appendChild(namingserviceProvidesNode)
+                connectinterfaceNode.appendChild(findbyProvidesNode)
+                connectinterfaceNode.appendChild(usesportNode)
+
+            # Append connectinterface to connections
+            connectionsNode.appendChild(connectinterfaceNode)
+
+        # Specify the uuid for the Assembly Controller
+        if n.AssemblyController == True:
+            assemblycontroller_id = u'DCE:' + unicode(n.instanceUUID)
+            assemblycontrollerNode.getElementsByTagName("componentinstantiationref")[0].setAttribute("refid", assemblycontroller_id)
+
+    # Create and beautify the SAD file as a temporary file
+    data = doc_sad.toxml('UTF-8')
+    xmlBeautify.beautify(data,waveformDir + '.' + outputFilename_sad + '.tmp')
+
+    # Post Processing - add some of the header lines
+
+
+    preProcessed_sad = open(waveformDir + '.' + outputFilename_sad + '.tmp', 'r')
+    postProcessed_sad = open(waveformDir + outputFilename_sad, 'w')
+
+    # Specify external DTD
+    line0 = preProcessed_sad.readline()
+    remaining = preProcessed_sad.readlines()
+    postProcessed_sad.writelines(line0)
+    postProcessed_sad.writelines(u'<!DOCTYPE softwareassembly SYSTEM \"../../xml/dtd/softwareassembly.dtd\">\n')
+    postProcessed_sad.writelines(commentLine)
+    postProcessed_sad.writelines(remaining)
+    postProcessed_sad.close()
+
+    # Remove temporary files
+    os.remove(waveformDir + '.' + outputFilename_sad + '.tmp')
+
+
+    #######################
+    #Generate the DCD file
+    #######################
+    #genDCD(complist,genPath,waveName,xmlpath)
+
+################################################################################
+# Generate the Device Assignment Sequence
+def genDAS(complist, path, wavedevPath, waveName):
+    if path[len(path)-1] != '/':
+        path = path + '/'
+    path += waveName + '/'
+
+    try:
+        # try to find the DAS template using a relative path (being called by OWD)
+        das = xml.dom.minidom.parse(wavedevPath + 'XML_gen/templates/_DAS.xml.tpl')
+    except:
+        # try to find the DAS template using an absolute path
+        # (being called by other application)
+        # if DAS file is still not found, should throw an IO Error
+        #das = xml.dom.minidom.parse('/sdr/tools/WaveDev/wavedev/XML_gen/_DAS.xml.tpl')
+        templates = __import__('WaveDev').__file__
+        if os.path.islink (templates):
+            templates = os.path.realpath (templates)
+        templates = os.path.dirname (os.path.abspath (templates)) + '/wavedev/XML_gen/templates'
+        das = xml.dom.minidom.parse(templates + '/_DAS.xml.tpl')
+
+    deviceassignmentsequenceNode = das.getElementsByTagName("deviceassignmentsequence")[0]
+
+    for n in complist:
+        if n.instanceUUID[0:4] == "DCE:":
+            tmpName = unicode(n.instanceUUID)
+        else:
+            tmpName = u'DCE:' + unicode(n.instanceUUID)
+        #tmpDev = u'DCE:b35dcdfa-a858-4b33-94b5-5feb007dd15c'
+        if n.device == None:
+            continue
+        tmpDev = u'DCE:' + unicode(n.device.uuid)
+
+        deviceassignmenttypeNode = das.createElement("deviceassignmenttype")
+        componentidNode = das.createElement("componentid")
+        componentidTextNode = das.createTextNode(tmpName)
+        assigndeviceidNode = das.createElement("assigndeviceid")
+        assigndeviceidTextNode = das.createTextNode(tmpDev)
+
+        # Append nodes
+        componentidNode.appendChild(componentidTextNode)
+        assigndeviceidNode.appendChild(assigndeviceidTextNode)
+        deviceassignmenttypeNode.appendChild(componentidNode)
+        deviceassignmenttypeNode.appendChild(assigndeviceidNode)
+        deviceassignmentsequenceNode.appendChild(deviceassignmenttypeNode)
+
+    data = das.toxml('UTF-8')
+    xmlBeautify.beautify(data,path+'.'+waveName+'_DAS.xml.tmp')
+
+
+
+    # Post Processing - add some of the header lines
+
+    preProcessed_das = open(path+'.'+waveName+'_DAS.xml.tmp', 'r')
+    postProcessed_das = open(path+waveName+'_DAS.xml', 'w')
+
+    # Specify external DTD
+    line0 = preProcessed_das.readline()
+    remaining = preProcessed_das.readlines()
+    postProcessed_das.writelines(line0)
+    postProcessed_das.writelines(u'<!DOCTYPE deploymentenforcement SYSTEM "dtd/deploymentenforcement.dtd\">\n')
+    postProcessed_das.writelines(commentLine)
+    postProcessed_das.writelines(remaining)
+    postProcessed_das.close()
+
+    # Remove temporary files
+    os.remove(path+'.'+waveName+'_DAS.xml.tmp')
+
+
+################################################################################
+# Generate the DeviceManager XML files
+def genDeviceManager(node, path, wavedevPath, wavName, dmName, folder = False):
+    if path[len(path)-1] != '/':
+        path = path + '/'
+    path += wavName + '/'
+
+    waveformDir = path
+    if folder == True:
+        if os.path.exists(path + node.name) == False:
+            os.mkdir(path + node.name)
+        path += node.name + '/'
+
+    #Generate the DCD file for the Device Manager
+    genDCD(node.Devices, path, wavedevPath, node.name, dmName, folder, node.generate, node.id)
+
+    outputFilename_spd = dmName + '.spd.xml'
+    outputFilename_scd = dmName + '.scd.xml'
+    outputFilename_prf = dmName + '.prf.xml'
+
+    #Copy and modify the spd file
+    doc_spd = xml.dom.minidom.parse(wavedevPath + 'XML_gen/DevMan/_spd.xml.tpl')
+    doc_spd.getElementsByTagName("softpkg")[0].setAttribute("name", dmName)
+    localfileNode = doc_spd.getElementsByTagName("descriptor")[0].getElementsByTagName("localfile")[0]
+    localfileNode.setAttribute("name", unicode(dmName) + u'.scd.xml')
+
+    data = doc_spd.toxml('UTF-8')
+    xmlBeautify.beautify(data,path + '.' + outputFilename_spd + '.tmp')
+    data = doc_spd.toxml('UTF-8')
+    xmlBeautify.beautify(data,path + '.' + outputFilename_spd + '.tmp')
+
+
+    # Post Processing - add some of the header lines
+
+    preProcessed_spd = open(path + '.' + outputFilename_spd + '.tmp', 'r')
+    postProcessed_spd = open(path + outputFilename_spd, 'w')
+
+    # Specify external DTD
+    line0 = preProcessed_spd.readline()
+    remaining = preProcessed_spd.readlines()
+    postProcessed_spd.writelines(line0)
+    postProcessed_spd.writelines(u'<!DOCTYPE softpkg SYSTEM \"../../xml/dtd/softpkg.dtd\">\n')
+    postProcessed_spd.writelines(commentLine)
+    postProcessed_spd.writelines(remaining)
+    postProcessed_spd.close()
+
+    #tempDM = CC.Component(dmName,generate=False)
+    #component_gen.gen_scd(tempDM,waveformDir,node.name)
+
+
+    # Post Processing - add some of the header lines
+    preProcessed_spd = open(path + '.' + outputFilename_spd + '.tmp', 'r')
+    postProcessed_spd = open(path + outputFilename_spd, 'w')
+
+    # Specify external DTD
+    line0 = preProcessed_spd.readline()
+    remaining = preProcessed_spd.readlines()
+    postProcessed_spd.writelines(line0)
+    postProcessed_spd.writelines(u'<!DOCTYPE softpkg SYSTEM \"../../xml/dtd/softpkg.dtd\">\n')
+    postProcessed_spd.writelines(commentLine)
+    postProcessed_spd.writelines(remaining)
+    postProcessed_spd.close()
+
+    # Remove temporary files
+    os.remove(path + '.' + outputFilename_spd + '.tmp')
+
+    #tempDM = CC.Component(dmName,generate=False)
+    #component_gen.gen_scd(tempDM,waveformDir,node.name)
+
+
+    # Copy the scd and prf files to directory - these aren't changed yet
+    print "Performing a copy to: " + path + outputFilename_scd
+    shutil.copyfile(wavedevPath + 'XML_gen/DevMan/_scd.xml.tpl', path + outputFilename_scd)
+    shutil.copyfile(wavedevPath + 'XML_gen/DevMan/_prf.xml.tpl', path + outputFilename_prf)
+
+
+
+################################################################################
+# Generate the DeviceManager DCD.xml file
+def genDCD(devlist, path, wavedevPath, nodeName, dmName = 'DeviceManager', folder = False, generate = True, devconf = ""):
+
+    outputFilename_dcd = dmName + '.dcd.xml'
+
+    doc_dcd = xml.dom.minidom.parse(wavedevPath + 'XML_gen/templates/_dcd.xml.tpl')
+
+    deviceconfigurationNode = doc_dcd.getElementsByTagName("deviceconfiguration")[0]
+
+    if devconf=="":
+        deviceconfigurationNode.setAttribute("id", u'DCE:' + unicode(uuidgen.uuidgen()))
+    else:
+        deviceconfigurationNode.setAttribute("id", unicode(devconf) )
+
+    deviceconfigurationNode.setAttribute("name", unicode(dmName + "_" + nodeName) )
+
+    devicemanagersoftpkgNode = deviceconfigurationNode.getElementsByTagName("devicemanagersoftpkg")[0]
+    devicemanagersoftpkgNode.getElementsByTagName("localfile")[0].setAttribute("name", unicode('/nodes/'+nodeName+'/'+dmName+'.spd.xml'))
+
+    baseDeviceList = []
+    componentfilesNode = deviceconfigurationNode.getElementsByTagName("componentfiles")[0]
+    partitioningNode = deviceconfigurationNode.getElementsByTagName("partitioning")[0]
+    for n in devlist:
+        if generate:
+            tmpid = unicode(n.name) + u'_' + unicode(n.file_uuid)
+        else:
+            tmpid = unicode(n.file_uuid)
+
+        if n.baseName not in baseDeviceList:
+        # Generate the componentfile entries
+            baseDeviceList.append(n.baseName)
+            componentfileNode = doc_dcd.createElement("componentfile")
+            componentfileNode.setAttribute("type", "SPD")
+            componentfileNode.setAttribute("id", tmpid)
+
+            localcomponentfileNode = doc_dcd.createElement("localfile")
+            localcomponentfileNode.setAttribute("name", unicode(xmlpath + n.baseName + '/' + n.baseName + '.spd.xml') )
+
+            componentfileNode.appendChild(localcomponentfileNode)
+            componentfilesNode.appendChild(componentfileNode)
+
+        # Generate the partitioning entries
+        componentplacementNode = doc_dcd.createElement("componentplacement")
+        componentfilerefNode = doc_dcd.createElement("componentfileref")
+        componentfilerefNode.setAttribute("refid", tmpid)
+        componentinstantiationNode = doc_dcd.createElement("componentinstantiation")
+        componentinstantiationNode.setAttribute("id", u'DCE:' + unicode(n.uuid) )
+        usagenameNode = doc_dcd.createElement("usagename")
+        usagenameTextNode = doc_dcd.createTextNode(n.name)
+
+        # Append nodes to partitioning
+        usagenameNode.appendChild(usagenameTextNode)
+        componentinstantiationNode.appendChild(usagenameNode)
+        componentplacementNode.appendChild(componentfilerefNode)
+        componentplacementNode.appendChild(componentinstantiationNode)
+        partitioningNode.appendChild(componentplacementNode)
+
+    # Create and beautify the dcd file as a temporary file
+    data = doc_dcd.toxml('UTF-8')
+    xmlBeautify.beautify(data,path + '.' + outputFilename_dcd + '.tmp')
+    # Create and beautify the dcd file as a temporary file
+    data = doc_dcd.toxml('UTF-8')
+    xmlBeautify.beautify(data,path + '.' + outputFilename_dcd + '.tmp')
+
+    # Post Processing - add some of the header lines
+
+    preProcessed_dcd = open(path + '.' + outputFilename_dcd + '.tmp', 'r')
+    postProcessed_dcd = open(path + outputFilename_dcd, 'w')
+
+    # Specify external DTD
+    line0 = preProcessed_dcd.readline()
+    remaining = preProcessed_dcd.readlines()
+    postProcessed_dcd.writelines(line0)
+    postProcessed_dcd.writelines(u'<!DOCTYPE deviceconfiguration SYSTEM \"../../xml/dtd/deviceconfiguration.dtd\">\n')
+    postProcessed_dcd.writelines(commentLine)
+    postProcessed_dcd.writelines(remaining)
+    postProcessed_dcd.close()
+
+    # Remove temporary files
+    os.remove(path + '.' + outputFilename_dcd + '.tmp')
+
+
+
+def writeWaveSetuppy(wavePath, wavedevPath, waveName):
+    '''
+    ##############################################################################
+    ## writeWaveSetuppy - generates the setup.py file for a waveform
+    ##############################################################################
+    '''
+
+    if wavePath[len(wavePath)-1] != '/':
+        wavePath = wavePath + '/' + waveName
+
+    #copy over the readme file
+    shutil.copy(wavedevPath + 'XML_gen/README', wavePath)
+
+    output = open(wavePath + '/setup.py','w')
+    ts = "\
+#! /usr/bin/env python\n\
+\n\
+from distutils.core import setup\n\
+import sys\n\
+\n\
+install_location = '/sdr'\n\
+\n\
+if len(sys.argv) != 2:\n\
+        sys.exit(1)\n\
+\n\
+sys.argv.append('--install-lib='+install_location)\n\n"
+    output.writelines(ts)
+
+    ts = "setup(name='" + waveName + "', description='" + waveName + \
+         "',data_files=[(install_location+'/waveforms/" + waveName + "',['" + \
+         waveName + ".sad.xml', '" + waveName + "_DAS.xml'])])"
+    output.writelines(ts)
+
+    output.close()   #done creating the file
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/__init__.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/__init__.py	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/__init__.py	(revision 4961)
@@ -0,0 +1,1 @@
+pass
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/Makefile.am	(revision 9483)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/Makefile.am	(revision 9483)
@@ -0,0 +1,10 @@
+SUBDIRS = DevMan \
+	  templates \
+	  dtd
+
+EXTRA_DIST = application_gen.py \
+	     component_gen.py \
+	     xmlBeautify.py \
+	     README \
+	     __init__.py
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/DevMan/_spd.xml.tpl
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/DevMan/_spd.xml.tpl	(revision 9644)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/DevMan/_spd.xml.tpl	(revision 9644)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<softpkg id="DCE:82f6515a-de05-47f0-8e7a-1c9f621c00ee" name="DeviceManager">
+    <author>
+        <name>OSSIE</name>
+        <company>Wireless@VT</company>
+        <webpage>http://ossie.wireless.vt.edu</webpage>
+    </author>
+	<descriptor>
+		<localfile name="DeviceManager.scd.xml"/>
+	</descriptor>
+	<implementation id="DCE:d3e8aba5-4421-45c5-9be6-372b763883e7">
+		<description>implementation of a Device Manager</description>
+		<code type="Executable">
+			<localfile name="/domainmanager.exe"/>
+			<entrypoint>domainmanager.exe</entrypoint>
+		</code>
+		<processor name="x86"/>
+        <os name="Linux" version="2.6.26.3"/>
+	</implementation>
+</softpkg>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/DevMan/_prf.xml.tpl
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/DevMan/_prf.xml.tpl	(revision 1132)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/DevMan/_prf.xml.tpl	(revision 1132)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE properties SYSTEM "../../xml/dtd/properties.dtd">
+<properties>
+	<description>These are the properties to configure the device manager</description>
+</properties>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/DevMan/_scd.xml.tpl
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/DevMan/_scd.xml.tpl	(revision 1132)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/DevMan/_scd.xml.tpl	(revision 1132)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE softwarecomponent SYSTEM "../../xml/dtd/softwarecomponent.dtd">
+<softwarecomponent>
+	<corbaversion>2.2</corbaversion>
+	<componentrepid repid="IDL:CF/DeviceManager:1.0"/>
+	<componenttype>devicemanager</componenttype>
+	<componentfeatures>
+		<supportsinterface repid="IDL:CF/DeviceManager:1.0" supportsname="DeviceManager"/>
+		<supportsinterface repid="IDL:CF/PropertySet:1.0" supportsname="PropertySet"/>
+	</componentfeatures>
+	<interfaces>
+		<interface repid="IDL:CF/DeviceManager:1.0" name="DeviceManager">
+			<inheritsinterface repid="IDL:CF/PropertySet:1.0"/>
+		</interface>
+		<interface repid="IDL:CF/PropertySet:1.0" name="PropertySet"/>
+	</interfaces>
+</softwarecomponent>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/DevMan/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/DevMan/Makefile.am	(revision 9483)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/DevMan/Makefile.am	(revision 9483)
@@ -0,0 +1,2 @@
+EXTRA_DIST = _prf.xml.tpl _scd.xml.tpl _spd.xml.tpl
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/deviceconfiguration.dtd
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/deviceconfiguration.dtd	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/deviceconfiguration.dtd	(revision 4961)
@@ -0,0 +1,202 @@
+<!ELEMENT deviceconfiguration
+	( description?
+	, devicemanagersoftpkg
+	, componentfiles?
+	, partitioning?
+	, domainmanager
+	, connections?
+	, filesystemnames?
+	)>
+<!ATTLIST deviceconfiguration
+	id		ID	#REQUIRED
+	name		CDATA	#IMPLIED>
+
+<!ELEMENT description (#PCDATA)>
+
+<!ELEMENT devicemanagersoftpkg
+	( localfile
+	)>
+
+<!ELEMENT componentfiles 
+	( componentfile+
+	)>
+
+<!ELEMENT componentfile
+	( localfile 
+	)>
+<!ATTLIST componentfile
+	id 		ID	#REQUIRED
+	type		CDATA	#IMPLIED>
+
+<!ELEMENT localfile EMPTY>
+<!ATTLIST localfile
+	name		CDATA	#REQUIRED>
+
+<!ELEMENT partitioning 
+	( componentplacement
+	)*>
+
+<!ELEMENT componentplacement 
+	( componentfileref
+	, deployondevice?
+	, compositepartofdevice?
+	, devicepkgfile?
+	, componentinstantiation+
+	)>
+
+<!ELEMENT componentfileref  EMPTY>
+<!ATTLIST componentfileref
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT deployondevice  EMPTY>
+<!ATTLIST deployondevice
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT compositepartofdevice  EMPTY>
+<!ATTLIST compositepartofdevice
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT devicepkgfile 
+	(localfile
+	)>
+<!ATTLIST devicepkgfile
+	type		CDATA	#IMPLIED>
+
+<!ELEMENT componentinstantiation
+	( usagename?
+	 ,componentproperties?
+	)>
+<!ATTLIST componentinstantiation
+	id	ID 	#REQUIRED>
+
+<!ELEMENT usagename (#PCDATA)>
+
+<!ELEMENT componentproperties 
+	( simpleref
+	| simplesequenceref
+	| structref
+	| structsequenceref
+	)+ >
+
+<!ELEMENT devicethatloadedthiscomponentref EMPTY>
+<!ATTLIST devicethatloadedthiscomponentref 
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT deviceusedbythiscomponentref EMPTY>
+<!ATTLIST deviceusedbythiscomponentref 
+	refid		CDATA	#REQUIRED
+	usesrefid	CDATA	#REQUIRED>
+
+<!ELEMENT simpleref EMPTY>
+<!ATTLIST simpleref
+	refid		CDATA	#REQUIRED
+	value		CDATA	#REQUIRED>
+		
+<!ELEMENT simplesequenceref
+	(values
+	)>
+<!ATTLIST simplesequenceref
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT structref
+	(simpleref+        
+	)>
+<!ATTLIST structref
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT structsequenceref
+	( structvalue+
+	)>
+<!ATTLIST structsequenceref
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT structvalue
+	(simpleref+
+	)>
+		
+<!ELEMENT values
+	( value+ 
+	)>
+		
+<!ELEMENT value (#PCDATA)>
+
+<!ELEMENT componentinstantiationref EMPTY>
+<!ATTLIST componentinstantiationref 
+	refid	CDATA	#REQUIRED>
+
+<!ELEMENT domainmanager
+	( namingservice
+	| stringifiedobjectref
+	)>
+
+<!ELEMENT findby
+	( namingservice
+	| stringifiedobjectref
+	| domainfinder
+	)>
+
+<!ELEMENT namingservice EMPTY>
+<!ATTLIST namingservice
+	name		CDATA	#REQUIRED>
+
+<!ELEMENT stringifiedobjectref (#PCDATA)>
+
+<!ELEMENT domainfinder EMPTY>
+<!ATTLIST domainfinder
+	type		CDATA	#REQUIRED
+	name		CDATA	#IMPLIED>
+
+<!ELEMENT filesystemnames
+	(filesystemname+
+	)>
+
+<!ELEMENT filesystemname EMPTY>
+<!ATTLIST filesystemname
+	mountname	CDATA	#REQUIRED
+	deviceid	CDATA	#REQUIRED>
+
+<!ELEMENT connections
+      ( connectinterface*
+      )>
+
+<!ELEMENT connectinterface
+	( usesport
+	, ( providesport
+	  | componentsupportedinterface
+	  | findby
+	  )
+	)>
+
+<!ATTLIST connectinterface
+	id		ID	#IMPLIED>
+
+<!ELEMENT usesport
+	( usesidentifier
+	, (componentinstantiationref
+	   | devicethatloadedthiscomponentref
+	   | deviceusedbythiscomponentref
+	   | findby
+	   )
+	)>
+
+<!ELEMENT usesidentifier (#PCDATA)>
+
+<!ELEMENT providesport
+	( providesidentifier
+	, ( componentinstantiationref
+	  | devicethatloadedthiscomponentref
+	  | deviceusedbythiscomponentref
+	  | findby
+	  )
+	)>
+
+<!ELEMENT providesidentifier (#PCDATA)>
+
+<!ELEMENT componentsupportedinterface
+	( supportedidentifier
+	, ( componentinstantiationref
+	  | findby
+	  )
+	)>
+
+<!ELEMENT supportedidentifier (#PCDATA)>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/domainmanagerconfiguration.dtd
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/domainmanagerconfiguration.dtd	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/domainmanagerconfiguration.dtd	(revision 4961)
@@ -0,0 +1,26 @@
+<!ELEMENT domainmanagerconfiguration (description?, domainmanagersoftpkg, services?)>
+<!ATTLIST domainmanagerconfiguration
+	id ID #REQUIRED
+	name CDATA #REQUIRED
+>
+<!ELEMENT description (#PCDATA)>
+<!ELEMENT domainmanagersoftpkg (localfile)>
+<!ELEMENT localfile EMPTY>
+<!ATTLIST localfile
+	name CDATA #REQUIRED
+>
+<!ELEMENT services (service+)>
+<!ELEMENT service (usesidentifier, findby)>
+<!ELEMENT usesidentifier (#PCDATA)>
+<!ELEMENT findby (namingservice | stringifiedobjectref | domainfinder)>
+<!ELEMENT namingservice EMPTY>
+<!ATTLIST namingservice
+	name CDATA #REQUIRED
+>
+<!ELEMENT stringifiedobjectref (#PCDATA)>
+<!ELEMENT domainfinder EMPTY>
+<!ATTLIST domainfinder
+	type CDATA #REQUIRED
+	name CDATA #IMPLIED
+>
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/softwareassembly.dtd
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/softwareassembly.dtd	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/softwareassembly.dtd	(revision 4961)
@@ -0,0 +1,206 @@
+<!ELEMENT softwareassembly
+	( description?
+	, componentfiles
+	, partitioning
+	, assemblycontroller
+	, connections?
+	, externalports?
+	)>
+<!ATTLIST softwareassembly
+	id		ID	#REQUIRED
+	name		CDATA	#IMPLIED>
+
+<!ELEMENT description (#PCDATA)>
+
+<!ELEMENT componentfiles 
+	( componentfile+
+	)>
+
+<!ELEMENT componentfile
+	( localfile 
+	)>
+<!ATTLIST componentfile
+	id		ID	#REQUIRED
+	type		CDATA	#IMPLIED>
+
+<!ELEMENT localfile EMPTY>
+<!ATTLIST localfile
+	name		CDATA	#REQUIRED>
+
+<!ELEMENT partitioning 
+	( componentplacement
+	|  hostcollocation
+	)*>
+
+<!ELEMENT componentplacement 
+	( componentfileref
+	, componentinstantiation+
+	)>
+
+<!ELEMENT componentfileref  EMPTY>
+<!ATTLIST componentfileref
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT componentinstantiation
+	( usagename?
+	, componentproperties?
+	, findcomponent?
+	)>
+<!ATTLIST componentinstantiation
+	id		ID 	#REQUIRED>
+
+<!ELEMENT usagename (#PCDATA)>
+
+<!ELEMENT componentproperties 
+	( simpleref
+	| simplesequenceref
+	| structref
+	| structsequenceref
+	)+ >
+
+<!ELEMENT findcomponent
+	( componentresourcefactoryref
+	| namingservice
+	)>
+
+<!ELEMENT componentresourcefactoryref
+	( resourcefactoryproperties?
+	)>
+<!ATTLIST componentresourcefactoryref 
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT devicethatloadedthiscomponentref EMPTY>
+<!ATTLIST devicethatloadedthiscomponentref 
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT deviceusedbythiscomponentref EMPTY>
+<!ATTLIST deviceusedbythiscomponentref 
+	refid		CDATA	#REQUIRED
+	usesrefid	CDATA	#REQUIRED>
+
+<!ELEMENT resourcefactoryproperties 
+	( simpleref
+	| simplesequenceref
+	| structref
+	| structsequenceref
+	)+ >
+
+<!ELEMENT simpleref EMPTY>
+<!ATTLIST simpleref
+	refid		CDATA	#REQUIRED
+	value		CDATA	#REQUIRED>
+		
+<!ELEMENT simplesequenceref
+	(values
+	)>
+<!ATTLIST simplesequenceref
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT structref
+	(simpleref+        
+	)>
+<!ATTLIST structref
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT structsequenceref
+	( structvalue+
+	)>
+<!ATTLIST structsequenceref
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT structvalue
+	(simpleref+
+	)>
+		
+<!ELEMENT values
+	( value+ 
+	)>
+		
+<!ELEMENT value (#PCDATA)>
+
+<!ELEMENT componentinstantiationref EMPTY>
+<!ATTLIST componentinstantiationref 
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT findby
+	( namingservice
+	| stringifiedobjectref
+	| domainfinder
+	)>
+
+<!ELEMENT namingservice EMPTY>
+<!ATTLIST namingservice
+	name 		CDATA	#REQUIRED>
+
+<!ELEMENT stringifiedobjectref (#PCDATA)>
+
+<!ELEMENT domainfinder EMPTY>
+<!ATTLIST domainfinder
+	type		CDATA	#REQUIRED
+	name		CDATA	#IMPLIED>
+
+<!ELEMENT hostcollocation
+	( componentplacement
+	)+>
+<!ATTLIST hostcollocation
+	id		ID	#IMPLIED
+	name		CDATA	#IMPLIED>
+
+<!ELEMENT assemblycontroller
+	( componentinstantiationref
+	)>
+
+<!ELEMENT connections
+	( connectinterface*
+	)>
+
+<!ELEMENT connectinterface
+	( usesport
+	, ( providesport
+	  | componentsupportedinterface
+	  | findby
+	  )
+	)>
+<!ATTLIST connectinterface
+	id 		ID	#IMPLIED>
+
+<!ELEMENT usesport
+	( usesidentifier
+	, (componentinstantiationref
+	   | devicethatloadedthiscomponentref
+	   | deviceusedbythiscomponentref
+	   | findby
+	   )
+	)>
+
+<!ELEMENT usesidentifier (#PCDATA)>
+
+<!ELEMENT providesport
+	( providesidentifier
+	, ( componentinstantiationref
+	  | devicethatloadedthiscomponentref
+	  | deviceusedbythiscomponentref
+	  | findby 
+        )
+	)>
+
+<!ELEMENT providesidentifier (#PCDATA)>
+
+<!ELEMENT componentsupportedinterface
+	( supportedidentifier
+	, ( componentinstantiationref
+	  | findby
+	  )
+	)>
+
+<!ELEMENT supportedidentifier (#PCDATA)>
+
+<!ELEMENT externalports 
+	(port+
+	)>
+
+<!ELEMENT port
+	( description?
+	, (usesidentifier | providesidentifier | supportedidentifier)
+	, componentinstantiationref
+	)>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/properties.dtd
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/properties.dtd	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/properties.dtd	(revision 4961)
@@ -0,0 +1,124 @@
+<!ELEMENT properties
+     	 ( description?
+     	 , 	( simple
+		| simplesequence
+		| test
+		| struct
+		| structsequence)+
+       )> 
+
+<!ELEMENT simple 
+	( description?
+	, value?
+	, units?
+	, range?
+	, enumerations?
+	, kind*
+	, action?
+	)>
+<!ATTLIST simple
+	id	ID							#REQUIRED
+	type	( boolean	| char	| double | float
+		| short	| long	| objref | octet
+		| string	| ulong	| ushort )		#REQUIRED
+	name	CDATA							#IMPLIED
+	mode	( readonly	| readwrite | writeonly)	"readwrite">
+
+<!ELEMENT description (#PCDATA)>
+
+<!ELEMENT value (#PCDATA)>
+
+<!ELEMENT units (#PCDATA)>
+
+<!ELEMENT range EMPTY>
+<!ATTLIST range
+	min		CDATA	#REQUIRED
+	max		CDATA	#REQUIRED>
+
+<!ELEMENT enumerations
+	( enumeration+
+	)>
+
+<!ELEMENT enumeration EMPTY>
+<!ATTLIST enumeration
+	label		CDATA	#REQUIRED
+	value		CDATA	#IMPLIED>
+
+<!ELEMENT kind EMPTY>
+<!ATTLIST kind
+	kindtype	(allocation | configure | test | execparam | factoryparam) 
+"configure">
+
+<!ELEMENT action EMPTY>
+<!ATTLIST action
+	type	( eq  | ne | gt  |  lt | ge | le | external ) "external">
+
+<!ELEMENT simplesequence 
+	( description?
+	, values?
+	, units?
+	, range?
+	, kind*
+	, action?
+	)>
+<!ATTLIST simplesequence
+	id	ID						#REQUIRED
+	type  ( boolean | char   | double | float
+	      | short  | long   | objref | octet
+	      | string | ulong  | ushort )		#REQUIRED
+	name	CDATA						#IMPLIED
+	mode	(readonly | readwrite | writeonly)	"readwrite">
+
+<!ELEMENT values
+	( value+ 
+	)>
+
+<!ELEMENT test 
+	( description
+      , inputValue?
+	, resultValue
+	)>
+<!ATTLIST test
+	id		CDATA #REQUIRED>
+
+<!ELEMENT inputValue
+	( simple+
+	)>
+
+<!ELEMENT resultValue
+	( simple+
+	)>
+
+<!ELEMENT struct 
+	( description?
+	, simple+
+	, configurationkind?
+	)>
+<!ATTLIST struct
+	id		ID	#REQUIRED
+	name		CDATA	#IMPLIED
+	mode		(readonly | readwrite | writeonly)  "readwrite">
+
+<!ELEMENT configurationkind EMPTY>
+<!ATTLIST configurationkind
+	kindtype	(configure | factoryparam)	"configure">
+
+<!ELEMENT structsequence
+	( description?
+	, structvalue+
+	, configurationkind?
+	)>
+<!ATTLIST structsequence
+	id       	ID	#REQUIRED
+	structrefid CDATA	#REQUIRED
+	name		CDATA	#IMPLIED
+	mode		(readonly | readwrite | writeonly)  "readwrite">
+		
+<!ELEMENT structvalue
+	(simpleref+	        
+	)>
+		
+<!ELEMENT simpleref EMPTY>
+<!ATTLIST simpleref
+	refid 	CDATA	#REQUIRED
+	value 	CDATA	#REQUIRED>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/softpkg.dtd
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/softpkg.dtd	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/softpkg.dtd	(revision 4961)
@@ -0,0 +1,138 @@
+<!ELEMENT softpkg
+      ( title?
+	, author+
+	, description?
+	, propertyfile?
+	, descriptor?
+	, implementation+
+	, usesdevice*
+	)>
+<!ATTLIST softpkg
+	id		ID	#REQUIRED
+	name		CDATA	#REQUIRED
+	type		(sca_compliant | sca_non_compliant)  "sca_compliant"
+	version	CDATA	#IMPLIED >
+
+<!ELEMENT localfile EMPTY>
+<!ATTLIST localfile
+	name		CDATA	#REQUIRED>
+
+<!ELEMENT propertyfile
+	(localfile
+	)>
+<!ATTLIST propertyfile
+	type		CDATA	#IMPLIED>
+
+<!ELEMENT title (#PCDATA)>
+
+<!ELEMENT pkgtype (#PCDATA)>
+
+<!ELEMENT author 
+	( name*
+	, company?
+	, webpage?
+	)>
+
+<!ELEMENT name (#PCDATA)>
+
+<!ELEMENT company (#PCDATA)>
+
+<!ELEMENT webpage (#PCDATA)>
+
+<!ELEMENT description (#PCDATA)>
+
+<!ELEMENT descriptor
+	(localfile
+	)>
+<!ATTLIST descriptor
+	name		CDATA	#IMPLIED>
+
+<!ELEMENT implementation
+	( description?
+	, propertyfile?
+	, code
+	, compiler?
+	, programminglanguage?
+	, humanlanguage?
+	, runtime?
+	, ( os
+	  | processor
+	  | dependency
+	  )+
+	, usesdevice*
+	)>
+
+<!ATTLIST implementation
+	id		ID	#REQUIRED
+	aepcompliance (aep_compliant | aep_non_compliant) "aep_compliant">
+
+<!ELEMENT code 
+	( localfile
+	, entrypoint?
+	, stacksize?
+	, priority?
+	)>
+<!ATTLIST code
+	type		CDATA	#IMPLIED>
+
+<!ELEMENT entrypoint (#PCDATA)>
+
+<!ELEMENT stacksize (#PCDATA)>
+
+<!ELEMENT priority (#PCDATA)>
+
+<!ELEMENT compiler EMPTY>
+<!ATTLIST compiler
+	name		CDATA	#REQUIRED
+	version 	CDATA	#IMPLIED>
+
+<!ELEMENT programminglanguage EMPTY>
+<!ATTLIST programminglanguage
+	name		CDATA	#REQUIRED
+	version	CDATA	#IMPLIED>
+
+<!ELEMENT humanlanguage EMPTY>
+<!ATTLIST humanlanguage
+	name		CDATA	#REQUIRED >
+
+<!ELEMENT os EMPTY>
+<!ATTLIST os
+	name		CDATA	#REQUIRED
+	version	CDATA	#IMPLIED>
+
+<!ELEMENT processor EMPTY>
+<!ATTLIST processor
+	name		CDATA	#REQUIRED>
+
+<!ELEMENT dependency
+	( softpkgref
+	| propertyref
+	)>
+<!ATTLIST dependency
+	type		CDATA	#REQUIRED>
+
+<!ELEMENT runtime EMPTY>
+<!ATTLIST runtime
+	name		CDATA	#REQUIRED
+	version	CDATA	#IMPLIED>
+
+<!ELEMENT propertyref EMPTY>
+<!ATTLIST propertyref
+	refid		CDATA	#REQUIRED
+	value		CDATA	#REQUIRED>
+	
+<!ELEMENT softpkgref
+	( localfile
+	,  implref?
+	)>
+
+<!ELEMENT implref EMPTY>
+<!ATTLIST implref 
+	refid		CDATA	#REQUIRED>
+
+<!ELEMENT  usesdevice
+	( propertyref+
+	)>
+<!ATTLIST usesdevice
+	id		ID	#REQUIRED
+	type		CDATA	#REQUIRED>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/softwarecomponent.dtd
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/softwarecomponent.dtd	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/softwarecomponent.dtd	(revision 4961)
@@ -0,0 +1,71 @@
+<!ELEMENT softwarecomponent
+	( corbaversion
+	, componentrepid
+	, componenttype
+	, componentfeatures
+	, interfaces
+	, propertyfile?
+	)>
+
+<!ELEMENT propertyfile
+	(localfile
+	)>
+<!ATTLIST propertyfile
+	type		CDATA	#IMPLIED>
+
+<!ELEMENT localfile EMPTY>
+<!ATTLIST localfile
+	name		CDATA	#REQUIRED>
+
+<!ELEMENT corbaversion (#PCDATA)> 
+
+<!ELEMENT componentrepid EMPTY>
+<!ATTLIST componentrepid
+	repid		CDATA	#REQUIRED>
+
+<!ELEMENT componenttype (#PCDATA)>
+
+<!ELEMENT componentfeatures
+	( supportsinterface* 
+	, ports
+	)>
+
+<!ELEMENT supportsinterface EMPTY>
+<!ATTLIST supportsinterface
+	repid			CDATA	#REQUIRED
+ 	supportsname	CDATA	#REQUIRED>
+
+<!ELEMENT ports
+	(provides   
+	| uses
+	)*> 
+
+<!ELEMENT provides
+	( porttype*)>
+<!ATTLIST provides
+	repid			CDATA	#REQUIRED
+	providesname	CDATA	#REQUIRED>
+
+<!ELEMENT uses
+	( porttype*)>
+<!ATTLIST uses
+	repid		CDATA	#REQUIRED
+	usesname	CDATA	#REQUIRED>
+
+<!ELEMENT porttype EMPTY>
+<!ATTLIST porttype
+    	type	( data | control | responses	| test ) 	#REQUIRED>
+
+<!ELEMENT interfaces
+	( interface+ 
+	)>
+
+<!ELEMENT interface
+	( inheritsinterface*)>
+<!ATTLIST interface
+	repid		CDATA	#REQUIRED
+	name		CDATA	#REQUIRED>
+
+<!ELEMENT inheritsinterface EMPTY>
+<!ATTLIST inheritsinterface
+	repid		CDATA	#REQUIRED>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/Makefile.am	(revision 9483)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/Makefile.am	(revision 9483)
@@ -0,0 +1,9 @@
+EXTRA_DIST = deviceconfiguration.dtd \
+	     devicepkg.dtd \
+	     domainmanagerconfiguration.dtd \
+	     profile.dtd \
+	     properties.dtd \
+	     softpkg.dtd \
+	     softwareassembly.dtd \
+	     softwarecomponent.dtd
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/profile.dtd
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/profile.dtd	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/profile.dtd	(revision 4961)
@@ -0,0 +1,4 @@
+<!ELEMENT profile EMPTY>
+<!ATTLIST profile
+        filename     CDATA #REQUIRED
+        type         CDATA #IMPLIED>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/devicepkg.dtd
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/devicepkg.dtd	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/dtd/devicepkg.dtd	(revision 4961)
@@ -0,0 +1,70 @@
+<!ELEMENT devicepkg
+	( title?
+	, author+
+	, description?
+	, hwdeviceregistration 
+	)>
+<!ATTLIST devicepkg
+	id		ID	#REQUIRED
+	name		CDATA	#REQUIRED
+	version	CDATA	#IMPLIED >
+
+<!ELEMENT title (#PCDATA)>
+
+<!ELEMENT author 
+	( name*
+	| company?
+	| webpage?
+	)>
+
+<!ELEMENT name (#PCDATA)>
+
+<!ELEMENT company (#PCDATA)>
+
+<!ELEMENT webpage (#PCDATA)>
+
+<!ELEMENT description (#PCDATA)>
+
+<!ELEMENT hwdeviceregistration
+	( propertyfile?
+	, description
+	, manufacturer
+	, modelnumber
+	, deviceclass
+	, childhwdevice*
+     	)>
+<!ATTLIST hwdeviceregistration
+	id		ID	#REQUIRED
+	name		CDATA	#REQUIRED
+	version	CDATA	#IMPLIED>
+
+<!ELEMENT propertyfile
+	(localfile
+	)>
+<!ATTLIST propertyfile
+	type		CDATA	#IMPLIED>
+
+<!ELEMENT localfile EMPTY>
+<!ATTLIST localfile
+	name		CDATA	#REQUIRED>
+
+<!ELEMENT manufacturer (#PCDATA)>
+
+<!ELEMENT modelnumber (#PCDATA)>
+
+<!ELEMENT deviceclass 
+	(class+
+	)>
+
+<!ELEMENT class (#PCDATA)>
+
+<!ELEMENT childhwdevice
+	( hwdeviceregistration 
+	| devicepkgref
+	)>
+
+<!ELEMENT devicepkgref
+	( localfile
+	)>
+<!ATTLIST devicepkgref
+	type		CDATA	#IMPLIED>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/README
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/README	(revision 8167)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/README	(revision 8167)
@@ -0,0 +1,10 @@
+To install:
+
+    * run the setup.py script:
+        $ python setup.py install
+
+    * or run the autoconf scripts:
+        $ ./reconf
+        $ ./configure
+        $ make install
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_spd.xml.tpl
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_spd.xml.tpl	(revision 9599)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_spd.xml.tpl	(revision 9599)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<softpkg id="DCE:Default" name="DefaultResource">
+	<title />
+    <description></description>
+	<author>
+		<name>OSSIE Project</name>
+		<company>Mobile and Portable Radio Research Group</company>
+		<webpage>http://www.mprg.org</webpage>
+	</author>
+	<propertyfile type="PRF">
+		<localfile name="Default.prf.xml"></localfile>
+	</propertyfile>
+	<descriptor>
+		<localfile name="Default.scd.xml"/>
+	</descriptor>
+	<implementation id="DCE:Default">
+		<description>Description</description>
+		<code type="Executable">
+			<localfile name="./default/default"/>
+		</code>
+        <os name="Linux" version="2.6.26.3"/>
+		<processor name="x86"/>
+	</implementation>
+</softpkg>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_DAS.xml.tpl
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_DAS.xml.tpl	(revision 8156)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_DAS.xml.tpl	(revision 8156)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!--
+    Generated by Zeligsoft Component Enabler 2.0.2 (Build: 200510131317)
+    http://www.zeligsoft.com
+-->
+<deploymentenforcement>
+    <application id="DCE:438bffd7-cf7d-4f29-b0bc-e66303d25a84" name="Name" />
+    <deviceassignmentsequence>
+    </deviceassignmentsequence>
+</deploymentenforcement>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_prf.xml.tpl
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_prf.xml.tpl	(revision 8648)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_prf.xml.tpl	(revision 8648)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<properties>
+	<description>These are the properties to configure the device manager</description>
+</properties>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_sad.xml.tpl
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_sad.xml.tpl	(revision 8156)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_sad.xml.tpl	(revision 8156)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<softwareassembly id="DCE:Default" name="OSSIE::Default">
+	<componentfiles>
+	</componentfiles>
+	<partitioning>
+	</partitioning>
+	<assemblycontroller>
+		<componentinstantiationref refid="DCE:default"/>
+	</assemblycontroller>
+	<connections>
+	</connections>
+</softwareassembly>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_scd.xml.tpl
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_scd.xml.tpl	(revision 8648)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_scd.xml.tpl	(revision 8648)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!--
+    Generated by Zeligsoft Component Enabler 2.0.2 (Build: 200510131317)
+    http://www.zeligsoft.com
+-->
+<softwarecomponent>
+    <corbaversion>2.2</corbaversion>
+    <componentrepid repid="IDL:CF/Resource:1.0" />
+    <componenttype>resource</componenttype>
+    <componentfeatures>
+        <supportsinterface repid="IDL:CF/Resource:1.0" supportsname="Resource" />
+        <supportsinterface repid="IDL:CF/LifeCycle:1.0" supportsname="LifeCycle" />
+        <supportsinterface repid="IDL:CF/PortSupplier:1.0" supportsname="PortSupplier" />
+        <supportsinterface repid="IDL:CF/PropertySet:1.0" supportsname="PropertySet" />
+        <supportsinterface repid="IDL:CF/TestableObject:1.0" supportsname="TestableObject" />
+        <ports>
+        </ports>
+    </componentfeatures>
+    <interfaces>
+        <interface repid="IDL:CF/Resource:1.0" name="Resource">
+            <!--[Inherited interface IDL:CF/LifeCycle:1.0]-->
+            <inheritsinterface repid="IDL:CF/LifeCycle:1.0" />
+            <!--[Inherited interface IDL:CF/PortSupplier:1.0]-->
+            <inheritsinterface repid="IDL:CF/PortSupplier:1.0" />
+            <!--[Inherited interface IDL:CF/PropertySet:1.0]-->
+            <inheritsinterface repid="IDL:CF/PropertySet:1.0" />
+            <!--[Inherited interface IDL:CF/TestableObject:1.0]-->
+            <inheritsinterface repid="IDL:CF/TestableObject:1.0" />
+        </interface>
+    </interfaces>
+</softwarecomponent>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_dcd.xml.tpl
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_dcd.xml.tpl	(revision 8156)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/_dcd.xml.tpl	(revision 8156)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<deviceconfiguration id="DCE:320baf2f-d7e3-4482-9e8c-7f23411bd84c" name="DeviceManager">
+    <devicemanagersoftpkg>
+        <localfile name="DeviceManager.spd.xml" />
+    </devicemanagersoftpkg>
+    <componentfiles>
+        <!--Device Definitions-->
+    </componentfiles>
+    <partitioning>
+    </partitioning>
+    <domainmanager>
+        <namingservice name="DomainName1/DomainManager" />
+    </domainmanager>
+</deviceconfiguration>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/Makefile.am	(revision 9483)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/XML_gen/templates/Makefile.am	(revision 9483)
@@ -0,0 +1,7 @@
+EXTRA_DIST = _DAS.xml.tpl \
+	     _dcd.xml.tpl \
+	     _prf.xml.tpl \
+	     _sad.xml.tpl \
+	     _scd.xml.tpl \
+	     _spd.xml.tpl
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/importIDL.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/importIDL.py	(revision 10468)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/importIDL.py	(revision 10468)
@@ -0,0 +1,150 @@
+#! /usr/bin/env python
+
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import os, sys
+import string
+import omniORB
+
+try:
+    from omniidl import idlast, idlvisitor, idlutil, main, idltype
+    from omniidl_be.cxx import types
+    import _omniidl
+except ImportError:
+    print "ERROR: importIDL.py cannot import the omniidl module"
+    print "  - Is omniORBpy installed?"
+    print "  - Is /usr/local/lib/pythonX.X/site-packages included in ossie.pth?"
+    sys.exit(0)
+
+import ComponentClass as CC
+
+keyList = range(34)
+valList = ['null','void','short','long','ushort','ulong','float','double','boolean', \
+           'char','octet','any','TypeCode','Principal','objref','struct','union','enum', \
+           'string','sequence','array','alias','except','longlong','ulonglong', \
+           'longdouble','wchar','wstring','fixed','value','value_box','native', \
+           'abstract_interface','local_interface']
+baseTypes = dict(zip(keyList,valList))
+
+# Non-standard kinds for forward-declared structs and unions
+baseTypes[100] = 'ot_structforward'
+baseTypes[101] = 'ot_unionforward'
+
+class ExampleVisitor (idlvisitor.AstVisitor):
+    def __init__(self,*args):
+        self.myInterfaces = []   #Used to store the interfaces that are found
+        if hasattr(idlvisitor.AstVisitor,'__init__'):
+            idlvisitor.AstVisitor.__init__(self,args)
+
+    def visitAST(self, node):
+        for n in node.declarations():
+            n.accept(self)
+
+    def visitModule(self, node):
+        for n in node.definitions():
+            n.accept(self)
+
+    def visitInterface(self, node):
+        new_int = CC.Interface(node.identifier(),node.scopedName()[0])
+        
+	ops_list = []
+ 	self.addOps(node,ops_list)
+        new_int.operations.extend(ops_list)
+        #print node.identifier() + " has " + str(len(new_int.operations)) + " operations"
+        self.myInterfaces.append(new_int)
+
+    def addOps(self,node,ops):
+	
+	for i in node.inherits():
+            self.addOps(i,ops)
+
+        for d in node.contents():
+            if isinstance(d, idlast.Operation):
+                new_op = CC.Operation(d.identifier(),baseTypes[d.returnType().kind()])
+                # Get the c++ mappping of the return type
+                cxxRT = types.Type(d.returnType())
+                new_op.cxxReturnType = cxxRT.base()
+#                if new_op.returnType == 'string':
+#                    print foo2.base()
+                #print new_op.name + "::" + d.identifier() + "()"
+                #tmpstr = node.identifier() + "::" + d.identifier() + "("
+                #tmpstr2 = "  " + node.identifier() + "::" + d.identifier() + "("
+                if hasattr(d,'parameters'):
+                    for p in d.parameters():
+                        new_param = CC.Param(p.identifier())
+                        t =  p.paramType()
+                        # Get the c++ mapping of the type
+                        cxxT = types.Type(t)
+                        new_param.cxxType = cxxT.op(types.direction(p))
+						
+                        if hasattr(t,'scopedName'):
+                            #print ' '*8 + str(t.scopedName()),
+                            new_param.dataType = idlutil.ccolonName(t.scopedName())
+                        else:
+                            if isinstance(t,idltype.Type):
+                                #print ' '*8 + baseTypes[t.kind()],
+                                new_param.dataType = baseTypes[t.kind()]
+
+                        if p.is_in() and p.is_out():
+                            new_param.direction = 'inout'
+                        elif p.is_out():
+                            new_param.direction = 'out'
+                        else:
+                            new_param.direction = 'in'
+                        new_op.params.append(new_param)
+                        #tmpstr += new_param.direction + " " + new_param.dataType + ","
+                        #tmpstr2 += new_param.direction + " " + new_param.cxxType + ","
+                ops.append(new_op)
+                #print tmpstr[:-1] + ")"
+                #print tmpstr2[:-1] + ")"
+
+def run(tree, args):
+    visitor = ExampleVisitor()
+    tree.accept(visitor)
+    return visitor.myInterfaces
+
+def getInterfaces(filename):
+  f = os.popen(main.preprocessor_cmd + ' -I "/usr/local/include" -I "/usr/local/include/ossie" -I "/usr/include" "' \
+               + filename + '"','r')
+  try:
+      tree = _omniidl.compile(f, filename)
+  except TypeError:
+      tree = _omniidl.compile(f)
+      
+  ints = run(tree,'')
+  f.close()
+  del tree
+  idlast.clear()
+  idltype.clear()
+  _omniidl.clear()
+  #store file name and location information for each interface
+  for x in ints:
+      x.fullpath = filename
+      i = filename.rfind("/")
+      if i >= 0:
+          x.filename = filename[i+1:]
+          
+      x.filename = x.filename[:-4] #remove the .idl suffix
+    
+      
+  return ints
+  
+
+if __name__ == '__main__':
+    print "Command line not supported in this version"
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/DomainManager.dmd.xml
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/DomainManager.dmd.xml	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/DomainManager.dmd.xml	(revision 4961)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE domainmanagerconfiguration SYSTEM "../../xml/dtd/domainmanagerconfiguration.dtd">
+<domainmanagerconfiguration id="OSSIE" name="ossieDomainManager">
+<description>OSSIE DomainManager Configuration File</description>
+<domainmanagersoftpkg >
+	<localfile name="DomainManager.spd.xml"/>
+</domainmanagersoftpkg>
+</domainmanagerconfiguration>
+
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/DomainManager.spd.xml
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/DomainManager.spd.xml	(revision 8749)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/DomainManager.spd.xml	(revision 8749)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE softpkg SYSTEM "../../xml/dtd/softpkg.dtd">
+<softpkg id="DCE:82f6515a-de05-47f0-8e7a-1c9f621c00ee" name="DomainManager">
+	<descriptor>
+		<localfile name="DomainManager.scd.xml"/>
+	</descriptor>
+	<implementation id="DCE:d3e8aba5-4421-45c5-9be6-372b763883e7">
+		<description>implementation of a Domain Manager</description>
+		<code type="SharedLibrary">
+			<localfile name="/usr/local/lib/ossiecf.so"/>
+		</code>
+		<compiler name="gcc" version="4.3.0"/>
+		<programminglanguage name="c++"/>
+		<os name="Linux" version="2.6.26.3"/>
+	</implementation>
+</softpkg>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/DomainManager.prf.xml
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/DomainManager.prf.xml	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/DomainManager.prf.xml	(revision 4961)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE properties SYSTEM "../../xml/dtd/properties.dtd">
+<properties>
+	<description>These are the properties to configure the domain manager</description>
+</properties>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/DomainManager.scd.xml
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/DomainManager.scd.xml	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/DomainManager.scd.xml	(revision 4961)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE softwarecomponent SYSTEM "../../xml/dtd/softwarecomponent.dtd">
+<softwarecomponent>
+	<corbaversion>2.2</corbaversion>
+	<componentrepid repid="IDL:CF/DomainManager:1.0"/>
+	<componenttype>domainmanager</componenttype>
+	<componentfeatures>
+		<supportsinterface repid="IDL:CF/DomainManager:1.0" supportsname="DomainManager"/>
+		<supportsinterface repid="IDL:CF/PropertySet:1.0" supportsname="PropertySet"/>
+	</componentfeatures>
+	<interfaces>
+		<interface repid="IDL:CF/DomainManager:1.0" name="DomainManager">
+			<inheritsinterface repid="IDL:CF/PropertySet:1.0"/>
+		</interface>
+		<interface repid="IDL:CF/PropertySet:1.0" name="PropertySet"/>
+	</interfaces>
+</softwarecomponent>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/Makefile.am	(revision 9483)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/basic_xml/Makefile.am	(revision 9483)
@@ -0,0 +1,5 @@
+EXTRA_DIST = DomainManager.dmd.xml \
+	     DomainManager.prf.xml \
+	     DomainManager.scd.xml \
+	     DomainManager.spd.xml
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/generic_preamble
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/generic_preamble	(revision 9976)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/generic_preamble	(revision 9976)
@@ -0,0 +1,22 @@
+/****************************************************************************
+
+Copyright 2007 Virginia Polytechnic Institute and State University
+
+This file is part of the OSSIE __COMP_NAME__.
+
+OSSIE __COMP_NAME__ is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+OSSIE __COMP_NAME__ is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with OSSIE __COMP_NAME__; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+****************************************************************************/
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/__init__.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/__init__.py	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/__init__.py	(revision 4961)
@@ -0,0 +1,1 @@
+pass
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/genNode.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/genNode.py	(revision 10361)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/genNode.py	(revision 10361)
@@ -0,0 +1,1043 @@
+#! /usr/bin/env python
+
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import sys, os, shutil
+from WaveDev.wavedev.errorMsg import *
+from WaveDev.wavedev.cfg import LoadConfiguration
+from datetime import date
+
+class genAll:
+  def __init__(self, path, wavedevPath, node, preamble=None):
+    if path[len(path)-1] != '/':
+        path = path + '/'
+    self.path = path
+    if wavedevPath[len(wavedevPath)-1] != '/':
+        wavedevPath = wavedevPath + '/'
+    self.wavedevPath = wavedevPath
+    self.path = path
+    self.node = node
+    self.preamble = preamble
+    LoadConfiguration(self)
+
+  ##############################################################################
+  ## genDirs - this function generates the directory structure for the generated
+  ##           code for the waveform; puts required files in main folder
+  ##############################################################################
+  def genDirs(self):
+    if os.path.exists(self.path) == False:
+       errorMsg(self,"Node already exists - exiting")
+       exit(1)
+
+    if os.path.exists(self.path+self.node.name) == False:
+        os.mkdir(self.path + self.node.name)
+
+    shutil.copy(self.wavedevPath + 'generate/reconf',self.path + self.node.name)
+    os.chmod(self.path + self.node.name + '/reconf', 0755)
+
+  ##############################################################################
+  ## writeMakefiles - generates the make file for the waveform and then calls
+  ##                  writeCompMakefile for each seperate component
+  ##############################################################################
+  def writeMakefile(self):
+    output = open(self.path + self.node.name + '/Makefile.am','w')
+
+    Flags = ["-Wall"]
+    self.info2str(output,"AM_CXXFLAGS = ",Flags,1)
+
+    tstr = "ossieName = " + self.node.name + '\n\n'
+    output.write(tstr)
+
+    tstr = "waveformdir = $(prefix)/dev/nodes/$(ossieName)\n"
+    output.write(tstr)
+
+    waveform_data = []
+    waveform_data.append("DeviceManager.dcd.xml")
+    waveform_data.append("DeviceManager.spd.xml")
+    waveform_data.append("DeviceManager.scd.xml")
+    waveform_data.append("DeviceManager.prf.xml")
+
+    self.info2str(output,"dist_waveform_DATA = ", waveform_data,1)
+
+    output.close()
+
+  def info2str(self, outfile, staticStr, mylist, extraLine=0,wrapFlag=False):
+    tstr = staticStr
+    mycount = 0
+    wrap = False
+    if len(mylist) > 5 or wrapFlag == True:
+	wrap = True
+
+    for x in mylist:
+      tstr = tstr + x + " "
+      mycount += 1
+      if mycount%2 == 0 and wrap and mylist.index(x) != len(mylist)-1:
+        tstr = tstr + "\\\n"
+
+    tstr = tstr + "\n"
+    for x in range(extraLine):
+      tstr = tstr + "\n"
+
+    outfile.write(tstr)
+
+  ##############################################################################
+  ## genConfigureACFiles - calls writeConfAC for appropriate locations
+  ##############################################################################
+  def genConfigureACFiles(self,installPath="/sdr/sca"):
+    if installPath[-1] == '/':
+        installPath = installPath[0:-1]
+
+    tmpPath = self.path + self.node.name + '/'
+    self.writeConfAC(tmpPath,self.node.name,False,False,installPath)
+
+  ##############################################################################
+  ## writeConfAC - generates configure.ac files for autoconf
+  ##############################################################################
+  def writeConfAC(self, genPath, name, aceFlag, wavFlag, installPath):
+     if genPath[len(genPath)-1] != '/':
+        genPath = genPath + '/'
+
+     output = open(genPath + 'configure.ac','w')
+     tstr = "AC_INIT(" + name + ", 0.8.0)\n\n"
+     tstr += "AM_INIT_AUTOMAKE\n\n"
+     tstr += 'AC_PREFIX_DEFAULT("' + installPath + '")\n\n'
+     tstr += "AC_PROG_INSTALL\n"
+     tstr += "INSTALL_DATA=\"/usr/bin/install -c -m 644\"\n"
+     tstr += "AC_SUBST(INSTALL_DATA)\n\n"
+     tstr += "AC_CONFIG_FILES(Makefile)\n\n"
+     tstr += "AC_OUTPUT\n"
+     output.write(tstr)
+     output.close()
+
+  ##############################################################################
+  ## This function generates the cpp and h files for each component:
+  ## component.h, component.cpp, main.cpp, port_impl.h, and port_impl.cpp
+  ##############################################################################
+  def genCompFiles(self,comp):
+      #for x in self.active_wave.components:
+        # generate the .h files for each component
+        inputH = open(self.wavedevPath + 'generate/sampleComp.h','r')
+        outputH = open(self.path + comp.name + "/" + comp.name + ".h",'w')
+        self.addPreamble(outputH,comp.name)
+        for line in inputH.readlines():
+          l_out = line.replace("__CLASS_DEF__",comp.name.upper()+"_IMPL_H")
+          l_out = l_out.replace("__Class_name__",comp.name+"_i")
+          if l_out.find("__PORT_DECL__") != -1:
+              self.writePortDecl(outputH,comp)
+              continue
+          if l_out.find("__ACE_INCLUDES__") != -1:
+              if comp.ace == True:
+                  l_out = '#include "ace/Task.h"\n'
+              else:
+                  continue
+          if l_out.find("__ACE_INHERIT__") != -1:
+              if comp.ace == True:
+                  l_out = l_out.replace("__ACE_INHERIT__",", public ACE_Task<ACE_MT_SYNCH>")
+              else:
+                  l_out = l_out.replace("__ACE_INHERIT__","")
+          if l_out.find("__ACE_SVC_DECL__") != -1:
+              if comp.ace == True:
+                  l_out = l_out.replace("__ACE_SVC_DECL__",'int svc(void);\n        size_t queue_size;')
+              else:
+                  continue
+          if l_out.find("__FRIEND_DECL__") != -1:
+              l_out = l_out.replace("__FRIEND_DECL__","")
+              self.writeFriendDecl(outputH,comp)
+              continue
+
+          outputH.write(l_out)
+
+        inputH.close()
+        outputH.close()
+
+        # generate the .cpp files for each component
+        inputCPP = open(self.wavedevPath + 'generate/sampleComp.cpp','r')
+        outputCPP = open(self.path + comp.name + "/" + comp.name + ".cpp",'w')
+        self.addPreamble(outputCPP,comp.name)
+        for line in inputCPP.readlines():
+          l_out = line.replace("__IncludeFile__",comp.name)
+          l_out = l_out.replace("__Class_name__",comp.name+"_i")
+          #l_out = l_out.replace("__NS_name__","ossie" + comp.name+"Resource")
+          if l_out.find("__PORT_INST__") != -1:
+              self.writePortInst(outputCPP,comp)
+              continue
+          if l_out.find("__GET_PORT__") != -1:
+              self.writeGetPort(outputCPP,comp)
+              continue
+          if l_out.find("__DEL_PORT__") != -1:
+              self.writeDelPort(outputCPP,comp)
+              continue
+          if l_out.find("__ACE_SVC_PORTS__") != -1:
+              self.writeACESvcPorts(outputCPP,comp)
+              continue
+          if l_out.find("__ACE_SVC_DEF__") != -1:
+              if comp.ace == True:
+                  self.writeACESvcDef(outputCPP,comp,'component',comp.timing, comp)
+              continue
+          outputCPP.write(l_out)
+
+        inputCPP.close()
+        outputCPP.close()
+
+        # generate the main.cpp files for each component
+        inputMain = open(self.wavedevPath + 'generate/sampleMain.cpp','r')
+        outputMain = open(self.path + comp.name + "/main.cpp",'w')
+        self.addPreamble(outputMain,comp.name)
+
+        for line in inputMain.readlines():
+          l_out = line.replace("__IncludeFile__",comp.name)
+          l_out = l_out.replace("__Class_name__",comp.name+"_i")
+          l_out = l_out.replace("__CLASS_VAR__",comp.name.lower())
+          if l_out.find("__CLASS_VAR_ACE__") != -1:
+              if comp.ace == True:
+                  l_out = l_out.replace("__CLASS_VAR_ACE__",comp.name.lower())
+              else:
+                  continue
+          if l_out.find("__NAME_SPACE__") != -1:
+              ns_list = []
+              for p in comp.ports:
+                  if p.interface.nameSpace not in ns_list:
+                      ns_list.append(p.interface.nameSpace)
+              l_out = ''
+              for tmpns in ns_list:
+                  l_out += 'using namespace ' + tmpns + ';\n'
+
+          outputMain.write(l_out)
+
+        inputMain.close()
+        outputMain.close()
+
+        # generate the port_impl.h file
+        inputPortImpl = open(self.wavedevPath + 'generate/port_impl.h','r')
+        outputPortImpl = open(self.path + comp.name + "/port_impl.h",'w')
+        self.addPreamble(outputPortImpl,comp.name)
+        portSample_p = open(self.wavedevPath + 'generate/port_sample_p.h','r')
+        portSample_u = open(self.wavedevPath + 'generate/port_sample_u.h','r')
+        for line in inputPortImpl.readlines():
+            l_out = line.replace("__IncludeFile__",comp.name)
+            if l_out.find("__ACE_INCLUDES__") != -1:
+              if comp.ace == True:
+                  l_out = '#include "ace/Task.h"\n'
+              else:
+                  continue
+            if l_out.find("__TIMING_DECL_AND_INCLUDES__") != -1:
+              if comp.timing == True:
+                  l_out = 'using namespace std;\n#ifndef time_signal_message_H\n#define time_signal_message_H\ntypedef struct {\n\tchar component_name[255];\n\tchar port_name[255];\n\tchar function_name[255];\n\tchar description[255];\n\tlong time_s;\n\tlong time_us;\n\tlong number_samples;\n} time_signal_message;\n#endif\n'
+              else:
+                  l_out = ''
+            if l_out.find("__PORT_DECL__") != -1:
+              self.writePortImplDecl(outputPortImpl,portSample_p,portSample_u,comp)
+              continue
+            outputPortImpl.write(l_out)
+
+        inputPortImpl.close()
+        outputPortImpl.close()
+        portSample_p.close()
+        portSample_u.close()
+
+        # generate the port_impl.cpp file
+        inputPortImpl = open(self.wavedevPath + 'generate/port_impl.cpp','r')
+        outputPortImpl = open(self.path + comp.name + "/port_impl.cpp",'w')
+        self.addPreamble(outputPortImpl,comp.name)
+        portSample_p = open(self.wavedevPath + 'generate/port_sample_p.cpp','r')
+        portSample_u = open(self.wavedevPath + 'generate/port_sample_u.cpp','r')
+        for line in inputPortImpl.readlines():
+            l_out = line
+            if l_out.find("__PORT_DEF__") != -1:
+              self.writePortImplDef(outputPortImpl,portSample_p,portSample_u,comp)
+              continue
+            outputPortImpl.write(l_out)
+
+        inputPortImpl.close()
+        outputPortImpl.close()
+        portSample_p.close()
+        portSample_u.close()
+
+    # Copy some required files into the main directory
+    #  os.system('cp generate/basic_xml/* ' + self.path)
+    #  os.system('cp generate/wavLoader.py ' + self.path)
+
+  def writePortImplDecl(self, output,portSample_p,portSample_u,c):
+    """ This function writes port implementation declarations for the port_impl.h file"""
+    intList = []
+    for x in c.ports:
+        if x.interface.filename in intList:
+            continue
+        ts = '#include "' + x.interface.filename + '.h"\n'
+        intList.append(x.interface.filename)
+        output.write(ts)
+    ts = '\n';output.write(ts);
+    intList = []
+    for x in c.ports:
+        if x.interface.name in intList:
+            continue
+        if x.type == "Uses":
+            portSample = portSample_u
+        else:
+            portSample = portSample_p
+        portSample.seek(0)
+        intList.append(x.interface.name)
+        for line in portSample.readlines():
+            l_out = line.replace("__IN_PORT__",x.p_cname)
+            l_out = l_out.replace("__INT_TYPE__",x.interface.name)
+            l_out = l_out.replace("__NAME_SPACE__",x.interface.nameSpace)
+            l_out = l_out.replace("__OUT_PORT__",x.u_cname)
+            l_out = l_out.replace("__IN_CLASS__",x.p_cname)
+            l_out = l_out.replace("__OUT_CLASS__",x.u_cname)
+            if l_out.find("__OPERATION__") != -1:
+              self.writeOperation(output,x.interface,port=c)
+              continue
+            if l_out.find("__ACE_INHERIT__") != -1:
+              if c.ace == True:
+                  l_out = l_out.replace("__ACE_INHERIT__",", public ACE_Task<ACE_MT_SYNCH>")
+              else:
+                  l_out = l_out.replace("__ACE_INHERIT__","")
+            if l_out.find("__TIMING_BUFFER_LENGTH__") != -1:
+	      if (c.timing==True):
+	        if (x.interface.name=='timingStatus'):
+	          l_out = l_out.replace("__TIMING_BUFFER_LENGTH__",'#define NUMBER_TIMING_MESSAGE_BUFFER	100')
+	        else:
+	          l_out = l_out.replace("__TIMING_BUFFER_LENGTH__", '');
+	      else:
+	        l_out = l_out.replace("__TIMING_BUFFER_LENGTH__", '');
+            if l_out.find("__TIMING_DECL__") != -1:
+	      if (c.timing==True):
+	        if (x.interface.name=='timingStatus'):
+	          l_out = l_out.replace("__TIMING_DECL__",'void send_timing_message(string component_name, string port_name, string function_name, string description, long number_samples);')
+	        else:
+	          l_out = l_out.replace("__TIMING_DECL__",'')
+	      else:
+	        l_out = l_out.replace("__TIMING_DECL__",'')
+            if l_out.find("__TIMING_VAR__") != -1:
+	      if (c.timing==True):
+	        if (x.interface.name=='timingStatus'):
+	          l_out = l_out.replace("__TIMING_VAR__",'time_signal_message message_buffer[NUMBER_TIMING_MESSAGE_BUFFER];\n    int message_buffer_write_idx;\n    omni_mutex writing_to_timing_buffer;\n    omni_semaphore *data_is_ready;')
+	        else:
+	          l_out = l_out.replace("__TIMING_VAR__",'')
+	      else:
+	        l_out = l_out.replace("__TIMING_VAR__",'')
+            if l_out.find("__ACE_SVC_DECL__") != -1:
+              if (c.ace == True):
+                  l_out = l_out.replace("__ACE_SVC_DECL__",'int svc(void);')
+              else:
+                  l_out = l_out.replace("__ACE_SVC_DECL__",'')
+            if l_out.find("__COMP_ARG__") != -1:
+                if c.type == "resource":
+                    l_out = l_out.replace("__COMP_ARG__",c.name+"_i *_"+c.name.lower())
+                else:
+                    l_out = l_out.replace("__COMP_ARG__","")
+            if l_out.find("__COMP_REF_DECL__") != -1:
+                if c.type == "resource":
+                    l_out = l_out.replace("__COMP_REF_DECL__",c.name+"_i *"+c.name.lower()+";")
+                else:
+                    l_out = l_out.replace("__COMP_REF_DECL__","")
+
+            output.write(l_out)
+
+  def writePortImplDef(self,output,portSample_p,portSample_u,c):
+    """ This function writes port implementation definitions for the port_impl.cpp file"""
+    intList = []
+    for x in c.ports:
+        if x.interface.name in intList:
+            continue
+        if x.type == "Uses":
+            portSample = portSample_u
+        else:
+            portSample = portSample_p
+        portSample.seek(0)
+        intList.append(x.interface.name)
+        for line in portSample.readlines():
+            l_out = line.replace("__IN_PORT__",x.p_cname)
+            l_out = l_out.replace("__INT_TYPE__",x.interface.name)
+            l_out = l_out.replace("__NAME_SPACE__",x.interface.nameSpace)
+            l_out = l_out.replace("__OUT_PORT__",x.u_cname)
+            if l_out.find("__OPERATION__") != -1:
+              l_out = l_out.replace("__OPERATION__",'')
+              l_out = l_out.replace("\n",'')
+              self.writeOperation(output,x.interface,prefix=l_out,cppFlag=True,in_name=c.name.lower(),using_ace=c.ace,comp=c,port=x)
+              continue
+            if l_out.find("__ACE_SVC_DEF__") != -1:
+              if c.ace == True:
+                  self.writeACESvcDef(output,x,'port',c.timing, c)
+              continue
+            if l_out.find("__TIMING_MESSAGE_DEF__") != -1:
+              if (c.timing == True) & (x.interface.name=='timingStatus'):
+                  self.writeTimingMessageDef(output,x,'port')
+              continue
+            if l_out.find("__COMP_ARG__") != -1:
+                if c.type == "resource":
+                    l_out = l_out.replace("__COMP_ARG__",c.name+"_i *_"+c.name.lower())
+                else:
+                    l_out = l_out.replace("__COMP_ARG__","")
+            if l_out.find("__COMP_REF_DEF__") != -1:
+                if c.type == "resource":
+                    l_out = l_out.replace("__COMP_REF_DEF__",c.name.lower()+" = _"+c.name.lower()+";")
+                else:
+                    l_out = l_out.replace("__COMP_REF_DEF__","")
+            if l_out.find("__INIT_VARS_DEF__") != -1:
+                if (c.type == "resource") & (x.interface.name=='timingStatus'):
+                    l_out = l_out.replace("__INIT_VARS_DEF__","message_buffer_write_idx = 0;\n    data_is_ready = new omni_semaphore(0);")
+                else:
+                    l_out = l_out.replace("__INIT_VARS_DEF__","")
+            output.write(l_out)
+
+  def writePortDecl(self, output,c):
+    """ This function writes the corba declarations of the ports to the component header file"""
+    inCount = 0; outCount=0;
+    for x in c.ports:
+        if x.type == "Provides":
+            ts = " "*8 + x.cname + " " + "*inPort" + str(inCount) + "_servant;\n"
+            output.write(ts)
+            inCount += 1
+    ts = "\n"; output.write(ts)
+    for x in c.ports:
+        if x.type == "Uses":
+            ts = " "*8 + x.cname + " " + "*outPort" + str(outCount) + "_servant;\n"
+            output.write(ts)
+            outCount += 1
+    ts = "\n"; output.write(ts)
+    inCount = 0; outCount=0;
+    for x in c.ports:
+        if x.type == "Provides":
+            ts = " "*8 + x.interface.nameSpace + "::" + x.interface.name + "_var " + "inPort" + str(inCount) + "_var;\n"
+            output.write(ts)
+            inCount += 1
+    ts = "\n"; output.write(ts)
+    for x in c.ports:
+        if x.type == "Uses":
+            ts = " "*8 + "CF::Port_var " + "outPort" + str(outCount) + "_var;\n"
+            ts += " "*8 + "bool outPort" + str(outCount) + "_active;\n"
+            ts += " "*8 + "size_t outPort" + str(outCount) + "_queue_size;\n"
+            output.write(ts)
+            outCount += 1
+    ts = " "*8 + "bool component_alive;\n\n" + " "*8 + "string naming_service_name;\n"; output.write(ts)
+
+  def writePortInst(self,output,c):
+    """ This function writes the port instantiations to the component cpp file"""
+    inCount = 0; outCount=0;
+    for x in c.ports:
+        if x.type == "Provides":
+            ts = " "*4 + "inPort" + str(inCount) + "_servant" + " = new " + x.cname + "(this);\n"
+            output.write(ts)
+            ts = " "*4 + "inPort" + str(inCount) + "_var = inPort" + str(inCount)+ "_servant->_this();\n"
+            output.write(ts)
+            inCount += 1
+    ts = "\n"; output.write(ts)
+    for x in c.ports:
+        if x.type == "Uses":
+            ts = " "*4 + "outPort" + str(outCount) + "_servant" + " = new " + x.cname + "(this);\n"
+            output.write(ts)
+            ts = " "*4 + "outPort" + str(outCount) + "_var = outPort" + str(outCount)+ "_servant->_this();\n"
+            ts += " "*4 + "outPort" + str(outCount) + "_active = false;\n"
+            ts += " "*4 + "outPort" + str(outCount) + "_queue_size = DEFAULT_QUEUE_BLOCK_SIZE;\n"
+            output.write(ts)
+            outCount += 1
+    ts = "\n"; output.write(ts)
+    ts = " "*4 + "queue_size = DEFAULT_QUEUE_BLOCK_SIZE;\n\n" + " "*4 + "component_alive = true;\n\n" + " "*4 + "naming_service_name = label;\n"; output.write(ts)
+
+  def writeGetPort(self,output,c):
+    """ This function writes the getPort functionality to the component cpp file"""
+    inCount = 0; outCount=0;
+    flag = True
+    for x in c.ports:
+        if x.type == "Provides":
+            if flag:
+                ts = " "*4 + 'if (strcmp(_id,"' + x.name + '") == 0) {\n'
+            else:
+                ts = " "*4 + 'else if (strcmp(_id,"' + x.name + '") == 0) {\n'
+            output.write(ts)
+#            ts = " "*8 + "return inPort" + str(inCount) + "_var;\n"
+            ts = " "*8 + "return " + x.interface.nameSpace + "::" + x.interface.name
+            ts += "::_duplicate(inPort" + str(inCount) + "_var);\n"
+            ts += " "*4 + "}\n"
+            output.write(ts)
+            inCount += 1
+    ts = "\n"; output.write(ts)
+    for x in c.ports:
+        if x.type == "Uses":
+            if flag:
+                ts = " "*4 + 'if (strcmp(_id,"' + x.name + '") == 0) {\n'
+            else:
+                ts = " "*4 + 'else if (strcmp(_id,"' + x.name + '") == 0) {\n'
+            output.write(ts)
+            ts = " "*8 + "outPort" + str(outCount) + "_active = true;\n"
+            ts += " "*8 + "return CF::Port::_duplicate(outPort" + str(outCount) + "_var);\n"
+            ts += " "*4 + "}\n"
+            output.write(ts)
+            outCount += 1
+    ts = "\n"; output.write(ts)
+    ts = " "*4 + 'return NULL;\n'; output.write(ts)
+
+  def writeDelPort(self,output,c):
+    """ This function writes the destructor functionality (for ports) to the component cpp file"""
+    inCount = 0; outCount=0;
+    flag = True
+    for x in c.ports:
+        if x.type == "Provides":
+            ts = " "*4 + "delete inPort" + str(inCount) + "_servant;\n"
+            output.write(ts)
+            inCount += 1
+    ts = "\n"; output.write(ts)
+    for x in c.ports:
+        if x.type == "Uses":
+            ts = " "*4 + "delete outPort" + str(outCount) + "_servant;\n"
+            output.write(ts)
+            outCount += 1
+    ts = "\n"; output.write(ts)
+
+##  def writeACESvcPorts(self,output,c):
+##    """ This function writes the svc port functionality to the component cpp file"""
+##    outCount=0;
+##    for x in c.ports:
+##        if x.type == "Uses":
+##            ts = " "*4 + "outPort" + str(outCount) + "_servant->activate();\n"
+##            output.write(ts)
+##            outCount += 1
+##    ts = "\n"; output.write(ts)
+
+  def writeACESvcDef(self, output,c,type,timing_flag, comp=''):
+    """ This function writes the implementation of the svn() function for a given component"""
+    if type == 'component':
+        ts = 'int ' + c.name + '_i::svc(void)\n{\n'
+        output.write(ts)
+        ts = " "*4 + '/* Start outgoing port threads */\n'
+        output.write(ts)
+        outCount=0;
+        for x in c.ports:
+            if x.type == "Uses":
+                ts = " "*4 + "outPort" + str(outCount) + "_servant->activate();\n"; output.write(ts)
+                outCount += 1
+        ts = "\n"; output.write(ts)
+        ts = " "*4 + 'std::vector<double> d1_data_double;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<float> d1_data_float;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<short> d1_data_short;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<float> d2_data_double;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<double> d2_data_float;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<short> d2_data_short;\n'; output.write(ts)
+        ts = " "*4 + 'ACE_Message_Block *mb;\n'; output.write(ts)
+        ts = " "*4 + '/* Main function loop */\n'; output.write(ts)
+        ts = " "*4 + 'while(component_alive)\n' + " "*4 + '{\n'; output.write(ts)
+	ts = " "*8 + "ACE_Time_Value getq_time_out = ACE_OS::gettimeofday();\n"; output.write(ts)
+	ts = " "*8 + "getq_time_out += 1;\n"; output.write(ts)
+	ts = " "*8 + "if(getq(mb, &getq_time_out) >= 0) {\n"; output.write(ts)
+	ts = " "*12 + "unsigned int buffer_size=mb->length();\n"; output.write(ts)
+	ts = " "*12 + "unsigned short data_type;\n"; output.write(ts)
+	ts = " "*12 + "ACE_OS::memmove( (char*)&data_type, mb->rd_ptr(), sizeof(unsigned short));\n"; output.write(ts)
+	ts = " "*12 + "mb->rd_ptr(sizeof(unsigned short));\n"; output.write(ts)
+	ts = " "*12 + "buffer_size=buffer_size - sizeof(unsigned short);\n"; output.write(ts)
+	ts = " "*12 + "unsigned int packet_size = 0;\n"; output.write(ts)
+	ts = " "*12 + "std::vector<double> data_I;\n"; output.write(ts)
+	ts = " "*12 + "std::vector<double> data_Q;\n"; output.write(ts)
+	ts = " "*12 + "// I've arbitrarily decided to use doubles as my working type inside the component\n"; output.write(ts)
+	ts = " "*12 + "//	the working type is implementation-specific\n"; output.write(ts)
+	ts = " "*12 + "switch(data_type) {\n"; output.write(ts)
+	ts = " "*16 + "case 1:\n"; output.write(ts)
+	ts = " "*20 + "// this is for complex double\n"; output.write(ts)
+	ts = " "*20 + "packet_size=buffer_size/(sizeof(double)*2);\n"; output.write(ts)
+	ts = " "*20 + "{\n"; output.write(ts)
+	ts = " "*24 + "std::vector <double> vals(packet_size*2);\n"; output.write(ts)
+	ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+	ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+	ts = " "*28 + "data_Q[i] = vals[i+packet_size];\n"; output.write(ts)
+	ts = " "*24 + "}\n"; output.write(ts)
+	ts = " "*20 + "}\n"; output.write(ts)
+	ts = " "*20 + "break;\n"; output.write(ts)
+	ts = " "*16 + "case 2:\n"; output.write(ts)
+	ts = " "*20 + "// this is for complex float\n"; output.write(ts)
+	ts = " "*20 + "packet_size=buffer_size/(sizeof(float)*2);\n"; output.write(ts)
+	ts = " "*20 + "{\n"; output.write(ts)
+	ts = " "*24 + "std::vector <float> vals(packet_size*2);\n"; output.write(ts)
+	ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+	ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+	ts = " "*28 + "data_Q[i] = vals[i+packet_size];\n"; output.write(ts)
+	ts = " "*24 + "}\n"; output.write(ts)
+	ts = " "*20 + "}\n"; output.write(ts)
+	ts = " "*20 + "break;\n"; output.write(ts)
+	ts = " "*16 + "case 3:\n"; output.write(ts)
+	ts = " "*20 + "// this is for complex short\n"; output.write(ts)
+	ts = " "*20 + "packet_size=buffer_size/(sizeof(short)*2);\n"; output.write(ts)
+	ts = " "*20 + "{\n"; output.write(ts)
+	ts = " "*24 + "std::vector <short> vals(packet_size*2);\n"; output.write(ts)
+	ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+	ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+	ts = " "*28 + "data_Q[i] = vals[i+packet_size];\n"; output.write(ts)
+	ts = " "*24 + "}\n"; output.write(ts)
+	ts = " "*20 + "}\n"; output.write(ts)
+	ts = " "*20 + "break;\n"; output.write(ts)
+	ts = " "*16 + "case 4:\n"; output.write(ts)
+	ts = " "*20 + "// this is for real double\n"; output.write(ts)
+	ts = " "*20 + "packet_size=buffer_size/(sizeof(double));\n"; output.write(ts)
+	ts = " "*20 + "{\n"; output.write(ts)
+	ts = " "*24 + "std::vector <double> vals(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+	ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+	ts = " "*28 + "data_Q[i] = 0;\n"; output.write(ts)
+	ts = " "*24 + "}\n"; output.write(ts)
+	ts = " "*20 + "}\n"; output.write(ts)
+	ts = " "*20 + "break;\n"; output.write(ts)
+	ts = " "*16 + "case 5:\n"; output.write(ts)
+	ts = " "*20 + "// this is for real float\n"; output.write(ts)
+	ts = " "*20 + "packet_size=buffer_size/(sizeof(float));\n"; output.write(ts)
+	ts = " "*20 + "{\n"; output.write(ts)
+	ts = " "*24 + "std::vector <float> vals(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+	ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+	ts = " "*28 + "data_Q[i] = 0;\n"; output.write(ts)
+	ts = " "*24 + "}\n"; output.write(ts)
+	ts = " "*20 + "}\n"; output.write(ts)
+	ts = " "*20 + "break;\n"; output.write(ts)
+	ts = " "*16 + "case 6:\n"; output.write(ts)
+	ts = " "*20 + "// this is for real short\n"; output.write(ts)
+	ts = " "*20 + "packet_size=buffer_size/(sizeof(short));\n"; output.write(ts)
+	ts = " "*20 + "{\n"; output.write(ts)
+	ts = " "*24 + "std::vector <short> vals(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+	ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+	ts = " "*28 + "data_Q[i] = 0;\n"; output.write(ts)
+	ts = " "*24 + "}\n"; output.write(ts)
+	ts = " "*20 + "}\n"; output.write(ts)
+	ts = " "*20 + "break;\n"; output.write(ts)
+	ts = " "*12 + "}\n"; output.write(ts)
+	#ts = " "*8 + "}\n"; output.write(ts)
+	ts = " "*12 + "mb->release();\n"; output.write(ts)
+	ts = " "*12 + "/*******************************************************************\n"; output.write(ts)
+	ts = " "*24 + "Insert functional code here\n"; output.write(ts)
+	ts = " "*12 + "*******************************************************************/\n\n"; output.write(ts)
+	ts = " "*12 + "/******************************************************************/\n\n"; output.write(ts)
+	ts = " "*12 + "// Prepare data for output\n"; output.write(ts)
+	ts = " "*12 + "d1_data_double.resize(packet_size);\n"; output.write(ts)
+	ts = " "*12 + "d1_data_float.resize(packet_size);\n"; output.write(ts)
+	ts = " "*12 + "d1_data_short.resize(packet_size);\n"; output.write(ts)
+	ts = " "*12 + "d2_data_double.resize(packet_size*2);\n"; output.write(ts)
+	ts = " "*12 + "d2_data_float.resize(packet_size*2);\n"; output.write(ts)
+	ts = " "*12 + "d2_data_short.resize(packet_size*2);\n\n"; output.write(ts)
+	ts = " "*12 + "for (unsigned int i=0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*16 + "d1_data_double[i] = data_I[i];\n"; output.write(ts)
+	ts = " "*16 + "d1_data_float[i] = data_I[i];\n"; output.write(ts)
+	ts = " "*16 + "d1_data_short[i] = (short)data_I[i];\n"; output.write(ts)
+	ts = " "*16 + "d2_data_double[i] = data_I[i];\n"; output.write(ts)
+	ts = " "*16 + "d2_data_double[i+packet_size] = data_Q[i];\n"; output.write(ts)
+	ts = " "*16 + "d2_data_float[i] = data_I[i];\n"; output.write(ts)
+	ts = " "*16 + "d2_data_float[i+packet_size] = data_Q[i];\n"; output.write(ts)
+	ts = " "*16 + "d2_data_short[i] = (short)data_I[i];\n"; output.write(ts)
+	ts = " "*16 + "d2_data_short[i+packet_size] = (short)data_Q[i];\n"; output.write(ts)
+	ts = " "*12 + "}\n"; output.write(ts)
+        outCount=0;
+        for x in c.ports:
+            if (x.type == "Uses") & ((x.interface.name == 'realDouble')|(x.interface.name == 'realFloat')|(x.interface.name == 'realShort')|(x.interface.name == 'complexDouble')|(x.interface.name == 'complexFloat')|(x.interface.name == 'complexShort')):
+                ts = " "*12 + "if (outPort" + str(outCount) + "_active) {\n"; output.write(ts)
+		if x.interface.name == 'realDouble':
+			DATA_TYPE_BEING_USED = 'double'
+			VECTOR_COUNT = '1'
+			VECTOR_NAME = 'd1_data_double'
+		if x.interface.name == 'realFloat':
+			DATA_TYPE_BEING_USED = 'float'
+			VECTOR_COUNT = '1'
+			VECTOR_NAME = 'd1_data_float'
+		if x.interface.name == 'realShort':
+			DATA_TYPE_BEING_USED = 'short'
+			VECTOR_COUNT = '1'
+			VECTOR_NAME = 'd1_data_short'
+		if x.interface.name == 'complexDouble':
+			DATA_TYPE_BEING_USED = 'double'
+			VECTOR_COUNT = '2'
+			VECTOR_NAME = 'd2_data_double'
+		if x.interface.name == 'complexFloat':
+			DATA_TYPE_BEING_USED = 'float'
+			VECTOR_COUNT = '2'
+			VECTOR_NAME = 'd2_data_float'
+		if x.interface.name == 'complexShort':
+			DATA_TYPE_BEING_USED = 'short'
+			VECTOR_COUNT = '2'
+			VECTOR_NAME = 'd2_data_short'
+                ts = " "*16 + "ACE_Message_Block *message = new ACE_Message_Block (packet_size*" + VECTOR_COUNT + "*sizeof(" + DATA_TYPE_BEING_USED + "));\n"; output.write(ts)
+                ts = " "*16 + "message->copy((const char*)&" + VECTOR_NAME + "[0], packet_size*" + VECTOR_COUNT + "*sizeof(" + DATA_TYPE_BEING_USED + "));\n"; output.write(ts)
+		ts = " "*16 + "size_t message_length = packet_size*" + VECTOR_COUNT + "*sizeof(" + DATA_TYPE_BEING_USED + ");\n"; output.write(ts)
+		ts = " "*16 + "size_t available_space = outPort" + str(outCount) + "_servant->msg_queue()->message_bytes();\n"; output.write(ts)
+		ts = " "*16 + "if (available_space<=(outPort" + str(outCount) + "_queue_size+message_length)) {\n"; output.write(ts)
+		ts = " "*20 + "outPort" + str(outCount) + "_queue_size+=QUEUE_BLOCK_SIZE;\n"; output.write(ts)
+		ts = " "*20 + "outPort" + str(outCount) + "_servant->water_marks (ACE_IO_Cntl_Msg::SET_HWM, outPort" + str(outCount) + "_queue_size);\n"; output.write(ts)
+		ts = " "*16 + "}\n"; output.write(ts)
+                ts = " "*16 + "if (outPort" + str(outCount) + "_servant->putq(message) == -1) {\n"; output.write(ts)
+                ts = " "*20 + "//  this is where a message for issues with the putq would appear\n"; output.write(ts)
+                ts = " "*16 + "}\n"; output.write(ts)
+                ts = " "*12 + "}\n"; output.write(ts)
+                outCount += 1
+	ts = " "*8 + "}\n"; output.write(ts)
+	ts = " "*8 + "/* Polling rate, slow CPU spinning */\n"; output.write(ts)
+	ts = " "*8 + "//ACE_OS::sleep (ACE_Time_Value (1));\n"; output.write(ts)
+        ts = " "*4 + '}\n\n' + " "*4 + 'return 0;\n}\n'; output.write(ts)
+
+    if type == 'port':
+        #ts = 'int ' + c.u_cname + '::svc(void)\n{\n'; output.write(ts)
+        #ts = " "*4 + 'ACE_Message_Block *mb;\n\n'; output.write(ts)
+        #ts = " "*4 + 'while(1)\n' + " "*4 + '{\n' + " "*8 + 'if (getq(mb) == -1)\n'
+        #output.write(ts)
+        #ts = " "*8 + '{\n' + " "*12 + 'ACE_ERROR_RETURN ((LM_ERROR, ' + r'"%p\n",'
+        #ts = ts + ' "getq"), -1);\n'
+        #output.write(ts)
+        #ts = " "*8 + '}\n\n' + " "*8 + '/* _complexShort->pushPacket(); */\n\n'
+        #output.write(ts)
+        #ts = " "*8 + '/* Release message block */\n' + " "*8 + 'mb->release();\n'
+        #output.write(ts)
+        #ts = " "*4 + '}\n' + " "*4 + 'return 0;\n}\n'
+        #output.write(ts)
+		# the following stuff is a work in progress
+		#	it needs to be reconciled with the contents of the actual port
+		#	This will be interesting for control ports instead of data ports
+		#	in the case of control ports, it will likely need a slightly different structure
+	#print c.interface.name
+        ts = 'int ' + c.u_cname + '::svc(void)\n{\n'; output.write(ts)
+	if ((c.interface.name == 'realDouble')|(c.interface.name == 'realFloat')|(c.interface.name == 'realShort')|(c.interface.name == 'complexDouble')|(c.interface.name == 'complexFloat')|(c.interface.name == 'complexShort')):
+		ts = " "*4 + 'ACE_Message_Block *mb;\n'; output.write(ts)
+		if c.interface.name == 'realDouble':
+			DATA_TYPE_BEING_USED = 'double'
+			DATA_TYPE_USED = 'Double'
+			ARGUMENT_LIST_FOR_PUSH = ' I'
+		if c.interface.name == 'realFloat':
+			DATA_TYPE_BEING_USED = 'float'
+			DATA_TYPE_USED = 'Float'
+			ARGUMENT_LIST_FOR_PUSH = ' I'
+		if c.interface.name == 'realShort':
+			DATA_TYPE_BEING_USED = 'short'
+			DATA_TYPE_USED = 'Short'
+			ARGUMENT_LIST_FOR_PUSH = ' I'
+		if c.interface.name == 'complexDouble':
+			DATA_TYPE_BEING_USED = 'double'
+			DATA_TYPE_USED = 'Double'
+			ARGUMENT_LIST_FOR_PUSH = ' I, Q'
+		if c.interface.name == 'complexFloat':
+			DATA_TYPE_BEING_USED = 'float'
+			DATA_TYPE_USED = 'Float'
+			ARGUMENT_LIST_FOR_PUSH = ' I, Q'
+		if c.interface.name == 'complexShort':
+			DATA_TYPE_BEING_USED = 'short'
+			DATA_TYPE_USED = 'Short'
+			ARGUMENT_LIST_FOR_PUSH = ' I, Q'
+		ts = " "*4 + 'vector < ' + DATA_TYPE_BEING_USED + ' > vals;\n'; output.write(ts)
+		ts = " "*4 + 'PortTypes::' + DATA_TYPE_USED + 'Sequence ' + ARGUMENT_LIST_FOR_PUSH +';\n\n'; output.write(ts)
+		ts = " "*4 + 'while(1)\n' + " "*8 + '{\n'; output.write(ts)
+		ts = " "*8 + 'ACE_Time_Value getq_time_out = ACE_OS::gettimeofday();\n'; output.write(ts)
+		ts = " "*8 + 'getq_time_out += 1;\n'; output.write(ts)
+		ts = " "*8 + 'if(getq(mb, &getq_time_out) >= 0) {\n'; output.write(ts)
+		portCount = 0
+		if c.interface.name == 'realDouble':
+			NUMBER_OF_VECTORS = '1'
+		if c.interface.name == 'realFloat':
+			NUMBER_OF_VECTORS = '1'
+		if c.interface.name == 'realShort':
+			NUMBER_OF_VECTORS = '1'
+		if c.interface.name == 'complexDouble':
+			NUMBER_OF_VECTORS = '2'
+		if c.interface.name == 'complexFloat':
+			NUMBER_OF_VECTORS = '2'
+		if c.interface.name == 'complexShort':
+			NUMBER_OF_VECTORS = '2'
+		for individual_port in comp.ports:
+			if individual_port.type == "Uses":
+				if individual_port.interface.name == 'timingStatus':
+					ts = " "*12 + "if (" + comp.name.lower() + "->outPort" + str(portCount) + '_active) {\n'; output.write(ts)
+					ts = " "*16 + comp.name.lower() + "->outPort" + str(portCount) + '_servant->send_timing_message(' + comp.name.lower() + '->naming_service_name, "' + c.name + '", "pushPacket", "begin", mb->length()/(sizeof('+ DATA_TYPE_BEING_USED +')*'+ NUMBER_OF_VECTORS +'));\n'; output.write(ts)
+					ts = " "*12 + '}\n'; output.write(ts)
+				portCount += 1
+		ts = " "*12 + 'unsigned int buffer_size=mb->length();\n'; output.write(ts)
+		ts = " "*12 + 'unsigned int packet_size=buffer_size/(sizeof(' + DATA_TYPE_BEING_USED + ')*' + NUMBER_OF_VECTORS + ');\n'; output.write(ts)
+		ts = " "*12 + 'vals.resize(packet_size*' + NUMBER_OF_VECTORS + ');\n'; output.write(ts)
+		if c.interface.name == 'realDouble':
+			ts = " "*12 + 'I.length(packet_size);\n'; output.write(ts)
+		if c.interface.name == 'realFloat':
+			ts = " "*12 + 'I.length(packet_size);\n'; output.write(ts)
+		if c.interface.name == 'realShort':
+			ts = " "*12 + 'I.length(packet_size);\n'; output.write(ts)
+		if c.interface.name == 'complexDouble':
+			ts = " "*12 + 'I.length(packet_size);\n'+" "*12 + 'Q.length(packet_size);\n'; output.write(ts)
+		if c.interface.name == 'complexFloat':
+			ts = " "*12 + 'I.length(packet_size);\n'+" "*12 + 'Q.length(packet_size);\n'; output.write(ts)
+		if c.interface.name == 'complexShort':
+			ts = " "*12 + 'I.length(packet_size);\n'+" "*12 + 'Q.length(packet_size);\n'; output.write(ts)
+		ts = " "*12 + 'ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n'; output.write(ts)
+		ts = " "*12 + 'for (unsigned int i=0; i<packet_size; i++) {\n'; output.write(ts)
+		if c.interface.name == 'realDouble':
+			ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+		if c.interface.name == 'realFloat':
+			ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+		if c.interface.name == 'realShort':
+			ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+		if c.interface.name == 'complexDouble':
+			ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+			ts = " "*16 + 'Q[i]=vals[i+packet_size];\n'; output.write(ts)
+		if c.interface.name == 'complexFloat':
+			ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+			ts = " "*16 + 'Q[i]=vals[i+packet_size];\n'; output.write(ts)
+		if c.interface.name == 'complexShort':
+			ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+			ts = " "*16 + 'Q[i]=vals[i+packet_size];\n'; output.write(ts)
+		ts = " "*12 + '}\n'; output.write(ts)
+		ts = " "*12 + 'for (unsigned int i = 0; i < outPorts.size(); i++) {\n'; output.write(ts)
+		ts = " "*16 + 'outPorts[i].port_var->pushPacket( ' + ARGUMENT_LIST_FOR_PUSH + ' );\n'; output.write(ts)
+		ts = " "*12 + '}\n'; output.write(ts)
+		portCount = 0
+		for individual_port in comp.ports:
+			if individual_port.type == "Uses":
+				if individual_port.interface.name == 'timingStatus':
+					ts = " "*12 + "if (" + comp.name.lower() + "->outPort" + str(portCount) + '_active) {\n'; output.write(ts)
+					ts = " "*16 + comp.name.lower() + "->outPort" + str(portCount) + '_servant->send_timing_message(' + comp.name.lower() + '->naming_service_name, "' + c.name + '", "pushPacket", "end", mb->length()/(sizeof('+ DATA_TYPE_BEING_USED +')*'+ NUMBER_OF_VECTORS +'));\n'; output.write(ts)
+					ts = " "*12 + '}\n'; output.write(ts)
+				portCount += 1
+		ts = " "*12 + 'mb->release();\n'; output.write(ts)
+		ts = " "*8 + '}\n'; output.write(ts)
+    		ts = " "*4 + '}\n' + " "*4 + 'return 0;\n}\n'
+    		output.write(ts)
+	else:
+	        if timing_flag & (c.interface.name=='timingStatus'):
+	        	ts = " "*4 + 'dataOut_timingStatus_i *output_port = this;\n'; output.write(ts)
+	        	ts = " "*4 + 'int message_buffer_read_idx = 0;\n'; output.write(ts)
+	        	ts = " "*4 + '\n'; output.write(ts)
+	        	ts = " "*4 + 'while(1) {\n'; output.write(ts)
+	        	ts = " "*8 + 'output_port->data_is_ready->wait();\n'; output.write(ts)
+	        	ts = " "*8 + 'for (unsigned int i = 0; i < output_port->outPorts.size(); i++) {\n'; output.write(ts)
+	        	ts = " "*12 + 'output_port->outPorts[i].port_var->send_timing_event(output_port->message_buffer[message_buffer_read_idx].component_name,\n'; output.write(ts)
+	        	ts = " "*16 + 'output_port->message_buffer[message_buffer_read_idx].port_name,\n'; output.write(ts)
+	        	ts = " "*16 + 'output_port->message_buffer[message_buffer_read_idx].function_name,\n'; output.write(ts)
+	        	ts = " "*16 + 'output_port->message_buffer[message_buffer_read_idx].description,\n'; output.write(ts)
+	        	ts = " "*16 + 'output_port->message_buffer[message_buffer_read_idx].time_s,\n'; output.write(ts)
+	        	ts = " "*16 + 'output_port->message_buffer[message_buffer_read_idx].time_us,\n'; output.write(ts)
+	        	ts = " "*16 + 'output_port->message_buffer[message_buffer_read_idx].number_samples);\n'; output.write(ts)
+	        	ts = " "*8 + '}\n'; output.write(ts)
+	        	ts = " "*8 + 'message_buffer_read_idx++;\n'; output.write(ts)
+	        	ts = " "*8 + 'message_buffer_read_idx = message_buffer_read_idx%NUMBER_TIMING_MESSAGE_BUFFER;\n'; output.write(ts)
+	        	ts = " "*4 + '}\n'; output.write(ts)
+	        	ts = " "*4 + 'return 0;\n'; output.write(ts)
+	        	ts = '}\n'; output.write(ts)
+		else:
+	        	ts = " "*4 + 'return 0;\n' + '}\n'; output.write(ts)
+
+  def writeTimingMessageDef(self, output,c,type):
+    if type == 'port':
+    	ts = 'void ' + c.u_cname + '::send_timing_message(string component_name, string port_name, string function_name, string description, long number_samples) {\n'; output.write(ts)
+    	ts = " "*4 + 'writing_to_timing_buffer.lock();\n'; output.write(ts)
+    	ts = " "*4 + 'struct timeval tv;\n'; output.write(ts)
+    	ts = " "*4 + 'struct timezone tz;\n'; output.write(ts)
+    	ts = " "*4 + 'gettimeofday(&tv, &tz);\n'; output.write(ts)
+    	ts = " "*4 + 'strcpy(message_buffer[message_buffer_write_idx].component_name, component_name.c_str());\n'; output.write(ts)
+    	ts = " "*4 + 'strcpy(message_buffer[message_buffer_write_idx].port_name, port_name.c_str());\n'; output.write(ts)
+    	ts = " "*4 + 'strcpy(message_buffer[message_buffer_write_idx].function_name, function_name.c_str());\n'; output.write(ts)
+    	ts = " "*4 + 'strcpy(message_buffer[message_buffer_write_idx].description, description.c_str());\n'; output.write(ts)
+    	ts = " "*4 + 'message_buffer[message_buffer_write_idx].time_s = tv.tv_sec;\n'; output.write(ts)
+    	ts = " "*4 + 'message_buffer[message_buffer_write_idx].time_us = tv.tv_usec;\n'; output.write(ts)
+    	ts = " "*4 + 'message_buffer[message_buffer_write_idx].number_samples = number_samples;\n'; output.write(ts)
+    	ts = " "*4 + 'message_buffer_write_idx++;\n'; output.write(ts)
+    	ts = " "*4 + 'message_buffer_write_idx = message_buffer_write_idx%NUMBER_TIMING_MESSAGE_BUFFER;\n'; output.write(ts)
+    	ts = " "*4 + 'writing_to_timing_buffer.unlock();\n'; output.write(ts)
+    	ts = " "*4 + 'data_is_ready->post();\n'; output.write(ts)
+    	ts = '}\n'; output.write(ts)
+
+  def writeOperation(self,output,i,prefix='',cppFlag=False,in_name='',using_ace=False,comp='',port=''):
+    """ Writes the declaration or definition of an operation (pushPacket) to
+        the port_impl.h and port_impl.cpp files respectively """
+    ocount = 0
+    for o in i.operations:
+
+
+        ocount += 1
+        if cppFlag:
+            if ocount > 1:
+                ts = "\n" + o.returnType + ' ' + prefix + o.name + '('
+                tscxx = "\n" + o.cxxReturnType + ' ' + prefix + o.name + '('
+            else:
+                ts = o.returnType + ' ' + prefix + o.name + '('
+                tscxx = o.cxxReturnType + ' ' + prefix + o.name + '('
+        else:
+            ts = prefix + " "*4 + o.returnType + ' ' + o.name + '('
+            tscxx = prefix + " "*4 + o.cxxReturnType + ' ' + o.name + '('
+
+        first = True
+        for p in o.params:
+            _USE_AMPERSAND_ = ''
+            _USE_CONST_ = 'const '
+            _USE__OUT_ = ''
+	    if p.direction == 'out':
+                if len(p.dataType) > 8 and p.dataType[-8:] != 'Sequence':
+                    _USE_CONST_ = ''
+                    _USE_AMPERSAND_ = '&'
+                if len(p.dataType) <= 8:
+                    _USE_CONST_ = ''
+                    _USE_AMPERSAND_ = '&'
+	    if p.direction == 'in' and len(p.dataType) > 8 and p.dataType[-8:] == 'Sequence':
+                _USE_AMPERSAND_ = '&'
+	    if p.direction == 'inout' and len(p.dataType) > 8 and p.dataType[-8:] == 'Sequence':
+                _USE_CONST_ = ''
+                _USE_AMPERSAND_ = '&'
+	    if p.direction == 'out' and len(p.dataType) > 8 and p.dataType[-8:] == 'Sequence':
+                _USE__OUT_ = '_out'
+
+            if not first:
+                ts += ','
+                tscxx += ','
+            else:
+                first = False
+            ts += _USE_CONST_ + p.dataType + _USE__OUT_ + ' ' + _USE_AMPERSAND_ + p.name
+            tscxx += p.cxxType + ' ' + p.name
+        #if len(o.params) != 0:
+        if cppFlag:
+            ts += ')\n'
+            tscxx += ')\n'
+        else:
+            ts += ');\n'
+            tscxx += ');\n'
+#        output.write(ts)
+        output.write(tscxx)
+
+        if cppFlag:
+		#ts = "{\n" + " "*4 + "unsigned int len = " + "hello" + ".length();\n"; output.write(ts)
+            	#ts = "{\n\n" + " "*4 + "/* Data flow and processing goes here */\n\n"; output.write(ts)
+		if using_ace:
+			if len(o.params)>0:
+				if _USE__OUT_ == '' :
+					if ((o.params[0].dataType == 'PortTypes::DoubleSequence')|(o.params[0].dataType == 'PortTypes::FloatSequence')|(o.params[0].dataType == 'PortTypes::ShortSequence')):
+						portCount = 0
+						ts = "{\n"; output.write(ts)
+						for individual_port in comp.ports:
+							if individual_port.type == "Uses":
+								if individual_port.interface.name == 'timingStatus':
+									ts = " "*4 + "if (" + comp.name.lower() + "->outPort" + str(portCount) + '_active) {\n'; output.write(ts)
+									ts = " "*8 + comp.name.lower() + "->outPort" + str(portCount) + '_servant->send_timing_message(' + comp.name.lower() + '->naming_service_name, "' + port.name + '", "' + o.name + '", "begin", I.length());\n'; output.write(ts)
+									ts = " "*4 + '}\n'; output.write(ts)
+								portCount += 1
+						ts = " "*4 + "unsigned int len = " + o.params[0].name + ".length();\n"; output.write(ts)
+						if o.params[0].dataType == 'PortTypes::DoubleSequence':
+							TYPE_NAME = 'double';
+						if o.params[0].dataType == 'PortTypes::FloatSequence':
+							TYPE_NAME = 'float';
+						if o.params[0].dataType == 'PortTypes::ShortSequence':
+							TYPE_NAME = 'short';
+						if len(o.params) == 1:
+							NUMBER_VECS = '1'
+							if o.params[0].dataType == 'PortTypes::DoubleSequence':
+								DATA_TYPE = '4';
+							if o.params[0].dataType == 'PortTypes::FloatSequence':
+								DATA_TYPE = '5';
+							if o.params[0].dataType == 'PortTypes::ShortSequence':
+								DATA_TYPE = '6';
+						if len(o.params) == 2:
+							NUMBER_VECS = '2'
+							if o.params[0].dataType == 'PortTypes::DoubleSequence':
+								DATA_TYPE = '1';
+							if o.params[0].dataType == 'PortTypes::FloatSequence':
+								DATA_TYPE = '2';
+							if o.params[0].dataType == 'PortTypes::ShortSequence':
+								DATA_TYPE = '3';
+						ts = " "*4 + "vector <" + TYPE_NAME + "> data_in(len*" + NUMBER_VECS + ");\n"; output.write(ts)
+						ts = " "*4 + "char *buffer;\n"; output.write(ts)
+						ts = " "*4 + "buffer = new char[len*" + NUMBER_VECS + "*sizeof(" + TYPE_NAME + ")+sizeof(unsigned short)];\n\n"; output.write(ts)
+						ts = " "*4 + "for (unsigned int i = 0; i<len; i++) {\n"; output.write(ts)
+						if len(o.params) == 1:
+							ts = " "*8 + "data_in[i] = " + o.params[0].name + "[i];\n"; output.write(ts)
+						if len(o.params) == 2:
+							ts = " "*8 + "data_in[i] = " + o.params[0].name + "[i];\n"; output.write(ts)
+							ts = " "*8 + "data_in[i+len] = " + o.params[1].name + "[i];\n"; output.write(ts)
+						ts = " "*4 + "}\n"; output.write(ts)
+						ts = " "*4 + "unsigned short data_type = " + DATA_TYPE + ";\n"; output.write(ts)
+						ts = " "*4 + "memcpy(buffer, &data_type, sizeof(unsigned short));\n"; output.write(ts)
+						ts = " "*4 + "memcpy(&buffer[sizeof(unsigned short)], (char *)&data_in[0], len*" + NUMBER_VECS + "*sizeof(" + TYPE_NAME + ")+sizeof(unsigned short));\n"; output.write(ts)
+						ts = "\n" + " "*4 + "ACE_Message_Block *message = new ACE_Message_Block (len*" + NUMBER_VECS + "*sizeof(" + TYPE_NAME + ")+sizeof(unsigned short));\n"; output.write(ts)
+						ts = " "*4 + "message->copy((const char*)&buffer[0], len*" + NUMBER_VECS + "*sizeof(" + TYPE_NAME + ")+sizeof(unsigned short));\n"; output.write(ts)
+						ts = " "*4 + "size_t message_length = len*" + NUMBER_VECS + "*sizeof(" + TYPE_NAME + ")+sizeof(unsigned short);\n"; output.write(ts)
+						ts = " "*4 + "size_t available_space = " + in_name + "->msg_queue()->message_bytes();\n"; output.write(ts)
+						ts = " "*4 + "if (available_space<=(" + in_name + "->queue_size+message_length)) {\n"; output.write(ts)
+						ts = " "*8 + "" + in_name + "->queue_size+=QUEUE_BLOCK_SIZE;\n"; output.write(ts)
+						ts = " "*8 + "" + in_name + "->water_marks (ACE_IO_Cntl_Msg::SET_HWM," + in_name + "->queue_size);\n"; output.write(ts)
+						ts = " "*4 + "}\n"; output.write(ts)
+						ts = " "*4 + "if (" + in_name + "->putq(message) == -1) {\n"; output.write(ts)
+						ts = " "*8 + "// this is where there would be a message about the putq failing\n"; output.write(ts)
+						ts = " "*4 + "}\n"; output.write(ts)
+						portCount = 0
+						for individual_port in comp.ports:
+							if individual_port.type == "Uses":
+								if individual_port.interface.name == 'timingStatus':
+									ts = " "*4 + "if (" + comp.name.lower() + "->outPort" + str(portCount) + '_active) {\n'; output.write(ts)
+									ts = " "*8 + comp.name.lower() + "->outPort" + str(portCount) + '_servant->send_timing_message(' + comp.name.lower() + '->naming_service_name, "' + port.name + '", "' + o.name + '", "end", I.length());\n'; output.write(ts)
+									ts = " "*4 + '}\n'; output.write(ts)
+								portCount += 1
+						ts = " "*4 + "\ndelete buffer;\n}\n"; output.write(ts)
+				        	#ts += " "*4 + "/* if using ACE:\n\n" + " "*7
+					        #ts += "ACE_Message_Block *mb;\n" + " "*7 + "putq(mb);\n"
+	        				#ts += " "*4 + "*/\n\n}\n"
+				        	#output.write(ts)
+					else:
+						ts = "{\n\n}\n"; output.write(ts)
+				else:
+					ts = "{\n\n}\n"; output.write(ts)
+			else:
+				ts = "{\n\n}\n"; output.write(ts)
+		else:
+			ts = "{\n\n}\n"; output.write(ts)
+
+  def writeFriendDecl(self,output,c):
+      friendList = []
+      for p in c.ports:
+          if p.type == "Uses":
+              if p.u_cname not in friendList:
+                  friendList.append(p.u_cname)
+          if p.type == "Provides":
+              if p.p_cname not in friendList:
+                  friendList.append(p.p_cname)
+
+      for x in friendList:
+          ts = " "*4 + "friend class " + x + ";\n"
+          output.write(ts)
+
+
+  def addPreamble(self,outFile,name):
+      if(self.preamble == None):
+          inFile = open(self.sourcepreamble,'r')
+          for line in inFile.readlines():
+              l_out = line.replace("__COMP_NAME__",name)
+              #l_out = l_out.replace("__YEAR__",date.today().year.__str__())
+              #l_out = l_out.replace("__DEVELOPER__",self.developer)
+              outFile.write(l_out)
+
+          inFile.close()
+      else:
+          outFile.write(preamble)
+
+
+  def cleanUp(self):
+      # Move the AssemblyController to the waveform Dir
+      for c in self.active_wave.components:
+        if c.AssemblyController == True and c.generate:
+            shutil.move(self.path + c.name, self.path + self.active_wav.name)
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/Makefile.am	(revision 9911)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/Makefile.am	(revision 9911)
@@ -0,0 +1,7 @@
+SUBDIRS = basic_xml templates
+
+EXTRA_DIST = genNode.py \
+	     generic_preamble \
+	     reconf \
+	     __init__.py
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/reconf
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/reconf	(revision 9596)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/reconf	(revision 9596)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+libtoolize
+rm -f config.cache
+aclocal
+autoconf
+automake --foreign --add-missing
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample_u.h
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample_u.h	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample_u.h	(revision 4961)
@@ -0,0 +1,48 @@
+// Declaration for uses ports
+
+#ifndef __OUT_CLASS___H
+#define __OUT_CLASS___H
+__TIMING_BUFFER_LENGTH__
+class __OUT_PORT__ : 
+public virtual POA_CF::Port__ACE_INHERIT__
+{
+  public:
+    __OUT_PORT__(__COMP_ARG__);
+    void connectPort(CORBA::Object_ptr connection, const char* connectionId);
+    void disconnectPort(const char* connectionId);
+    __ACE_SVC_DECL__
+    __TIMING_DECL__
+    
+    __TIMING_VAR__
+
+    //Port Information Storage Class
+    class PortInfo {
+      public:
+        PortInfo(__NAME_SPACE__::__INT_TYPE___var _port, const char *&_id)
+        {
+            port_var = _port;
+            connectionId = _id;
+        };
+
+        PortInfo(const PortInfo &cp)
+        {
+            port_var = cp.port_var;
+            connectionId = cp.connectionId;
+        };
+
+        __NAME_SPACE__::__INT_TYPE___var port_var;
+        std::string connectionId;
+
+      private:
+        PortInfo(); //no default constructor
+    };
+
+    std::vector <__OUT_PORT__::PortInfo> get_ports();
+
+  private:
+    std::vector <__OUT_PORT__::PortInfo> outPorts;
+    __COMP_REF_DECL__
+
+};
+#endif
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/genStructure.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/genStructure.py	(revision 10362)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/genStructure.py	(revision 10362)
@@ -0,0 +1,1239 @@
+#! /usr/bin/env python
+
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import sys, os, shutil
+from WaveDev.wavedev.cfg import LoadConfiguration
+from datetime import date
+
+try:
+    from WaveDev.wavedev.errorMsg import *
+except ImportError:
+    print "ERROR: custom_ports/genStructure.py could not import WaveDev module"
+    print "  - Is /sdr/tools included in ossie.pth?"
+    sys.exit(0)
+
+class genAll:
+  def __init__(self, path, wavedevPath, active_wave, preamble=None):
+    if path[len(path)-1] != '/':
+        path = path + '/'
+    self.path = path
+    if len(wavedevPath) > 0 and wavedevPath[len(wavedevPath)-1] != '/':
+        wavedevPath = wavedevPath + '/'
+    self.wavedevPath = wavedevPath
+    self.active_wave = active_wave
+    self.preamble = preamble
+    LoadConfiguration(self)
+
+  ##############################################################################
+  ## genDirs - this function generates the directory structure for the generated
+  ##           code for the waveform; puts required files in main folder
+  ##############################################################################
+  def genDirs(self):
+    if os.path.exists(self.path) == False:
+       errorMsg(self,"Output directory does not exist")
+       exit(1)
+
+    if os.path.exists(self.path+self.active_wave.name) == False:
+        os.mkdir(self.path + self.active_wave.name)
+
+    shutil.copy(self.wavedevPath + 'generate/reconf',self.path + self.active_wave.name)
+    os.chmod(self.path + self.active_wave.name + '/reconf', 0755)
+    #for x in os.listdir(self.wavedevPath + 'generate/basic_xml/'):
+    #    if not os.path.isdir(x):
+    #        shutil.copy(self.wavedevPath + 'generate/basic_xml/' + x,self.path + self.active_wave.name)
+
+    for x in self.active_wave.components:
+        if x.generate:
+            if os.path.exists(self.path+x.name) == False:
+                os.mkdir(self.path+x.name)
+            if x.AssemblyController != True:
+                shutil.copy(self.wavedevPath + 'generate/reconf',self.path + x.name)
+                os.chmod(self.path + x.name + '/reconf', 0755)
+                #for f in os.listdir(self.wavedevPath + 'generate/basic_xml/'):
+                #    if not os.path.isdir(f):
+                #        shutil.copy(self.wavedevPath + 'generate/basic_xml/' + f,self.path + x.name)
+                if self.licensefile != "":
+                    shutil.copy(self.licensefile,self.path + x.name + '/LICENSE')
+
+  ##############################################################################
+  ## writeMakefiles - generates the make file for the waveform and then calls
+  ##                  writeCompMakefile for each seperate component
+  ##############################################################################
+  def writeMakefiles(self,DevMan_flag):
+    output = open(self.path + self.active_wave.name + '/Makefile.am','w')
+
+    Flags = ["-Wall"]
+    self.info2str(output,"AM_CXXFLAGS = ",Flags,1)
+
+    tstr = "ossieName = " + self.active_wave.name + '\n\n'
+    output.write(tstr)
+
+    tstr = "SUBDIRS = "
+    for c in self.active_wave.components:
+        if c.AssemblyController == True and c.generate:
+            tstr += c.name + '\n\n'
+            output.write(tstr)
+
+    tstr = "waveformdir = $(prefix)/dom/waveforms/$(ossieName)\n"
+    #tstr = "waveformdir = $(prefix)/waveforms/" + self.active_wave.name + "\n"
+
+
+    output.write(tstr)
+
+    waveform_data = []
+    waveform_data.append(self.active_wave.name + ".sad.xml")
+    waveform_data.append(self.active_wave.name + "_DAS.xml")
+    # If there is only one node - then install device manager files as well
+    #if DevMan_flag:
+    #    waveform_data.append("DeviceManager.dcd.xml")
+    #    waveform_data.append("DeviceManager.spd.xml")
+    #    waveform_data.append("DeviceManager.scd.xml")
+    #    waveform_data.append("DeviceManager.prf.xml")
+    #waveform_data.append("DomainManager.dmd.xml")
+    #waveform_data.append("DomainManager.spd.xml")
+    #waveform_data.append("DomainManager.scd.xml")
+    #waveform_data.append("DomainManager.prf.xml")
+
+    self.info2str(output,"dist_waveform_DATA = ", waveform_data,1)
+
+    output.close()
+
+    for c in self.active_wave.components:
+        if c.generate:
+            tmpPath = self.path + c.name
+            self.writeCompMakefile(c,tmpPath)
+
+  ##############################################################################
+  ## writeCompMakefilee - generates the make file for an indivdual component
+  ##############################################################################
+  def writeCompMakefile(self,comp,compPath):
+    if compPath[len(compPath)-1] != '/':
+        compPath = compPath + '/'
+
+    header = "%SK.cpp %.h : %.idl\n\t@IDL@ @IDL_FLAGS@ "
+    header += "-bcxx -Wbh=.h -Wbs=SK.cpp -Wbkeep_inc_path $<\n\n"
+    header += "%.idl :\n\tcp @SI_PATH@/standardinterfaces/$@ .\n"
+
+    Flags = ["-Wall"]
+
+    output = open(compPath + 'Makefile.am','w')
+    output.writelines(header + "\n")
+    self.info2str(output,"AM_CXXFLAGS = ",Flags,1)
+
+    BuiltSources = []
+    CleanFiles = []
+    tempIntList = []
+    nodist = []
+    for x in comp.ports:
+        #if x.interface.name in tempIntList:
+        if x.interface.filename in tempIntList:
+    	   continue
+##        BuiltSources.append(x.interface.name+'SK.cpp')
+##        BuiltSources.append(x.interface.name+'.idl')
+##        CleanFiles.append(x.interface.name+'SK.cpp')
+##        CleanFiles.append(x.interface.name+'.idl')
+##        CleanFiles.append(x.interface.name+'.h')
+##        nodist.append(x.interface.name+'SK.cpp')
+##        tempIntList.append(x.interface.name)
+        BuiltSources.append(x.interface.filename+'SK.cpp')
+        BuiltSources.append(x.interface.filename+'.idl')
+        CleanFiles.append(x.interface.filename+'SK.cpp')
+        CleanFiles.append(x.interface.filename+'.idl')
+        CleanFiles.append(x.interface.filename+'.h')
+        nodist.append(x.interface.filename+'SK.cpp')
+        tempIntList.append(x.interface.filename)
+
+    self.info2str(output,"BUILT_SOURCES = ",BuiltSources,wrapFlag=True)
+    self.info2str(output,"CLEANFILES = ",CleanFiles,1)
+
+    tstr = "ossieName = " + comp.name + "\n"
+    output.write(tstr)
+    tstr = "bin_PROGRAMS = " + comp.name + "\n\n"
+    output.write(tstr)
+
+    tstr = "xmldir = $(prefix)/dom/xml/$(ossieName)\n"
+    output.write(tstr)
+    #tstr2 = comp.name + "Resource"
+    tstr2 = comp.name
+    xmlData = []
+    xmlData.append(tstr2 + ".prf.xml")
+    xmlData.append(tstr2 + ".scd.xml")
+    xmlData.append(tstr2 + ".spd.xml")
+    self.info2str(output,"dist_xml_DATA = ",xmlData,1,wrapFlag=True)
+
+    tstr = comp.name + "_SOURCES = " + comp.name+".cpp " + comp.name+".h "
+    tstr += "main.cpp port_impl.cpp port_impl.h\n"
+    output.write(tstr)
+    self.info2str(output,"nodist_"+comp.name+"_SOURCES = ",nodist,1)
+
+    output.close()
+
+  def info2str(self, outfile, staticStr, mylist, extraLine=0,wrapFlag=False):
+    tstr = staticStr
+    mycount = 0
+    wrap = False
+    if len(mylist) > 5 or wrapFlag == True:
+	wrap = True
+
+    for x in mylist:
+      tstr = tstr + x + " "
+      mycount += 1
+      if mycount%2 == 0 and wrap and mylist.index(x) != len(mylist)-1:
+        tstr = tstr + "\\\n"
+
+    tstr = tstr + "\n"
+    for x in range(extraLine):
+      tstr = tstr + "\n"
+
+    outfile.write(tstr)
+
+  ##############################################################################
+  ## genConfigureACFiles - calls writeConfAC for appropriate locations
+  ##############################################################################
+  def genConfigureACFiles(self,installPath="/sdr"):
+    if installPath[-1] == '/':
+        installPath = installPath[0:-1]
+
+    tmpPath = self.path + self.active_wave.name + '/'
+    self.writeConfAC(tmpPath,self.active_wave.name,self.active_wave.ace,True,installPath)
+
+    for c in self.active_wave.components:
+        if c.AssemblyController ==  True or not c.generate:
+            continue
+        tmpPath = self.path + c.name + '/'
+        self.writeConfAC(tmpPath,c.name,c.ace, #c.timing,
+                         False,installPath)
+
+  ##############################################################################
+  ## writeConfAC - generates configure.ac files for autoconf
+  ##############################################################################
+  def writeConfAC(self, genPath, name, aceFlag, wavFlag, installPath):
+     if genPath[len(genPath)-1] != '/':
+        genPath = genPath + '/'
+
+     output = open(genPath + 'configure.ac','w')
+     tstr = "# Generated by WaveDev/wavedev/generate/templates/custom_ports/\n"
+     output.write(tstr)
+     tstr = "AC_INIT(" + name + ", 0.8.0)\nAM_INIT_AUTOMAKE\n\n"
+     output.write(tstr)
+     #tstr = 'AC_PREFIX_DEFAULT("/home/sca")\n\n'
+     tstr = 'AC_PREFIX_DEFAULT("' + installPath + '")\n\n'
+     output.write(tstr)
+     tstr = "AC_PROG_CXX\nAC_PROG_INSTALL\nAC_PROG_MAKE_SET\n\n"
+     output.write(tstr)
+     #tstr = "AC_HEADER_SYS_WAIT\n\nAC_FUNC_FORK\n\n"
+     #output.write(tstr)
+     #tstr = "AC_CORBA_ORB\n\n"
+     #output.write(tstr)
+
+     #tstr = 'AC_LANG_PUSH([C++])\n\n'
+     #output.write(tstr)
+
+     #tstr = 'AC_CHECK_LIB([omniORB4], [main], [], [AC_MSG_ERROR([cannot find omniORBi4 library])])\n'
+     #output.write(tstr)
+     #tstr = 'AC_CHECK_LIB([omnithread], [main], [], [AC_MSG_ERROR([cannot find omnithread library])])\n'
+     #output.write(tstr)
+     #tstr = 'AC_CHECK_LIB([omniDynamic4], [main], [], [AC_MSG_ERROR([cannot find omniDynamic4 library])])\n'
+     #output.write(tstr)
+     #tstr = 'AC_CHECK_HEADERS([omniORB4/CORBA.h], [], [AC_MSG_ERROR([cannot find omniORB4 header files])])\n\n'
+     #output.write(tstr)
+
+     # TODO: only include standard interfacesi AC_CHECK lines for components
+     #if True:
+     #   tstr = 'AC_CHECK_LIB([standardInterfaces], [main], [], [AC_MSG_ERROR([cannot find standardInterfaces])])\n'
+     #   output.write(tstr)
+     #   tstr = 'AC_CHECK_HEADERS([standardinterfaces/complexShort.h], [], [AC_MSG_ERROR([cannot find standardInterfaces header files])])\n\n'
+     #   output.write(tstr)
+
+     # TODO: Add support for sigproc
+     #if False:
+     #    tstr = 'AC_CHECK_LIB([sigproc], [main], [], [AC_MSG_ERROR([cannot find sigproc library])])\n'
+     #    output.write(tstr)
+     #    tstr = 'AC_CHECK_HEADERS([sigproc/SigProc.h], [], [AC_MSG_ERROR([cannot find sigproc library header files])])\n\n'
+     #    output.write(tstr)
+
+     #tstr = 'AC_LANG_POP\n\n'
+     #output.write(tstr)
+
+     #tstr = 'export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"\n'
+     #output.write(tstr)
+     #tstr = "PKG_CHECK_MODULES(OSSIE, ossie >= 0.0.1,,exit)\n"
+     #output.write(tstr)
+     #tstr = 'CXXFLAGS="$CXXFLAGS $OSSIE_CFLAGS"\nLIBS="$LIBS $OSSIE_LIBS"\n'
+     #output.write(tstr)
+     #tstr = 'IDL_FLAGS="$OSSIE_CFLAGS"\nAC_SUBST(IDL_FLAGS)\n\n'
+     #output.write(tstr)
+
+     #if aceFlag == True:
+     #    tstr = 'PKG_CHECK_MODULES(ACE, ACE >= 5.4.7)\n'
+     #    tstr = tstr + 'AC_SUBST(ACE_CFLAGS)\nAC_SUBST(ACE_LIBS)\nLIBS="$LIBS $ACE_LIBS"\n\n'
+     #    output.write(tstr)
+
+     tstr = "AC_CONFIG_FILES(Makefile"
+     if wavFlag == True:
+        for x in self.active_wave.components:
+            if x.AssemblyController and x.generate:
+                tstr2 = " " + x.name + "/Makefile"
+                tstr = tstr + tstr2
+
+     tstr = tstr + ")\n\n"
+     output.write(tstr)
+
+     tstr = "AC_OUTPUT\n"
+     output.write(tstr)
+
+     output.close()
+
+  ##############################################################################
+  ## This function generates the cpp and h files for each component:
+  ## component.h, component.cpp, main.cpp, port_impl.h, and port_impl.cpp
+  ##############################################################################
+  def genCompFiles(self,comp):
+      #for x in self.active_wave.components:
+        # generate the .h files for each component
+        inputH = open(self.wavedevPath + 'generate/templates/custom_ports/sampleComp.h','r')
+        outputH = open(self.path + comp.name + "/" + comp.name + ".h",'w')
+        self.addPreamble(outputH,comp.name)
+        for line in inputH.readlines():
+          l_out = line.replace("__CLASS_DEF__",comp.name.upper()+"_IMPL_H")
+          l_out = l_out.replace("__Class_name__",comp.name+"_i")
+          if l_out.find("__PORT_DECL__") != -1:
+              self.writePortDecl(outputH,comp)
+              continue
+          if l_out.find("__ACE_INCLUDES__") != -1:
+              if comp.ace == True:
+                  l_out = '#include "ace/Task.h"\n'
+              else:
+                  continue
+          if l_out.find("__ACE_INHERIT__") != -1:
+              if comp.ace == True:
+                  l_out = l_out.replace("__ACE_INHERIT__",", public ACE_Task<ACE_MT_SYNCH>")
+              else:
+                  l_out = l_out.replace("__ACE_INHERIT__","")
+          if l_out.find("__ACE_SVC_DECL__") != -1:
+              if comp.ace == True:
+                  l_out = l_out.replace("__ACE_SVC_DECL__",'int svc(void);\n        size_t queue_size;')
+              else:
+                  continue
+          if l_out.find("__FRIEND_DECL__") != -1:
+              l_out = l_out.replace("__FRIEND_DECL__","")
+              self.writeFriendDecl(outputH,comp)
+              continue
+
+          outputH.write(l_out)
+
+        inputH.close()
+        outputH.close()
+
+        # generate the .cpp files for each component
+        inputCPP = open(self.wavedevPath + 'generate/templates/custom_ports/sampleComp.cpp','r')
+        outputCPP = open(self.path + comp.name + "/" + comp.name + ".cpp",'w')
+        self.addPreamble(outputCPP,comp.name)
+        for line in inputCPP.readlines():
+          l_out = line.replace("__IncludeFile__",comp.name)
+          l_out=l_out.replace("__ComponentName__",comp.name)
+          l_out = l_out.replace("__Class_name__",comp.name+"_i")
+          #l_out = l_out.replace("__NS_name__","ossie" + comp.name+"Resource")
+          if l_out.find("__PORT_INST__") != -1:
+              self.writePortInst(outputCPP,comp)
+              continue
+          if l_out.find("__GET_PORT__") != -1:
+              self.writeGetPort(outputCPP,comp)
+              continue
+          if l_out.find("__DEL_PORT__") != -1:
+              self.writeDelPort(outputCPP,comp)
+              continue
+          if l_out.find("__ACE_SVC_PORTS__") != -1:
+              self.writeACESvcPorts(outputCPP,comp)
+              continue
+          if l_out.find("__ACE_SVC_DEF__") != -1:
+              if comp.ace == True:
+                  self.writeACESvcDef(outputCPP,comp,'component',comp.timing, comp)
+              continue
+          outputCPP.write(l_out)
+
+        inputCPP.close()
+        outputCPP.close()
+
+        # generate the main.cpp files for each component
+        inputMain = open(self.wavedevPath + 'generate/templates/custom_ports/sampleMain.cpp','r')
+        outputMain = open(self.path + comp.name + "/main.cpp",'w')
+        self.addPreamble(outputMain,comp.name)
+
+        for line in inputMain.readlines():
+          l_out = line.replace("__IncludeFile__",comp.name)
+          l_out= l_out.replace("__ComponentName__",comp.name)
+          l_out = l_out.replace("__Class_name__",comp.name+"_i")
+          l_out = l_out.replace("__CLASS_VAR__",comp.name.lower())
+          if l_out.find("__CLASS_VAR_ACE__") != -1:
+              if comp.ace == True:
+                  l_out = l_out.replace("__CLASS_VAR_ACE__",comp.name.lower())
+              else:
+                  continue
+          if l_out.find("__NAME_SPACE__") != -1:
+              ns_list = []
+              for p in comp.ports:
+                  if p.interface.nameSpace not in ns_list:
+                      ns_list.append(p.interface.nameSpace)
+              l_out = ''
+              for tmpns in ns_list:
+                  l_out += 'using namespace ' + tmpns + ';\n'
+
+          outputMain.write(l_out)
+
+        inputMain.close()
+        outputMain.close()
+
+        # generate the port_impl.h file
+        inputPortImpl = open(self.wavedevPath + 'generate/templates/custom_ports/port_impl.h','r')
+        outputPortImpl = open(self.path + comp.name + "/port_impl.h",'w')
+        self.addPreamble(outputPortImpl,comp.name)
+        portSample_p = open(self.wavedevPath + 'generate/templates/custom_ports/port_sample_p.h','r')
+        portSample_u = open(self.wavedevPath + 'generate/templates/custom_ports/port_sample_u.h','r')
+        for line in inputPortImpl.readlines():
+            l_out = line.replace("__IncludeFile__",comp.name)
+            if l_out.find("__ACE_INCLUDES__") != -1:
+              if comp.ace == True:
+                  l_out = '#include "ace/Task.h"\n'
+              else:
+                  continue
+            if l_out.find("__TIMING_DECL_AND_INCLUDES__") != -1:
+              if comp.timing == True:
+                  l_out = 'using namespace std;\n#ifndef time_signal_message_H\n#define time_signal_message_H\ntypedef struct {\n\tchar component_name[255];\n\tchar port_name[255];\n\tchar function_name[255];\n\tchar description[255];\n\tlong time_s;\n\tlong time_us;\n\tlong number_samples;\n} time_signal_message;\n#endif\n'
+              else:
+                  l_out = ''
+            if l_out.find("__PORT_DECL__") != -1:
+              self.writePortImplDecl(outputPortImpl,portSample_p,portSample_u,comp)
+              continue
+            outputPortImpl.write(l_out)
+
+        inputPortImpl.close()
+        outputPortImpl.close()
+        portSample_p.close()
+        portSample_u.close()
+
+        # generate the port_impl.cpp file
+        inputPortImpl = open(self.wavedevPath + 'generate/templates/custom_ports/port_impl.cpp','r')
+        outputPortImpl = open(self.path + comp.name + "/port_impl.cpp",'w')
+        self.addPreamble(outputPortImpl,comp.name)
+        portSample_p = open(self.wavedevPath + 'generate/templates/custom_ports/port_sample_p.cpp','r')
+        portSample_u = open(self.wavedevPath + 'generate/templates/custom_ports/port_sample_u.cpp','r')
+        for line in inputPortImpl.readlines():
+            l_out = line
+            if l_out.find("__PORT_DEF__") != -1:
+              self.writePortImplDef(outputPortImpl,portSample_p,portSample_u,comp)
+              continue
+            outputPortImpl.write(l_out)
+
+        inputPortImpl.close()
+        outputPortImpl.close()
+        portSample_p.close()
+        portSample_u.close()
+
+    # Copy some required files into the main directory
+    #  os.system('cp ' + self.wavedevPath + 'generate/basic_xml/* ' + self.path)
+    #  os.system('cp ' + self.wavedevPath + 'generate/wavLoader.py ' + self.path)
+
+  def writePortImplDecl(self, output,portSample_p,portSample_u,c):
+    """ This function writes port implementation declarations for the port_impl.h file"""
+    intList = []
+    for x in c.ports:
+        if x.interface.filename in intList:
+            continue
+        ts = '#include "' + x.interface.filename + '.h"\n'
+        intList.append(x.interface.filename)
+        output.write(ts)
+    ts = '\n';output.write(ts);
+    intList = []
+    for x in c.ports:
+        found_match = False
+        for int_tup in intList:
+            if x.interface.name == int_tup[0]:
+                if x.type == int_tup[1]:
+                    found_match = True
+                    break
+        if found_match:
+            continue
+        #if x.interface.name in intList:
+        #    continue
+        if x.type == "Uses":
+            portSample = portSample_u
+        else:
+            portSample = portSample_p
+        portSample.seek(0)
+        intList.append((x.interface.name, x.type))
+        for line in portSample.readlines():
+            l_out = line.replace("__IN_PORT__",x.p_cname)
+            l_out = l_out.replace("__INT_TYPE__",x.interface.name)
+            l_out = l_out.replace("__NAME_SPACE__",x.interface.nameSpace)
+            l_out = l_out.replace("__OUT_PORT__",x.u_cname)
+            l_out = l_out.replace("__IN_CLASS__",x.p_cname)
+            l_out = l_out.replace("__OUT_CLASS__",x.u_cname)
+            if l_out.find("__OPERATION__") != -1:
+              self.writeOperation(output,x.interface,port=c)
+              continue
+            if l_out.find("__ACE_INHERIT__") != -1:
+              if c.ace == True:
+                  l_out = l_out.replace("__ACE_INHERIT__",", public ACE_Task<ACE_MT_SYNCH>")
+              else:
+                  l_out = l_out.replace("__ACE_INHERIT__","")
+            if l_out.find("__TIMING_BUFFER_LENGTH__") != -1:
+	      if (c.timing==True):
+	        if (x.interface.name=='timingStatus'):
+	          l_out = l_out.replace("__TIMING_BUFFER_LENGTH__",'#define NUMBER_TIMING_MESSAGE_BUFFER	100')
+	        else:
+	          l_out = l_out.replace("__TIMING_BUFFER_LENGTH__", '');
+	      else:
+	        l_out = l_out.replace("__TIMING_BUFFER_LENGTH__", '');
+            if l_out.find("__TIMING_DECL__") != -1:
+	      if (c.timing==True):
+	        if (x.interface.name=='timingStatus'):
+	          l_out = l_out.replace("__TIMING_DECL__",'void send_timing_message(string component_name, string port_name, string function_name, string description, long number_samples);')
+	        else:
+	          l_out = l_out.replace("__TIMING_DECL__",'')
+	      else:
+	        l_out = l_out.replace("__TIMING_DECL__",'')
+            if l_out.find("__TIMING_VAR__") != -1:
+	      if (c.timing==True):
+	        if (x.interface.name=='timingStatus'):
+	          l_out = l_out.replace("__TIMING_VAR__",'time_signal_message message_buffer[NUMBER_TIMING_MESSAGE_BUFFER];\n    int message_buffer_write_idx;\n    omni_mutex writing_to_timing_buffer;\n    omni_semaphore *data_is_ready;')
+	        else:
+	          l_out = l_out.replace("__TIMING_VAR__",'')
+	      else:
+	        l_out = l_out.replace("__TIMING_VAR__",'')
+            if l_out.find("__ACE_SVC_DECL__") != -1:
+              if (c.ace == True):
+                  l_out = l_out.replace("__ACE_SVC_DECL__",'int svc(void);')
+              else:
+                  l_out = l_out.replace("__ACE_SVC_DECL__",'')
+            if l_out.find("__COMP_ARG__") != -1:
+                if c.type == "resource":
+                    l_out = l_out.replace("__COMP_ARG__",c.name+"_i *_"+c.name.lower())
+                else:
+                    l_out = l_out.replace("__COMP_ARG__","")
+            if l_out.find("__COMP_REF_DECL__") != -1:
+                if c.type == "resource":
+                    l_out = l_out.replace("__COMP_REF_DECL__",c.name+"_i *"+c.name.lower()+";")
+                else:
+                    l_out = l_out.replace("__COMP_REF_DECL__","")
+
+            output.write(l_out)
+
+  def writePortImplDef(self,output,portSample_p,portSample_u,c):
+    """ This function writes port implementation definitions for the port_impl.cpp file"""
+    intList = []
+    for x in c.ports:
+        found_match = False
+        for int_tup in intList:
+            if x.interface.name == int_tup[0]:
+                if x.type == int_tup[1]:
+                    found_match = True
+                    break
+        if found_match:
+            continue
+        #if x.interface.name in intList:
+        #    continue
+        if x.type == "Uses":
+            portSample = portSample_u
+        else:
+            portSample = portSample_p
+        portSample.seek(0)
+        intList.append((x.interface.name, x.name))
+        for line in portSample.readlines():
+            l_out = line.replace("__IN_PORT__",x.p_cname)
+            l_out = l_out.replace("__INT_TYPE__",x.interface.name)
+            l_out = l_out.replace("__NAME_SPACE__",x.interface.nameSpace)
+            l_out = l_out.replace("__OUT_PORT__",x.u_cname)
+            if l_out.find("__OPERATION__") != -1:
+              l_out = l_out.replace("__OPERATION__",'')
+              l_out = l_out.replace("\n",'')
+              self.writeOperation(output,x.interface,prefix=l_out,cppFlag=True,in_name=c.name.lower(),using_ace=c.ace,comp=c,port=x)
+              continue
+            if l_out.find("__ACE_SVC_DEF__") != -1:
+              if c.ace == True:
+                  self.writeACESvcDef(output,x,'port',c.timing, c)
+              continue
+            if l_out.find("__TIMING_MESSAGE_DEF__") != -1:
+              if (c.timing == True) & (x.interface.name=='timingStatus'):
+                  self.writeTimingMessageDef(output,x,'port')
+              continue
+            if l_out.find("__COMP_ARG__") != -1:
+                if c.type == "resource":
+                    l_out = l_out.replace("__COMP_ARG__",c.name+"_i *_"+c.name.lower())
+                else:
+                    l_out = l_out.replace("__COMP_ARG__","")
+            if l_out.find("__COMP_REF_DEF__") != -1:
+                if c.type == "resource":
+                    l_out = l_out.replace("__COMP_REF_DEF__",c.name.lower()+" = _"+c.name.lower()+";")
+                else:
+                    l_out = l_out.replace("__COMP_REF_DEF__","")
+            if l_out.find("__INIT_VARS_DEF__") != -1:
+                if (c.type == "resource") & (x.interface.name=='timingStatus'):
+                    l_out = l_out.replace("__INIT_VARS_DEF__","message_buffer_write_idx = 0;\n    data_is_ready = new omni_semaphore(0);")
+                else:
+                    l_out = l_out.replace("__INIT_VARS_DEF__","")
+            output.write(l_out)
+
+  def writePortDecl(self, output,c):
+    """ This function writes the corba declarations of the ports to the component header file"""
+    inCount = 0; outCount=0;
+    for x in c.ports:
+        if x.type == "Provides":
+            ts = " "*8 + x.cname + " " + "*inPort" + str(inCount) + "_servant;\n"
+            output.write(ts)
+            inCount += 1
+    ts = "\n"; output.write(ts)
+    for x in c.ports:
+        if x.type == "Uses":
+            ts = " "*8 + x.cname + " " + "*outPort" + str(outCount) + "_servant;\n"
+            output.write(ts)
+            outCount += 1
+    ts = "\n"; output.write(ts)
+    inCount = 0; outCount=0;
+    for x in c.ports:
+        if x.type == "Provides":
+            ts = " "*8 + x.interface.nameSpace + "::" + x.interface.name + "_var " + "inPort" + str(inCount) + "_var;\n"
+            output.write(ts)
+            inCount += 1
+    ts = "\n"; output.write(ts)
+    for x in c.ports:
+        if x.type == "Uses":
+            ts = " "*8 + "CF::Port_var " + "outPort" + str(outCount) + "_var;\n"
+            ts += " "*8 + "bool outPort" + str(outCount) + "_active;\n"
+            ts += " "*8 + "size_t outPort" + str(outCount) + "_queue_size;\n"
+            output.write(ts)
+            outCount += 1
+    ts = " "*8 + "bool component_alive;\n\n" + " "*8 + "string naming_service_name;\n"; output.write(ts)
+
+  def writePortInst(self,output,c):
+    """ This function writes the port instantiations to the component cpp file"""
+    inCount = 0; outCount=0;
+    for x in c.ports:
+        if x.type == "Provides":
+            ts = " "*4 + "inPort" + str(inCount) + "_servant" + " = new " + x.cname + "(this);\n"
+            output.write(ts)
+            ts = " "*4 + "inPort" + str(inCount) + "_var = inPort" + str(inCount)+ "_servant->_this();\n"
+            output.write(ts)
+            inCount += 1
+    ts = "\n"; output.write(ts)
+    for x in c.ports:
+        if x.type == "Uses":
+            ts = " "*4 + "outPort" + str(outCount) + "_servant" + " = new " + x.cname + "(this);\n"
+            output.write(ts)
+            ts = " "*4 + "outPort" + str(outCount) + "_var = outPort" + str(outCount)+ "_servant->_this();\n"
+            ts += " "*4 + "outPort" + str(outCount) + "_active = false;\n"
+            ts += " "*4 + "outPort" + str(outCount) + "_queue_size = DEFAULT_QUEUE_BLOCK_SIZE;\n"
+            output.write(ts)
+            outCount += 1
+    ts = "\n"; output.write(ts)
+    ts = " "*4 + "queue_size = DEFAULT_QUEUE_BLOCK_SIZE;\n\n" + " "*4 + "component_alive = true;\n\n" + " "*4 + "naming_service_name = label;\n"; output.write(ts)
+
+  def writeGetPort(self,output,c):
+    """ This function writes the getPort functionality to the component cpp file"""
+    inCount = 0; outCount=0;
+    flag = True
+    for x in c.ports:
+        if x.type == "Provides":
+            if flag:
+                ts = " "*4 + 'if (strcmp(_id,"' + x.name + '") == 0) {\n'
+            else:
+                ts = " "*4 + 'else if (strcmp(_id,"' + x.name + '") == 0) {\n'
+            output.write(ts)
+#            ts = " "*8 + "return inPort" + str(inCount) + "_var;\n"
+            ts = " "*8 + "return " + x.interface.nameSpace + "::" + x.interface.name
+            ts += "::_duplicate(inPort" + str(inCount) + "_var);\n"
+            ts += " "*4 + "}\n"
+            output.write(ts)
+            inCount += 1
+    ts = "\n"; output.write(ts)
+    for x in c.ports:
+        if x.type == "Uses":
+            if flag:
+                ts = " "*4 + 'if (strcmp(_id,"' + x.name + '") == 0) {\n'
+            else:
+                ts = " "*4 + 'else if (strcmp(_id,"' + x.name + '") == 0) {\n'
+            output.write(ts)
+            ts = " "*8 + "outPort" + str(outCount) + "_active = true;\n"
+            ts += " "*8 + "return CF::Port::_duplicate(outPort" + str(outCount) + "_var);\n"
+            ts += " "*4 + "}\n"
+            output.write(ts)
+            outCount += 1
+    ts = "\n"; output.write(ts)
+    ts = " "*4 + 'return NULL;\n'; output.write(ts)
+
+  def writeDelPort(self,output,c):
+    """ This function writes the destructor functionality (for ports) to the component cpp file"""
+    inCount = 0; outCount=0;
+    flag = True
+    for x in c.ports:
+        if x.type == "Provides":
+            ts = " "*4 + "delete inPort" + str(inCount) + "_servant;\n"
+            output.write(ts)
+            inCount += 1
+    ts = "\n"; output.write(ts)
+    for x in c.ports:
+        if x.type == "Uses":
+            ts = " "*4 + "delete outPort" + str(outCount) + "_servant;\n"
+            output.write(ts)
+            outCount += 1
+    ts = "\n"; output.write(ts)
+
+##  def writeACESvcPorts(self,output,c):
+##    """ This function writes the svc port functionality to the component cpp file"""
+##    outCount=0;
+##    for x in c.ports:
+##        if x.type == "Uses":
+##            ts = " "*4 + "outPort" + str(outCount) + "_servant->activate();\n"
+##            output.write(ts)
+##            outCount += 1
+##    ts = "\n"; output.write(ts)
+
+  def writeACESvcDef(self, output,c,type,timing_flag, comp=''):
+    """ This function writes the implementation of the svn() function for a given component"""
+    if type == 'component':
+        ts = 'int ' + c.name + '_i::svc(void)\n{\n'
+        output.write(ts)
+        ts = " "*4 + '/* Start outgoing port threads */\n'
+        output.write(ts)
+        outCount=0;
+        for x in c.ports:
+            if x.type == "Uses":
+                ts = " "*4 + "outPort" + str(outCount) + "_servant->activate();\n"; output.write(ts)
+                outCount += 1
+        ts = "\n"; output.write(ts)
+        ts = " "*4 + 'std::vector<double> d1_data_double;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<float> d1_data_float;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<short> d1_data_short;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<float> d2_data_double;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<double> d2_data_float;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<short> d2_data_short;\n'; output.write(ts)
+        ts = " "*4 + 'ACE_Message_Block *mb;\n'; output.write(ts)
+        ts = " "*4 + '/* Main function loop */\n'; output.write(ts)
+        ts = " "*4 + 'while(component_alive)\n' + " "*4 + '{\n'; output.write(ts)
+	ts = " "*8 + "ACE_Time_Value getq_time_out = ACE_OS::gettimeofday();\n"; output.write(ts)
+	ts = " "*8 + "getq_time_out += 1;\n"; output.write(ts)
+	ts = " "*8 + "if(getq(mb, &getq_time_out) >= 0) {\n"; output.write(ts)
+	ts = " "*12 + "unsigned int buffer_size=mb->length();\n"; output.write(ts)
+	ts = " "*12 + "unsigned short data_type;\n"; output.write(ts)
+	ts = " "*12 + "ACE_OS::memmove( (char*)&data_type, mb->rd_ptr(), sizeof(unsigned short));\n"; output.write(ts)
+	ts = " "*12 + "mb->rd_ptr(sizeof(unsigned short));\n"; output.write(ts)
+	ts = " "*12 + "buffer_size=buffer_size - sizeof(unsigned short);\n"; output.write(ts)
+	ts = " "*12 + "unsigned int packet_size = 0;\n"; output.write(ts)
+	ts = " "*12 + "std::vector<double> data_I;\n"; output.write(ts)
+	ts = " "*12 + "std::vector<double> data_Q;\n"; output.write(ts)
+	ts = " "*12 + "// I've arbitrarily decided to use doubles as my working type inside the component\n"; output.write(ts)
+	ts = " "*12 + "//	the working type is implementation-specific\n"; output.write(ts)
+	ts = " "*12 + "switch(data_type) {\n"; output.write(ts)
+	ts = " "*16 + "case 1:\n"; output.write(ts)
+	ts = " "*20 + "// this is for complex double\n"; output.write(ts)
+	ts = " "*20 + "packet_size=buffer_size/(sizeof(double)*2);\n"; output.write(ts)
+	ts = " "*20 + "{\n"; output.write(ts)
+	ts = " "*24 + "std::vector <double> vals(packet_size*2);\n"; output.write(ts)
+	ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+	ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+	ts = " "*28 + "data_Q[i] = vals[i+packet_size];\n"; output.write(ts)
+	ts = " "*24 + "}\n"; output.write(ts)
+	ts = " "*20 + "}\n"; output.write(ts)
+	ts = " "*20 + "break;\n"; output.write(ts)
+	ts = " "*16 + "case 2:\n"; output.write(ts)
+	ts = " "*20 + "// this is for complex float\n"; output.write(ts)
+	ts = " "*20 + "packet_size=buffer_size/(sizeof(float)*2);\n"; output.write(ts)
+	ts = " "*20 + "{\n"; output.write(ts)
+	ts = " "*24 + "std::vector <float> vals(packet_size*2);\n"; output.write(ts)
+	ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+	ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+	ts = " "*28 + "data_Q[i] = vals[i+packet_size];\n"; output.write(ts)
+	ts = " "*24 + "}\n"; output.write(ts)
+	ts = " "*20 + "}\n"; output.write(ts)
+	ts = " "*20 + "break;\n"; output.write(ts)
+	ts = " "*16 + "case 3:\n"; output.write(ts)
+	ts = " "*20 + "// this is for complex short\n"; output.write(ts)
+	ts = " "*20 + "packet_size=buffer_size/(sizeof(short)*2);\n"; output.write(ts)
+	ts = " "*20 + "{\n"; output.write(ts)
+	ts = " "*24 + "std::vector <short> vals(packet_size*2);\n"; output.write(ts)
+	ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+	ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+	ts = " "*28 + "data_Q[i] = vals[i+packet_size];\n"; output.write(ts)
+	ts = " "*24 + "}\n"; output.write(ts)
+	ts = " "*20 + "}\n"; output.write(ts)
+	ts = " "*20 + "break;\n"; output.write(ts)
+	ts = " "*16 + "case 4:\n"; output.write(ts)
+	ts = " "*20 + "// this is for real double\n"; output.write(ts)
+	ts = " "*20 + "packet_size=buffer_size/(sizeof(double));\n"; output.write(ts)
+	ts = " "*20 + "{\n"; output.write(ts)
+	ts = " "*24 + "std::vector <double> vals(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+	ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+	ts = " "*28 + "data_Q[i] = 0;\n"; output.write(ts)
+	ts = " "*24 + "}\n"; output.write(ts)
+	ts = " "*20 + "}\n"; output.write(ts)
+	ts = " "*20 + "break;\n"; output.write(ts)
+	ts = " "*16 + "case 5:\n"; output.write(ts)
+	ts = " "*20 + "// this is for real float\n"; output.write(ts)
+	ts = " "*20 + "packet_size=buffer_size/(sizeof(float));\n"; output.write(ts)
+	ts = " "*20 + "{\n"; output.write(ts)
+	ts = " "*24 + "std::vector <float> vals(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+	ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+	ts = " "*28 + "data_Q[i] = 0;\n"; output.write(ts)
+	ts = " "*24 + "}\n"; output.write(ts)
+	ts = " "*20 + "}\n"; output.write(ts)
+	ts = " "*20 + "break;\n"; output.write(ts)
+	ts = " "*16 + "case 6:\n"; output.write(ts)
+	ts = " "*20 + "// this is for real short\n"; output.write(ts)
+	ts = " "*20 + "packet_size=buffer_size/(sizeof(short));\n"; output.write(ts)
+	ts = " "*20 + "{\n"; output.write(ts)
+	ts = " "*24 + "std::vector <short> vals(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+	ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+	ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+	ts = " "*28 + "data_Q[i] = 0;\n"; output.write(ts)
+	ts = " "*24 + "}\n"; output.write(ts)
+	ts = " "*20 + "}\n"; output.write(ts)
+	ts = " "*20 + "break;\n"; output.write(ts)
+	ts = " "*12 + "}\n"; output.write(ts)
+	#ts = " "*8 + "}\n"; output.write(ts)
+	ts = " "*12 + "mb->release();\n"; output.write(ts)
+	ts = " "*12 + "/*******************************************************************\n"; output.write(ts)
+	ts = " "*24 + "Insert functional code here\n"; output.write(ts)
+	ts = " "*12 + "*******************************************************************/\n\n"; output.write(ts)
+	ts = " "*12 + "/******************************************************************/\n\n"; output.write(ts)
+	ts = " "*12 + "// Prepare data for output\n"; output.write(ts)
+	ts = " "*12 + "d1_data_double.resize(packet_size);\n"; output.write(ts)
+	ts = " "*12 + "d1_data_float.resize(packet_size);\n"; output.write(ts)
+	ts = " "*12 + "d1_data_short.resize(packet_size);\n"; output.write(ts)
+	ts = " "*12 + "d2_data_double.resize(packet_size*2);\n"; output.write(ts)
+	ts = " "*12 + "d2_data_float.resize(packet_size*2);\n"; output.write(ts)
+	ts = " "*12 + "d2_data_short.resize(packet_size*2);\n\n"; output.write(ts)
+	ts = " "*12 + "for (unsigned int i=0; i<packet_size; i++) {\n"; output.write(ts)
+	ts = " "*16 + "d1_data_double[i] = data_I[i];\n"; output.write(ts)
+	ts = " "*16 + "d1_data_float[i] = data_I[i];\n"; output.write(ts)
+	ts = " "*16 + "d1_data_short[i] = (short)data_I[i];\n"; output.write(ts)
+	ts = " "*16 + "d2_data_double[i] = data_I[i];\n"; output.write(ts)
+	ts = " "*16 + "d2_data_double[i+packet_size] = data_Q[i];\n"; output.write(ts)
+	ts = " "*16 + "d2_data_float[i] = data_I[i];\n"; output.write(ts)
+	ts = " "*16 + "d2_data_float[i+packet_size] = data_Q[i];\n"; output.write(ts)
+	ts = " "*16 + "d2_data_short[i] = (short)data_I[i];\n"; output.write(ts)
+	ts = " "*16 + "d2_data_short[i+packet_size] = (short)data_Q[i];\n"; output.write(ts)
+	ts = " "*12 + "}\n"; output.write(ts)
+        outCount=0;
+        for x in c.ports:
+            if (x.type == "Uses") & ((x.interface.name == 'realDouble')|(x.interface.name == 'realFloat')|(x.interface.name == 'realShort')|(x.interface.name == 'complexDouble')|(x.interface.name == 'complexFloat')|(x.interface.name == 'complexShort')):
+                ts = " "*12 + "if (outPort" + str(outCount) + "_active) {\n"; output.write(ts)
+		if x.interface.name == 'realDouble':
+			DATA_TYPE_BEING_USED = 'double'
+			VECTOR_COUNT = '1'
+			VECTOR_NAME = 'd1_data_double'
+		if x.interface.name == 'realFloat':
+			DATA_TYPE_BEING_USED = 'float'
+			VECTOR_COUNT = '1'
+			VECTOR_NAME = 'd1_data_float'
+		if x.interface.name == 'realShort':
+			DATA_TYPE_BEING_USED = 'short'
+			VECTOR_COUNT = '1'
+			VECTOR_NAME = 'd1_data_short'
+		if x.interface.name == 'complexDouble':
+			DATA_TYPE_BEING_USED = 'double'
+			VECTOR_COUNT = '2'
+			VECTOR_NAME = 'd2_data_double'
+		if x.interface.name == 'complexFloat':
+			DATA_TYPE_BEING_USED = 'float'
+			VECTOR_COUNT = '2'
+			VECTOR_NAME = 'd2_data_float'
+		if x.interface.name == 'complexShort':
+			DATA_TYPE_BEING_USED = 'short'
+			VECTOR_COUNT = '2'
+			VECTOR_NAME = 'd2_data_short'
+                ts = " "*16 + "ACE_Message_Block *message = new ACE_Message_Block (packet_size*" + VECTOR_COUNT + "*sizeof(" + DATA_TYPE_BEING_USED + "));\n"; output.write(ts)
+                ts = " "*16 + "message->copy((const char*)&" + VECTOR_NAME + "[0], packet_size*" + VECTOR_COUNT + "*sizeof(" + DATA_TYPE_BEING_USED + "));\n"; output.write(ts)
+		ts = " "*16 + "size_t message_length = packet_size*" + VECTOR_COUNT + "*sizeof(" + DATA_TYPE_BEING_USED + ");\n"; output.write(ts)
+		ts = " "*16 + "size_t available_space = outPort" + str(outCount) + "_servant->msg_queue()->message_bytes();\n"; output.write(ts)
+		ts = " "*16 + "if (available_space<=(outPort" + str(outCount) + "_queue_size+message_length)) {\n"; output.write(ts)
+		ts = " "*20 + "outPort" + str(outCount) + "_queue_size+=QUEUE_BLOCK_SIZE;\n"; output.write(ts)
+		ts = " "*20 + "outPort" + str(outCount) + "_servant->water_marks (ACE_IO_Cntl_Msg::SET_HWM, outPort" + str(outCount) + "_queue_size);\n"; output.write(ts)
+		ts = " "*16 + "}\n"; output.write(ts)
+                ts = " "*16 + "if (outPort" + str(outCount) + "_servant->putq(message) == -1) {\n"; output.write(ts)
+                ts = " "*20 + "//  this is where a message for issues with the putq would appear\n"; output.write(ts)
+                ts = " "*16 + "}\n"; output.write(ts)
+                ts = " "*12 + "}\n"; output.write(ts)
+                outCount += 1
+	ts = " "*8 + "}\n"; output.write(ts)
+	ts = " "*8 + "/* Polling rate, slow CPU spinning */\n"; output.write(ts)
+	ts = " "*8 + "//ACE_OS::sleep (ACE_Time_Value (1));\n"; output.write(ts)
+        ts = " "*4 + '}\n\n' + " "*4 + 'return 0;\n}\n'; output.write(ts)
+
+    if type == 'port':
+        #ts = 'int ' + c.u_cname + '::svc(void)\n{\n'; output.write(ts)
+        #ts = " "*4 + 'ACE_Message_Block *mb;\n\n'; output.write(ts)
+        #ts = " "*4 + 'while(1)\n' + " "*4 + '{\n' + " "*8 + 'if (getq(mb) == -1)\n'
+        #output.write(ts)
+        #ts = " "*8 + '{\n' + " "*12 + 'ACE_ERROR_RETURN ((LM_ERROR, ' + r'"%p\n",'
+        #ts = ts + ' "getq"), -1);\n'
+        #output.write(ts)
+        #ts = " "*8 + '}\n\n' + " "*8 + '/* _complexShort->pushPacket(); */\n\n'
+        #output.write(ts)
+        #ts = " "*8 + '/* Release message block */\n' + " "*8 + 'mb->release();\n'
+        #output.write(ts)
+        #ts = " "*4 + '}\n' + " "*4 + 'return 0;\n}\n'
+        #output.write(ts)
+		# the following stuff is a work in progress
+		#	it needs to be reconciled with the contents of the actual port
+		#	This will be interesting for control ports instead of data ports
+		#	in the case of control ports, it will likely need a slightly different structure
+	#print c.interface.name
+        ts = 'int ' + c.u_cname + '::svc(void)\n{\n'; output.write(ts)
+	if ((c.interface.name == 'realDouble')|(c.interface.name == 'realFloat')|(c.interface.name == 'realShort')|(c.interface.name == 'complexDouble')|(c.interface.name == 'complexFloat')|(c.interface.name == 'complexShort')):
+		ts = " "*4 + 'ACE_Message_Block *mb;\n'; output.write(ts)
+		if c.interface.name == 'realDouble':
+			DATA_TYPE_BEING_USED = 'double'
+			DATA_TYPE_USED = 'Double'
+			ARGUMENT_LIST_FOR_PUSH = ' I'
+		if c.interface.name == 'realFloat':
+			DATA_TYPE_BEING_USED = 'float'
+			DATA_TYPE_USED = 'Float'
+			ARGUMENT_LIST_FOR_PUSH = ' I'
+		if c.interface.name == 'realShort':
+			DATA_TYPE_BEING_USED = 'short'
+			DATA_TYPE_USED = 'Short'
+			ARGUMENT_LIST_FOR_PUSH = ' I'
+		if c.interface.name == 'complexDouble':
+			DATA_TYPE_BEING_USED = 'double'
+			DATA_TYPE_USED = 'Double'
+			ARGUMENT_LIST_FOR_PUSH = ' I, Q'
+		if c.interface.name == 'complexFloat':
+			DATA_TYPE_BEING_USED = 'float'
+			DATA_TYPE_USED = 'Float'
+			ARGUMENT_LIST_FOR_PUSH = ' I, Q'
+		if c.interface.name == 'complexShort':
+			DATA_TYPE_BEING_USED = 'short'
+			DATA_TYPE_USED = 'Short'
+			ARGUMENT_LIST_FOR_PUSH = ' I, Q'
+		ts = " "*4 + 'vector < ' + DATA_TYPE_BEING_USED + ' > vals;\n'; output.write(ts)
+		ts = " "*4 + 'PortTypes::' + DATA_TYPE_USED + 'Sequence ' + ARGUMENT_LIST_FOR_PUSH +';\n\n'; output.write(ts)
+		ts = " "*4 + 'while(1)\n' + " "*8 + '{\n'; output.write(ts)
+		ts = " "*8 + 'ACE_Time_Value getq_time_out = ACE_OS::gettimeofday();\n'; output.write(ts)
+		ts = " "*8 + 'getq_time_out += 1;\n'; output.write(ts)
+		ts = " "*8 + 'if(getq(mb, &getq_time_out) >= 0) {\n'; output.write(ts)
+		portCount = 0
+		if c.interface.name == 'realDouble':
+			NUMBER_OF_VECTORS = '1'
+		if c.interface.name == 'realFloat':
+			NUMBER_OF_VECTORS = '1'
+		if c.interface.name == 'realShort':
+			NUMBER_OF_VECTORS = '1'
+		if c.interface.name == 'complexDouble':
+			NUMBER_OF_VECTORS = '2'
+		if c.interface.name == 'complexFloat':
+			NUMBER_OF_VECTORS = '2'
+		if c.interface.name == 'complexShort':
+			NUMBER_OF_VECTORS = '2'
+		for individual_port in comp.ports:
+			if individual_port.type == "Uses":
+				if individual_port.interface.name == 'timingStatus':
+					ts = " "*12 + "if (" + comp.name.lower() + "->outPort" + str(portCount) + '_active) {\n'; output.write(ts)
+					ts = " "*16 + comp.name.lower() + "->outPort" + str(portCount) + '_servant->send_timing_message(' + comp.name.lower() + '->naming_service_name, "' + c.name + '", "pushPacket", "begin", mb->length()/(sizeof('+ DATA_TYPE_BEING_USED +')*'+ NUMBER_OF_VECTORS +'));\n'; output.write(ts)
+					ts = " "*12 + '}\n'; output.write(ts)
+				portCount += 1
+		ts = " "*12 + 'unsigned int buffer_size=mb->length();\n'; output.write(ts)
+		ts = " "*12 + 'unsigned int packet_size=buffer_size/(sizeof(' + DATA_TYPE_BEING_USED + ')*' + NUMBER_OF_VECTORS + ');\n'; output.write(ts)
+		ts = " "*12 + 'vals.resize(packet_size*' + NUMBER_OF_VECTORS + ');\n'; output.write(ts)
+		if c.interface.name == 'realDouble':
+			ts = " "*12 + 'I.length(packet_size);\n'; output.write(ts)
+		if c.interface.name == 'realFloat':
+			ts = " "*12 + 'I.length(packet_size);\n'; output.write(ts)
+		if c.interface.name == 'realShort':
+			ts = " "*12 + 'I.length(packet_size);\n'; output.write(ts)
+		if c.interface.name == 'complexDouble':
+			ts = " "*12 + 'I.length(packet_size);\n'+" "*12 + 'Q.length(packet_size);\n'; output.write(ts)
+		if c.interface.name == 'complexFloat':
+			ts = " "*12 + 'I.length(packet_size);\n'+" "*12 + 'Q.length(packet_size);\n'; output.write(ts)
+		if c.interface.name == 'complexShort':
+			ts = " "*12 + 'I.length(packet_size);\n'+" "*12 + 'Q.length(packet_size);\n'; output.write(ts)
+		ts = " "*12 + 'ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n'; output.write(ts)
+		ts = " "*12 + 'for (unsigned int i=0; i<packet_size; i++) {\n'; output.write(ts)
+		if c.interface.name == 'realDouble':
+			ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+		if c.interface.name == 'realFloat':
+			ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+		if c.interface.name == 'realShort':
+			ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+		if c.interface.name == 'complexDouble':
+			ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+			ts = " "*16 + 'Q[i]=vals[i+packet_size];\n'; output.write(ts)
+		if c.interface.name == 'complexFloat':
+			ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+			ts = " "*16 + 'Q[i]=vals[i+packet_size];\n'; output.write(ts)
+		if c.interface.name == 'complexShort':
+			ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+			ts = " "*16 + 'Q[i]=vals[i+packet_size];\n'; output.write(ts)
+		ts = " "*12 + '}\n'; output.write(ts)
+		ts = " "*12 + 'for (unsigned int i = 0; i < outPorts.size(); i++) {\n'; output.write(ts)
+		ts = " "*16 + 'outPorts[i].port_var->pushPacket( ' + ARGUMENT_LIST_FOR_PUSH + ' );\n'; output.write(ts)
+		ts = " "*12 + '}\n'; output.write(ts)
+		portCount = 0
+		for individual_port in comp.ports:
+			if individual_port.type == "Uses":
+				if individual_port.interface.name == 'timingStatus':
+					ts = " "*12 + "if (" + comp.name.lower() + "->outPort" + str(portCount) + '_active) {\n'; output.write(ts)
+					ts = " "*16 + comp.name.lower() + "->outPort" + str(portCount) + '_servant->send_timing_message(' + comp.name.lower() + '->naming_service_name, "' + c.name + '", "pushPacket", "end", mb->length()/(sizeof('+ DATA_TYPE_BEING_USED +')*'+ NUMBER_OF_VECTORS +'));\n'; output.write(ts)
+					ts = " "*12 + '}\n'; output.write(ts)
+				portCount += 1
+		ts = " "*12 + 'mb->release();\n'; output.write(ts)
+		ts = " "*8 + '}\n'; output.write(ts)
+    		ts = " "*4 + '}\n' + " "*4 + 'return 0;\n}\n'
+    		output.write(ts)
+	else:
+	        if timing_flag & (c.interface.name=='timingStatus'):
+	        	ts = " "*4 + 'dataOut_timingStatus_i *output_port = this;\n'; output.write(ts)
+	        	ts = " "*4 + 'int message_buffer_read_idx = 0;\n'; output.write(ts)
+	        	ts = " "*4 + '\n'; output.write(ts)
+	        	ts = " "*4 + 'while(1) {\n'; output.write(ts)
+	        	ts = " "*8 + 'output_port->data_is_ready->wait();\n'; output.write(ts)
+	        	ts = " "*8 + 'for (unsigned int i = 0; i < output_port->outPorts.size(); i++) {\n'; output.write(ts)
+	        	ts = " "*12 + 'output_port->outPorts[i].port_var->send_timing_event(output_port->message_buffer[message_buffer_read_idx].component_name,\n'; output.write(ts)
+	        	ts = " "*16 + 'output_port->message_buffer[message_buffer_read_idx].port_name,\n'; output.write(ts)
+	        	ts = " "*16 + 'output_port->message_buffer[message_buffer_read_idx].function_name,\n'; output.write(ts)
+	        	ts = " "*16 + 'output_port->message_buffer[message_buffer_read_idx].description,\n'; output.write(ts)
+	        	ts = " "*16 + 'output_port->message_buffer[message_buffer_read_idx].time_s,\n'; output.write(ts)
+	        	ts = " "*16 + 'output_port->message_buffer[message_buffer_read_idx].time_us,\n'; output.write(ts)
+	        	ts = " "*16 + 'output_port->message_buffer[message_buffer_read_idx].number_samples);\n'; output.write(ts)
+	        	ts = " "*8 + '}\n'; output.write(ts)
+	        	ts = " "*8 + 'message_buffer_read_idx++;\n'; output.write(ts)
+	        	ts = " "*8 + 'message_buffer_read_idx = message_buffer_read_idx%NUMBER_TIMING_MESSAGE_BUFFER;\n'; output.write(ts)
+	        	ts = " "*4 + '}\n'; output.write(ts)
+	        	ts = " "*4 + 'return 0;\n'; output.write(ts)
+	        	ts = '}\n'; output.write(ts)
+		else:
+	        	ts = " "*4 + 'return 0;\n' + '}\n'; output.write(ts)
+
+  def writeTimingMessageDef(self, output,c,type):
+    if type == 'port':
+    	ts = 'void ' + c.u_cname + '::send_timing_message(string component_name, string port_name, string function_name, string description, long number_samples) {\n'; output.write(ts)
+    	ts = " "*4 + 'writing_to_timing_buffer.lock();\n'; output.write(ts)
+    	ts = " "*4 + 'struct timeval tv;\n'; output.write(ts)
+    	ts = " "*4 + 'struct timezone tz;\n'; output.write(ts)
+    	ts = " "*4 + 'gettimeofday(&tv, &tz);\n'; output.write(ts)
+    	ts = " "*4 + 'strcpy(message_buffer[message_buffer_write_idx].component_name, component_name.c_str());\n'; output.write(ts)
+    	ts = " "*4 + 'strcpy(message_buffer[message_buffer_write_idx].port_name, port_name.c_str());\n'; output.write(ts)
+    	ts = " "*4 + 'strcpy(message_buffer[message_buffer_write_idx].function_name, function_name.c_str());\n'; output.write(ts)
+    	ts = " "*4 + 'strcpy(message_buffer[message_buffer_write_idx].description, description.c_str());\n'; output.write(ts)
+    	ts = " "*4 + 'message_buffer[message_buffer_write_idx].time_s = tv.tv_sec;\n'; output.write(ts)
+    	ts = " "*4 + 'message_buffer[message_buffer_write_idx].time_us = tv.tv_usec;\n'; output.write(ts)
+    	ts = " "*4 + 'message_buffer[message_buffer_write_idx].number_samples = number_samples;\n'; output.write(ts)
+    	ts = " "*4 + 'message_buffer_write_idx++;\n'; output.write(ts)
+    	ts = " "*4 + 'message_buffer_write_idx = message_buffer_write_idx%NUMBER_TIMING_MESSAGE_BUFFER;\n'; output.write(ts)
+    	ts = " "*4 + 'writing_to_timing_buffer.unlock();\n'; output.write(ts)
+    	ts = " "*4 + 'data_is_ready->post();\n'; output.write(ts)
+    	ts = '}\n'; output.write(ts)
+
+  def writeOperation(self,output,i,prefix='',cppFlag=False,in_name='',using_ace=False,comp='',port=''):
+    """ Writes the declaration or definition of an operation (pushPacket) to
+        the port_impl.h and port_impl.cpp files respectively """
+    ocount = 0
+    for o in i.operations:
+
+
+        ocount += 1
+        if cppFlag:
+            if ocount > 1:
+                ts = "\n" + o.returnType + ' ' + prefix + o.name + '('
+                tscxx = "\n" + o.cxxReturnType + ' ' + prefix + o.name + '('
+            else:
+                ts = o.returnType + ' ' + prefix + o.name + '('
+                tscxx = o.cxxReturnType + ' ' + prefix + o.name + '('
+        else:
+            ts = prefix + " "*4 + o.returnType + ' ' + o.name + '('
+            tscxx = prefix + " "*4 + o.cxxReturnType + ' ' + o.name + '('
+
+        first = True
+        for p in o.params:
+            _USE_AMPERSAND_ = ''
+            _USE_CONST_ = 'const '
+            _USE__OUT_ = ''
+	    if p.direction == 'out':
+                if len(p.dataType) > 8 and p.dataType[-8:] != 'Sequence':
+                    _USE_CONST_ = ''
+                    _USE_AMPERSAND_ = '&'
+                if len(p.dataType) <= 8:
+                    _USE_CONST_ = ''
+                    _USE_AMPERSAND_ = '&'
+	    if p.direction == 'in' and len(p.dataType) > 8 and p.dataType[-8:] == 'Sequence':
+                _USE_AMPERSAND_ = '&'
+	    if p.direction == 'inout' and len(p.dataType) > 8 and p.dataType[-8:] == 'Sequence':
+                _USE_CONST_ = ''
+                _USE_AMPERSAND_ = '&'
+	    if p.direction == 'out' and len(p.dataType) > 8 and p.dataType[-8:] == 'Sequence':
+                _USE__OUT_ = '_out'
+
+            if not first:
+                ts += ','
+                tscxx += ','
+            else:
+                first = False
+            ts += _USE_CONST_ + p.dataType + _USE__OUT_ + ' ' + _USE_AMPERSAND_ + p.name
+            tscxx += p.cxxType + ' ' + p.name
+        #if len(o.params) != 0:
+        if cppFlag:
+            ts += ')\n'
+            tscxx += ')\n'
+        else:
+            ts += ');\n'
+            tscxx += ');\n'
+#        output.write(ts)
+        output.write(tscxx)
+
+        if cppFlag:
+		#ts = "{\n" + " "*4 + "unsigned int len = " + "hello" + ".length();\n"; output.write(ts)
+            	#ts = "{\n\n" + " "*4 + "/* Data flow and processing goes here */\n\n"; output.write(ts)
+		if using_ace:
+			if len(o.params)>0:
+				if _USE__OUT_ == '' :
+					if ((o.params[0].dataType == 'PortTypes::DoubleSequence')|(o.params[0].dataType == 'PortTypes::FloatSequence')|(o.params[0].dataType == 'PortTypes::ShortSequence')):
+						portCount = 0
+						ts = "{\n"; output.write(ts)
+						for individual_port in comp.ports:
+							if individual_port.type == "Uses":
+								if individual_port.interface.name == 'timingStatus':
+									ts = " "*4 + "if (" + comp.name.lower() + "->outPort" + str(portCount) + '_active) {\n'; output.write(ts)
+									ts = " "*8 + comp.name.lower() + "->outPort" + str(portCount) + '_servant->send_timing_message(' + comp.name.lower() + '->naming_service_name, "' + port.name + '", "' + o.name + '", "begin", I.length());\n'; output.write(ts)
+									ts = " "*4 + '}\n'; output.write(ts)
+								portCount += 1
+						ts = " "*4 + "unsigned int len = " + o.params[0].name + ".length();\n"; output.write(ts)
+						if o.params[0].dataType == 'PortTypes::DoubleSequence':
+							TYPE_NAME = 'double';
+						if o.params[0].dataType == 'PortTypes::FloatSequence':
+							TYPE_NAME = 'float';
+						if o.params[0].dataType == 'PortTypes::ShortSequence':
+							TYPE_NAME = 'short';
+						if len(o.params) == 1:
+							NUMBER_VECS = '1'
+							if o.params[0].dataType == 'PortTypes::DoubleSequence':
+								DATA_TYPE = '4';
+							if o.params[0].dataType == 'PortTypes::FloatSequence':
+								DATA_TYPE = '5';
+							if o.params[0].dataType == 'PortTypes::ShortSequence':
+								DATA_TYPE = '6';
+						if len(o.params) == 2:
+							NUMBER_VECS = '2'
+							if o.params[0].dataType == 'PortTypes::DoubleSequence':
+								DATA_TYPE = '1';
+							if o.params[0].dataType == 'PortTypes::FloatSequence':
+								DATA_TYPE = '2';
+							if o.params[0].dataType == 'PortTypes::ShortSequence':
+								DATA_TYPE = '3';
+						ts = " "*4 + "vector <" + TYPE_NAME + "> data_in(len*" + NUMBER_VECS + ");\n"; output.write(ts)
+						ts = " "*4 + "char *buffer;\n"; output.write(ts)
+						ts = " "*4 + "buffer = new char[len*" + NUMBER_VECS + "*sizeof(" + TYPE_NAME + ")+sizeof(unsigned short)];\n\n"; output.write(ts)
+						ts = " "*4 + "for (unsigned int i = 0; i<len; i++) {\n"; output.write(ts)
+						if len(o.params) == 1:
+							ts = " "*8 + "data_in[i] = " + o.params[0].name + "[i];\n"; output.write(ts)
+						if len(o.params) == 2:
+							ts = " "*8 + "data_in[i] = " + o.params[0].name + "[i];\n"; output.write(ts)
+							ts = " "*8 + "data_in[i+len] = " + o.params[1].name + "[i];\n"; output.write(ts)
+						ts = " "*4 + "}\n"; output.write(ts)
+						ts = " "*4 + "unsigned short data_type = " + DATA_TYPE + ";\n"; output.write(ts)
+						ts = " "*4 + "memcpy(buffer, &data_type, sizeof(unsigned short));\n"; output.write(ts)
+						ts = " "*4 + "memcpy(&buffer[sizeof(unsigned short)], (char *)&data_in[0], len*" + NUMBER_VECS + "*sizeof(" + TYPE_NAME + ")+sizeof(unsigned short));\n"; output.write(ts)
+						ts = "\n" + " "*4 + "ACE_Message_Block *message = new ACE_Message_Block (len*" + NUMBER_VECS + "*sizeof(" + TYPE_NAME + ")+sizeof(unsigned short));\n"; output.write(ts)
+						ts = " "*4 + "message->copy((const char*)&buffer[0], len*" + NUMBER_VECS + "*sizeof(" + TYPE_NAME + ")+sizeof(unsigned short));\n"; output.write(ts)
+						ts = " "*4 + "size_t message_length = len*" + NUMBER_VECS + "*sizeof(" + TYPE_NAME + ")+sizeof(unsigned short);\n"; output.write(ts)
+						ts = " "*4 + "size_t available_space = " + in_name + "->msg_queue()->message_bytes();\n"; output.write(ts)
+						ts = " "*4 + "if (available_space<=(" + in_name + "->queue_size+message_length)) {\n"; output.write(ts)
+						ts = " "*8 + "" + in_name + "->queue_size+=QUEUE_BLOCK_SIZE;\n"; output.write(ts)
+						ts = " "*8 + "" + in_name + "->water_marks (ACE_IO_Cntl_Msg::SET_HWM," + in_name + "->queue_size);\n"; output.write(ts)
+						ts = " "*4 + "}\n"; output.write(ts)
+						ts = " "*4 + "if (" + in_name + "->putq(message) == -1) {\n"; output.write(ts)
+						ts = " "*8 + "// this is where there would be a message about the putq failing\n"; output.write(ts)
+						ts = " "*4 + "}\n"; output.write(ts)
+						portCount = 0
+						for individual_port in comp.ports:
+							if individual_port.type == "Uses":
+								if individual_port.interface.name == 'timingStatus':
+									ts = " "*4 + "if (" + comp.name.lower() + "->outPort" + str(portCount) + '_active) {\n'; output.write(ts)
+									ts = " "*8 + comp.name.lower() + "->outPort" + str(portCount) + '_servant->send_timing_message(' + comp.name.lower() + '->naming_service_name, "' + port.name + '", "' + o.name + '", "end", I.length());\n'; output.write(ts)
+									ts = " "*4 + '}\n'; output.write(ts)
+								portCount += 1
+						ts = " "*4 + "\ndelete buffer;\n}\n"; output.write(ts)
+				        	#ts += " "*4 + "/* if using ACE:\n\n" + " "*7
+					        #ts += "ACE_Message_Block *mb;\n" + " "*7 + "putq(mb);\n"
+	        				#ts += " "*4 + "*/\n\n}\n"
+				        	#output.write(ts)
+					else:
+						ts = "{\n\n}\n"; output.write(ts)
+				else:
+					ts = "{\n\n}\n"; output.write(ts)
+			else:
+				ts = "{\n\n}\n"; output.write(ts)
+		else:
+			ts = "{\n\n}\n"; output.write(ts)
+
+  def writeFriendDecl(self,output,c):
+      friendList = []
+      for p in c.ports:
+          if p.type == "Uses":
+              if p.u_cname not in friendList:
+                  friendList.append(p.u_cname)
+          if p.type == "Provides":
+              if p.p_cname not in friendList:
+                  friendList.append(p.p_cname)
+
+      for x in friendList:
+          ts = " "*4 + "friend class " + x + ";\n"
+          output.write(ts)
+
+
+  def addPreamble(self,outFile,name):
+      if(self.preamble == None):
+          inFile = open(self.sourcepreamble,'r')
+          for line in inFile.readlines():
+              l_out = line.replace("__COMP_NAME__",name)
+              #l_out = l_out.replace("__YEAR__",date.today().year.__str__())
+              #l_out = l_out.replace("__DEVELOPER__",self.developer)
+              outFile.write(l_out)
+
+          inFile.close()
+      else:
+          outFile.write(self.preamble)
+
+
+  def cleanUp(self):
+      # Move the AssemblyController to the waveform Dir
+      for c in self.active_wave.components:
+        if c.AssemblyController == True and c.generate:
+            os.system('mv ' + self.path + c.name + ' ' + self.path + self.active_wave.name)
+
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/sampleComp.cpp
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/sampleComp.cpp	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/sampleComp.cpp	(revision 4961)
@@ -0,0 +1,52 @@
+
+#include <iostream>
+
+#include "__IncludeFile__.h"
+
+#include "port_impl.h"
+
+__Class_name__::__Class_name__(const char *uuid, omni_condition *con, const char *label) : Resource_impl(uuid)
+{
+    component_running = con;
+
+__PORT_INST__
+}
+
+
+__Class_name__::~__Class_name__(void)
+{
+__DEL_PORT__
+}
+
+CORBA::Object_ptr __Class_name__::getPort( const char* _id ) throw (CORBA::SystemException, CF::PortSupplier::UnknownPort)
+{
+__GET_PORT__
+}
+
+void __Class_name__::start() throw (CORBA::SystemException, CF::Resource::StartError)
+{
+
+}
+
+void __Class_name__::stop() throw (CORBA::SystemException, CF::Resource::StopError) {  }
+
+void __Class_name__::releaseObject() throw (CORBA::SystemException, CF::LifeCycle::ReleaseError)
+{
+    // Clear the component running condition so main shuts down everything
+    component_alive = false;
+    component_running->signal();
+}
+
+void __Class_name__::initialize() throw (CF::LifeCycle::InitializeError, CORBA::SystemException)
+{
+
+}
+
+void __Class_name__::configure(const CF::Properties& props) throw (CORBA::SystemException, CF::PropertySet::InvalidConfiguration, CF::PropertySet::PartialConfiguration)
+{
+    PropertySet_impl::configure(props);
+}
+
+
+__ACE_SVC_DEF__
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample_p.cpp
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample_p.cpp	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample_p.cpp	(revision 4961)
@@ -0,0 +1,7 @@
+__IN_PORT__::__IN_PORT__(__COMP_ARG__)
+{
+    __COMP_REF_DEF__
+}
+
+__IN_PORT__::__OPERATION__
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/__init__.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/__init__.py	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/__init__.py	(revision 4961)
@@ -0,0 +1,1 @@
+pass
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_impl.cpp
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_impl.cpp	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_impl.cpp	(revision 4961)
@@ -0,0 +1,7 @@
+#include <iostream>
+
+#include "port_impl.h"
+
+using namespace std;
+
+__PORT_DEF__
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample.cpp
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample.cpp	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample.cpp	(revision 4961)
@@ -0,0 +1,37 @@
+__IN_PORT__::__IN_PORT__(__COMP_ARG__)
+{
+    __COMP_REF_DEF__
+}
+
+__IN_PORT__::__OPERATION__
+
+__OUT_PORT__::__OUT_PORT__(__COMP_ARG__)
+{
+    __COMP_REF_DEF__
+}
+
+void __OUT_PORT__::connectPort(CORBA::Object_ptr connection, const char *connectionId)
+{
+  __NAME_SPACE__::__INT_TYPE___var port = __NAME_SPACE__::__INT_TYPE__::_narrow(connection);
+  outPorts.push_back(__OUT_PORT__::PortInfo(port,connectionId));
+}
+
+void __OUT_PORT__::disconnectPort(const char *connectionId)
+{
+  std::vector<__OUT_PORT__::PortInfo>::iterator i;
+
+  for (i = outPorts.begin(); i != outPorts.end(); ++i) {
+      if ((*i).connectionId == connectionId) {
+          outPorts.erase(i);
+          break;
+      }
+  }
+}
+
+std::vector<__OUT_PORT__::PortInfo> __OUT_PORT__::get_ports()
+{
+    return outPorts;
+}
+
+__ACE_SVC_DEF__
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/sampleComp.h
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/sampleComp.h	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/sampleComp.h	(revision 4961)
@@ -0,0 +1,46 @@
+
+#ifndef __CLASS_DEF__
+#define __CLASS_DEF__
+
+#include <stdlib.h>
+
+#include "ossie/cf.h"
+__ACE_INCLUDES__
+
+#include "ossie/Resource_impl.h"
+
+class __Class_name__;
+#include "port_impl.h"
+
+class __Class_name__ : public Resource_impl__ACE_INHERIT__
+{
+
+    __FRIEND_DECL__
+
+    public:
+        __Class_name__(const char *uuid, omni_condition *con, const char *);
+
+        ~__Class_name__(void);
+
+        void start() throw (CF::Resource::StartError, CORBA::SystemException);
+
+        void stop() throw (CF::Resource::StopError, CORBA::SystemException);
+
+        CORBA::Object_ptr getPort( const char* _id ) throw (CF::PortSupplier::UnknownPort, CORBA::SystemException);
+
+        void releaseObject() throw (CF::LifeCycle::ReleaseError, CORBA::SystemException);
+
+	void initialize() throw (CF::LifeCycle::InitializeError, CORBA::SystemException);
+
+        void configure(const CF::Properties&) throw (CORBA::SystemException, CF::PropertySet::InvalidConfiguration, CF::PropertySet::PartialConfiguration);
+
+        __ACE_SVC_DECL__
+
+    private:
+        // For component shutdown
+        omni_condition *component_running;
+
+    	__PORT_DECL__
+
+};
+#endif
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/sampleMain.cpp
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/sampleMain.cpp	(revision 5731)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/sampleMain.cpp	(revision 5731)
@@ -0,0 +1,44 @@
+#include "ossie/ossieSupport.h"
+
+#include "__IncludeFile__.h"
+
+
+
+int main(int argc, char* argv[])
+
+{
+    ossieSupport::ORB *orb = new ossieSupport::ORB;
+    omni_mutex component_running_mutex;
+    omni_condition *component_running = new omni_condition(&component_running_mutex);
+
+    if (argc != 3) {
+	std::cout << argv[0] << " <id> <usage name> " << std::endl;
+	exit (-1);
+    }
+
+    char *uuid = argv[1];
+    char *label = argv[2];
+
+    std::cout << "Identifier - " << uuid << "  Label - " << label << std::endl;
+
+    __Class_name__* __CLASS_VAR___servant;
+    CF::Resource_var __CLASS_VAR___var;
+
+    // Create the __CLASS_VAR__ component servant and object reference
+
+    __CLASS_VAR___servant = new __Class_name__(uuid, component_running, label);
+    __CLASS_VAR___var = __CLASS_VAR___servant->_this();
+    __CLASS_VAR_ACE___servant->activate();
+
+    orb->bind_object_to_name((CORBA::Object_ptr) __CLASS_VAR___var, label);
+
+    // This bit is ORB specific
+    // omniorb is threaded and the servants are running at this point
+    // so we block on the condition
+    // The releaseObject method clear the condition and the component exits
+
+    component_running->wait();
+    orb->unbind_name(label);
+    orb->orb->shutdown(0);
+
+}
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/Makefile.am	(revision 9483)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/Makefile.am	(revision 9483)
@@ -0,0 +1,13 @@
+EXTRA_DIST = genStructure.py \
+	     port_impl.cpp \
+	     port_impl.h \
+	     port_sample.cpp \
+	     port_sample.h \
+	     port_sample_p.cpp \
+	     port_sample_p.h \
+	     port_sample_u.cpp \
+	     port_sample_u.h \
+	     sampleComp.cpp \
+	     sampleComp.h \
+	     sampleMain.cpp \
+	     __init__.py
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample_p.h
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample_p.h	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample_p.h	(revision 4961)
@@ -0,0 +1,16 @@
+// Declaration for provides ports
+#ifndef __IN_CLASS___H
+#define __IN_CLASS___H
+class __IN_PORT__ : 
+public POA___NAME_SPACE__::__INT_TYPE____ACE_INHERIT__
+{
+  public:
+    __IN_PORT__(__COMP_ARG__);
+
+    __OPERATION__
+
+  private:
+    __COMP_REF_DECL__
+};
+#endif
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample_u.cpp
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample_u.cpp	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample_u.cpp	(revision 4961)
@@ -0,0 +1,32 @@
+__OUT_PORT__::__OUT_PORT__(__COMP_ARG__)
+{
+    __COMP_REF_DEF__
+    __INIT_VARS_DEF__
+}
+
+void __OUT_PORT__::connectPort(CORBA::Object_ptr connection, const char *connectionId)
+{
+  __NAME_SPACE__::__INT_TYPE___var port = __NAME_SPACE__::__INT_TYPE__::_narrow(connection);
+  outPorts.push_back(__OUT_PORT__::PortInfo(port,connectionId));
+}
+
+void __OUT_PORT__::disconnectPort(const char *connectionId)
+{
+  std::vector<__OUT_PORT__::PortInfo>::iterator i;
+
+  for (i = outPorts.begin(); i != outPorts.end(); ++i) {
+      if ((*i).connectionId == connectionId) {
+          outPorts.erase(i);
+          break;
+      }
+  }
+}
+
+std::vector<__OUT_PORT__::PortInfo> __OUT_PORT__::get_ports()
+{
+    return outPorts;
+}
+
+__ACE_SVC_DEF__
+
+__TIMING_MESSAGE_DEF__
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_impl.h
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_impl.h	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_impl.h	(revision 4961)
@@ -0,0 +1,17 @@
+#include <vector>
+#include "ossie/cf.h"
+#include "ossie/PortTypes.h"
+
+#define QUEUE_BLOCK_SIZE  100000
+#define DEFAULT_QUEUE_BLOCK_SIZE 16*1024
+
+#include "ossie/Resource_impl.h"
+#include "__IncludeFile__.h"
+__ACE_INCLUDES__
+
+__TIMING_DECL_AND_INCLUDES__
+
+__PORT_DECL__
+
+
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample.h
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample.h	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/custom_ports/port_sample.h	(revision 4961)
@@ -0,0 +1,59 @@
+// Declaration for provides ports
+#ifndef __IN_CLASS___H
+#define __IN_CLASS___H
+class __IN_PORT__ : 
+public POA___NAME_SPACE__::__INT_TYPE____ACE_INHERIT__
+{
+  public:
+    __IN_PORT__(__COMP_ARG__);
+
+    __OPERATION__
+
+  private:
+    __COMP_REF_DECL__
+};
+#endif
+
+// Declaration for uses ports
+
+#ifndef __OUT_CLASS___H
+#define __OUT_CLASS___H
+class __OUT_PORT__ : 
+public virtual POA_CF::Port__ACE_INHERIT__
+{
+  public:
+    __OUT_PORT__(__COMP_ARG__);
+    void connectPort(CORBA::Object_ptr connection, const char* connectionId);
+    void disconnectPort(const char* connectionId);
+    __ACE_SVC_DECL__
+
+    //Port Information Storage Class
+    class PortInfo {
+      public:
+        PortInfo(__NAME_SPACE__::__INT_TYPE___var _port, const char *&_id)
+        {
+            port_var = _port;
+            connectionId = _id;
+        };
+
+        PortInfo(const PortInfo &cp)
+        {
+            port_var = cp.port_var;
+            connectionId = cp.connectionId;
+        };
+
+        __NAME_SPACE__::__INT_TYPE___var port_var;
+        std::string connectionId;
+
+      private:
+        PortInfo(); //no default constructor
+    };
+
+    std::vector <__OUT_PORT__::PortInfo> get_ports();
+
+  private:
+    std::vector <__OUT_PORT__::PortInfo> outPorts;
+    __COMP_REF_DECL__
+
+};
+#endif
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/__init__.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/__init__.py	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/__init__.py	(revision 4961)
@@ -0,0 +1,1 @@
+pass
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/WorkModule.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/WorkModule.py	(revision 10374)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/WorkModule.py	(revision 10374)
@@ -0,0 +1,71 @@
+import threading
+
+class WorkClass:
+    """This class provides a place for the main processing of the 
+    component to reside."""
+
+    def __init__(self, __CLASS_NAME___ref, buffer_size):
+        '''Initialization.  Sets a reference to parent.  
+        Initializes the buffer.  Starts the Process data
+        thread, which waits for data to be added to the buffer'''
+
+        self.__CLASS_NAME___ref = __CLASS_NAME___ref
+        self.buffer_size = buffer_size
+	
+        self.data_queue = []
+        self.data_queue_lock = threading.Lock()
+        self.data_signal = threading.Event()
+
+        self.is_running = True
+
+        self.process_thread = threading.Thread(target=self.Process)
+        self.process_thread.start()
+	
+    def __del__(self):
+        '''Destructor'''
+        pass
+	
+    def AddData(self, I, Q):
+        '''Generally called by parent.  Adds data to a buffer.
+        The Process() method will wait for this buffer to be set.
+        '''
+        self.data_queue_lock.acquire()
+        self.data_queue.insert(0, (I,Q))
+        self.data_queue_lock.release()
+        self.data_signal.set()
+    	
+    def Release(self):
+        self.is_running = False
+        self.data_signal.set()
+		
+    def Process(self):
+        while self.is_running:
+            self.data_signal.wait()  # wait for data to be aded to the 
+                                     # buffer in self.AddData()
+            while len(self.data_queue) > 0:
+                # get the data from the buffer:
+                self.data_queue_lock.acquire()
+                new_data = self.data_queue.pop()
+                self.data_queue_lock.release()
+				
+                # get data out of tuple
+                I = new_data[0]
+                Q = new_data[1]
+				
+                newI = [0 for x in range(len(I))]
+                newQ = [0 for x in range(len(Q))]
+		
+		
+                # Insert code here to do work
+                # Example:
+                #for x in range(len(I)):
+                #    newI[x] = I[x]
+                #    newQ[x] = Q[x]
+
+					
+                # Output the new data
+                __SEND_TO_USES_PORTS__
+
+            self.data_signal.clear()  # done reading the buffer
+				
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/genStructure.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/genStructure.py	(revision 10518)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/genStructure.py	(revision 10518)
@@ -0,0 +1,594 @@
+#! /usr/bin/env python
+
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import os, shutil
+from WaveDev.wavedev.errorMsg import *
+from WaveDev.wavedev.cfg import LoadConfiguration
+from datetime import date
+
+class genAll:
+  def __init__(self, path, wavedevPath, active_wave, preamble=None):
+    if path[len(path)-1] != '/':
+        path = path + '/'
+    self.path = path
+    if len(wavedevPath) > 0 and wavedevPath[len(wavedevPath)-1] != '/':
+        wavedevPath = wavedevPath + '/'
+    self.wavedevPath = wavedevPath
+    self.active_wave = active_wave
+    self.preamble = preamble
+    LoadConfiguration(self)
+
+
+
+  def writeCompMakefile(self,comp,compPath):
+    '''
+    ##############################################################################
+    ## writeCompMakefile - generates the make file for an indivdual component
+    ##############################################################################
+    '''
+
+    #copy over the readme file
+    shutil.copy(self.wavedevPath + 'generate/templates/py_comp/README', compPath)
+
+    #copy over the license file
+    if self.licensefile != "":
+        shutil.copy(self.licensefile, compPath + '/LICENSE')
+
+    if compPath[len(compPath)-1] != '/':
+        compPath = compPath + '/'
+
+    output = open(compPath + 'setup.py','w')
+    ts = "\
+#! /usr/bin/env python\n\
+\n\
+from distutils.core import setup\n\
+import sys\n\
+import os, stat\n\
+\n\
+install_location = '/sdr/dom/'\n\
+\n\
+if len(sys.argv) != 2:\n\
+	sys.exit(1)\n\
+\n\
+sys.argv.append('--install-lib='+install_location)\n\n"
+    output.writelines(ts)
+
+    ts = "setup(name='" + comp.name + "',\n"
+    ts = ts + " "*8 + "description='" + comp.name + "',\n"
+    ts = ts + " "*8 + "data_files=[\n"
+    ts = ts + " "*16 + "(install_location+'bin/" + comp.name + "',['" + comp.name + ".py', 'WorkModule.py']),\n"
+
+    ts = ts + ' '*16 + "(install_location+'xml/" + comp.name + "',\n"
+    ts = ts + ' '*24 + "['" + comp.name + ".prf.xml',\n"
+    ts = ts + " "*24 + "'" + comp.name + ".scd.xml', \n"
+    ts = ts + " "*24 + "'" + comp.name + ".spd.xml'])])\n"
+    output.writelines(ts)
+    output.writelines("#Change executable file permissions\n")
+    ts = "fileperm = stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR \n"
+    ts = ts + "fileperm = fileperm | stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP | stat.S_IXOTH \n"
+    output.writelines(ts)
+    chmodCmd = "os.chmod(install_location + 'bin/" + comp.name + "/" + comp.name + ".py', fileperm)\n"
+    output.writelines(chmodCmd)
+
+    output.close()   #done creating the file
+
+    output = open(compPath + 'Makefile.am', 'w')
+    ts = "ACLOCAL_AMFLAGS = -I m4\n"
+    ts = ts + "EXTRA_DIST = " + comp.name + ".prf.xml " + comp.name + ".scd.xml " + comp.name + ".spd.xml " + "setup.py\n"
+    ts = ts + "install-exec-hook:\n\tpython setup.py install\n"
+    output.writelines(ts)
+
+    output.close()
+
+
+  def writeConfAC(self, genPath, name, aceFlag, wavFlag, installPath):
+    '''
+    ##############################################################################
+    ## writeConfAC - gets called by ComponentFrame.  python component installation
+    ## does not need configure.ac files, so it does not really do anything.  still
+    ## needs to exist so that an error does not get thrown in ComponetFrame.py.
+    ##############################################################################
+    '''
+    if genPath[len(genPath)-1] != '/':
+        genPath = genPath + '/'
+
+    output = open(genPath + 'configure.ac', 'w')
+    ts = "AC_INIT(" + name + ", 0.8.1)\n"
+    ts = ts + "AM_INIT_AUTOMAKE\n"
+    ts = ts + "AM_PATH_PYTHON([2.5])\n"
+    ts = ts + "AC_CONFIG_FILES([Makefile])\n"
+    ts = ts + "AC_OUTPUT"
+    output.writelines(ts)
+    output.close()
+
+
+  #-----------------------------------------------------------------------------
+  def genCompFiles(self,comp):
+      '''
+      ##############################################################################
+      ## This function generates the cpp and h files for each component:
+      ## component.h, component.cpp, main.cpp, port_impl.h, and port_impl.cpp
+      ##############################################################################
+      '''
+
+      #-------------------------------------------------------------------------
+      '''
+      ##########################################################################
+      ## generate component .py file
+      ##########################################################################
+      '''
+      #TODO: write more of the code for generting .py file based on component class instance
+      input_tmpl = open(self.wavedevPath + 'generate/templates/py_comp/_sampleComp.py', 'r')
+
+      #create the main .py file for the component
+      output = open(self.path + comp.name + '/' + comp.name + '.py', 'w')
+
+      #add the generic public license to the beginning of the component main .py file
+      self.addPreamble(output, comp.name)
+
+      for line in input_tmpl.readlines():
+          l_out = line.replace('__CLASS_NAME__',comp.name)
+          if l_out.find("__PORT_DECL__") != -1:
+              self.writePortDecl(output,comp)
+              continue
+          if l_out.find("__GET_PORT__") != -1:
+              self.writeGetPort(output,comp)
+              continue
+          if l_out.find("__READ_PROPS__") != -1:
+              self.writeReadProps(output,comp)
+              continue
+          if l_out.find("__REL_MAIN_PROCESS_THREADS__") != -1:
+              self.writeReleaseMainProcessThreads(output,comp)
+              continue
+          if l_out.find("__DEACTIVATE_PORTS__") != -1:
+              self.writeDeactivatePorts(output,comp)
+              continue
+          if l_out.find("__DATA_IN_CLASS_DEFS__") != -1:
+              self.writeDataInClassDefs(output,comp)
+              continue
+          if l_out.find("__DATA_OUT_CLASS_DEFS__") != -1:
+              self.writeDataOutClassDefs(output,comp)
+              continue
+          if l_out.find("__TIMING_MESSAGE_DEF__") != -1:
+              self.writeTimingMessageDef(output,comp)
+              continue
+
+          output.write(l_out)  #if none of the continue statements have been executed
+
+      input_tmpl.close()
+      output.close()
+
+      # TODO: figure out this command
+      #os.chmod(self.path + comp.name + '/' + comp.name + '.py', os.X_OK | os.R_OK | os.W_OK)
+      #-------------------------------------------------------------------------
+
+
+      #-------------------------------------------------------------------------
+      '''
+      ##########################################################################
+      ## generate WorkModule.py file
+      ##########################################################################
+      '''
+      #TODO: write all the code for the WorkModule based on component class instance
+      input_wm = open(self.wavedevPath + 'generate/templates/py_comp/WorkModule.py', 'r')
+
+      #create the WorkModule.py file for the component
+      output_wm = open(self.path + comp.name + '/' + 'WorkModule.py', 'w')
+
+      #add the generic public license to the beginning of the generated WorkModule file
+      self.addPreamble(output_wm, comp.name)
+
+      for line in input_wm.readlines():
+         l_out = line.replace('__CLASS_NAME__',comp.name)
+
+         if l_out.find("__SEND_TO_USES_PORTS__") != -1:
+             self.writeSendToUsesPorts(output_wm,comp)
+             continue
+         output_wm.write(l_out)
+
+      input_wm.close()
+      output_wm.close()
+      #-----------------------------------------------------------------------------
+  #----------------------------------------------------------------------------------
+
+
+
+
+
+  #-----------------------------------------------------------------------------------
+  def writePortDecl(self,output,comp):
+    """ This function writes the corba declarations of the ports to the init method"""
+
+    inCount = 0
+    for p in comp.ports:
+        if p.type == "Provides":
+            ts = " "*8 + "self.inPort" + str(inCount) + '_servant = dataIn_complexShort_i(self, "' + p.name + '")\n'
+            ts = ts + " "*8 + 'self.inPort' + str(inCount) + '_var = self.inPort' + str(inCount) + '_servant._this()\n\n'
+            output.write(ts)
+            inCount += 1
+
+    outCount = 0
+    for p in comp.ports:
+        if p.type == "Uses" and p.name != "send_timing_report":
+            ts = " "*8 + 'self.outPort' + str(outCount) + '_servant = dataOut_' + p.interface.name + '_i(self, "' + p.name + '")\n'
+            ts = ts + " "*8 + 'self.outPort' + str(outCount) + '_var = self.outPort' + str(outCount) + '_servant._this()\n'
+            output.write(ts)
+            outCount += 1
+
+    if comp.timing:
+        ts = "\n"
+        ts = ts + " "*8 + "self.timingPort_servant = dataOut_timingStatus_i(self, 'send_timing_report')\n"
+        ts = ts + " "*8 + "self.timingPort_var = self.timingPort_servant._this()\n"
+        output.write(ts)
+  #-------------------------------------------------------------------------------------
+
+  #-------------------------------------------------------------------------------------
+  def writeGetPort(self,output,comp):
+    inCount = 0
+    for p in comp.ports:
+        if p.type == "Provides":
+            ts = " "*8 + 'if str(id) == "' + p.name + '":\n'
+            ts = ts + " "*12 + 'return ' + 'self.inPort' + str(inCount) + '_var\n'
+            output.write(ts)
+            inCount += 1
+
+    outCount = 0
+    for p in comp.ports:
+        if p.type == "Uses" and p.name != "send_timing_report":
+            ts = " "*8 + 'if str(id) == "' + p.name + '":\n'
+            ts = ts + " "*12 + 'return ' + 'self.outPort' + str(outCount) + '_var\n'
+            output.write(ts)
+            outCount += 1
+        elif p.name == "send_timing_report":
+            ts = " "*8 + 'if str(id) == "' + p.name + '":\n'
+            ts = ts + " "*12 + 'return ' + 'self.timingPort_var\n'
+            output.write(ts)
+  #-------------------------------------------------------------------------------------
+
+
+  #-------------------------------------------------------------------------------------
+  def writeReadProps(self,output,comp):
+    '''write teh code that will read propeties from the prf file'''
+    # TODO: test this method
+
+    # check to make sure there are properties
+    # TODO: use a more efficient method
+    props_present = False
+    for p in comp.properties:
+        props_present = True
+
+    # if there are properties present, open up a for loop to cycle through them
+    if props_present:
+        ts = " "*8 + "for property in props:\n"
+        output.write(ts)
+
+    for p in comp.properties:
+        ts = " "*12 + "if property not in self.propertySet:\n"; output.write(ts)
+        ts = " "*16 + "self.propertySet.append(property)\n"; output.write(ts)
+        
+        if p.type == "short" or p.type == "ushort":
+            tcast = "int("
+        elif p.type == "float" or p.type == "double":
+            tcast = "float("
+        elif p.type == "long" or p.type == "ulong":
+            tcast = "long("
+        elif p.type == "boolean":
+            tcast = "bool("
+        elif p.type == "string":
+            tcast = "str("
+        else:
+            print "ERROR.  property type not supported in generate/templates/py_comp/genStructure.writeReadProps"
+            return
+
+        if p.elementType == "Simple":
+            ts = " "*12 + "if property.id == '" +  p.id + "':\n"; output.write(ts)
+            ts = " "*16 + "self." + p.name + " = " + tcast + "property.value.value())\n"; output.write(ts)
+
+        elif p.elementType == "SimpleSequence":
+            ts = " "*12 + "if property.id == '" +  p.id + "':\n"; output.write(ts)
+            ts = " "*16 + "self." + str(p.name) + " = []\n"; output.write(ts)
+            ts = " "*16 + "self." + str(p.name) + ".extend(" + tcast + "[val for val in property.values.value()))\n"; output.write(ts)
+
+        else:
+            print "Element types other than simple and simple sequence not supported in writeReadProps in generate/templates/py_comp/genStructure.py"
+            return
+  #-------------------------------------------------------------------------------------
+
+
+  #-------------------------------------------------------------------------------------
+  def writeReleaseMainProcessThreads(self,output,comp):
+    #TODO: comment this method
+    #TODO: test this method
+    outCount = 0
+    for p in comp.ports:
+        if p.type == "Uses":
+            ts = " "*8 + "self.outPort" + str(outCount) + "_servant.releasePort()\n"
+            output.write(ts)
+            outCount += 1
+  #-------------------------------------------------------------------------------------
+
+
+  #------------------------------------------------------------------------------------
+  def writeDeactivatePorts(self,output,comp):
+    #TODO: comment this method
+    inCount = 0
+    for p in comp.ports:
+        if p.type == "Provides":
+            ts = " "*8 + "iid" + str(inCount) + " = self.poa.reference_to_id(self.inPort" + str(inCount) + "_var)\n"
+            output.write(ts)
+            inCount += 1
+
+    outCount = 0
+    for p in comp.ports:
+        if p.type == "Uses" and p.name != "send_timing_report":
+            ts = " "*8 + "oid" + str(outCount) + " = self.poa.reference_to_id(self.outPort" + str(outCount) + "_var)\n"
+            output.write(ts)
+            outCount += 1
+
+    ts = "\n"; output.write(ts)
+
+    inCount = 0
+    for p in comp.ports:
+        if p.type == "Provides":
+            ts = " "*8 + "self.poa.deactivate_object(iid" + str(inCount) + ")\n"
+            output.write(ts)
+            inCount += 1
+
+    outCount = 0
+    for p in comp.ports:
+        if p.type == "Uses" and p.name != "send_timing_report":
+            ts = " "*8 + "self.poa.deactivate_object(oid" + str(outCount) + ")\n"
+            output.write(ts)
+            outCount += 1
+
+    if comp.timing:
+        ts = "\n"
+        ts = ts + " "*8 + "tid = self.poa.reference_to_id(self.timingPort_var)\n"
+        ts = ts + " "*8 + "self.poa.deactivate_object(tid)\n"
+        output.write(ts)
+  #------------------------------------------------------------------------------------
+
+
+  #------------------------------------------------------------------------------------
+  def writeDataInClassDefs(self,output,comp):
+    '''Generates the code for the in port class definitions'''
+
+    def_types_written = " "   #keeps track of the interface names that have been written already so that a certain interface (e.g., complexShort) does not get defined more than once
+
+    for p in comp.ports:
+        if p.type == "Provides" and def_types_written.find(p.interface.name) == -1:
+            ts = "#------------------------------------------------------------------\n"
+            ts = ts + "# dataIn_" + p.interface.name + "_i class definition\n"
+            ts = ts + "#------------------------------------------------------------------\n"
+            ts = ts + "class dataIn_" + p.interface.name + "_i(" + p.interface.nameSpace + "__POA." + p.interface.name + "):\n"
+            ts = ts + " "*4 + "def __init__(self, parent, name):\n"
+            ts = ts + " "*8 + "self.parent = parent\n"
+            ts = ts + " "*8 + "self.name = name\n\n"
+            ts = ts + " "*4 + "# WARNING:  I and Q may have to be changed depending on what data you are receiving (e.g., bytesIn for realChar)\n"
+            ts = ts + " "*4 + "def pushPacket(self, I, Q):\n"
+            ts = ts + " "*8 + "self.parent.work_mod.AddData(I, Q)\n"
+            ts = ts + "\n"
+            output.write(ts)
+
+            # the following code assumes one timing port name "timingPort"
+            if comp.timing == True:
+                ts = " "*8 + "if (self.parent.timingPort_servant.active):\n"
+                ts = ts + " "*12 + "self.parent.timingPort_servant.send_timing_message(\n"
+                ts = ts + " "*18 + "self.parent.naming_service_name, self.name,\n"
+                ts = ts + " "*18 + '"pushPacket", "end", len(I))\n'
+                output.write(ts)
+
+            def_types_written = def_types_written + p.interface.name
+  #------------------------------------------------------------------------------------
+
+
+  #------------------------------------------------------------------------------------
+  def writeDataOutClassDefs(self,output,comp):
+    '''generates the code for the out port class definitions'''
+    def_types_written = " "    #keeps track of the interface names that have been written already so that a certain interface (e.g., complexShort) does not get defined more than once
+    out_port_count = -1
+
+    for u in comp.ports:
+        if u.interface.name == "timingStatus":
+            # timing status port definition is written somewhere else
+            continue
+
+        if u.type == "Uses" and def_types_written.find(u.interface.name) == -1:
+            out_port_count = out_port_count + 1
+
+            ts = "#------------------------------------------------------------------\n"
+            ts = ts + "# dataOut_" + u.interface.name + "_i class definition\n"
+            ts = ts + "#------------------------------------------------------------------\n"
+            ts = ts + "class dataOut_" + u.interface.name + "_i(CF__POA.Port):\n"
+            output.write(ts)
+
+            #create the __init__ method
+            ts = " "*4 + "def __init__(self, parent, name):\n\
+        self.parent = parent\n\
+        self.outPorts = {}\n\
+        self.name = name\n\
+        self.active = False\n\
+        \n\
+        self.data_buffer = []\n\
+        self.data_event = threading.Event()\n\
+        self.data_buffer_lock = threading.Lock()\n\
+        \n\
+        self.is_running = True\n\
+        self.process_thread = threading.Thread(target = self.Process)\n\
+        self.process_thread.start()\n\n"
+            output.write(ts)
+
+            #create connectPort method
+            ts = " "*4 + "def connectPort(self, connection, connectionId):\n"
+            ts = ts + " "*8 + "port = connection._narrow(" + u.interface.nameSpace + "__POA." + u.interface.name + ")\n"
+            ts = ts + " "*8 + "self.outPorts[str(connectionId)] = port\n"
+            ts = ts + " "*8 + "self.active = True\n\n"
+            output.write(ts)
+
+            #create disconnectPort method
+            ts = " "*4 + "def disconnectPort(self, connectionId):\n\
+        self.outPorts.pop(str(connectionId))\n\
+        if len(self.outPorts)==0:\n\
+            self.active = False\n\n"
+            output.write(ts)
+
+            #create releasePort method
+            ts = " "*4 + "def releasePort(self):\n\
+        # shut down the Process thread\n\
+        self.is_running = False\n\
+        self.data_event.set()\n\n"
+            output.write(ts)
+
+            #create send_data method
+            ts = " "*4 + "# WARNING:  I and Q may have to be changed depending on what data you are receiving (e.g., bytesIn for realChar)\n\
+    def send_data(self, I, Q):\n\
+        self.data_buffer_lock.acquire()\n\
+        self.data_buffer.insert(0, (I,Q))\n\
+        self.data_buffer_lock.release()\n\
+        self.data_event.set()\n\n"
+            output.write(ts)
+
+            #create Process method
+            ts = " "*4 + "def Process(self):\n\
+        while self.is_running:\n\
+            self.data_event.wait()\n\
+            while len(self.data_buffer) > 0:\n\
+                self.data_buffer_lock.acquire()\n\
+                new_data = self.data_buffer.pop()\n\
+                self.data_buffer_lock.release()\n\
+                \n\
+                for port in self.outPorts.values():\n\
+                    port.pushPacket(new_data[0], new_data[1])\n\
+                \n\
+                self.data_event.clear()\n\n"
+            output.write(ts)
+
+
+            def_types_written = def_types_written + u.interface.name
+  #------------------------------------------------------------------------------------
+
+
+
+  #------------------------------------------------------------------------------------
+  def writeTimingMessageDef(self, output,c):
+    ts = ""
+    if c.timing == True:
+        ts = "\n#------------------------------------------------------------------\n"
+        ts = ts + "# dataOut_timingStatus_i class definition\n"
+        ts = ts + "#------------------------------------------------------------------\n"
+        output.write(ts)
+        ts = "\n\
+class dataOut_timingStatus_i(CF__POA.Port):\n\
+    def __init__(self, parent, name):\n\
+        self.parent = parent\n\
+        self.outPorts = {}\n\
+        self.name = name\n\
+        self.active = False\n\
+        \n\
+        self.message_buffer = []\n\
+        self.timing_event = threading.Event()\n\
+        self.message_buffer_lock = threading.Lock()\n\
+        \n\
+        self.is_running = True\n\
+        self.process_thread = threading.Thread(target = self.Process)\n\
+        self.process_thread.start()\n\
+        \n\
+    def connectPort(self, connection, connectionId):\n\
+        port = connection._narrow(customInterfaces__POA.timingStatus)\n\
+        self.outPorts[str(connectionId)] = port\n\
+        self.active = True\n\
+    \n\
+    def disconnectPort(self, connectionId):\n\
+        self.outPorts.pop(str(connectionId))\n\
+        if len(self.outPorts) == 0:\n\
+            self.parent.outPort1_active = False\n\
+    \n\
+    def releasePort(self):\n\
+        # shut down the Process thread\n\
+        self.is_running = False\n\
+        self.timing_event.set()\n\
+        \n\
+    def send_timing_message(self, component_name, port_name, function_name, description, number_samples):\n\
+        tv = time.time()\n\
+        tv_sec = int(tv)\n\
+        tv_usec = int((tv-tv_sec)*1000000)\n\
+        \n\
+        tmpmsg = (str(component_name), str(port_name), str(function_name), str(description), tv_sec, tv_usec, number_samples)\n\
+        \n\
+        self.message_buffer_lock.acquire()\n\
+        self.message_buffer.insert(0, tmpmsg)\n\
+        self.message_buffer_lock.release()\n\
+        \n\
+        self.timing_event.set()\n\
+    \n\
+    def Process(self):\n\
+        while self.is_running:\n\
+            self.timing_event.wait()\n\
+            while len(self.message_buffer) > 0:\n\
+                self.message_buffer_lock.acquire()\n\
+                newmsg = self.message_buffer.pop()\n\
+                self.message_buffer_lock.release()\n\
+                \n\
+                for port in self.outPorts.values():\n\
+                    port.send_timing_event(newmsg[0], newmsg[1], newmsg[2], newmsg[3], newmsg[4], newmsg[5], newmsg[6])\n\
+            \n\
+            else:\n\
+                self.timing_event.clear()\n\n"
+    output.write(ts)
+  #------------------------------------------------------------------------------------
+
+
+  #------------------------------------------------------------------------------------
+  def writeSendToUsesPorts(self, output, comp):
+      outCount = 0
+      for p in comp.ports:
+          if p.type == "Uses" and p.name != "send_timing_report":
+              ts = " "* 16 + "if self." + comp.name + "_ref.outPort" + str(outCount) + "_servant.active:\n"
+              ts = ts + " "*20 + "self." + comp.name + "_ref.outPort" + str(outCount) + "_servant.send_data(newI, newQ)\n\n"
+              output.write(ts)
+              outCount = outCount + 1
+  #------------------------------------------------------------------------------------
+
+
+
+
+
+  def addPreamble(self,outFile,name):
+      '''Creates a GPL for the component.  The new GPL will have the component
+name.  The new GPL is written to the beginning of the outFile'''
+
+      
+      outFile.write('#! /usr/bin/env python\n\n')
+      outFile.write("'''\n")
+      if(self.preamble == None):
+          inFile = open(self.sourcepreamble,'r')
+          for line in inFile.readlines():
+              l_out = line.replace("__COMP_NAME__",name)
+              #l_out = l_out.replace("__YEAR__",date.today().year.__str__())
+              #l_out = l_out.replace("__DEVELOPER__",self.developer)
+              outFile.write(l_out)
+          outFile.write("'''\n\n")
+          inFile.close()
+      else:
+          outFile.write(self.preamble)
+          outFile.write("'''\n\n")
+
+
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/__init__.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/__init__.py	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/__init__.py	(revision 4961)
@@ -0,0 +1,1 @@
+pass
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/_sampleComp.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/_sampleComp.py	(revision 8161)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/_sampleComp.py	(revision 8161)
@@ -0,0 +1,127 @@
+from omniORB import CORBA
+from omniORB import URI
+import CosNaming
+from ossie.standardinterfaces import standardInterfaces__POA
+from ossie.custominterfaces import customInterfaces__POA
+from ossie.cf import CF, CF__POA
+import sys
+
+import WorkModule  # module found in the component directory.
+                   # this module is where the main processing
+                   # thread resides.  
+import threading
+import time        # primarily availble for time.sleep() statements
+
+#-------------------------------------------------------------
+# __CLASS_NAME___i class definition (main component class)
+#-------------------------------------------------------------
+class __CLASS_NAME___i(CF__POA.Resource):
+    def __init__(self, uuid, label, poa):
+        CF._objref_Resource.__init__(self._this())
+        print "__CLASS_NAME___i __init__: " + label
+        self.naming_service_name = label
+        self.poa = poa
+
+        __PORT_DECL__
+        
+        self.WorkModule_created = False
+
+        self.propertySet = []
+        self.work_mod = None
+        
+    def start(self):
+        print "__CLASS_NAME__ start called"
+        
+    def stop(self):
+        print "__CLASS_NAME__ stop called"
+        
+    def getPort(self, id):
+        __GET_PORT__
+        
+        return None  #port not found in available ports list
+        
+    def initialize(self):
+        print "__CLASS_NAME__ initialize called"
+    
+    def configure(self, props):
+        ''' The configure method is called twice by the framework:
+        once to read the default properties in the component.prf
+        file, and once to read the component instance properties
+        storred in the waveform.sad file.  This method should be
+        called before the start method.  This method is where
+        the properties are read in by the component.  
+        ''' 
+
+        print "__CLASS_NAME__ configure called"
+        buffer_size = 0
+        
+        __READ_PROPS__
+    
+        # make sure that only one WorkModule thread is started, 
+        # even if configure method is called more than once    
+        if not self.WorkModule_created:
+            self.work_mod = WorkModule.WorkClass(self, buffer_size)
+            self.WorkModule_created = True    
+
+    def query(self, props):
+        return self.propertySet
+    
+    def releaseObject(self):
+        # release the main work module
+        self.work_mod.Release()
+        
+        # release the main process threads for the ports
+        __REL_MAIN_PROCESS_THREADS__
+                
+        # deactivate the ports
+        __DEACTIVATE_PORTS__
+
+
+__DATA_IN_CLASS_DEFS__        
+
+__DATA_OUT_CLASS_DEFS__
+
+__TIMING_MESSAGE_DEF__
+
+#-------------------------------------------------------------------
+# ORB_Init class definition
+#-------------------------------------------------------------------
+class ORB_Init:
+    """Takes care of initializing the ORB and bind the object"""
+    
+    def __init__(self, uuid, label):
+        # initialize the orb
+        self.orb = CORBA.ORB_init()
+        
+        # get the POA
+        obj_poa = self.orb.resolve_initial_references("RootPOA")
+        poaManager = obj_poa._get_the_POAManager()
+        poaManager.activate()
+        
+        ns_obj = self.orb.resolve_initial_references("NameService")
+        rootContext = ns_obj._narrow(CosNaming.NamingContext)
+        
+        # create the main component object
+        self.__CLASS_NAME___Obj = __CLASS_NAME___i(uuid, label, obj_poa)
+        __CLASS_NAME___var = self.__CLASS_NAME___Obj._this()
+        
+        name = URI.stringToName(label)
+        rootContext.rebind(name, __CLASS_NAME___var)
+        
+        self.orb.run()
+        
+#-------------------------------------------------------------------
+# Code run when this file is executed
+#-------------------------------------------------------------------
+if __name__ == "__main__":
+    if len(sys.argv) != 3:
+        print sys.argv[0] + " <id> <usage name> "
+    
+    uuid = str(sys.argv[1])
+    label = str(sys.argv[2])
+    
+    print "Identifier - " + uuid + "  Label - " + label
+    
+    orb = ORB_Init(uuid, label)
+    
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/Makefile.am	(revision 9483)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/Makefile.am	(revision 9483)
@@ -0,0 +1,6 @@
+EXTRA_DIST = genStructure.py \
+	     WorkModule.py \
+	     _sampleComp.py \
+	     README \
+	     __init__.py
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/README
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/README	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/py_comp/README	(revision 4961)
@@ -0,0 +1,9 @@
+To install:
+    * in your_comp_name.spd.xml, replace:
+        <localfile name="bin/your_comp_name"/>
+      with:
+        <localfile name="bin/your_comp_name/your_comp_name.py"/>
+    * make sure that py_comp.py is executable
+        -chmod +x py_comp.py
+    * run the setup.py script
+        - python setup.py install
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/genStructure.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/genStructure.py	(revision 10362)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/genStructure.py	(revision 10362)
@@ -0,0 +1,1708 @@
+#! /usr/bin/env python
+
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import sys, os, shutil
+from WaveDev.wavedev.datatypemap import *
+from WaveDev.wavedev.cfg import LoadConfiguration
+from datetime import date
+
+try:
+    from WaveDev.wavedev.errorMsg import *
+except ImportError:
+    print "ERROR: basic_ports/genStructure.py could not import WaveDev module"
+    print "  - Is /sdr/tools included in ossie.pth?"
+    sys.exit(0)
+
+class genAll:
+  def __init__(self, path, wavedevPath, active_wave, preamble=None):
+    if path[len(path)-1] != '/':
+        path = path + '/'
+    self.path = path
+    if len(wavedevPath) > 0 and wavedevPath[len(wavedevPath)-1] != '/':
+        wavedevPath = wavedevPath + '/'
+    self.wavedevPath = wavedevPath
+    self.active_wave = active_wave
+    self.preamble = preamble
+    LoadConfiguration(self)
+
+  ##############################################################################
+  ## genDirs - this function generates the directory structure for the generated
+  ##           code for the waveform; puts required files in main folder
+  ##############################################################################
+  def genDirs(self):
+    if os.path.exists(self.path) == False:
+       errorMsg(self,"Waveform already exists - exiting")
+       exit(1)
+
+    if os.path.exists(self.path+self.active_wave.name) == False:
+        os.mkdir(self.path + self.active_wave.name)
+
+    shutil.copy(self.wavedevPath + 'generate/reconf',self.path + self.active_wave.name)
+    os.chmod(self.path + self.active_wave.name + '/reconf', '0755')
+    for x in os.listdir(self.wavedevPath + 'generate/basic_xml/'):
+        if not os.path.isdir(x):
+            shutil.copy(self.wavedevPath + 'generate/basic_xml/' + x,self.path + self.active_wave.name)
+
+    for x in self.active_wave.components:
+        if x.generate:
+            if os.path.exists(self.path+x.name) == False:
+                os.mkdir(self.path+x.name)
+            if x.AssemblyController != True:
+                shutil.copy(self.wavedevPath + 'generate/reconf',self.path + x.name)
+                os.chmod(self.path + x.name + '/reconf', 0755)
+                for f in os.listdir(self.wavedevPath + 'generate/basic_xml/'):
+                    if not os.path.isdir(f):
+                        shutil.copy(self.wavedevPath + 'generate/basic_xml/' + f,self.path + x.name)
+                if self.licensefile != "":
+                    shutil.copy(self.licensefile,self.path + x.name + '/LICENSE')
+
+  ##############################################################################
+  ## writeMakefiles - generates the make file for the waveform and then calls
+  ##                  writeCompMakefile for each seperate component
+  ##############################################################################
+  def writeMakefiles(self,DevMan_flag):
+    output = open(self.path + self.active_wave.name + '/Makefile.am','w')
+
+    Flags = ["-Wall"]
+    self.info2str(output,"AM_CXXFLAGS = ",Flags,1)
+
+    tstr = "ossieName = " + self.active_wave.name + '\n\n'
+    output.write(tstr)
+
+    tstr = "SUBDIRS = "
+    for c in self.active_wave.components:
+        if c.AssemblyController == True and c.generate:
+            tstr += c.name + '\n\n'
+            output.write(tstr)
+
+#    tstr = "waveformdir = $(prefix)/dom/waveforms/$(ossieName)\n"
+    tstr = "waveformdir = $(prefix)/waveforms/" + self.active_wave.name + "\n"
+    output.write(tstr)
+
+    waveform_data = []
+    waveform_data.append(self.active_wave.name + ".sad.xml")
+    waveform_data.append(self.active_wave.name + "_DAS.xml")
+    # If there is only one node - then install device manager files as well
+    if DevMan_flag:
+        waveform_data.append("DeviceManager.dcd.xml")
+        waveform_data.append("DeviceManager.spd.xml")
+        waveform_data.append("DeviceManager.scd.xml")
+        waveform_data.append("DeviceManager.prf.xml")
+    waveform_data.append("DomainManager.dmd.xml")
+    waveform_data.append("DomainManager.spd.xml")
+    waveform_data.append("DomainManager.scd.xml")
+    waveform_data.append("DomainManager.prf.xml")
+
+    self.info2str(output,"dist_waveform_DATA = ", waveform_data,1)
+
+    output.close()
+
+    for c in self.active_wave.components:
+        if c.generate:
+            tmpPath = self.path + c.name
+            self.writeCompMakefile(c,tmpPath)
+
+  ##############################################################################
+  ## writeCompMakefilee - generates the make file for an indivdual component
+  ##############################################################################
+  def writeCompMakefile(self,comp,compPath):
+    if compPath[len(compPath)-1] != '/':
+        compPath = compPath + '/'
+
+    Flags = ["-Wall"]
+
+    # Flags = ["-Wall"]
+    output = open(compPath + 'Makefile.am','w')
+    self.info2str(output,"AM_CXXFLAGS = ",Flags,1)
+
+    # tstr = "LDADD = $(libdir)/libossiecf.la $(libdir)/libossieparser.la $(libdir)/libossieidl.la $(libdir)/libstandardInterfaces.la\n"
+    # output.write(tstr)
+
+    tstr = "bin_PROGRAMS = " + comp.name + "\n\n"
+    output.write(tstr)
+
+    tstr = comp.name + "_SOURCES = " + comp.name + ".cpp " + comp.name + ".h main.cpp\n\n"
+    output.write(tstr)
+    tstr = "ossieName = " + comp.name + "\n"
+    output.write(tstr)
+
+    tstr = "xmldir = $(prefix)/dom/xml/$(ossieName)\n"
+    output.write(tstr)
+
+    tstr = "bindir = $(prefix)/dom/bin\n"
+    output.write(tstr)
+
+    tstr2 = comp.name
+
+    xmlData = []
+    xmlData.append(tstr2 + ".prf.xml")
+    xmlData.append(tstr2 + ".scd.xml")
+    xmlData.append(tstr2 + ".spd.xml")
+    self.info2str(output,"dist_xml_DATA = ",xmlData,1,wrapFlag=True)
+
+    output.close()
+
+  def info2str(self, outfile, staticStr, mylist, extraLine=0,wrapFlag=False):
+    tstr = staticStr
+    mycount = 0
+    wrap = False
+    if len(mylist) > 5 or wrapFlag == True:
+        wrap = True
+
+    for x in mylist:
+      tstr = tstr + x + " "
+      mycount += 1
+      if mycount%2 == 0 and wrap and mylist.index(x) != len(mylist)-1:
+        tstr = tstr + "\\\n"
+
+    tstr = tstr + "\n"
+    for x in range(extraLine):
+      tstr = tstr + "\n"
+
+    outfile.write(tstr)
+
+  ##############################################################################
+  ## genConfigureACFiles - calls writeConfAC for appropriate locations
+  ##############################################################################
+  def genConfigureACFiles(self,installPath):
+    if installPath[-1] == '/':
+        installPath = installPath[0:-1]
+
+    tmpPath = self.path + self.active_wave.name + '/'
+    self.writeConfAC(tmpPath,self.active_wave.name,self.active_wave.ace,True,installPath)
+
+    for c in self.active_wave.components:
+        if c.AssemblyController ==  True or not c.generate:
+            continue
+        tmpPath = self.path + c.name + '/'
+        self.writeConfAC(tmpPath,c.name,c.ace,False,installPath)
+
+  ##############################################################################
+  ## writeConfAC - generates configure.ac files for autoconf
+  ##############################################################################
+  def writeConfAC(self,genPath,name,aceFlag,wavFlag,installPath="/sdr"):
+     if genPath[len(genPath)-1] != '/':
+        genPath = genPath + '/'
+
+     output = open(genPath + 'configure.ac','w')
+     tstr = "# Generated by WaveDev/wavedev/generate/templates/basic_ports/\n"
+     output.write(tstr)
+     tstr = "AC_INIT(" + name + ", 0.8.0)\nAM_INIT_AUTOMAKE\n\n"
+     output.write(tstr)
+     tstr = "AC_CONFIG_MACRO_DIR([m4])\nLT_INIT\n"
+     output.write(tstr)
+     #tstr = 'AC_PREFIX_DEFAULT("/sdr")\n\n'
+     tstr = 'AC_PREFIX_DEFAULT("' + installPath + '")\n\n'
+     output.write(tstr)
+     tstr = "AC_PROG_CXX\nAC_PROG_INSTALL\nAC_PROG_LIBTOOL\nAC_PROG_MAKE_SET\n\n"
+     output.write(tstr)
+     tstr = "AC_HEADER_SYS_WAIT\n\nAC_FUNC_FORK\n\n"
+     output.write(tstr)
+     #tstr = "AC_CORBA_ORB\n\n"
+     #output.write(tstr)
+
+     tstr = 'AC_LANG_PUSH([C++])\n\n'
+     output.write(tstr)
+
+     tstr = 'AC_CHECK_LIB([omniORB4], [main], [], [AC_MSG_ERROR([cannot find omniORBi4 library])])\n'
+     output.write(tstr)
+     tstr = 'AC_CHECK_LIB([omnithread], [main], [], [AC_MSG_ERROR([cannot find omnithread library])])\n'
+     output.write(tstr)
+     tstr = 'AC_CHECK_LIB([omniDynamic4], [main], [], [AC_MSG_ERROR([cannot find omniDynamic4 library])])\n'
+     output.write(tstr)
+     tstr = 'AC_CHECK_HEADERS([omniORB4/CORBA.h], [], [AC_MSG_ERROR([cannot find omniORB4 header files])])\n\n'
+     output.write(tstr)
+     tstr = 'AC_CHECK_LIB([ossieidl], [main], [], [AC_MSG_ERROR([cannot find ossieidl])])\n'
+     output.write(tstr)
+     tstr = 'AC_CHECK_LIB([ossieparser], [main], [], [AC_MSG_ERROR([cannot find ossieparser])])\n';
+     output.write(tstr)
+     tstr = 'AC_CHECK_LIB([ossiecf], [main], [], [AC_MSG_ERROR([cannot find ossiecf])])\n'
+     output.write(tstr)
+     tstr = 'AC_CHECK_LIB([standardInterfaces], [main], [], [AC_MSG_ERROR([cannot find standardInterfaces])])\n'
+     output.write(tstr)
+     tstr = 'AC_CHECK_HEADERS([standardinterfaces/complexShort.h], [], [AC_MSG_ERROR([cannot find standardInterfaces header files])])\n\n'
+     output.write(tstr)
+
+     # if False:
+     #    tstr = 'AC_CHECK_LIB([sigproc], [main], [], [AC_MSG_ERROR([cannot find sigproc library])])\n'
+     #    output.write(tstr)
+     #    tstr = 'AC_CHECK_HEADERS([sigproc/SigProc.h], [], [AC_MSG_ERROR([cannot find sigproc library header files])])\n\n'
+     #    output.write(tstr)
+
+     tstr = 'AC_LANG_POP\n\n'
+     output.write(tstr)
+
+
+     tstr = 'export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"\n'
+     output.write(tstr)
+     # tstr = "PKG_CHECK_MODULES(OSSIE, ossie >= 0.6.0,,exit)\n"
+     # output.write(tstr)
+     tstr = 'CXXFLAGS="$CXXFLAGS $OSSIE_CFLAGS"\n'
+     output.write(tstr)
+     # tstr = 'IDL_FLAGS="$OSSIE_CFLAGS"\nAC_SUBST(IDL_FLAGS)\n\n'
+     # output.write(tstr)
+
+     if aceFlag == True:
+         tstr = 'PKG_CHECK_MODULES(ACE, ACE >= 5.4.7)\n'
+         tstr = tstr + 'AC_SUBST(ACE_CFLAGS)\nAC_SUBST(ACE_LIBS)\nLIBS="$LIBS $ACE_LIBS"\n\n'
+         output.write(tstr)
+
+     tstr = 'LIBS="$LIBS $OSSIE_LIBS"\n\n'
+     output.write(tstr)
+
+     # tstr = 'AC_SUBST(SI_PATH)\n\n'
+     # output.write(tstr)
+
+     tstr = "AC_CONFIG_FILES(Makefile"
+     if wavFlag == True:
+        for x in self.active_wave.components:
+            if x.AssemblyController and x.generate:
+                tstr2 = " " + x.name + "/Makefile"
+                tstr = tstr + tstr2
+
+     tstr = tstr + ")\n\n"
+     output.write(tstr)
+
+     tstr = "AC_OUTPUT\n"
+     output.write(tstr)
+
+     output.close()
+
+  ##############################################################################
+  ## This function generates the cpp and h files for each component:
+  ## component.h, component.cpp, main.cpp, port_impl.h, and port_impl.cpp
+  ##############################################################################
+  def genCompFiles(self,comp):
+      #for x in self.active_wave.components:
+        # generate the .h files for each component
+        inputH = open(self.wavedevPath + 'generate/templates/basic_ports/sampleComp.h','r')
+        outputH = open(self.path + comp.name + "/" + comp.name + ".h",'w')
+        self.addPreamble(outputH,comp.name)
+        for line in inputH.readlines():
+          l_out = line.replace("__CLASS_DEF__",comp.name.upper()+"_IMPL_H")
+          l_out = l_out.replace("__Class_name__",comp.name+"_i")
+          if l_out.find("__SI_BASES__") != -1:
+              self.writeInterfaceBaseIncludes(outputH,comp)
+              continue
+          if l_out.find("__USES_SI__") != -1:
+              self.writeInterfaceUIncludes(outputH,comp)
+              continue
+          if l_out.find("__PROVIDES_SI__") != -1:
+              self.writeInterfacePIncludes(outputH,comp)
+              continue
+          if l_out.find("__PORT_DECL__") != -1:
+              self.writePortDecl(outputH,comp)
+              continue
+          if l_out.find("__CORBA_SIMPLE_PROP_DECL__") != -1:
+              self.writeCORBASimplepropDeclarations(outputH,comp)
+              continue
+          if l_out.find("__CORBA_SIMPLE_SEQUENCE_PROP_DECL__") != -1:
+              self.writeCORBASimpleSequencepropDeclarations(outputH,comp)
+              continue
+          if l_out.find("__ACE_INCLUDES__") != -1:
+              if comp.ace == True:
+                  l_out = '#include "ace/Task.h"\n'
+              else:
+                  continue
+          if l_out.find("__ACE_INHERIT__") != -1:
+              if comp.ace == True:
+                  l_out = l_out.replace("__ACE_INHERIT__",", public ACE_Task<ACE_MT_SYNCH>")
+              else:
+                  l_out = l_out.replace("__ACE_INHERIT__","")
+          if l_out.find("__ACE_SVC_DECL__") != -1:
+              if comp.ace == True:
+                  l_out = l_out.replace("__ACE_SVC_DECL__",'int svc(void);')
+              else:
+                  continue
+          if l_out.find("__FRIEND_DECL__") != -1:
+              l_out = l_out.replace("__FRIEND_DECL__","")
+              self.writeFriendDecl(outputH,comp)
+              continue
+
+          outputH.write(l_out)
+
+        inputH.close()
+        outputH.close()
+
+        # generate the .cpp files for each component
+        inputCPP = open(self.wavedevPath + 'generate/templates/basic_ports/sampleComp.cpp','r')
+        outputCPP = open(self.path + comp.name + "/" + comp.name + ".cpp",'w')
+        self.addPreamble(outputCPP,comp.name)
+        for line in inputCPP.readlines():
+          l_out = line.replace("__IncludeFile__",comp.name)
+          l_out = l_out.replace("__ComponentName__",comp.name)
+          l_out = l_out.replace("__Class_name__",comp.name +"_i")
+          #l_out = l_out.replace("__NS_name__","ossie" + comp.name+"Resource")
+          if l_out.find("__CONSTRUCTORS__") != -1:
+              self.writePortConstructors(outputCPP,comp)
+              continue
+          if l_out.find("__IS_ASSEMBLY_CONTROLLER__") != -1:
+              self.writeAssemblyController(outputCPP,comp)
+              continue
+          if l_out.find("__PORT_DESTRUCTORS__") != -1:
+              self.writePortDestructors(outputCPP,comp)
+              continue
+          if l_out.find("__SIMPLE_SEQUENCE_POINTER_DESTRUCTORS__") != -1:
+              self.writeSimpleSequencePointerDestructors(outputCPP,comp)
+              continue
+          if l_out.find("__PORT_INST__") != -1:
+              self.writePortInst(outputCPP,comp)
+              continue
+          if l_out.find("__GET_PORT__") != -1:
+              self.writeGetPort(outputCPP,comp)
+              continue
+          if l_out.find("__READ_PROPS__") !=-1:
+              self.writeReadProps(outputCPP,comp)
+              continue
+          if l_out.find("__PROCESS_DATA_DECLARATIONS__") != -1:
+              self.writeProcessDataDeclaration(outputCPP,comp)
+              continue
+          if l_out.find("__PROCESS_DATA_LOOP__") != -1:
+              self.writeProcessDataLoop(outputCPP,comp)
+              continue
+          if l_out.find("__ACE_SVC_PORTS__") != -1:
+              self.writeACESvcPorts(outputCPP,comp)
+              continue
+          if l_out.find("__ACE_SVC_DEF__") != -1:
+              if comp.ace == True:
+                  self.writeACESvcDef(outputCPP,comp,'component')
+              continue
+          outputCPP.write(l_out)
+
+        inputCPP.close()
+        outputCPP.close()
+
+        # generate the main.cpp files for each component
+        inputMain = open(self.wavedevPath + 'generate/templates/basic_ports/sampleMain.cpp','r')
+        outputMain = open(self.path + comp.name + "/main.cpp",'w')
+        self.addPreamble(outputMain,comp.name)
+
+        for line in inputMain.readlines():
+          l_out = line.replace("__IncludeFile__",comp.name)
+          l_out = l_out.replace("__ComponentName__",comp.name)
+          l_out = l_out.replace("__Class_name__",comp.name+"_i")
+          l_out = l_out.replace("__CLASS_VAR__",comp.name.lower())
+          if l_out.find("__CLASS_VAR_ACE__") != -1:
+              if comp.ace == True:
+                  l_out = l_out.replace("__CLASS_VAR_ACE__",comp.name.lower())
+              else:
+                  continue
+          outputMain.write(l_out)
+
+        inputMain.close()
+        outputMain.close()
+
+        # generate the Doxygen documentation.txt file
+        inputDoc = open(self.wavedevPath + 'generate/templates/basic_ports/sampleDocumentation.txt','r')
+        outputDoc = open(self.path + comp.name + '/documentation.txt','w')
+        self.addPreamble(outputDoc, comp.name)
+
+        for line in inputDoc.readlines():
+            l_out = line.replace("__ComponentName__", comp.name)
+            outputDoc.write(l_out)
+        inputDoc.close()
+        outputDoc.close()
+
+        # generate the Doxygen configure file
+        inputDoxy = open(self.wavedevPath + 'generate/templates/basic_ports/sampleDoxyfile','r')
+        outputDoxy = open(self.path + comp.name + '/Doxyfile','w')
+
+        for line in inputDoxy.readlines():
+            l_out = line.replace("__ComponentName__", comp.name)
+            outputDoxy.write(l_out)
+        inputDoxy.close()
+        outputDoxy.close()
+
+#--------------------------------------------------------------------------------------------
+#############################################################################################
+
+
+        ##code for generating port_impl.h and .cpp files has been temporarily
+        ##commented out. this code should be rewritten to put port_impl
+        ##functionality into the appropriate .cpp function
+##        # generate the port_impl.h file
+##        inputPortImpl = open(self.wavedevPath + 'generate/port_impl.h','r')
+##        outputPortImpl = open(self.path + comp.name + "/port_impl.h",'w')
+##        self.addPreamble(outputPortImpl,comp.name)
+##        portSample = open(self.wavedevPath + 'generate/port_sample.h','r')
+##        for line in inputPortImpl.readlines():
+##            l_out = line.replace("__IncludeFile__",comp.name)
+##            if l_out.find("__ACE_INCLUDES__") != -1:
+##              if comp.ace == True:
+##                  l_out = '#include "ace/Task.h"\n'
+##              else:
+##                  continue
+##            if l_out.find("__PORT_DECL__") != -1:
+##              self.writePortImplDecl(outputPortImpl,portSample,comp)
+##              continue
+##            outputPortImpl.write(l_out)
+##
+##        inputPortImpl.close()
+##        outputPortImpl.close()
+##        portSample.close()
+##
+##        # generate the port_impl.cpp file
+##        inputPortImpl = open(self.wavedevPath + 'generate/port_impl.cpp','r')
+##        outputPortImpl = open(self.path + comp.name + "/port_impl.cpp",'w')
+##        self.addPreamble(outputPortImpl,comp.name)
+##        portSample = open(self.wavedevPath + 'generate/port_sample.cpp','r')
+##        for line in inputPortImpl.readlines():
+##            l_out = line
+##            if l_out.find("__PORT_DEF__") != -1:
+##              self.writePortImplDef(outputPortImpl,portSample,comp)
+##              continue
+##            outputPortImpl.write(l_out)
+##
+##        inputPortImpl.close()
+##        outputPortImpl.close()
+##        portSample.close()
+
+    # Copy some required files into the main directory
+    #  os.system('cp ' + self.wavedevPath + 'generate/basic_xml/* ' + self.path)
+    #  os.system('cp ' + self.wavedevPath + 'generate/wavLoader.py ' + self.path)
+####################################################################################################
+#---------------------------------------------------------------------------------------------------
+
+
+
+#----------------------------------------------------------------------------------
+###################################################################################
+  def writeInterfaceBaseIncludes(self,output,c):
+    """ This function writes the corba declarations of the base types for the ports"""
+    compShort = 0
+    compFloat = 0
+    compDouble = 0
+    compChar = 0
+    compLong = 0
+
+    realShort = 0
+    realFloat = 0
+    realDouble = 0
+    realChar = 0
+    realLong = 0
+
+    for x in c.ports:
+        if x.interface.name == "complexShort" and compShort == 0:
+            ts = '#include "standardinterfaces/' + x.interface.name + '.h"\n'
+            output.write(ts)
+            compShort += 1
+        elif x.interface.name == "complexFloat" and compFloat == 0:
+            ts = '#include "standardinterfaces/' + x.interface.name + '.h"\n'
+            output.write(ts)
+            compFloat += 1
+        elif x.interface.name == "complexDouble" and compDouble == 0:
+            ts = '#include "standardinterfaces/' + x.interface.name + '.h"\n'
+            output.write(ts)
+            compDouble += 1
+        elif x.interface.name == "complexChar" and compChar == 0:
+            ts = '#include "standardinterfaces/' + x.interface.name + '.h"\n'
+            output.write(ts)
+            compChar += 1
+        elif x.interface.name == "complexLong" and compLong == 0:
+            ts = '#include "standardinterfaces/' + x.interface.name + '.h"\n'
+            output.write(ts)
+            compLong += 1
+
+        elif x.interface.name == "realShort" and realShort == 0:
+            ts = '#include "standardinterfaces/' + x.interface.name + '.h"\n'
+            output.write(ts)
+            realShort += 1
+        elif x.interface.name == "realFloat" and realFloat == 0:
+            ts = '#include "standardinterfaces/' + x.interface.name + '.h"\n'
+            output.write(ts)
+            realFloat += 1
+        elif x.interface.name == "realDouble" and realDouble == 0:
+            ts = '#include "standardinterfaces/' + x.interface.name + '.h"\n'
+            output.write(ts)
+            realDouble += 1
+        elif x.interface.name == "realChar" and realChar == 0:
+            ts = '#include "standardinterfaces/' + x.interface.name + '.h"\n'
+            output.write(ts)
+            realChar += 1
+        elif x.interface.name == "realLong" and realLong == 0:
+            ts = '#include "standardinterfaces/' + x.interface.name + '.h"\n'
+            output.write(ts)
+            realLong += 1
+
+        else:
+            continue
+###################################################################################
+#----------------------------------------------------------------------------------
+
+
+#----------------------------------------------------------------------------------
+###################################################################################
+  def writeInterfaceUIncludes(self,output,c):
+    """ This function writes the corba declarations of the uses ports to the component header file"""
+    compShort = 0
+    compFloat = 0
+    compDouble = 0
+    compChar = 0
+    compLong = 0
+
+    realShort = 0
+    realFloat = 0
+    realDouble = 0
+    realChar = 0
+    realLong = 0
+
+    for x in c.ports:
+        if x.type == "Uses":
+            if x.interface.name == "complexShort" and compShort == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_u.h"\n';
+                output.write(ts)
+                compShort += 1
+            elif x.interface.name == "complexFloat" and compFloat == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_u.h"\n';
+                output.write(ts)
+                compFloat += 1
+            elif x.interface.name == "complexDouble" and compDouble == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_u.h"\n';
+                output.write(ts)
+                compDouble += 1
+            elif x.interface.name == "complexChar" and compChar == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_u.h"\n';
+                output.write(ts)
+                compChar += 1
+            elif x.interface.name == "complexLong" and compLong == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_u.h"\n';
+                output.write(ts)
+                compLong += 1
+
+
+            elif x.interface.name == "realShort" and realShort == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_u.h"\n';
+                output.write(ts)
+                realShort += 1
+            elif x.interface.name == "realFloat" and realFloat == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_u.h"\n';
+                output.write(ts)
+                realFloat += 1
+            elif x.interface.name == "realDouble" and realDouble == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_u.h"\n';
+                output.write(ts)
+                realDouble += 1
+            elif x.interface.name == "realChar" and realChar == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_u.h"\n';
+                output.write(ts)
+                realChar += 1
+            elif x.interface.name == "realLong" and realLong == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_u.h"\n';
+                output.write(ts)
+                realLong += 1
+
+            else:
+                continue
+
+##################################################################################
+#----------------------------------------------------------------------------------
+
+
+#----------------------------------------------------------------------------------
+###################################################################################
+  def writeInterfacePIncludes(self,output,c):
+    """ This function writes the corba declarations of the provides ports to the component header file"""
+    compShort = 0;
+    compFloat = 0;
+    compDouble = 0;
+    compChar = 0;
+    compLong = 0;
+
+    realShort = 0;
+    realFloat = 0;
+    realDouble = 0;
+    realChar = 0;
+    realLong = 0;
+
+
+    inCount = 0;
+    for x in c.ports:
+        if x.type == "Provides":
+            if x.interface.name == "complexShort" and compShort == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_p.h"\n';
+                output.write(ts)
+                compShort += 1
+            elif x.interface.name == "complexFloat" and compFloat == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_p.h"\n';
+                output.write(ts)
+                compFloat += 1
+            elif x.interface.name == "complexDouble" and compDouble == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_p.h"\n';
+                output.write(ts)
+                compDouble += 1
+            elif x.interface.name == "complexChar" and compChar == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_p.h"\n';
+                output.write(ts)
+                compChar += 1
+            elif x.interface.name == "complexLong" and compLong == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_p.h"\n';
+                output.write(ts)
+                compLong += 1
+
+
+            elif x.interface.name == "realShort" and realShort == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_p.h"\n';
+                output.write(ts)
+                realShort += 1
+            elif x.interface.name == "realFloat" and realFloat == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_p.h"\n';
+                output.write(ts)
+                realFloat += 1
+            elif x.interface.name == "realDouble" and realDouble == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_p.h"\n';
+                output.write(ts)
+                realDouble += 1
+            elif x.interface.name == "realShort" and realShort == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_p.h"\n';
+                output.write(ts)
+                realShort += 1
+            elif x.interface.name == "realChar" and realChar == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_p.h"\n';
+                output.write(ts)
+                realChar += 1
+            elif x.interface.name == "realLong" and realLong == 0:
+                ts = '#include "standardinterfaces/' + x.interface.name + '_p.h"\n';
+                output.write(ts)
+                realLong += 1
+
+            else:
+                continue
+
+###################################################################################
+#---------------------------------------------------------------------------------
+
+#--------------------------------------------------------------------------------
+##################################################################################
+
+
+#  def writePortImplDecl(self, output,portSample,c):
+#    """ This function writes port implementation declarations for the port_impl.h file"""
+#    intList = []
+#    for x in c.ports:
+#        if x.interface.filename in intList:
+#            continue
+#        ts = '#include "' + x.interface.filename + '.h"\n'
+#        intList.append(x.interface.filename)
+#        output.write(ts)
+#    ts = '\n';output.write(ts);
+#    intList = []
+#    for x in c.ports:
+#        if x.interface.name in intList:
+#            continue
+#        portSample.seek(0)
+#        intList.append(x.interface.name)
+#        for line in portSample.readlines():
+#            l_out = line.replace("__IN_PORT__",x.p_cname)
+#            l_out = l_out.replace("__INT_TYPE__",x.interface.name)
+#            l_out = l_out.replace("__NAME_SPACE__",x.interface.nameSpace)
+#            l_out = l_out.replace("__OUT_PORT__",x.u_cname)
+#            l_out = l_out.replace("__IN_CLASS__",x.p_cname)
+#            l_out = l_out.replace("__OUT_CLASS__",x.u_cname)
+#            if l_out.find("__OPERATION__") != -1:
+#              self.writeOperation(output,x.interface)
+#              continue
+#            if l_out.find("__ACE_INHERIT__") != -1:
+#              if c.ace == True:
+#                  l_out = l_out.replace("__ACE_INHERIT__",", public ACE_Task<ACE_MT_SYNCH>")
+#              else:
+#                  l_out = l_out.replace("__ACE_INHERIT__","")
+#            if l_out.find("__ACE_SVC_DECL__") != -1:
+#              if c.ace == True:
+#                  l_out = l_out.replace("__ACE_SVC_DECL__",'int svc(void);')
+#              else:
+#                  continue
+#            if l_out.find("__COMP_ARG__") != -1:
+#                if c.type == "resource":
+#                    l_out = l_out.replace("__COMP_ARG__",c.name+"_i *_"+c.name.lower())
+#                else:
+#                    l_out = l_out.replace("__COMP_ARG__","")
+#            if l_out.find("__COMP_REF_DECL__") != -1:
+#                if c.type == "resource":
+#                    l_out = l_out.replace("__COMP_REF_DECL__",c.name+"_i *"+c.name.lower()+";")
+#                else:
+#                    l_out = l_out.replace("__COMP_REF_DECL__","")
+#
+#            output.write(l_out)
+
+#################################################################################################################
+#----------------------------------------------------------------------------------------------------------------
+
+
+#availableTypes = ["boolean", "char", "double", "float", "short", "long","objref", "octet", "string", "ulong","ushort"]
+
+
+
+#---------------------------------------------------------------------------------
+#################################################################################
+
+  def writeCORBASimplepropDeclarations(self,output,c):
+    simpleCount = 0;
+    for x in c.properties:
+        tmp_type = getDatatype(str(x.type))
+
+        if x.elementType == "Simple":
+            ts = " "*8 + "CORBA::" + tmp_type + " simple_" + str(simpleCount) + "_value;\n";
+            output.write(ts)
+            simpleCount += 1;
+        else:
+            continue
+
+###################################################################################
+#----------------------------------------------------------------------------------
+
+
+#--------------------------------------------------------------------------------
+#################################################################################
+
+  def writeCORBASimpleSequencepropDeclarations(self,output,c):
+    simplesequenceCount = 0;
+    for x in c.properties:
+        tmp_type = getDatatype(str(x.type))
+
+        if x.elementType == "SimpleSequence":
+            ts = " "*8 + "CORBA::" + tmp_type + "Seq *simplesequence_" + str(simplesequenceCount) + ";\n"
+            output.write(ts)
+            simplesequenceCount = simplesequenceCount + 1
+        else:
+            continue
+
+################################################################################
+#-------------------------------------------------------------------------------
+
+
+#--------------------------------------------------------------------------------------------------------------
+###############################################################################################################
+
+#  def writePortImplDef(self,output,portSample,c):
+#    """ This function writes port implementation definitions for the port_impl.cpp file"""
+#    intList = []
+#    for x in c.ports:
+#        if x.interface.name in intList:
+#            continue
+#        portSample.seek(0)
+#        intList.append(x.interface.name)
+#        for line in portSample.readlines():
+#            l_out = line.replace("__IN_PORT__",x.p_cname)
+#            l_out = l_out.replace("__INT_TYPE__",x.interface.name)
+#            l_out = l_out.replace("__NAME_SPACE__",x.interface.nameSpace)
+#            l_out = l_out.replace("__OUT_PORT__",x.u_cname)
+#            if l_out.find("__OPERATION__") != -1:
+#              l_out = l_out.replace("__OPERATION__",'')
+#              l_out = l_out.replace("\n",'')
+#              self.writeOperation(output,x.interface,prefix=l_out,cppFlag=True,in_name=c.name,using_ace=c.ace)
+#              continue
+#            if l_out.find("__ACE_SVC_DEF__") != -1:
+#              if c.ace == True:
+#                  self.writeACESvcDef(output,x,'port')
+#              continue
+#            if l_out.find("__COMP_ARG__") != -1:
+#                if c.type == "resource":
+#                    l_out = l_out.replace("__COMP_ARG__",c.name+"_i *_"+c.name.lower())
+#                else:
+#                    l_out = l_out.replace("__COMP_ARG__","")
+#            if l_out.find("__COMP_REF_DEF__") != -1:
+#                if c.type == "resource":
+#                    l_out = l_out.replace("__COMP_REF_DEF__",c.name.lower()+" = _"+c.name.lower()+";")
+#                else:
+#                    l_out = l_out.replace("__COMP_REF_DEF__","")
+#            output.write(l_out)
+###############################################################################################################
+#-------------------------------------------------------------------------------------------------------------
+
+
+#--------------------------------------------------------------------------------------------------------------
+###############################################################################################################
+
+  def writePortDecl(self, output,c):
+    """ This function writes the corba declarations of the ports to the component header file"""
+    inCount = 0; outCount=0;
+    for x in c.ports:
+        if x.type == "Provides":
+            ts = " "*8 + "standardInterfaces_i::" + x.interface.name + "_p *dataIn_" + str(inCount) + ";\n";
+            output.write(ts)
+            inCount += 1
+        elif x.type == "Uses":
+            ts = " "*8 + "standardInterfaces_i::" + x.interface.name + "_u *dataOut_" + str(outCount) + ";\n";
+            output.write(ts)
+            outCount += 1
+        else:
+            continue
+
+###############################################################################################################
+#-------------------------------------------------------------------------------------------------------------
+
+
+#--------------------------------------------------------------------------------------------------------------
+###############################################################################################################
+
+#  def writePortInst(self,output,c):
+#    """ This function writes the port instantiations to the component cpp file"""
+#    inCount = 0; outCount=0;
+#    for x in c.ports:
+#        if x.type == "Provides":
+#            ts = " "*4 + "inPort" + str(inCount) + "_servant" + " = new " + x.cname + "(this);\n"
+#            output.write(ts)
+#            ts = " "*4 + "inPort" + str(inCount) + "_var = inPort" + str(inCount)+ "_servant->_this();\n"
+#            output.write(ts)
+#            inCount += 1
+#    ts = "\n"; output.write(ts)
+#    for x in c.ports:
+#        if x.type == "Uses":
+#            ts = " "*4 + "outPort" + str(outCount) + "_servant" + " = new " + x.cname + "(this);\n"
+#            output.write(ts)
+#            ts = " "*4 + "outPort" + str(outCount) + "_var = outPort" + str(outCount)+ "_servant->_this();\n"
+#            ts += " "*4 + "outPort" + str(outCount) + "_active = false;\n"
+#            output.write(ts)
+#            outCount += 1
+#    ts = "\n"; output.write(ts)
+#    ts = " "*4 + "component_alive = true;\n"; output.write(ts)
+
+#---------------------------------------------------------------------------------
+##################################################################################
+
+  def writeGetPort(self,output,c):
+    """ This function writes the getPort functionality to the component cpp file"""
+    inCount = 0; outCount=0;
+    flag = True
+    for x in c.ports:
+        if x.type == "Uses":
+            ts = " "*4 + "p = dataOut_" + str(outCount) + "->getPort(portName);\n"; output.write(ts)
+            outCount += 1;
+        elif x.type == "Provides":
+            ts = " "*4 + "p = dataIn_" + str(inCount) + "->getPort(portName);\n"; output.write(ts)
+            inCount += 1;
+        else:
+            continue
+
+        ts = "\n"; output.write(ts)
+        ts = " "*4 + "if (!CORBA::is_nil(p))\n"; output.write(ts)
+        ts = " "*8 + "return p._retn();\n\n"; output.write(ts)
+
+    ts = " "*4 + '/*exception*/\n'; output.write(ts)
+    ts = " "*4 + 'throw CF::PortSupplier::UnknownPort();\n'; output.write(ts)
+#################################################################################
+#----------------------------------------------------------------------------------
+
+
+#################################################################################
+# NOTE: At the moment, all components are self-starting, unless they are designated as an AssemblyController
+  def writeAssemblyController(self,output,c):
+    if c.AssemblyController == True:
+        output.write("\n")
+    else:
+        ts = " "*4 + 'start();\n';
+        output.write(ts)
+
+#---------------------------------------------------------------------------------
+###############################################################################
+
+  def writePortConstructors(self,output,c):
+    inCount = 0;
+    outCount = 0;
+    for x in c.ports:
+        if x.type == "Uses":
+            ts = " "*4 + 'dataOut_' + str(outCount) + ' = new standardInterfaces_i::';
+            ts = ts + str(x.interface.name) + '_u("' + x.name + '");\n';
+            output.write(ts)
+            outCount += 1;
+        elif x.type == "Provides":
+            ts = " "*4 + 'dataIn_' + str(inCount) + ' = new standardInterfaces_i::';
+            ts = ts + str(x.interface.name) + '_p("' + x.name + '");\n';
+            output.write(ts)
+            inCount += 1;
+        else:
+            continue
+
+###################################################################################
+#----------------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------------
+##################################################################################
+  def writePortDestructors(self,output,c):
+    inCount = 0;
+    outCount = 0;
+    for x in c.ports:
+        if x.type == "Uses":
+            ts = " "*4 + 'delete dataOut_' + str(outCount) + ';\n';
+            output.write(ts)
+            outCount += 1;
+
+        elif x.type == "Provides":
+            ts = " "*4 + 'delete dataIn_' + str(inCount) + ';\n';
+            output.write(ts)
+            inCount += 1;
+        else:
+            continue
+##################################################################################
+#-------------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------------
+###################################################################################
+
+  def writeSimpleSequencePointerDestructors(self,output,c):
+    simplesequenceCount = 0;
+    for x in c.properties:
+        tmp_type = str(x.type)
+
+        if x.elementType == "SimpleSequence":
+            ts = " "*4 + "delete []simplesequence_" + str(simplesequenceCount) + ";\n"
+            output.write(ts)
+            simplesequenceCount += 1;
+        else:
+            continue
+
+###################################################################################
+#--------------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------------
+###################################################################################
+
+  def writeReadProps(self,output,c):
+    """write the code that will read properties from the prf file"""
+    simpleCount = 0;
+    simplesequenceCount = 0;
+    #make sure there are properties first
+
+    ts = " "*4 + 'static int init = 0;\n'
+    output.write(ts)
+    ts = " "*4 + "if( init == 0 ) {\n"
+    ts = ts + " "*8 + "if( props.length() == 0 ) {\n"
+    ts = ts + " "*12 + 'std::cout << "configure called with invalid props.length - " << props.length() << std::endl;\n'
+    ts = ts + " "*12 + "return;\n"
+    ts = ts + " "*8 + "}\n"
+    output.write(ts)
+
+    
+    ts = " "*8 + "propertySet.length(props.length());\n"
+    ts = ts + " "*8 + "for( int j=0; j < props.length(); j++ ) {\n"
+    ts = ts + " "*12 + "propertySet[j].id = CORBA::string_dup(props[j].id);\n"
+    ts = ts + " "*12 + "propertySet[j].value = props[j].value;\n"
+    ts = ts + " "*8 + "}\n"
+    ts = ts + " "*8 + "init = 1;\n"
+    ts = ts + " "*4 + "}\n\n"
+    
+    output.write(ts)
+
+    ts = " "*4 + 'std::cout << "props length : " << props.length() << std::endl;\n\n'
+    ts = ts + " "*4 + "for ( int i = 0; i <props.length(); i++)\n"
+    ts = ts + " "*4 + "{\n"; 
+    output.write(ts)
+    ts = " "*8 + 'std::cout << "Property id : " << props[i].id << std::endl;\n\n'
+    output.write(ts)
+
+    for p in c.properties:
+
+        ts = " "*8 + 'if (strcmp(props[i].id, "' + p.id + '") == 0)\n' + " "*8 + "{\n";
+        output.write(ts)
+
+        if p.elementType == "Simple":
+            tmp_type = getDatatype(p.type)
+            if tmp_type == "":
+                print "ERROR: " + p.type + " is not supported in basic_ports/genStructure\n"
+
+            ts = " "*12 + "CORBA::" + str(tmp_type) + " simple_temp;\n";
+            output.write(ts)
+            ts = " "*12 + "props[i].value >>= simple_temp;\n";
+            ts = ts + " "*12 + "simple_" + str(simpleCount) + "_value = simple_temp;\n";
+            ts = ts + " "*12 + "for( int k = 0; k < propertySet.length(); k++ ) {\n"
+            ts = ts + " "*16 + "if( strcmp(propertySet[k].id, props[i].id) == 0 ) {\n"
+            ts = ts + " "*20 + "propertySet[k].value = props[i].value;\n"
+            ts = ts + " "*20 + "break;\n"
+            ts = ts + " "*16 + "}\n"
+            ts = ts + " "*12 + "}\n"
+            ts = ts + " "*8 + "}\n\n"
+            output.write(ts)
+            simpleCount += 1;
+
+        elif p.elementType == "SimpleSequence":
+            tmp_type = getDatatype(p.type)
+            if tmp_type == "":
+                print "ERROR: " + p.type + " is not supported in basic_ports/genStructure\n"
+
+            ts = " "*12 + "props[i].value >>= simplesequence_" + str(simplesequenceCount) + ";\n";
+            output.write(ts)
+
+            ts = " "*8 + "}\n\n"        # close the if statement
+            output.write(ts)
+
+            simplesequenceCount += 1;
+        else:
+            print "WARNING: properties other than simple and simple sequence are not supported yet"
+            continue
+
+    ts = " "*4 + "}\n"; 
+    output.write(ts)  #closes the for loop
+
+#################################################################################
+#--------------------------------------------------------------------------------
+
+
+
+#--------------------------------------------------------------------------------
+#################################################################################
+
+
+  def writeProcessDataDeclaration(self,output,c):
+    """This function sets up the majority of the process data function (in the .cpp file) based on the port type"""
+
+    outPort_present = False
+    inPort_present = False
+    inCount = 0;
+    outCount = 0;
+    #declare the output (uses) variables
+    for x in c.ports:  #assumes that you have at least one port
+        if x.type == "Uses":
+
+            if x.interface.name == "complexShort":
+                ts = " "*4 + "PortTypes::ShortSequence I_out_" + str(outCount) + ", Q_out_" + str(outCount) + ";\n";
+                output.write(ts)
+                outCount += 1;
+
+            elif x.interface.name == "complexFloat":
+                ts = " "*4 + "PortTypes::FloatSequence I_out_" + str(outCount) + ", Q_out_" + str(outCount) + ";\n";
+                output.write(ts)
+                outCount += 1;
+
+            elif x.interface.name == "complexDouble":
+                ts = " "*4 + "PortTypes::DoubleSequence I_out_" + str(outCount) + ", Q_out_" + str(outCount) + ";\n";
+                output.write(ts)
+                outCount += 1;
+
+            elif x.interface.name == "complexChar":
+                ts = " "*4 + "PortTypes::CharSequence I_out_" + str(outCount) + ", Q_out_" + str(outCount) + ";\n";
+                output.write(ts)
+                outCount += 1;
+
+            elif x.interface.name == "complexLong":
+                ts = " "*4 + "PortTypes::LongSequence I_out_" + str(outCount) + ", Q_out_" + str(outCount) + ";\n";
+                output.write(ts)
+                outCount += 1;
+
+
+            elif x.interface.name == "realShort":
+                ts = " "*4 + "PortTypes::ShortSequence I_out_" + str(outCount) + ";\n";
+                output.write(ts)
+                outCount += 1;
+            elif x.interface.name == "realFloat":
+                ts = " "*4 + "PortTypes::FloatSequence I_out_" + str(outCount) + ";\n";
+                output.write(ts)
+                outCount += 1;
+            elif x.interface.name == "realDouble":
+                ts = " "*4 + "PortTypes::DoubleSequence I_out_" + str(outCount) + ";\n";
+                output.write(ts)
+                outCount += 1;
+
+            elif x.interface.name == "realChar":
+                ts = " "*4 + "PortTypes::CharSequence I_out_" + str(outCount) + ";\n";
+                output.write(ts)
+                outCount += 1;
+            elif x.interface.name == "realLong":
+                ts = " "*4 + "PortTypes::LongSequence I_out_" + str(outCount) + ";\n";
+                output.write(ts)
+                outCount += 1;
+
+
+
+            else:
+                print "\nInterfaces other than complex and real Short, Float, Char, long and Double are not supported yet in the process data function generation!!\n  See writeProcessDataDeclaration in genStructure.\n"
+            #declare input values short, shortsequence, float, floatSequence, unsupported
+                continue
+    ts = "\n";
+    output.write(ts)
+
+    #declare input (provides) values based on interface type
+    for x in c.ports:
+        if x.type == "Provides":
+
+            if x.interface.name == "complexShort":
+                ts = "\n" + " "*4 + "PortTypes::ShortSequence *I_in_"+str(inCount)+"(NULL), *Q_in_"+str(inCount)+"(NULL);\n";
+                output.write(ts)
+                ts = " "*4 + "CORBA::UShort I_in_" + str(inCount) + "_length, Q_in_" + str(inCount) + "_length;\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "complexFloat":
+                ts = "\n" + " "*4 + "PortTypes::FloatSequence *I_in_"+str(inCount)+"(NULL), *Q_in_"+str(inCount)+"(NULL);\n";
+                output.write(ts)
+                ts = " "*4 + "CORBA::UShort I_in_" + str(inCount) + "_length, Q_in_" + str(inCount) + "_length;\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "complexDouble":
+                ts = "\n" + " "*4 + "PortTypes::DoubleSequence *I_in_"+str(inCount)+"(NULL), *Q_in_"+str(inCount)+"(NULL);\n";
+                output.write(ts)
+                ts = " "*4 + "CORBA::UShort I_in_" + str(inCount) + "_length, Q_in_" + str(inCount) + "_length;\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "complexChar":
+                ts = "\n" + " "*4 + "PortTypes::CharSequence *I_in_"+str(inCount)+"(NULL), *Q_in_"+str(inCount)+"(NULL);\n";
+                output.write(ts)
+                ts = " "*4 + "CORBA::UShort I_in_" + str(inCount) + "_length, Q_in_" + str(inCount) + "_length;\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "complexLong":
+                ts = "\n" + " "*4 + "PortTypes::LongSequence *I_in_"+str(inCount)+"(NULL), *Q_in_"+str(inCount)+"(NULL);\n";
+                output.write(ts)
+                ts = " "*4 + "CORBA::UShort I_in_" + str(inCount) + "_length, Q_in_" + str(inCount) + "_length;\n";
+                output.write(ts)
+                inCount += 1;
+
+
+            elif x.interface.name == "realShort":
+                ts = "\n" + " "*4 + "PortTypes::ShortSequence *I_in_"+str(inCount)+"(NULL);\n";
+                output.write(ts)
+                ts = " "*4 + "CORBA::UShort I_in_" + str(inCount) + "_length;\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "realFloat":
+                ts = "\n" + " "*4 + "PortTypes::FloatSequence *I_in_"+str(inCount)+"(NULL);\n";
+                output.write(ts)
+                ts = " "*4 + "CORBA::UShort I_in_" + str(inCount) + "_length;\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "realDouble":
+                ts = "\n" + " "*4 + "PortTypes::DoubleSequence *I_in_"+str(inCount)+"(NULL);\n";
+                output.write(ts)
+                ts = " "*4 + "CORBA::UShort I_in_" + str(inCount) + "_length;\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "realChar":
+                ts = "\n" + " "*4 + "PortTypes::CharSequence *I_in_"+str(inCount)+"(NULL);\n";
+                output.write(ts)
+                ts = " "*4 + "CORBA::UShort I_in_" + str(inCount) + "_length;\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "realLong":
+                ts = "\n" + " "*4 + "PortTypes::LongSequence *I_in_"+str(inCount)+"(NULL);\n";
+                output.write(ts)
+                ts = " "*4 + "CORBA::UShort I_in_" + str(inCount) + "_length;\n";
+                output.write(ts)
+                inCount += 1;
+
+
+            else:
+                print "\nInterfaces other than real/complex Float, short, Long, char, and double are not supported yet in the process data function generation!!\nSee writeProcessDataDeclaration in genStructure."
+            #only one provides port is supported at this point
+                continue
+
+###################################################################################
+#----------------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------------
+#################################################################################
+
+
+  def writeProcessDataLoop(self,output,c):
+    """This function sets up the majority of the process data function (in the .cpp file) based on the port type"""
+    inCount = 0;
+    outCount = 0;
+    ts = " "*4 + "while(continue_processing())\n" + " "*4 + "{\n";
+    output.write(ts)
+
+    #define input (provides) values input to them and get length on each loop
+    for x in c.ports:
+        if x.type == "Provides":
+            if x.interface.name == "complexShort":
+                ts = " "*8 + "dataIn_"+str(inCount)+"->getData(I_in_"+str(inCount)+", Q_in_"+str(inCount) + ");\n\n";
+                output.write(ts)
+                ts = " "*8 + "I_in_" + str(inCount) + "_length = I_in_" + str(inCount) + "->length();\n";
+                output.write(ts)
+                ts = " "*8 + "Q_in_" + str(inCount) + "_length = Q_in_" + str(inCount) + "->length();\n\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "complexFloat":
+                ts = " "*8 + "dataIn_"+str(inCount)+"->getData(I_in_"+str(inCount)+", Q_in_"+str(inCount) + ");\n\n";
+                output.write(ts)
+                ts = " "*8 + "I_in_" + str(inCount) + "_length = I_in_" + str(inCount) + "->length();\n";
+                output.write(ts)
+                ts = " "*8 + "Q_in_" + str(inCount) + "_length = Q_in_" + str(inCount) + "->length();\n\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "complexDouble":
+                ts = " "*8 + "dataIn_"+str(inCount)+"->getData(I_in_"+str(inCount)+", Q_in_"+str(inCount) + ");\n\n";
+                output.write(ts)
+                ts = " "*8 + "I_in_" + str(inCount) + "_length = I_in_" + str(inCount) + "->length();\n";
+                output.write(ts)
+                ts = " "*8 + "Q_in_" + str(inCount) + "_length = Q_in_" + str(inCount) + "->length();\n\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "complexChar":
+                ts = " "*8 + "dataIn_"+str(inCount)+"->getData(I_in_"+str(inCount)+", Q_in_"+str(inCount) + ");\n\n";
+                output.write(ts)
+                ts = " "*8 + "I_in_" + str(inCount) + "_length = I_in_" + str(inCount) + "->length();\n";
+                output.write(ts)
+                ts = " "*8 + "Q_in_" + str(inCount) + "_length = Q_in_" + str(inCount) + "->length();\n\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "complexLong":
+                ts = " "*8 + "dataIn_"+str(inCount)+"->getData(I_in_"+str(inCount)+", Q_in_"+str(inCount) + ");\n\n";
+                output.write(ts)
+                ts = " "*8 + "I_in_" + str(inCount) + "_length = I_in_" + str(inCount) + "->length();\n";
+                output.write(ts)
+                ts = " "*8 + "Q_in_" + str(inCount) + "_length = Q_in_" + str(inCount) + "->length();\n\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "realShort":
+                ts = " "*8 + "dataIn_"+str(inCount)+"->getData(I_in_"+str(inCount)+");\n\n";
+                output.write(ts)
+                ts = " "*8 + "I_in_" + str(inCount) + "_length = I_in_" + str(inCount) + "->length();\n\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "realFloat":
+                ts = " "*8 + "dataIn_"+str(inCount)+"->getData(I_in_"+str(inCount)+");\n\n";
+                output.write(ts)
+                ts = " "*8 + "I_in_" + str(inCount) + "_length = I_in_" + str(inCount) + "->length();\n\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "realDouble":
+                ts = " "*8 + "dataIn_"+str(inCount)+"->getData(I_in_"+str(inCount)+");\n\n";
+                output.write(ts)
+                ts = " "*8 + "I_in_" + str(inCount) + "_length = I_in_" + str(inCount) + "->length();\n\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "realChar":
+                ts = " "*8 + "dataIn_"+str(inCount)+"->getData(I_in_"+str(inCount)+");\n\n";
+                output.write(ts)
+                ts = " "*8 + "I_in_" + str(inCount) + "_length = I_in_" + str(inCount) + "->length();\n\n";
+                output.write(ts)
+                inCount += 1;
+            elif x.interface.name == "realLong":
+                ts = " "*8 + "dataIn_"+str(inCount)+"->getData(I_in_"+str(inCount)+");\n\n";
+                output.write(ts)
+                ts = " "*8 + "I_in_" + str(inCount) + "_length = I_in_" + str(inCount) + "->length();\n\n";
+                output.write(ts)
+                inCount += 1;
+
+
+            else:
+                print "\nInterfaces other than complex/real Short,  Float, Char, Long and Double are not supported yet in the process data function generation!!\nSee writeProcessDataLoop in genStructure.\n"
+                continue
+
+    for x in c.ports:
+        if x.type == "Uses":
+            if x.interface.name == "complexShort" or x.interface.name == "complexFloat" or x.interface.name == "complexDouble" or x.interface.name == "complexChar" or x.interface.name == "complexLong":
+                ts = " "*8 + "I_out_" + str(outCount) + ".length(); //must define length of output\n";
+                output.write(ts)
+                ts = " "*8 + "Q_out_" +  str(outCount) + ".length(); //must define length of output\n\n";
+                output.write(ts)
+                outCount += 1;
+
+
+
+            elif x.interface.name == "realShort" or x.interface.name == "realFloat" or x.interface.name == "realDouble" or x.interface.name == "realChar" or x.interface.name == "realLong":
+                ts = " "*8 + "I_out_" + str(outCount) + ".length(); //must define length of output\n\n";
+                output.write(ts)
+                outCount += 1;
+
+            else:
+                print "\nInterfaces other than complex/real Short, Float, Char, Long and Double are not supported yet in the process data function generation!!\nSee writeProcessDataLoop in genStructure.\n"
+            #declare input values short, shortsequence, float, floatSequence, unsupported
+                continue
+
+    ts = " "*8 + "/*insert code here to do work*/\n\n\n\n\n\n\n";
+    output.write(ts)
+
+    inCount = 0;
+    for x in c.ports:
+        if x.type == "Provides":
+            if x.interface.name == "complexShort" or x.interface.name == "complexFloat" or x.interface.name == "complexDouble" or x.interface.name == "complexChar" or x.interface.name == "complexLong":
+                ts = " "*8 + "dataIn_" + str(inCount) + "->bufferEmptied();\n";
+                output.write(ts)
+                inCount += 1;
+
+            elif x.interface.name == "realShort" or x.interface.name == "realFloat" or x.interface.name == "realDouble" or x.interface.name == "realChar" or x.interface.name == "realLong":
+                ts = " "*8 + "dataIn_" + str(inCount) + "->bufferEmptied();\n";
+                output.write(ts)
+                inCount += 1;
+
+            else:
+                print "\nInterfaces other than complexand real Short, Char, long, FLoat and Double are not supported yet in the process data function generation!!\nSee writeProcessDataLoop in genStructure.\n"
+                continue
+
+    outCount = 0;
+    for x in c.ports:  #assumes that you have at least one port
+        if x.type == "Uses":
+            if x.interface.name == "complexShort" or x.interface.name == "complexFloat" or x.interface.name == "complexDouble" or x.interface.name == "complexChar" or x.interface.name == "complexLong":
+                ts = " "*8 + "dataOut_" + str(outCount) + "->pushPacket(I_out_" + str(outCount) + ", Q_out_" + str(outCount) + ");\n";
+                output.write(ts)
+                outCount += 1;
+
+            elif x.interface.name == "realShort" or x.interface.name == "realFloat" or x.interface.name == "realDouble" or x.interface.name == "realChar" or x.interface.name == "realLong":
+
+                ts = " "*8 + "dataOut_" + str(outCount) + "->pushPacket(I_out_" + str(outCount) + ");\n";
+                output.write(ts)
+                outCount += 1;
+
+            else:
+                print "\nInterfaces other than complex and real Short, Float, char, long, and Double are not supported yet in the process data function generation!!\nSee writeProcessDataLoop in genStructure.\n"
+            continue
+            #declare input values short, shortsequence, float, floatSequence, unsupported
+    #close while loop
+
+    ts = " "*4 + "}\n"; output.write(ts)
+
+##################################################################################
+#---------------------------------------------------------------------------------
+
+
+
+
+  def writeACESvcDef(self, output,c,type):
+    """ This function writes the implementation of the svn() function for a given component"""
+    if type == 'component':
+        ts = 'int ' + c.name + '_i::svc(void)\n{\n'
+        output.write(ts)
+        ts = " "*4 + '/* Start outgoing port threads */\n'
+        output.write(ts)
+        outCount=0;
+        for x in c.ports:
+            if x.type == "Uses":
+                ts = " "*4 + "outPort" + str(outCount) + "_servant->activate();\n"; output.write(ts)
+                outCount += 1
+        ts = "\n"; output.write(ts)
+        ts = " "*4 + 'std::vector<double> d1_data_double;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<float> d1_data_float;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<short> d1_data_short;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<float> d2_data_double;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<double> d2_data_float;\n'; output.write(ts)
+        ts = " "*4 + 'std::vector<short> d2_data_short;\n'; output.write(ts)
+        ts = " "*4 + 'ACE_Message_Block *mb;\n'; output.write(ts)
+        ts = " "*4 + '/* Main function loop */\n'; output.write(ts)
+        ts = " "*4 + 'while(component_alive)\n' + " "*4 + '{\n'; output.write(ts)
+        ts = " "*8 + "ACE_Time_Value getq_time_out = ACE_OS::gettimeofday();\n"; output.write(ts)
+        ts = " "*8 + "getq_time_out += 1;\n"; output.write(ts)
+        ts = " "*8 + "if(getq(mb, &getq_time_out) >= 0) {\n"; output.write(ts)
+        ts = " "*12 + "unsigned int buffer_size=mb->length();\n"; output.write(ts)
+        ts = " "*12 + "unsigned short data_type;\n"; output.write(ts)
+        ts = " "*12 + "ACE_OS::memmove( (char*)&data_type, mb->rd_ptr(), sizeof(unsigned short));\n"; output.write(ts)
+        ts = " "*12 + "mb->rd_ptr(sizeof(unsigned short));\n"; output.write(ts)
+        ts = " "*12 + "buffer_size=buffer_size - sizeof(unsigned short);\n"; output.write(ts)
+        ts = " "*12 + "unsigned int packet_size = 0;\n"; output.write(ts)
+        ts = " "*12 + "std::vector<double> data_I;\n"; output.write(ts)
+        ts = " "*12 + "std::vector<double> data_Q;\n"; output.write(ts)
+        ts = " "*12 + "// I've arbitrarily decided to use doubles as my working type inside the component\n"; output.write(ts)
+        ts = " "*12 + "//    the working type is implementation-specific\n"; output.write(ts)
+        ts = " "*12 + "switch(data_type) {\n"; output.write(ts)
+        ts = " "*16 + "case 1:\n"; output.write(ts)
+        ts = " "*20 + "// this is for complex double\n"; output.write(ts)
+        ts = " "*20 + "packet_size=buffer_size/(sizeof(double)*2);\n"; output.write(ts)
+        ts = " "*20 + "{\n"; output.write(ts)
+        ts = " "*24 + "std::vector <double> vals(packet_size*2);\n"; output.write(ts)
+        ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+        ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+        ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+        ts = " "*28 + "data_Q[i] = vals[i+packet_size];\n"; output.write(ts)
+        ts = " "*24 + "}\n"; output.write(ts)
+        ts = " "*20 + "}\n"; output.write(ts)
+        ts = " "*20 + "break;\n"; output.write(ts)
+        ts = " "*16 + "case 2:\n"; output.write(ts)
+        ts = " "*20 + "// this is for complex float\n"; output.write(ts)
+        ts = " "*20 + "packet_size=buffer_size/(sizeof(float)*2);\n"; output.write(ts)
+        ts = " "*20 + "{\n"; output.write(ts)
+        ts = " "*24 + "std::vector <float> vals(packet_size*2);\n"; output.write(ts)
+        ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+        ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+        ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+        ts = " "*28 + "data_Q[i] = vals[i+packet_size];\n"; output.write(ts)
+        ts = " "*24 + "}\n"; output.write(ts)
+        ts = " "*20 + "}\n"; output.write(ts)
+        ts = " "*20 + "break;\n"; output.write(ts)
+        ts = " "*16 + "case 3:\n"; output.write(ts)
+        ts = " "*20 + "// this is for complex short\n"; output.write(ts)
+        ts = " "*20 + "packet_size=buffer_size/(sizeof(short)*2);\n"; output.write(ts)
+        ts = " "*20 + "{\n"; output.write(ts)
+        ts = " "*24 + "std::vector <short> vals(packet_size*2);\n"; output.write(ts)
+        ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+        ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+        ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+        ts = " "*28 + "data_Q[i] = vals[i+packet_size];\n"; output.write(ts)
+        ts = " "*24 + "}\n"; output.write(ts)
+        ts = " "*20 + "}\n"; output.write(ts)
+        ts = " "*20 + "break;\n"; output.write(ts)
+        ts = " "*16 + "case 4:\n"; output.write(ts)
+        ts = " "*20 + "// this is for real double\n"; output.write(ts)
+        ts = " "*20 + "packet_size=buffer_size/(sizeof(double));\n"; output.write(ts)
+        ts = " "*20 + "{\n"; output.write(ts)
+        ts = " "*24 + "std::vector <double> vals(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+        ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+        ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+        ts = " "*28 + "data_Q[i] = 0;\n"; output.write(ts)
+        ts = " "*24 + "}\n"; output.write(ts)
+        ts = " "*20 + "}\n"; output.write(ts)
+        ts = " "*20 + "break;\n"; output.write(ts)
+        ts = " "*16 + "case 5:\n"; output.write(ts)
+        ts = " "*20 + "// this is for real float\n"; output.write(ts)
+        ts = " "*20 + "packet_size=buffer_size/(sizeof(float));\n"; output.write(ts)
+        ts = " "*20 + "{\n"; output.write(ts)
+        ts = " "*24 + "std::vector <float> vals(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+        ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+        ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+        ts = " "*28 + "data_Q[i] = 0;\n"; output.write(ts)
+        ts = " "*24 + "}\n"; output.write(ts)
+        ts = " "*20 + "}\n"; output.write(ts)
+        ts = " "*20 + "break;\n"; output.write(ts)
+        ts = " "*16 + "case 6:\n"; output.write(ts)
+        ts = " "*20 + "// this is for real short\n"; output.write(ts)
+        ts = " "*20 + "packet_size=buffer_size/(sizeof(short));\n"; output.write(ts)
+        ts = " "*20 + "{\n"; output.write(ts)
+        ts = " "*24 + "std::vector <short> vals(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n"; output.write(ts)
+        ts = " "*24 + "data_I.resize(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "data_Q.resize(packet_size);\n"; output.write(ts)
+        ts = " "*24 + "for (unsigned int i = 0; i<packet_size; i++) {\n"; output.write(ts)
+        ts = " "*28 + "data_I[i] = vals[i];\n"; output.write(ts)
+        ts = " "*28 + "data_Q[i] = 0;\n"; output.write(ts)
+        ts = " "*24 + "}\n"; output.write(ts)
+        ts = " "*20 + "}\n"; output.write(ts)
+        ts = " "*20 + "break;\n"; output.write(ts)
+        ts = " "*12 + "}\n"; output.write(ts)
+        #ts = " "*8 + "}\n"; output.write(ts)
+        ts = " "*12 + "mb->release();\n"; output.write(ts)
+        ts = " "*12 + "/*******************************************************************\n"; output.write(ts)
+        ts = " "*24 + "Insert functional code here\n"; output.write(ts)
+        ts = " "*12 + "*******************************************************************/\n\n"; output.write(ts)
+        ts = " "*12 + "/******************************************************************/\n\n"; output.write(ts)
+        ts = " "*12 + "// Prepare data for output\n"; output.write(ts)
+        ts = " "*12 + "d1_data_double.resize(packet_size);\n"; output.write(ts)
+        ts = " "*12 + "d1_data_float.resize(packet_size);\n"; output.write(ts)
+        ts = " "*12 + "d1_data_short.resize(packet_size);\n"; output.write(ts)
+        ts = " "*12 + "d2_data_double.resize(packet_size*2);\n"; output.write(ts)
+        ts = " "*12 + "d2_data_float.resize(packet_size*2);\n"; output.write(ts)
+        ts = " "*12 + "d2_data_short.resize(packet_size*2);\n\n"; output.write(ts)
+        ts = " "*12 + "for (unsigned int i=0; i<packet_size; i++) {\n"; output.write(ts)
+        ts = " "*16 + "d1_data_double[i] = data_I[i];\n"; output.write(ts)
+        ts = " "*16 + "d1_data_float[i] = data_I[i];\n"; output.write(ts)
+        ts = " "*16 + "d1_data_short[i] = (short)data_I[i];\n"; output.write(ts)
+        ts = " "*16 + "d2_data_double[i] = data_I[i];\n"; output.write(ts)
+        ts = " "*16 + "d2_data_double[i+packet_size] = data_Q[i];\n"; output.write(ts)
+        ts = " "*16 + "d2_data_float[i] = data_I[i];\n"; output.write(ts)
+        ts = " "*16 + "d2_data_float[i+packet_size] = data_Q[i];\n"; output.write(ts)
+        ts = " "*16 + "d2_data_short[i] = (short)data_I[i];\n"; output.write(ts)
+        ts = " "*16 + "d2_data_short[i+packet_size] = (short)data_Q[i];\n"; output.write(ts)
+        ts = " "*12 + "}\n"; output.write(ts)
+
+        outCount=0
+
+        for x in c.ports:
+            if x.type == "Uses":
+                ts = " "*12 + "if (outPort" + str(outCount) + "_active) {\n"; output.write(ts)
+        if x.interface.name == 'realDouble':
+            DATA_TYPE_BEING_USED = 'double'
+            VECTOR_COUNT = '1'
+            VECTOR_NAME = 'd1_data_double'
+        if x.interface.name == 'realFloat':
+            DATA_TYPE_BEING_USED = 'float'
+            VECTOR_COUNT = '1'
+            VECTOR_NAME = 'd1_data_float'
+        if x.interface.name == 'realShort':
+            DATA_TYPE_BEING_USED = 'short'
+            VECTOR_COUNT = '1'
+            VECTOR_NAME = 'd1_data_short'
+        if x.interface.name == 'complexDouble':
+            DATA_TYPE_BEING_USED = 'double'
+            VECTOR_COUNT = '2'
+            VECTOR_NAME = 'd2_data_double'
+        if x.interface.name == 'complexFloat':
+            DATA_TYPE_BEING_USED = 'float'
+            VECTOR_COUNT = '2'
+            VECTOR_NAME = 'd2_data_float'
+        if x.interface.name == 'complexShort':
+                DATA_TYPE_BEING_USED = 'short'
+                VECTOR_COUNT = '2'
+                VECTOR_NAME = 'd2_data_short'
+                ts = " "*16 + "ACE_Message_Block *message = new ACE_Message_Block (packet_size*" + VECTOR_COUNT + "*sizeof(" + DATA_TYPE_BEING_USED + "));\n"; output.write(ts)
+                ts = " "*16 + "message->copy((const char*)&" + VECTOR_NAME + "[0], packet_size*" + VECTOR_COUNT + "*sizeof(" + DATA_TYPE_BEING_USED + "));\n"; output.write(ts)
+                ts = " "*16 + "if (outPort" + str(outCount) + "_servant->putq(message) == -1) {\n"; output.write(ts)
+                ts = " "*20 + "//  this is where a message for issues with the putq would appear\n"; output.write(ts)
+                ts = " "*16 + "}\n"; output.write(ts)
+                ts = " "*12 + "}\n"; output.write(ts)
+                outCount += 1
+        ts = " "*8 + "}\n"; output.write(ts)
+        ts = " "*8 + "/* Polling rate, slow CPU spinning */\n"; output.write(ts)
+        ts = " "*8 + "ACE_OS::sleep (ACE_Time_Value (1));\n"; output.write(ts)
+        ts = " "*4 + '}\n\n' + " "*4 + 'return 0;\n}\n'; output.write(ts)
+
+    if type == 'port':
+        #ts = 'int ' + c.u_cname + '::svc(void)\n{\n'; output.write(ts)
+        #ts = " "*4 + 'ACE_Message_Block *mb;\n\n'; output.write(ts)
+        #ts = " "*4 + 'while(1)\n' + " "*4 + '{\n' + " "*8 + 'if (getq(mb) == -1)\n'
+        #output.write(ts)
+        #ts = " "*8 + '{\n' + " "*12 + 'ACE_ERROR_RETURN ((LM_ERROR, ' + r'"%p\n",'
+        #ts = ts + ' "getq"), -1);\n'
+        #output.write(ts)
+        #ts = " "*8 + '}\n\n' + " "*8 + '/* _complexShort->pushPacket(); */\n\n'
+        #output.write(ts)
+        #ts = " "*8 + '/* Release message block */\n' + " "*8 + 'mb->release();\n'
+        #output.write(ts)
+        #ts = " "*4 + '}\n' + " "*4 + 'return 0;\n}\n'
+        #output.write(ts)
+        # the following stuff is a work in progress
+        #    it needs to be reconciled with the contents of the actual port
+        #    This will be interesting for control ports instead of data ports
+        #    in the case of control ports, it will likely need a slightly different structure
+    #print c.interface.name
+        ts = 'int ' + c.u_cname + '::svc(void)\n{\n'; output.write(ts)
+    ts = " "*4 + 'ACE_Message_Block *mb;\n'; output.write(ts)
+    if c.interface.name == 'realDouble':
+        DATA_TYPE_BEING_USED = 'double'
+        DATA_TYPE_USED = 'Double'
+        ARGUMENT_LIST_FOR_PUSH = ' I'
+    if c.interface.name == 'realFloat':
+        DATA_TYPE_BEING_USED = 'float'
+        DATA_TYPE_USED = 'Float'
+        ARGUMENT_LIST_FOR_PUSH = ' I'
+    if c.interface.name == 'realShort':
+        DATA_TYPE_BEING_USED = 'short'
+        DATA_TYPE_USED = 'Short'
+        ARGUMENT_LIST_FOR_PUSH = ' I'
+    if c.interface.name == 'complexDouble':
+        DATA_TYPE_BEING_USED = 'double'
+        DATA_TYPE_USED = 'Double'
+        ARGUMENT_LIST_FOR_PUSH = ' I, Q'
+    if c.interface.name == 'complexFloat':
+        DATA_TYPE_BEING_USED = 'float'
+        DATA_TYPE_USED = 'Float'
+        ARGUMENT_LIST_FOR_PUSH = ' I, Q'
+    if c.interface.name == 'complexShort':
+        DATA_TYPE_BEING_USED = 'short'
+        DATA_TYPE_USED = 'Short'
+        ARGUMENT_LIST_FOR_PUSH = ' I, Q'
+    ts = " "*4 + 'vector < ' + DATA_TYPE_BEING_USED + ' > vals;\n'; output.write(ts)
+    ts = " "*4 + 'PortTypes::' + DATA_TYPE_USED + 'Sequence ' + ARGUMENT_LIST_FOR_PUSH +';\n\n'; output.write(ts)
+    ts = " "*4 + 'while(1)\n' + " "*8 + '{\n'; output.write(ts)
+    ts = " "*8 + 'ACE_Time_Value getq_time_out = ACE_OS::gettimeofday();\n'; output.write(ts)
+    ts = " "*8 + 'getq_time_out += 1;\n'; output.write(ts)
+    ts = " "*8 + 'if(getq(mb, &getq_time_out) >= 0) {\n'; output.write(ts)
+    ts = " "*12 + 'unsigned int buffer_size=mb->length();\n'; output.write(ts)
+    if c.interface.name == 'realDouble':
+        NUMBER_OF_VECTORS = '1'
+    if c.interface.name == 'realFloat':
+        NUMBER_OF_VECTORS = '1'
+    if c.interface.name == 'realShort':
+        NUMBER_OF_VECTORS = '1'
+    if c.interface.name == 'complexDouble':
+        NUMBER_OF_VECTORS = '2'
+    if c.interface.name == 'complexFloat':
+        NUMBER_OF_VECTORS = '2'
+    if c.interface.name == 'complexShort':
+        NUMBER_OF_VECTORS = '2'
+    ts = " "*12 + 'unsigned int packet_size=buffer_size/(sizeof(' + DATA_TYPE_BEING_USED + ')*' + NUMBER_OF_VECTORS + ');\n'; output.write(ts)
+    ts = " "*12 + 'vals.resize(packet_size*' + NUMBER_OF_VECTORS + ');\n'; output.write(ts)
+    if c.interface.name == 'realDouble':
+        ts = " "*12 + 'I.length(packet_size);\n'; output.write(ts)
+    if c.interface.name == 'realFloat':
+        ts = " "*12 + 'I.length(packet_size);\n'; output.write(ts)
+    if c.interface.name == 'realShort':
+        ts = " "*12 + 'I.length(packet_size);\n'; output.write(ts)
+    if c.interface.name == 'complexDouble':
+        ts = " "*12 + 'I.length(packet_size);\n'+" "*12 + 'Q.length(packet_size);\n'; output.write(ts)
+    if c.interface.name == 'complexFloat':
+        ts = " "*12 + 'I.length(packet_size);\n'+" "*12 + 'Q.length(packet_size);\n'; output.write(ts)
+    if c.interface.name == 'complexShort':
+        ts = " "*12 + 'I.length(packet_size);\n'+" "*12 + 'Q.length(packet_size);\n'; output.write(ts)
+    ts = " "*12 + 'ACE_OS::memmove( (char*)&vals[0], mb->rd_ptr(), buffer_size);\n'; output.write(ts)
+    ts = " "*12 + 'for (unsigned int i=0; i<packet_size; i++) {\n'; output.write(ts)
+    if c.interface.name == 'realDouble':
+        ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+    if c.interface.name == 'realFloat':
+        ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+    if c.interface.name == 'realShort':
+        ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+    if c.interface.name == 'complexDouble':
+        ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+        ts = " "*16 + 'Q[i]=vals[i+packet_size];\n'; output.write(ts)
+    if c.interface.name == 'complexFloat':
+        ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+        ts = " "*16 + 'Q[i]=vals[i+packet_size];\n'; output.write(ts)
+    if c.interface.name == 'complexShort':
+        ts = " "*16 + 'I[i]=vals[i];\n'; output.write(ts)
+        ts = " "*16 + 'Q[i]=vals[i+packet_size];\n'; output.write(ts)
+    ts = " "*12 + '}\n'; output.write(ts)
+    ts = " "*12 + 'for (unsigned int i = 0; i < outPorts.size(); i++) {\n'; output.write(ts)
+    ts = " "*16 + 'outPorts[i].port_var->pushPacket( ' + ARGUMENT_LIST_FOR_PUSH + ' );\n'; output.write(ts)
+    ts = " "*12 + '}\n'; output.write(ts)
+    ts = " "*12 + 'mb->release();\n'; output.write(ts)
+    ts = " "*8 + '}\n'; output.write(ts)
+    ts = " "*4 + '}\n' + " "*4 + 'return 0;\n}\n'
+    output.write(ts)
+
+
+  def writeFriendDecl(self,output,c):
+      friendList = []
+      for p in c.ports:
+          if p.type == "Uses":
+              if p.u_cname not in friendList:
+                  friendList.append(p.u_cname)
+          if p.type == "Provides":
+              if p.p_cname not in friendList:
+                  friendList.append(p.p_cname)
+
+      for x in friendList:
+          ts = " "*4 + "friend class " + x + ";\n"
+          output.write(ts)
+
+
+  def addPreamble(self,outFile,name):
+      if(self.preamble == None):
+          inFile = open(self.sourcepreamble,'r')
+          for line in inFile.readlines():
+              l_out = line.replace("__COMP_NAME__",name)
+              #l_out = l_out.replace("__YEAR__",date.today().year.__str__())
+              #l_out = l_out.replace("__DEVELOPER__",self.developer)
+              outFile.write(l_out)
+
+          inFile.close()
+      else:
+          outFile.write(self.preamble)
+
+
+  def cleanUp(self):
+      # Move the AssemblyController to the waveform Dir
+      for c in self.active_wave.components:
+        if c.AssemblyController == True and c.generate:
+            os.system('mv ' + self.path + c.name + ' ' + self.path + self.active_wave.name)
+
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleComp.cpp
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleComp.cpp	(revision 10012)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleComp.cpp	(revision 10012)
@@ -0,0 +1,120 @@
+
+#include <string>
+#include <iostream>
+#include "__IncludeFile__.h"
+
+__Class_name__::__Class_name__(const char *uuid, omni_condition *condition) :
+    Resource_impl(uuid), component_running(condition)
+{
+    __CONSTRUCTORS__
+	__IS_ASSEMBLY_CONTROLLER__
+}
+
+__Class_name__::~__Class_name__(void)
+{
+    __PORT_DESTRUCTORS__
+    __SIMPLE_SEQUENCE_POINTER_DESTRUCTORS__
+}
+
+// Static function for omni thread
+void __Class_name__::Run( void * data )
+{
+    ((__Class_name__*)data)->ProcessData();
+}
+
+CORBA::Object_ptr __Class_name__::getPort( const char* portName ) throw (
+    CORBA::SystemException, CF::PortSupplier::UnknownPort)
+{
+    DEBUG(3, __IncludeFile__, "getPort() invoked with " << portName)
+
+    CORBA::Object_var p;
+
+__GET_PORT__
+}
+
+void __Class_name__::start() throw (CORBA::SystemException,
+    CF::Resource::StartError)
+{
+    DEBUG(3, __IncludeFile__, "start() invoked")
+	omni_mutex_lock  l(processing_mutex);
+	if( false == thread_started )
+	{
+		thread_started = true;
+		// Create the thread for the writer's processing function
+		processing_thread = new omni_thread(Run, (void *) this);
+
+		// Start the thread containing the writer's processing function
+		processing_thread->start();
+	}
+}
+
+void __Class_name__::stop() throw (CORBA::SystemException, CF::Resource::StopError)
+{
+    DEBUG(3, __IncludeFile__, "stop() invoked")
+	omni_mutex_lock l(processing_mutex);
+	thread_started = false;
+}
+
+void __Class_name__::releaseObject() throw (CORBA::SystemException,
+    CF::LifeCycle::ReleaseError)
+{
+    DEBUG(3, __IncludeFile__, "releaseObject() invoked")
+
+    component_running->signal();
+}
+
+void __Class_name__::initialize() throw (CF::LifeCycle::InitializeError,
+    CORBA::SystemException)
+{
+    DEBUG(3, __IncludeFile__, "initialize() invoked")
+}
+
+void __Class_name__::query( CF::Properties & configProperties ) throw (CORBA::SystemException, CF::UnknownProperties)
+{
+	if( configProperties.length() == 0 )
+	{
+		configProperties.length( propertySet.length() );
+		for( int i = 0; i < propertySet.length(); i++ )
+		{
+			configProperties[i].id = CORBA::string_dup( propertySet[i].id );
+			configProperties[i].value = propertySet[i].value;
+		}
+		return;
+	} else {
+		for( int i = 0; i < configProperties.length(); i++ ) {
+			for( int j = 0; j < propertySet.length(); j++ ) {
+				if( strcmp(configProperties[i].id, propertySet[j].id) == 0 ) {
+					configProperties[i].value = propertySet[j].value;
+				}
+			}
+		}
+	} // end if-else
+}
+
+void __Class_name__::configure(const CF::Properties& props)
+throw (CORBA::SystemException,
+    CF::PropertySet::InvalidConfiguration,
+    CF::PropertySet::PartialConfiguration)
+{
+    DEBUG(3, __IncludeFile__, "configure() invoked")
+
+    __READ_PROPS__
+}
+
+void __Class_name__::ProcessData()
+{
+    DEBUG(3, __IncludeFile__, "ProcessData() invoked")
+
+    __PROCESS_DATA_DECLARATIONS__
+
+    __PROCESS_DATA_LOOP__
+}
+
+bool __Class_name__::continue_processing()
+{
+	omni_mutex_lock l(processing_mutex);
+	return thread_started;
+}
+
+__ACE_SVC_DEF__
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleDoxyfile
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleDoxyfile	(revision 3319)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleDoxyfile	(revision 3319)
@@ -0,0 +1,1239 @@
+# Doxyfile 1.4.6
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = "__ComponentName__"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = docs
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, 
+# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, 
+# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, 
+# Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# This tag can be used to specify the encoding used in the generated output. 
+# The encoding is not always determined by the language that is chosen, 
+# but also whether or not the output is meant for Windows or non-Windows users. 
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES 
+# forces the Windows encoding (this is the default for the Windows binary), 
+# whereas setting the tag to NO uses a Unix-style encoding (the default for 
+# all platforms other than Windows).
+
+USE_WINDOWS_ENCODING   = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like the Qt-style comments (thus requiring an 
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for Java. 
+# For instance, namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
+# include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = yes
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from the 
+# version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = documentation.txt      \
+                         __ComponentName__.cpp  \
+                         __ComponentName__.h
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+
+FILE_PATTERNS          = 
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = YES
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = letter
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_WIDTH    = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT   = 1024
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that a graph may be further truncated if the graph's 
+# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH 
+# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), 
+# the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, which results in a white background. 
+# Warning: Depending on the platform used, enabling this option may lead to 
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/__init__.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/__init__.py	(revision 3319)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/__init__.py	(revision 3319)
@@ -0,0 +1,1 @@
+pass
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/port_impl.cpp
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/port_impl.cpp	(revision 3319)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/port_impl.cpp	(revision 3319)
@@ -0,0 +1,7 @@
+#include <iostream>
+
+#include "port_impl.h"
+
+using namespace std;
+
+__PORT_DEF__
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/port_sample.cpp
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/port_sample.cpp	(revision 3319)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/port_sample.cpp	(revision 3319)
@@ -0,0 +1,37 @@
+__IN_PORT__::__IN_PORT__(__COMP_ARG__)
+{
+    __COMP_REF_DEF__
+}
+
+void __IN_PORT__::__OPERATION__
+
+__OUT_PORT__::__OUT_PORT__(__COMP_ARG__)
+{
+    __COMP_REF_DEF__
+}
+
+void __OUT_PORT__::connectPort(CORBA::Object_ptr connection, const char *connectionId)
+{
+  __NAME_SPACE__::__INT_TYPE___var port = __NAME_SPACE__::__INT_TYPE__::_narrow(connection);
+  outPorts.push_back(__OUT_PORT__::PortInfo(port,connectionId));
+}
+
+void __OUT_PORT__::disconnectPort(const char *connectionId)
+{
+  std::vector<__OUT_PORT__::PortInfo>::iterator i;
+
+  for (i = outPorts.begin(); i != outPorts.end(); ++i) {
+      if ((*i).connectionId == connectionId) {
+          outPorts.erase(i);
+          break;
+      }
+  }
+}
+
+std::vector<__OUT_PORT__::PortInfo> __OUT_PORT__::get_ports()
+{
+    return outPorts;
+}
+
+__ACE_SVC_DEF__
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleComp.h
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleComp.h	(revision 9595)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleComp.h	(revision 9595)
@@ -0,0 +1,86 @@
+
+#ifndef __CLASS_DEF__
+#define __CLASS_DEF__
+
+#include <stdlib.h>
+#include "ossie/cf.h"
+#include "ossie/PortTypes.h"
+#include "ossie/Resource_impl.h"
+#include "ossie/debug.h"
+
+__ACE_INCLUDES__
+
+__SI_BASES__
+__USES_SI__
+__PROVIDES_SI__
+
+/** \brief
+ *
+ *
+ */
+class __Class_name__ : public virtual Resource_impl__ACE_INHERIT__
+{
+  public:
+    /// Initializing constructor
+    __Class_name__(const char *uuid, omni_condition *sem);
+
+    /// Destructor
+    ~__Class_name__(void);
+
+    /// Static function for omni thread
+    static void Run( void * data );
+
+    ///
+    void start() throw (CF::Resource::StartError, CORBA::SystemException);
+
+    ///
+    void stop() throw (CF::Resource::StopError, CORBA::SystemException);
+
+    ///
+    CORBA::Object_ptr getPort( const char* portName )
+        throw (CF::PortSupplier::UnknownPort, CORBA::SystemException);
+
+    ///
+    void releaseObject() throw (CF::LifeCycle::ReleaseError, CORBA::SystemException);
+
+    ///
+    void initialize() throw (CF::LifeCycle::InitializeError, CORBA::SystemException);
+
+	/// Query properties from .prf.xml
+	void query(CF::Properties&)
+		throw (CORBA::SystemException,
+				CF::UnknownProperties);
+
+    /// Configures properties read from .prf.xml
+    void configure(const CF::Properties&)
+        throw (CORBA::SystemException,
+            CF::PropertySet::InvalidConfiguration,
+            CF::PropertySet::PartialConfiguration);
+
+    __ACE_SVC_DECL__
+
+  private:
+    /// Disallow default constructor
+    __Class_name__();
+
+    /// Disallow copy constructor
+    __Class_name__(__Class_name__&);
+
+    /// Main signal processing method
+    void ProcessData();
+	bool continue_processing();
+	volatile bool thread_started;
+	omni_mutex processing_mutex;
+   
+    omni_condition *component_running;  ///< for component shutdown
+    omni_thread *processing_thread;     ///< for component writer function
+    	
+    __CORBA_SIMPLE_PROP_DECL__
+
+    __CORBA_SIMPLE_SEQUENCE_PROP_DECL__
+    
+    // list components provides and uses ports
+    __PORT_DECL__
+    
+};
+#endif
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleMain.cpp
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleMain.cpp	(revision 9916)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleMain.cpp	(revision 9916)
@@ -0,0 +1,101 @@
+#include <iostream>
+#include <omniORB4/omniURI.h>
+#include "ossie/ossieSupport.h"
+#include "ossie/debug.h"
+
+#include "__IncludeFile__.h"
+
+using namespace std;
+//using namespace standardInterfaces;  // For standard OSSIE interface classes
+
+int main(int argc, char* argv[])
+{
+    ossieDebugLevel = 0;
+
+    if ( argc < 7 ) {
+        cout << argv[0] << " NAMING_CONTEXT_IOR <string> NAME_BINDING <string> COMPONENT_IDENTIFIER <string> " << endl;
+        exit(EXIT_FAILURE);
+    }
+
+    int i = 0;
+    char *uuid = NULL;
+    char *label = NULL;
+    char *ior = NULL;
+
+    while ( i < argc ) {
+        if ( strcmp("NAMING_CONTEXT_IOR", argv[i]) == 0 ) ior = argv[i+1];
+        if ( strcmp("NAME_BINDING", argv[i]) == 0 ) label = argv[i+1];
+        if ( strcmp("COMPONENT_IDENTIFIER", argv[i]) == 0 ) uuid = argv[i+1];
+        ++i;
+    }
+
+    if ( uuid == NULL ) {
+        cout << "ERROR: " << argv[0] << " missing COMPONENT_IDENTIFIER argument" << endl;
+        exit(EXIT_FAILURE);
+    }
+
+    if ( label == NULL ) {
+        cout << "ERROR: " << argv[0] << " missing NAME_BINDING argument" << endl;
+        exit(EXIT_FAILURE);
+    }
+
+    if ( ior == NULL ) {
+        cout << "ERROR: " << argv[0] << " missing NAMING_CONTEXT_IOR argument" << endl;
+        exit(EXIT_FAILURE);
+    }
+
+    cout << argv[0] << " NAMING_CONTEXT_IOR " << ior << " NAME_BINDING " << label << " COMPONENT_IDENTIFIER " << uuid << endl;
+
+    ossieSupport::ORB::orb = CORBA::ORB_init( argc, argv );
+
+    try {
+        CORBA::Object_ptr _ncobj = ossieSupport::ORB::orb->string_to_object(ior);
+        ossieSupport::ORB::inc = CosNaming::NamingContext::_narrow(_ncobj);
+        CORBA::release(_ncobj);
+    } catch ( ... ) {
+        cout << "ERROR: " << argv[0] << " Failed to narrow NamingContext from IOR" << endl;
+        exit(EXIT_FAILURE);
+    }
+
+    try {
+        CORBA::Object_ptr _poaobj = ossieSupport::ORB::orb->resolve_initial_references("RootPOA");
+        ossieSupport::ORB::poa = PortableServer::POA::_narrow(_poaobj);
+        ossieSupport::ORB::pman = ossieSupport::ORB::poa->the_POAManager();
+        ossieSupport::ORB::pman->activate();
+    } catch ( ... ) {
+        cout << "ERROR: " << argv[0] << " Failed to initialize POA" << endl;
+        exit(EXIT_FAILURE);
+    }
+
+    omni_mutex component_running_mutex;
+    omni_condition *component_running = new omni_condition(&component_running_mutex);
+
+    __Class_name__* __CLASS_VAR___servant;
+    CF::Resource_var __CLASS_VAR___var;
+
+    // Create the __CLASS_VAR__ component servant and object reference
+
+    __CLASS_VAR___servant = new __Class_name__(uuid, component_running);
+    __CLASS_VAR___var = __CLASS_VAR___servant->_this();
+    __CLASS_VAR_ACE___servant->activate();
+
+    CosNaming::Name_var _bindingname = omni::omniURI::stringToName(label);
+    try {
+        ossieSupport::ORB::inc->rebind(_bindingname, (CORBA::Object_ptr) __CLASS_VAR___var);
+    } catch ( ... ) {
+        cout << "ERROR: " << argv[0] << " Failed to rebind reference to NameService" << endl;
+        exit(EXIT_FAILURE);
+    }
+
+    // This bit is ORB specific
+    // omniorb is threaded and the servants are running at this point
+    // so we block on the condition
+    // The releaseObject method clear the condition and the component exits
+
+    component_running->wait();
+    ossieSupport::ORB::inc->unbind(_bindingname);
+    ossieSupport::ORB::orb->destroy();
+
+    return 0;
+}
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/Makefile.am	(revision 9483)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/Makefile.am	(revision 9483)
@@ -0,0 +1,10 @@
+EXTRA_DIST = genStructure.py \
+	     port_impl.cpp \
+	     port_impl.h \
+	     port_sample.cpp \
+	     port_sample.h \
+	     sampleComp.cpp \
+	     sampleComp.h \
+	     sampleDocumentation.txt \
+	     sampleDoxyfile \
+	     __init__.py
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleDocumentation.txt
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleDocumentation.txt	(revision 3319)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/sampleDocumentation.txt	(revision 3319)
@@ -0,0 +1,26 @@
+/*! \mainpage __ComponentName__
+
+\section description Basic description
+Include a basic description of the __ComponentName__ component here
+
+\section properties Properties
+This section details the properties
+
+\subsection prop_property_name Property Name (DCE:xxxx-xxx-xxx-xxx-xxxx)
+
+\section interfaces Interfaces
+
+\subsection port_portName Port: "portName"
+There is a description for each port
+
+\section dependencies Software build dependencies
+  - Dependency 1
+  - Dependency 2
+
+\section algorithm Detailed Description of Algorithm
+
+\section status Status and history
+
+\section references References
+
+*/
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/port_impl.h
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/port_impl.h	(revision 3319)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/port_impl.h	(revision 3319)
@@ -0,0 +1,12 @@
+#include <vector>
+#include "ossie/cf.h"
+#include "ossie/PortTypes.h"
+
+#include "ossie/Resource_impl.h"
+#include "__IncludeFile__.h"
+__ACE_INCLUDES__
+
+__PORT_DECL__
+
+
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/port_sample.h
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/port_sample.h	(revision 3319)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/basic_ports/port_sample.h	(revision 3319)
@@ -0,0 +1,59 @@
+// Declaration for provides ports
+#ifndef __IN_CLASS___H
+#define __IN_CLASS___H
+class __IN_PORT__ : 
+public POA___NAME_SPACE__::__INT_TYPE____ACE_INHERIT__
+{
+  public:
+    __IN_PORT__(__COMP_ARG__);
+
+    __OPERATION__
+
+  private:
+    __COMP_REF_DECL__
+};
+#endif
+
+// Declaration for uses ports
+
+#ifndef __OUT_CLASS___H
+#define __OUT_CLASS___H
+class __OUT_PORT__ : 
+public virtual POA_CF::Port__ACE_INHERIT__
+{
+  public:
+    __OUT_PORT__(__COMP_ARG__);
+    void connectPort(CORBA::Object_ptr connection, const char* connectionId);
+    void disconnectPort(const char* connectionId);
+    __ACE_SVC_DECL__
+
+    //Port Information Storage Class
+    class PortInfo {
+      public:
+        PortInfo(__NAME_SPACE__::__INT_TYPE___var _port, const char *&_id)
+        {
+            port_var = _port;
+            connectionId = _id;
+        };
+
+        PortInfo(const PortInfo &cp)
+        {
+            port_var = cp.port_var;
+            connectionId = cp.connectionId;
+        };
+
+        __NAME_SPACE__::__INT_TYPE___var port_var;
+        std::string connectionId;
+
+      private:
+        PortInfo(); //no default constructor
+    };
+
+    std::vector <__OUT_PORT__::PortInfo> get_ports();
+
+  private:
+    std::vector <__OUT_PORT__::PortInfo> outPorts;
+    __COMP_REF_DECL__
+
+};
+#endif
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/Makefile.am	(revision 9483)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/generate/templates/Makefile.am	(revision 9483)
@@ -0,0 +1,4 @@
+SUBDIRS = basic_ports custom_ports py_comp
+
+EXTRA_DIST = __init__.py
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/PortDialog.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/PortDialog.py	(revision 5938)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/PortDialog.py	(revision 5938)
@@ -0,0 +1,202 @@
+#Boa:Dialog:PortDialog
+
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+import ComponentClass
+import copy
+from errorMsg import *
+import importIDL
+
+def create(parent):
+    return PortDialog(parent)
+
+[wxID_PORTDIALOG, wxID_PORTDIALOGCANCELBTN, wxID_PORTDIALOGIMPORTBTN, 
+ wxID_PORTDIALOGINTBOX, wxID_PORTDIALOGOKBTN, wxID_PORTDIALOGPORTNAMEBOX, 
+ wxID_PORTDIALOGSTATICTEXT1, wxID_PORTDIALOGSTATICTEXT2, 
+ wxID_PORTDIALOGSTATICTEXT3, wxID_PORTDIALOGTYPECHOICE, 
+] = [wx.NewId() for _init_ctrls in range(10)]
+
+class PortDialog(wx.Dialog):
+    def _init_ctrls(self, prnt):
+        # generated method, don't edit
+        wx.Dialog.__init__(self, id=wxID_PORTDIALOG, name='PortDialog',
+              parent=prnt, pos=wx.Point(797, 377), size=wx.Size(498, 342),
+              style=wx.DEFAULT_DIALOG_STYLE, title='Add Port')
+        self.SetClientSize(wx.Size(498, 342))
+        self.Center(wx.BOTH)
+
+        self.portNameBox = wx.TextCtrl(id=wxID_PORTDIALOGPORTNAMEBOX,
+              name='portNameBox', parent=self, pos=wx.Point(275, 80),
+              size=wx.Size(200, 25), style=0, value='')
+        self.portNameBox.Enable(True)
+
+        self.OkBtn = wx.Button(id=wxID_PORTDIALOGOKBTN, label='Ok',
+              name='OkBtn', parent=self, pos=wx.Point(275, 291),
+              size=wx.Size(85, 30), style=0)
+        self.OkBtn.SetToolTipString(u'Ok')
+        self.OkBtn.Bind(wx.EVT_BUTTON, self.OnOkBtnButton,
+              id=wxID_PORTDIALOGOKBTN)
+
+        self.staticText1 = wx.StaticText(id=wxID_PORTDIALOGSTATICTEXT1,
+              label=u'Interface', name='staticText1', parent=self,
+              pos=wx.Point(107, 23), size=wx.Size(81, 17), style=0)
+
+        self.ImportBtn = wx.Button(id=wxID_PORTDIALOGIMPORTBTN, label=u'Import',
+              name=u'ImportBtn', parent=self, pos=wx.Point(90, 291),
+              size=wx.Size(85, 30), style=0)
+        self.ImportBtn.SetToolTipString(u'Import an Interface')
+        self.ImportBtn.Enable(True)
+        self.ImportBtn.Bind(wx.EVT_BUTTON, self.OnImportBtnButton,
+              id=wxID_PORTDIALOGIMPORTBTN)
+
+        self.staticText2 = wx.StaticText(id=wxID_PORTDIALOGSTATICTEXT2,
+              label=u'Port Name', name='staticText2', parent=self,
+              pos=wx.Point(295, 56), size=wx.Size(100, 17), style=0)
+
+        self.CancelBtn = wx.Button(id=wxID_PORTDIALOGCANCELBTN, label=u'Cancel',
+              name=u'CancelBtn', parent=self, pos=wx.Point(394, 291),
+              size=wx.Size(85, 30), style=0)
+        self.CancelBtn.Bind(wx.EVT_BUTTON, self.OnCancelBtnButton,
+              id=wxID_PORTDIALOGCANCELBTN)
+
+        self.typeChoice = wx.Choice(choices=["Uses", "Provides"],
+              id=wxID_PORTDIALOGTYPECHOICE, name=u'typeChoice', parent=self,
+              pos=wx.Point(275, 161), size=wx.Size(120, 27), style=0)
+        self.typeChoice.Show(True)
+        self.typeChoice.SetSelection(0)
+        self.typeChoice.Bind(wx.EVT_CHOICE, self.OnChoice1Choice,
+              id=wxID_PORTDIALOGTYPECHOICE)
+
+        self.staticText3 = wx.StaticText(id=wxID_PORTDIALOGSTATICTEXT3,
+              label=u'Port Type', name='staticText3', parent=self,
+              pos=wx.Point(295, 136), size=wx.Size(100, 17), style=0)
+
+        self.intBox = wx.TreeCtrl(id=wxID_PORTDIALOGINTBOX, name=u'intBox',
+              parent=self, pos=wx.Point(16, 43), size=wx.Size(248, 229),
+              style=wx.SIMPLE_BORDER | wx.TR_HAS_BUTTONS | wx.TR_HIDE_ROOT)
+
+    def __init__(self, parent):
+        self._init_ctrls(parent)
+        self.active_comp = parent.active_comp
+        self.Available_Ints = parent.Available_Ints
+        self.display_ints()
+
+    def OnOkBtnButton(self, event):
+        tempLn = self.portNameBox.GetLineText(0)
+                            
+        if tempLn == '':
+            errorMsg(self,'Please enter a port name!')
+            return
+            
+        sn = self.intBox.GetSelection()
+        if sn == self.intBox.GetRootItem() or self.intBox.GetItemParent(sn) == self.intBox.GetRootItem():
+            errorMsg(self,'Please select an Interface!')
+            return   
+            
+        tempType = self.typeChoice.GetSelection()
+        if tempType == wx.NOT_FOUND:
+            errorMsg(self,'Please select a Type!')
+            return 
+        if tempType == 0:
+            typeS = "Uses"
+        else:
+            typeS = "Provides"
+            
+        for p in self.active_comp.ports:
+            if tempLn == p.name and typeS == p.type:
+                errorMsg(self,"Port name <" + tempLn + "> already in use as a '"+typeS+"' port.")
+                return
+        
+        selectedInt = self.intBox.GetPyData(sn)
+        
+        tempP = ComponentClass.Port(tempLn,copy.deepcopy(selectedInt),typeS)
+        self.active_comp.ports.append(tempP)
+        self.Close()
+        event.Skip()
+
+    def display_ints(self):
+        if len(self.Available_Ints)==0:
+            dlg = wx.MessageDialog(self, 'There are no interfaces available.',
+              'Error', wx.OK | wx.ICON_INFORMATION)
+            try:
+                dlg.ShowModal()
+            finally:
+                dlg.Destroy()
+            return
+        self.intBox.DeleteAllItems()
+        ns_list = {}
+        troot = self.intBox.AddRoot("the_root")
+        for i in self.Available_Ints:
+            if i.nameSpace in ns_list:
+                t1 = ns_list[i.nameSpace]
+            else:
+                t1 = self.intBox.AppendItem(troot,i.nameSpace)
+                ns_list[i.nameSpace] = t1
+                
+            t2 = self.intBox.AppendItem(t1,i.name)
+            self.intBox.SetPyData(t2,i)
+            
+        if self.intBox.GetChildrenCount(troot,recursively=False) > 0:
+            cid1,cookie1 = self.intBox.GetFirstChild(troot)
+            self.intBox.SortChildren(cid1)
+            for x in range(self.intBox.GetChildrenCount(troot,recursively=False)-1):
+                cid1,cookie1 = self.intBox.GetNextChild(troot,cookie1)
+                self.intBox.SortChildren(cid1)
+
+    def OnCancelBtnButton(self, event):
+        self.Close()
+        event.Skip()
+
+    def OnChoice1Choice(self, event):
+        event.Skip()
+
+    def OnImportBtnButton(self, event):
+        dlg = wx.FileDialog(self, "Choose an idl file to import", "/home", "", "*.idl", wx.OPEN)
+        tmpPath = ''
+        try:
+            returnCode = dlg.ShowModal()
+            if returnCode == wx.ID_OK:
+                tmpPath = dlg.GetPath()
+            elif returnCode == wx.ID_CANCEL:
+                dlg.Destroy()
+                return
+        finally:
+            dlg.Destroy()
+        print dlg.GetMessage()
+        
+        newInts = importIDL.getInterfaces(tmpPath)
+        tmpMsg = 'You will need to copy <' + tmpPath[(tmpPath.rfind('/')+1):]
+        tmpMsg += '> to /usr/local/include/standardinterfaces in order to '
+        tmpMsg += 'use the generated code.'
+        dlg = wx.MessageDialog(self, tmpMsg,
+          'Note', wx.OK | wx.CANCEL | wx.ICON_INFORMATION)
+        try:
+            returnCode = dlg.ShowModal()
+            if returnCode == wx.ID_CANCEL:
+                dlg.Destroy()
+                return
+        finally:
+            dlg.Destroy()
+        
+        
+        self.Available_Ints.extend(newInts)
+        self.display_ints()
+        
+        event.Skip()
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/NodeDialog.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/NodeDialog.py	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/NodeDialog.py	(revision 4961)
@@ -0,0 +1,75 @@
+#Boa:Dialog:Dialog1
+
+import wx
+from errorMsg import *
+
+def create(parent,nodes,name):
+    return Dialog1(parent,nodes,name)
+
+[wxID_DIALOG1, wxID_DIALOG1CANCEL, wxID_DIALOG1NAMEBOX, 
+ wxID_DIALOG1NODECHOICE, wxID_DIALOG1OK, wxID_DIALOG1STATICTEXT1, 
+ wxID_DIALOG1STATICTEXT2, 
+] = [wx.NewId() for _init_ctrls in range(7)]
+
+class Dialog1(wx.Dialog):
+    def _init_ctrls(self, prnt):
+        # generated method, don't edit
+        wx.Dialog.__init__(self, id=wxID_DIALOG1, name='', parent=prnt,
+              pos=wx.Point(891, 437), size=wx.Size(310, 222),
+              style=wx.DEFAULT_DIALOG_STYLE, title=u'Set Node Info')
+        self.SetClientSize(wx.Size(310, 222))
+        self.SetMaxSize(wx.Size(310, 222))
+        self.SetMinSize(wx.Size(310, 222))
+        self.Center(wx.BOTH)
+
+        self.nameBox = wx.TextCtrl(id=wxID_DIALOG1NAMEBOX, name=u'nameBox',
+              parent=self, pos=wx.Point(25, 48), size=wx.Size(260, 25), style=0,
+              value=u'')
+
+        self.staticText1 = wx.StaticText(id=wxID_DIALOG1STATICTEXT1,
+              label=u'Please enter an instance name for this device.',
+              name='staticText1', parent=self, pos=wx.Point(20, 23),
+              size=wx.Size(270, 17), style=0)
+
+        self.nodeChoice = wx.Choice(choices=[], id=wxID_DIALOG1NODECHOICE,
+              name=u'nodeChoice', parent=self, pos=wx.Point(75, 121),
+              size=wx.Size(160, 27), style=0)
+
+        self.staticText2 = wx.StaticText(id=wxID_DIALOG1STATICTEXT2,
+              label=u'Please choose a deployment node.', name='staticText2',
+              parent=self, pos=wx.Point(53, 96), size=wx.Size(204, 17),
+              style=0)
+
+        self.ok = wx.Button(id=wx.ID_OK, label=u'OK', name=u'ok', parent=self,
+              pos=wx.Point(200, 176), size=wx.Size(85, 30), style=0)
+        self.ok.Bind(wx.EVT_BUTTON, self.OnOkButton, id=wx.ID_OK)
+
+        self.cancel = wx.Button(id=wx.ID_CANCEL, label=u'Cancel',
+              name=u'cancel', parent=self, pos=wx.Point(100, 176),
+              size=wx.Size(85, 30), style=0)
+
+    def __init__(self, parent,nodes,name):
+        self._init_ctrls(parent)
+        self.nameBox.WriteText(name)
+        self.nodeChoice.Clear()
+        for x in nodes:
+            self.nodeChoice.Append(x.name,x)
+        
+        if self.nodeChoice.GetCount() > 0:
+            self.nodeChoice.SetSelection(0)
+
+    def OnOkButton(self, event):
+        pos = self.nodeChoice.GetSelection()
+        if pos == wx.NOT_FOUND:
+            errorMsg(self,"You must select a deployment node.")
+            return 
+        tempLn = self.nameBox.GetLineText(0)
+        if tempLn == '':
+            errorMsg(self,'Invalid instance name.')
+            return
+        
+        self.DeploymentNode = self.nodeChoice.GetClientData(pos)
+        self.InstanceName = tempLn
+        
+        event.Skip()
+        
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/ConnectDialog.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/ConnectDialog.py	(revision 8161)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/ConnectDialog.py	(revision 8161)
@@ -0,0 +1,334 @@
+#Boa:Dialog:ConnectDialog
+
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+import sys
+import os
+from errorMsg import *
+import ComponentClass
+
+def create(parent):
+    return ConnectDialog(parent)
+
+[wxID_CONNECTDIALOG, wxID_CONNECTDIALOGCONLABEL, wxID_CONNECTDIALOGCONNECTBOX, 
+ wxID_CONNECTDIALOGCONNECTBTN, wxID_CONNECTDIALOGDSTBOX, 
+ wxID_CONNECTDIALOGINTLABELDST, wxID_CONNECTDIALOGINTLABELSRC, 
+ wxID_CONNECTDIALOGOKBTN, wxID_CONNECTDIALOGSRCBOX, 
+ wxID_CONNECTDIALOGSTATICBITMAP1, wxID_CONNECTDIALOGSTATICBITMAP2, 
+ wxID_CONNECTDIALOGSTATICBOX1, wxID_CONNECTDIALOGSTATICTEXT1, 
+ wxID_CONNECTDIALOGSTATICTEXT2, wxID_CONNECTDIALOGSTATICTEXT3, 
+ wxID_CONNECTDIALOGSTATICTEXT4, wxID_CONNECTDIALOGSTATICTEXT5, 
+ wxID_CONNECTDIALOGSTATICTEXT6, 
+] = [wx.NewId() for _init_ctrls in range(18)]
+
+class ConnectDialog(wx.Dialog):
+    def _init_coll_imageList1_Images(self, parent):
+        # generated method, don't edit
+
+        root = __file__
+        if os.path.islink (root):
+              root = os.path.realpath (root)
+        root = os.path.dirname (os.path.abspath (root))
+        parent.Add(bitmap=wx.Bitmap( root + '/images/uses.bmp', wx.BITMAP_TYPE_BMP),
+              mask=wx.NullBitmap)
+        parent.Add(bitmap=wx.Bitmap( root + '/images/provides.bmp', wx.BITMAP_TYPE_BMP),
+              mask=wx.NullBitmap)
+
+    def _init_utils(self):
+        # generated method, don't edit
+        self.imageList1 = wx.ImageList(height=16, width=16)
+        self._init_coll_imageList1_Images(self.imageList1)
+
+    def _init_ctrls(self, prnt):
+        # generated method, don't edit
+        wx.Dialog.__init__(self, id=wxID_CONNECTDIALOG, name='ConnectDialog',
+              parent=prnt, pos=wx.Point(727, 264), size=wx.Size(638, 567),
+              style=wx.DEFAULT_DIALOG_STYLE, title='Connections')
+        self._init_utils()
+        self.SetClientSize(wx.Size(638, 567))
+        self.Center(wx.BOTH)
+
+        self.ConnectBtn = wx.Button(id=wxID_CONNECTDIALOGCONNECTBTN,
+              label='Connect', name='ConnectBtn', parent=self, pos=wx.Point(239,
+              182), size=wx.Size(85, 30), style=0)
+        self.ConnectBtn.Bind(wx.EVT_BUTTON, self.OnConnectBtnButton,
+              id=wxID_CONNECTDIALOGCONNECTBTN)
+
+        self.ConLabel = wx.StaticText(id=wxID_CONNECTDIALOGCONLABEL,
+              label='None', name='ConLabel', parent=self, pos=wx.Point(29, 21),
+              size=wx.Size(31, 17), style=0)
+
+        self.OkBtn = wx.Button(id=wxID_CONNECTDIALOGOKBTN, label=u'Ok',
+              name=u'OkBtn', parent=self, pos=wx.Point(488, 496),
+              size=wx.Size(85, 30), style=0)
+        self.OkBtn.Bind(wx.EVT_BUTTON, self.OnOkBtnButton,
+              id=wxID_CONNECTDIALOGOKBTN)
+
+        self.srcBox = wx.TreeCtrl(id=wxID_CONNECTDIALOGSRCBOX, name=u'srcBox',
+              parent=self, pos=wx.Point(24, 48), size=wx.Size(199, 296),
+              style=wx.SIMPLE_BORDER | wx.TR_HAS_BUTTONS | wx.TR_HIDE_ROOT)
+        self.srcBox.SetImageList(self.imageList1)
+        self.srcBox.SetBestFittingSize(wx.Size(199, 296))
+        self.srcBox.Bind(wx.EVT_LEFT_UP, self.OnSrcBoxLeftUp)
+
+        self.dstBox = wx.TreeCtrl(id=wxID_CONNECTDIALOGDSTBOX, name=u'dstBox',
+              parent=self, pos=wx.Point(340, 48), size=wx.Size(278, 296),
+              style=wx.SIMPLE_BORDER | wx.TR_HAS_BUTTONS | wx.TR_HIDE_ROOT)
+        self.dstBox.SetImageList(self.imageList1)
+        self.dstBox.SetBestFittingSize(wx.Size(278, 296))
+        self.dstBox.Bind(wx.EVT_LEFT_UP, self.OnDstBoxLeftUp)
+
+        self.connectBox = wx.ListBox(choices=[],
+              id=wxID_CONNECTDIALOGCONNECTBOX, name=u'connectBox', parent=self,
+              pos=wx.Point(52, 429), size=wx.Size(401, 118), style=0)
+        self.connectBox.SetBestFittingSize(wx.Size(401, 118))
+
+        self.staticText1 = wx.StaticText(id=wxID_CONNECTDIALOGSTATICTEXT1,
+              label=u'Connections', name='staticText1', parent=self,
+              pos=wx.Point(214, 405), size=wx.Size(105, 17), style=0)
+
+        self.staticText2 = wx.StaticText(id=wxID_CONNECTDIALOGSTATICTEXT2,
+              label=u'Available ports to connect to:', name='staticText2',
+              parent=self, pos=wx.Point(394, 21), size=wx.Size(235, 17),
+              style=0)
+
+        self.intLabelSrc = wx.StaticText(id=wxID_CONNECTDIALOGINTLABELSRC,
+              label=u'intLabelSrc', name=u'intLabelSrc', parent=self,
+              pos=wx.Point(120, 352), size=wx.Size(65, 17), style=0)
+
+        self.intLabelDst = wx.StaticText(id=wxID_CONNECTDIALOGINTLABELDST,
+              label=u'intLabelDst', name=u'intLabelDst', parent=self,
+              pos=wx.Point(466, 352), size=wx.Size(66, 17), style=0)
+
+        self.staticText3 = wx.StaticText(id=wxID_CONNECTDIALOGSTATICTEXT3,
+              label=u'Interface:', name='staticText3', parent=self,
+              pos=wx.Point(30, 352), size=wx.Size(67, 17), style=0)
+        self.staticText3.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD,
+              False, u'Sans'))
+
+        self.staticText4 = wx.StaticText(id=wxID_CONNECTDIALOGSTATICTEXT4,
+              label=u'Interface:', name='staticText4', parent=self,
+              pos=wx.Point(386, 352), size=wx.Size(67, 17), style=0)
+        self.staticText4.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD,
+              False, u'Sans'))
+
+        self.staticBox1 = wx.StaticBox(id=wxID_CONNECTDIALOGSTATICBOX1,
+              label=u'Legend', name='staticBox1', parent=self, pos=wx.Point(233,
+              264), size=wx.Size(96, 68), style=0)
+        self.staticBox1.SetBestFittingSize(wx.Size(96, 68))
+
+        root = __file__
+        if os.path.islink (root):
+              root = os.path.realpath (root)
+        root = os.path.dirname (os.path.abspath (root))
+        self.staticBitmap1 = wx.StaticBitmap(bitmap=wx.Bitmap( root+ '/images/uses.bmp',
+              wx.BITMAP_TYPE_BMP), id=wxID_CONNECTDIALOGSTATICBITMAP1,
+              name='staticBitmap1', parent=self, pos=wx.Point(245, 286),
+              size=wx.Size(16, 16), style=0)
+
+        self.staticBitmap2 = wx.StaticBitmap(bitmap=wx.Bitmap( root + '/images/provides.bmp',
+              wx.BITMAP_TYPE_BMP), id=wxID_CONNECTDIALOGSTATICBITMAP2,
+              name='staticBitmap2', parent=self, pos=wx.Point(245, 306),
+              size=wx.Size(16, 16), style=0)
+
+        self.staticText5 = wx.StaticText(id=wxID_CONNECTDIALOGSTATICTEXT5,
+              label=u'Uses', name='staticText5', parent=self, pos=wx.Point(269,
+              284), size=wx.Size(55, 17), style=0)
+
+        self.staticText6 = wx.StaticText(id=wxID_CONNECTDIALOGSTATICTEXT6,
+              label=u'Provides', name='staticText6', parent=self,
+              pos=wx.Point(269, 304), size=wx.Size(60, 17), style=0)
+
+    def __init__(self, parent):
+        self._init_ctrls(parent)
+        self.parent = parent
+        self.active_comp = parent.active_comp
+        
+        # Set the label for the Component box
+        t = self.active_comp.name +" ports:"
+        self.ConLabel.SetLabel(t)
+        
+        # Set the interface labels to nothing
+        self.intLabelSrc.SetLabel('')
+        self.intLabelDst.SetLabel('')
+        
+        # Add the available ports on the Component
+        srcRoot= self.srcBox.AddRoot("src_root")
+        for p in self.active_comp.ports:
+            if p.type == 'Uses':
+                t1 = self.srcBox.AppendItem(srcRoot,p.name,image=0)
+            else:
+                t1 = self.srcBox.AppendItem(srcRoot,p.name,image=1)
+            self.srcBox.SetPyData(t1,p)
+        
+        # Add the available ports from all the other Components
+        dstRoot = self.dstBox.AddRoot("dst_root")
+        compRoot = self.dstBox.AppendItem(dstRoot,"Components")
+        devRoot = self.dstBox.AppendItem(dstRoot,"Devices")
+        for c in parent.active_wave:
+            t1 = self.dstBox.AppendItem(compRoot,c.name)
+            self.dstBox.SetPyData(t1,c)
+            for p in c.ports:
+                if p.type == 'Uses':
+                    t2 = self.dstBox.AppendItem(t1,p.name,image=0)
+                else:
+                    t2 = self.dstBox.AppendItem(t1,p.name,image=1)
+                self.dstBox.SetPyData(t2,p)
+            self.dstBox.Expand(t1)
+        
+        for n in self.parent.active_plat.nodes:
+            t1 = self.dstBox.AppendItem(devRoot,n.name)
+            self.dstBox.SetPyData(t1,n)    
+            for d in n.Devices:
+                t2 = self.dstBox.AppendItem(t1,unicode(d.name))
+                self.dstBox.SetPyData(t2,d)
+                for p in d.ports:
+                    if p.type == 'Uses':
+                        t3 = self.dstBox.AppendItem(t2,p.name,image=0)
+                    else:
+                        t3 = self.dstBox.AppendItem(t2,p.name,image=1)
+                    self.dstBox.SetPyData(t3,p)
+                        
+                self.dstBox.Expand(t2)
+            self.dstBox.Expand(t1)
+        
+        self.displayConnections()
+
+    def OnConnectBtnButton(self, event):
+        srcOK = self.checkSrcBox()
+        dstOK = self.checkDstBox()
+        
+        if not srcOK or not dstOK:
+            return        
+        else:
+            srcSel = self.srcBox.GetSelection()
+            dstSel = self.dstBox.GetSelection()        
+            # both the source and destination boxes have ports selected
+            srcP = self.srcBox.GetPyData(srcSel)
+            dstP = self.dstBox.GetPyData(dstSel)
+            dstC = self.dstBox.GetPyData(self.dstBox.GetItemParent(dstSel))
+            
+            if (srcP.type == 'Uses' and dstP.type == 'Uses') or \
+                (srcP.type == 'Provides' and dstP.type == 'Provides'):
+                errorMsg(self,"Ports cannot be of same type")
+                return
+            newCon = ComponentClass.Connection(srcP,dstP,dstC)
+            tmpflag,tmpcomp = self.checkConnection(newCon)
+            if tmpflag == True:
+                self.active_comp.connections.append(newCon)
+                self.displayConnections()
+            else:
+                errorMsg(self,"A duplicate connection exists on <"+tmpcomp+">.")
+            
+        event.Skip()
+        
+    def displayConnections(self):
+        self.connectBox.Clear()
+        cnames = []
+        for x in self.active_comp.connections:
+            tmpS = x.localPort.name + " ==> " + x.remoteComp.name + "::" + x.remotePort.name
+            cnames.append(tmpS)
+        if len(cnames) != 0:
+            self.connectBox.InsertItems(cnames,0)
+ 
+
+    def OnOkBtnButton(self, event):
+        self.Close()
+        event.Skip()
+
+    def checkConnection(self,newCon):
+        """This function checks for duplicate connections on both components"""
+        for c in self.active_comp.connections:
+            if c.remoteComp.uuid == newCon.remoteComp.uuid and \
+                c.localPort.name == newCon.localPort.name and \
+                c.remotePort.name == newCon.remotePort.name and \
+                c.localPort.type == newCon.localPort.type:
+                    
+                return False,self.active_comp.name
+                
+        for c in newCon.remoteComp.connections:
+            if c.remoteComp.uuid == self.active_comp.uuid and \
+                c.localPort.name == newCon.remotePort.name and \
+                c.remotePort.name == newCon.localPort.name and \
+                c.localPort.type == newCon.remotePort.type:
+                    
+                return False,newCon.remoteComp.name
+            
+        return True,''
+
+    def OnSrcBoxLeftUp(self, event):
+        sn = self.srcBox.GetSelection()
+        if self.srcBox.GetItemParent(sn) == self.srcBox.GetRootItem():
+            tempInt = self.srcBox.GetPyData(sn)
+            self.intLabelSrc.SetLabel(tempInt.interface.name)
+        else:
+            self.intLabelSrc.SetLabel('')
+            return
+        event.Skip()
+
+    def OnDstBoxLeftUp(self, event):
+        sn = self.dstBox.GetSelection()
+        if sn == self.dstBox.GetRootItem():
+            self.intLabelDst.SetLabel('')
+            #return
+        elif self.dstBox.GetItemParent(sn) == self.dstBox.GetRootItem():
+            self.intLabelDst.SetLabel('')
+            #return
+        else:
+            tempP = self.dstBox.GetPyData(sn)
+            if isinstance(tempP,ComponentClass.Port):
+                self.intLabelDst.SetLabel(tempP.interface.name)
+            #return
+        event.Skip()
+            
+            
+    def checkSrcBox(self):
+        srcSel = self.srcBox.GetSelection()
+        
+        if srcSel == self.srcBox.GetRootItem():
+            # nothing is selected in the source box
+            errorMsg(self,"Please select a source Port")
+            return False
+        else:
+            return True
+        
+    def checkDstBox(self):
+        dstSel = self.dstBox.GetSelection()
+        
+        if dstSel == self.dstBox.GetRootItem():
+            # nothing is selected in the source box
+            errorMsg(self,"Please select a destination Port")
+            return False
+        elif self.dstBox.GetItemParent(dstSel) == self.dstBox.GetRootItem():
+            # a main level component was selected for the destination
+            errorMsg(self,"Invalid destination selection.")
+            return False
+        else:
+            tmpP = self.dstBox.GetPyData(dstSel)
+            if isinstance(tmpP,ComponentClass.Port):
+                return True
+            else:
+                errorMsg(self,"Invalid destination selection.")
+                return False
+                
+            
+            
+            
+            
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/datatypemap.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/datatypemap.py	(revision 9912)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/datatypemap.py	(revision 9912)
@@ -0,0 +1,22 @@
+import os
+
+datatypes = {}
+datatypes["boolean"] = "Boolean"
+datatypes["char"] = "Char"
+datatypes["double"] = "Double"
+datatypes["float"] = "Float"
+datatypes["short"] = "Short"
+datatypes["long"] = "Long"
+datatypes["objref"] = "Object_var"
+datatypes["octet"] = "Octet"
+datatypes["string"] = "String_var"
+datatypes["ulong"] = "ULong"
+datatypes["ushort"] = "UShort"
+
+def getDatatype(thetype):
+    try:
+        str_type = datatypes[thetype]
+    except KeyError:
+        str_type = ""
+    return str_type
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/PlatformClass.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/PlatformClass.py	(revision 5886)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/PlatformClass.py	(revision 5886)
@@ -0,0 +1,29 @@
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+# Platform Class
+class Platform:
+  def __init__(self, name=""):
+    self.name = name
+    self.nodes = []
+
+#  
+#class Node:
+#    def __init__(self,name=""):
+#        self.name = name
+#        self.devices = []
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/wd.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/wd.py	(revision 4961)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/wd.py	(revision 4961)
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+#Boa:App:BoaApp
+
+## Copyright 2005, 2006 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+
+import MainFrame
+
+modules ={'AboutDialog': [0, '', 'AboutDialog.py'],
+ 'ComponentClass': [0, '', 'ComponentClass.py'],
+ 'ComponentFrame': [0, '', 'ComponentFrame.py'],
+ 'ConnectDialog': [0, '', 'ConnectDialog.py'],
+ 'MainFrame': [1, 'Main frame of Application', 'MainFrame.py'],
+ u'NodeDialog': [0, '', u'NodeDialog.py'],
+ 'PortDialog': [0, '', 'PortDialog.py'],
+ u'PropertiesDialog': [0, '', u'PropertiesDialog.py'],
+ 'WaveformClass': [0, '', 'WaveformClass.py'],
+ u'application_gen': [0, '', u'XML_gen/application_gen.py'],
+ u'component_gen': [0, '', u'XML_gen/component_gen.py'],
+ 'genStructure': [0, '', 'generate/genStructure.py']}
+
+class BoaApp(wx.App):
+    def OnInit(self):
+        wx.InitAllImageHandlers()
+        self.main = MainFrame.create(None)
+        self.main.Show()
+        self.SetTopWindow(self.main)
+        return True
+
+def main():
+    application = BoaApp(0)
+    application.MainLoop()
+
+if __name__ == '__main__':
+    main()
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/WaveformClass.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/WaveformClass.py	(revision 5886)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/WaveformClass.py	(revision 5886)
@@ -0,0 +1,29 @@
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+class Waveform:
+    def __init__(self,name=""):
+        self.name = name
+        self.components = []
+        self.devices = []
+        self.ace = False
+    
+    def __getitem__(self,i):
+        return self.components[i]
+
+        
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/PropertiesDialog.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/PropertiesDialog.py	(revision 8161)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/PropertiesDialog.py	(revision 8161)
@@ -0,0 +1,639 @@
+#Boa:Dialog:PropertiesDialog
+
+import os
+import wx
+import wx.gizmos
+import ComponentClass as CC
+from errorMsg import *
+import commands
+import uuidgen
+
+def create(parent):
+    return PropertiesDialog(parent)
+
+[wxID_PROPERTIESDIALOG, wxID_PROPERTIESDIALOGACTIONCHOICE,
+ wxID_PROPERTIESDIALOGADDPROP, wxID_PROPERTIESDIALOGADDVALUE,
+ wxID_PROPERTIESDIALOGCANCEL, wxID_PROPERTIESDIALOGDESCRIPTION,
+ wxID_PROPERTIESDIALOGELEMENTCHOICE, wxID_PROPERTIESDIALOGENUMBOX,
+ wxID_PROPERTIESDIALOGIDBOX, wxID_PROPERTIESDIALOGKINDCHOICE,
+ wxID_PROPERTIESDIALOGMAXBOX, wxID_PROPERTIESDIALOGMINBOX,
+ wxID_PROPERTIESDIALOGMODECHOICE, wxID_PROPERTIESDIALOGNAMEBOX,
+ wxID_PROPERTIESDIALOGOK, wxID_PROPERTIESDIALOGSASHWINDOW1,
+ wxID_PROPERTIESDIALOGSASHWINDOW2, wxID_PROPERTIESDIALOGSPLITTERWINDOW1,
+ wxID_PROPERTIESDIALOGSTATICTEXT1, wxID_PROPERTIESDIALOGSTATICTEXT10,
+ wxID_PROPERTIESDIALOGSTATICTEXT11, wxID_PROPERTIESDIALOGSTATICTEXT12,
+ wxID_PROPERTIESDIALOGSTATICTEXT2, wxID_PROPERTIESDIALOGSTATICTEXT3,
+ wxID_PROPERTIESDIALOGSTATICTEXT4, wxID_PROPERTIESDIALOGSTATICTEXT5,
+ wxID_PROPERTIESDIALOGSTATICTEXT6, wxID_PROPERTIESDIALOGSTATICTEXT7,
+ wxID_PROPERTIESDIALOGSTATICTEXT8, wxID_PROPERTIESDIALOGSTATICTEXT9,
+ wxID_PROPERTIESDIALOGTYPECHOICE, wxID_PROPERTIESDIALOGUNITSCHOICE,
+ wxID_PROPERTIESDIALOGVALUEBOX, wxID_PROPERTIESDIALOGVALUELIST,
+] = [wx.NewId() for _init_ctrls in range(34)]
+
+[wxID_PROPERTIESDIALOGVALUELISTPOPUPREMOVE] = [wx.NewId() for _init_coll_valueListPopup_Items in range(1)]
+
+class PropertiesDialog(wx.Dialog):
+    def _init_coll_valueListPopup_Items(self, parent):
+        # generated method, don't edit
+
+        parent.Append(help='', id=wxID_PROPERTIESDIALOGVALUELISTPOPUPREMOVE,
+              kind=wx.ITEM_NORMAL, text=u'Remove')
+        self.Bind(wx.EVT_MENU, self.OnValueListPopupRemoveMenu,
+              id=wxID_PROPERTIESDIALOGVALUELISTPOPUPREMOVE)
+
+    def _init_coll_valueList_Columns(self, parent):
+        # generated method, don't edit
+
+        parent.InsertColumn(col=0, format=wx.LIST_FORMAT_LEFT, heading=u'Value',
+              width=92)
+        parent.InsertColumn(col=1, format=wx.LIST_FORMAT_LEFT,
+              heading=u'Default', width=92)
+
+    def _init_utils(self):
+        # generated method, don't edit
+        self.valueListPopup = wx.Menu(title=u'')
+
+        self._init_coll_valueListPopup_Items(self.valueListPopup)
+
+    def _init_ctrls(self, prnt):
+        # generated method, don't edit
+        wx.Dialog.__init__(self, id=wxID_PROPERTIESDIALOG,
+              name=u'PropertiesDialog', parent=prnt, pos=wx.Point(483, 325),
+              size=wx.Size(775, 446), style=wx.DEFAULT_DIALOG_STYLE,
+              title=u'Properties')
+        self._init_utils()
+        self.SetClientSize(wx.Size(775, 446))
+        self.Center(wx.BOTH)
+        self.Bind(wx.EVT_ACTIVATE, self.OnPropertiesDialogActivate)
+
+        self.AddProp = wx.Button(id=wxID_PROPERTIESDIALOGADDPROP,
+              label=u'Add Property', name=u'AddProp', parent=self,
+              pos=wx.Point(439, 399), size=wx.Size(125, 30), style=0)
+        self.AddProp.Bind(wx.EVT_BUTTON, self.OnAddPropButton,
+              id=wxID_PROPERTIESDIALOGADDPROP)
+
+        self.splitterWindow1 = wx.SplitterWindow(id=wxID_PROPERTIESDIALOGSPLITTERWINDOW1,
+              name='splitterWindow1', parent=self, point=wx.Point(8, 79),
+              size=wx.Size(760, 308), style=wx.ALWAYS_SHOW_SB | wx.SP_3D)
+        self.splitterWindow1.SetBestFittingSize(wx.Size(760, 305))
+
+        self.sashWindow2 = wx.SashWindow(id=wxID_PROPERTIESDIALOGSASHWINDOW2,
+              name='sashWindow2', parent=self.splitterWindow1, pos=wx.Point(204,
+              0), size=wx.Size(556, 305),
+              style=wx.ALWAYS_SHOW_SB | wx.CLIP_CHILDREN | wx.HSCROLL | wx.VSCROLL | wx.SW_3D)
+        self.sashWindow2.SetAutoLayout(True)
+        self.sashWindow2.SetBestFittingSize(wx.Size(556, 285))
+        self.sashWindow2.SetMaximumSizeY(375)
+
+        self.nameBox = wx.TextCtrl(id=wxID_PROPERTIESDIALOGNAMEBOX,
+              name=u'nameBox', parent=self, pos=wx.Point(208, 40),
+              size=wx.Size(144, 25), style=0, value=u'')
+
+        self.idBox = wx.TextCtrl(id=wxID_PROPERTIESDIALOGIDBOX, name=u'idBox',
+              parent=self, pos=wx.Point(360, 40), size=wx.Size(283, 25),
+              style=0, value=u'')
+
+        self.typeChoice = wx.Choice(choices=["boolean", "char", "double",
+              "float", "short", "long", "objref", "octet", "string", "ulong",
+              "ushort"], id=wxID_PROPERTIESDIALOGTYPECHOICE, name=u'typeChoice',
+              parent=self.sashWindow2, pos=wx.Point(32, 105), size=wx.Size(100,
+              27), style=0)
+        self.typeChoice.SetBestFittingSize(wx.Size(100, 27))
+
+        self.elementChoice = wx.Choice(choices=["Simple", "SimpleSequence",
+              "Test", "Struct", "StructSequence"],
+              id=wxID_PROPERTIESDIALOGELEMENTCHOICE, name=u'elementChoice',
+              parent=self, pos=wx.Point(32, 40), size=wx.Size(152, 27),
+              style=0)
+        self.elementChoice.Bind(wx.EVT_CHOICE, self.OnElementChoiceChoice,
+              id=wxID_PROPERTIESDIALOGELEMENTCHOICE)
+
+        self.modeChoice = wx.Choice(choices=["readonly", "readwrite",
+              "writeonly"], id=wxID_PROPERTIESDIALOGMODECHOICE,
+              name=u'modeChoice', parent=self, pos=wx.Point(653, 39),
+              size=wx.Size(104, 27), style=0)
+
+        self.description = wx.TextCtrl(id=wxID_PROPERTIESDIALOGDESCRIPTION,
+              name=u'description', parent=self.sashWindow2, pos=wx.Point(16,
+              32), size=wx.Size(272, 40), style=wx.TE_MULTILINE, value=u'')
+
+        self.unitsChoice = wx.Choice(choices=["None", "Hz", "W", "V", "cycles_per_sample"],
+              id=wxID_PROPERTIESDIALOGUNITSCHOICE, name=u'unitsChoice',
+              parent=self.sashWindow2, pos=wx.Point(185, 105), size=wx.Size(85,
+              27), style=0)
+        self.unitsChoice.SetBestFittingSize(wx.Size(85, 27))
+
+        self.minBox = wx.TextCtrl(id=wxID_PROPERTIESDIALOGMINBOX,
+              name=u'minBox', parent=self.sashWindow2, pos=wx.Point(184, 236),
+              size=wx.Size(80, 25), style=0, value=u'min')
+
+        self.maxBox = wx.TextCtrl(id=wxID_PROPERTIESDIALOGMAXBOX,
+              name=u'maxBox', parent=self.sashWindow2, pos=wx.Point(184, 268),
+              size=wx.Size(80, 25), style=0, value=u'max')
+
+        self.staticText1 = wx.StaticText(id=wxID_PROPERTIESDIALOGSTATICTEXT1,
+              label=u'Description', name='staticText1', parent=self.sashWindow2,
+              pos=wx.Point(16, 11), size=wx.Size(76, 17), style=0)
+
+        self.kindChoice = wx.Choice(choices=["allocation", "configure", "test",
+              "execparam", "factoryparam"], id=wxID_PROPERTIESDIALOGKINDCHOICE,
+              name=u'kindChoice', parent=self.sashWindow2, pos=wx.Point(27,
+              170), size=wx.Size(110, 27), style=0)
+        self.kindChoice.SetBestFittingSize(wx.Size(110, 27))
+        self.kindChoice.Bind(wx.EVT_CHOICE, self.OnKindChoiceChoice,
+              id=wxID_PROPERTIESDIALOGKINDCHOICE)
+
+        self.staticText2 = wx.StaticText(id=wxID_PROPERTIESDIALOGSTATICTEXT2,
+              label=u'Type', name='staticText2', parent=self.sashWindow2,
+              pos=wx.Point(65, 84), size=wx.Size(39, 17), style=0)
+
+        self.staticText3 = wx.StaticText(id=wxID_PROPERTIESDIALOGSTATICTEXT3,
+              label=u'Units', name='staticText3', parent=self.sashWindow2,
+              pos=wx.Point(212, 84), size=wx.Size(41, 17), style=0)
+
+        self.staticText4 = wx.StaticText(id=wxID_PROPERTIESDIALOGSTATICTEXT4,
+              label=u'Kind', name='staticText4', parent=self.sashWindow2,
+              pos=wx.Point(69, 149), size=wx.Size(36, 17), style=0)
+
+        self.staticText5 = wx.StaticText(id=wxID_PROPERTIESDIALOGSTATICTEXT5,
+              label=u'Range', name='staticText5', parent=self.sashWindow2,
+              pos=wx.Point(205, 215), size=wx.Size(48, 17), style=0)
+
+        self.staticText6 = wx.StaticText(id=wxID_PROPERTIESDIALOGSTATICTEXT6,
+              label=u'Value(s)', name='staticText6', parent=self.sashWindow2,
+              pos=wx.Point(362, 23), size=wx.Size(58, 17), style=0)
+
+        self.sashWindow1 = wx.SashWindow(id=wxID_PROPERTIESDIALOGSASHWINDOW1,
+              name='sashWindow1', parent=self.splitterWindow1, pos=wx.Point(0,
+              0), size=wx.Size(199, 305), style=wx.CLIP_CHILDREN | wx.SW_3D)
+        self.splitterWindow1.SplitVertically(self.sashWindow1, self.sashWindow2,
+              200)
+
+        self.valueBox = wx.TextCtrl(id=wxID_PROPERTIESDIALOGVALUEBOX,
+              name=u'valueBox', parent=self.sashWindow2, pos=wx.Point(336, 44),
+              size=wx.Size(100, 25), style=0, value=u'')
+        self.valueBox.SetBestFittingSize(wx.Size(100, 25))
+
+        root = __file__
+        if os.path.islink (root):
+              root = os.path.realpath (root)
+        root = os.path.dirname (os.path.abspath (root))
+        self.addValue = wx.BitmapButton(bitmap=wx.Bitmap( root + '/images/plus.bmp',
+              wx.BITMAP_TYPE_BMP), id=wxID_PROPERTIESDIALOGADDVALUE,
+              name=u'addValue', parent=self.sashWindow2, pos=wx.Point(456, 44),
+              size=wx.Size(24, 24), style=wx.BU_AUTODRAW)
+        self.addValue.Bind(wx.EVT_BUTTON, self.OnAddValueButton,
+              id=wxID_PROPERTIESDIALOGADDVALUE)
+
+        self.staticText7 = wx.StaticText(id=wxID_PROPERTIESDIALOGSTATICTEXT7,
+              label=u'Element Type', name='staticText7', parent=self,
+              pos=wx.Point(57, 16), size=wx.Size(141, 17), style=0)
+
+        self.staticText8 = wx.StaticText(id=wxID_PROPERTIESDIALOGSTATICTEXT8,
+              label=u'Name', name='staticText8', parent=self, pos=wx.Point(252,
+              16), size=wx.Size(45, 17), style=0)
+
+        self.staticText9 = wx.StaticText(id=wxID_PROPERTIESDIALOGSTATICTEXT9,
+              label=u'ID', name='staticText9', parent=self, pos=wx.Point(485,
+              16), size=wx.Size(24, 17), style=0)
+
+        self.staticText10 = wx.StaticText(id=wxID_PROPERTIESDIALOGSTATICTEXT10,
+              label=u'Mode', name='staticText10', parent=self, pos=wx.Point(687,
+              16), size=wx.Size(42, 17), style=0)
+
+        self.valueList = wx.ListCtrl(id=wxID_PROPERTIESDIALOGVALUELIST,
+              name=u'valueList', parent=self.sashWindow2, pos=wx.Point(316, 82),
+              size=wx.Size(185, 206),
+              style=wx.ALWAYS_SHOW_SB | wx.LC_EDIT_LABELS | wx.LC_VRULES | wx.LC_REPORT | wx.SIMPLE_BORDER | wx.LC_HRULES | wx.VSCROLL | wx.LC_SINGLE_SEL)
+        self.valueList.SetBestFittingSize(wx.Size(185, 206))
+        self._init_coll_valueList_Columns(self.valueList)
+        self.valueList.Bind(wx.EVT_RIGHT_UP, self.OnValueListRightUp)
+
+        self.Cancel = wx.Button(id=wxID_PROPERTIESDIALOGCANCEL, label=u'Cancel',
+              name=u'Cancel', parent=self, pos=wx.Point(680, 399),
+              size=wx.Size(85, 30), style=0)
+        self.Cancel.Bind(wx.EVT_BUTTON, self.OnCancelButton,
+              id=wxID_PROPERTIESDIALOGCANCEL)
+
+        self.enumBox = wx.TextCtrl(id=wxID_PROPERTIESDIALOGENUMBOX,
+              name=u'enumBox', parent=self.sashWindow2, pos=wx.Point(20, 251),
+              size=wx.Size(125, 25), style=0, value=u'')
+
+        self.staticText11 = wx.StaticText(id=wxID_PROPERTIESDIALOGSTATICTEXT11,
+              label=u'Enumeration', name=u'staticText11',
+              parent=self.sashWindow2, pos=wx.Point(36, 230), size=wx.Size(90,
+              17), style=0)
+
+        self.ok = wx.Button(id=wxID_PROPERTIESDIALOGOK, label=u'OK', name=u'ok',
+              parent=self, pos=wx.Point(579, 399), size=wx.Size(85, 30),
+              style=0)
+        self.ok.Bind(wx.EVT_BUTTON, self.OnOkButton, id=wxID_PROPERTIESDIALOGOK)
+
+        self.actionChoice = wx.Choice(choices=["eq", "ne", "gt", "lt", "ge",
+              "le", "external"], id=wxID_PROPERTIESDIALOGACTIONCHOICE,
+              name=u'actionChoice', parent=self.sashWindow2, pos=wx.Point(185,
+              170), size=wx.Size(85, 27), style=0)
+
+        self.staticText12 = wx.StaticText(id=wxID_PROPERTIESDIALOGSTATICTEXT12,
+              label=u'Action', name='staticText12', parent=self.sashWindow2,
+              pos=wx.Point(209, 149), size=wx.Size(50, 17), style=0)
+
+    def __init__(self, parent):
+        self._init_ctrls(parent)
+        self.parent = parent
+        self.calledByParent = False
+        self.active_prop = None
+
+    def OnPropertiesDialogActivate(self, event):
+        if self.calledByParent == True:
+
+            self.active_comp = self.parent.active_comp
+
+            if self.active_prop == None:
+                self.elementType = "Simple"
+                self.elementChoice.SetSelection(0)
+                self.modeChoice.SetSelection(0)
+                self.typeChoice.SetStringSelection("short")
+                self.kindChoice.SetStringSelection("configure")
+                self.unitsChoice.SetStringSelection("None")
+                self.AddProp.Enable(True)
+                self.idBox.SetValue("DCE:"+uuidgen.uuidgen())
+                self.ok.Enable(False)
+            else:
+                #read in the property and display
+                self.AddProp.Enable(False)
+                self.ok.Enable(True)
+                self.idBox.SetValue(self.active_prop.id)
+                self.nameBox.SetValue(self.active_prop.name)
+                tmp = self.modeChoice.FindString(self.active_prop.mode)
+                self.modeChoice.SetSelection(tmp)
+                self.elementType = self.active_prop.elementType
+                tmp = self.elementChoice.FindString(self.elementType)
+                self.elementChoice.SetSelection(tmp)
+                self.description.SetValue(self.active_prop.description)
+
+                self.initializeDisplay()
+
+            self.unitsChoice.Enable(False) # we don't support units yet
+
+            self.refreshDisplay()
+
+            self.calledByParent = False
+        event.Skip()
+
+    def OnPropBoxLeftUp(self, event):
+        self.propBox.Refresh()
+
+        event.Skip()
+
+    def OnElementChoiceChoice(self, event):
+        pos = self.elementChoice.GetSelection()
+        if pos == wx.NOT_FOUND:
+            return
+        self.elementType = self.elementChoice.GetString(pos)
+        if self.elementType != "Simple" and self.elementType != "SimpleSequence":
+            errorMsg(self,'This element type is not supported yet!')
+            self.elementType = "Simple"
+            self.elementChoice.SetSelection(0)
+
+        self.refreshDisplay()
+        event.Skip()
+
+    def refreshDisplay(self):
+        if self.active_prop != None:
+
+            if self.active_prop.elementType == "Simple":
+                pass
+        if self.elementType == "Simple":
+            if self.valueList.GetItemCount() >= 1:
+                self.addValue.Enable(False)
+            else:
+                self.addValue.Enable(True)
+            self.enumBox.Enable(True)
+
+            pos = self.kindChoice.GetSelection()
+            if pos != wx.NOT_FOUND:
+                if self.kindChoice.GetString(pos) == "allocation":
+                    self.actionChoice.Enable(True)
+                else:
+                    self.actionChoice.Enable(False)
+
+        elif self.elementType == "SimpleSequence":
+            self.addValue.Enable(True)
+            self.enumBox.Enable(False)
+
+    def initializeDisplay(self):
+        if self.elementType == "Simple" or self.elementType == "SimpleSequence":
+            # Load the type (ie. long, string, boolean)
+            pos = self.typeChoice.FindString(self.active_prop.type)
+            self.typeChoice.SetSelection(pos)
+
+            # Load the action (ie. eq, lt, ge)
+            if self.active_prop.action != None:
+                pos = self.actionChoice.FindString(self.active_prop.action)
+                self.actionChoice.SetSelection(pos)
+
+            # Load the kind (ie. allocation, configure, execparam)
+            pos = self.kindChoice.FindString(self.active_prop.kind)
+            self.kindChoice.SetSelection(pos)
+
+            # Load the range of the value(s)
+            if self.active_prop.range[0] == -1 and self.active_prop.range[1] == -1:
+                pass
+            else:
+                self.minBox.SetValue(str(self.active_prop.range[0]))
+                self.maxBox.SetValue(str(self.active_prop.range[1]))
+
+            # If this is already installed on the system - can't change anything but the value(s)
+            if self.editable == False:
+                self.nameBox.Enable(False)
+                self.idBox.Enable(False)
+                self.typeChoice.Enable(False)
+                self.kindChoice.Enable(False)
+                self.elementChoice.Enable(False)
+                self.actionChoice.Enable(False)
+                self.enumBox.Enable(False)
+                self.minBox.Enable(False)
+                self.maxBox.Enable(False)
+                self.modeChoice.Enable(False)
+                self.description.Enable(False)
+
+        if self.elementType == "Simple":
+            # Load the value for a Simple type
+            self.valueList.InsertStringItem(0,unicode(self.active_prop.value))
+            self.valueList.SetStringItem(0,1,unicode(self.active_prop.defaultValue))
+
+            # Load the enumeration
+            if self.active_prop.enum != '':
+                self.enumBox.SetValue(self.active_prop.enum)
+
+        if self.elementType == "SimpleSequence":
+            for v in self.active_prop.values:
+                self.valueList.InsertStringItem(0,v)  #create list (backwards at first)
+            tmpPropCounter = 0
+            for v in self.active_prop.values:
+                self.valueList.SetStringItem(tmpPropCounter,0,v)  #set the items in the listin the correct order
+                tmpPropCounter = tmpPropCounter + 1
+            tmpPropCounter = 0
+            for dv in self.active_prop.defaultValues:
+                self.valueList.SetStringItem(tmpPropCounter,1,dv)
+                tmpPropCounter = tmpPropCounter + 1
+
+    def OnBitmapButton1Button(self, event):
+        event.Skip()
+
+    def OnAddValueButton(self, event):
+        tmpStr = self.valueBox.GetLineText(0)
+        if tmpStr != '':
+            self.valueList.InsertStringItem(0,tmpStr)
+            self.valueList.SetStringItem(0,1,tmpStr)
+            self.valueBox.Clear()
+
+        self.refreshDisplay()
+        event.Skip()
+
+    def OnValueListPopupRemoveMenu(self, event):
+        if self.editable == False:
+            errorMsg(self,"This property is not removable!")
+            return
+        sel = self.valueList.GetFirstSelected()
+        if sel >= 0:
+            if self.elementType == "Simple":
+                self.addValue.Enable(True)
+            self.valueList.DeleteItem(sel)
+        event.Skip()
+
+    def OnValueListRightUp(self, event):
+        self.valueList.PopupMenu(self.valueListPopup)
+
+        event.Skip()
+
+    def OnCancelButton(self, event):
+        self.Close()
+        event.Skip()
+
+    def OnAddPropButton(self, event):
+        # Check for the name
+        tmpName = self.nameBox.GetLineText(0)
+        if tmpName == '':
+            errorMsg(self,"Please enter a property name first!")
+            return
+
+        # Check for the id
+        tmpid = self.idBox.GetLineText(0)
+        if tmpid == '':
+            errorMsg(self,"Please enter a property id first!")
+            return
+
+        # Check for the mode
+        pos = self.modeChoice.GetSelection()
+        if pos == wx.NOT_FOUND:
+            errorMsg(self,"Please select a property mode first!")
+            return
+        tmpMode = self.modeChoice.GetString(pos)
+
+        # Get the description
+        tmpDes = self.description.GetValue()
+
+        # Check for the type ex: bool, char, short, etc.
+        pos = self.typeChoice.GetSelection()
+        if pos == wx.NOT_FOUND:
+            errorMsg(self,"Please select a type first!")
+            return
+        tmpType = self.typeChoice.GetString(pos)
+
+        if self.elementType == "Simple":
+            # instantiate the property object
+            newProp = CC.SimpleProperty(tmpName,tmpMode,tmpType,tmpDes)
+
+            # store the default value and the value
+            if self.valueList.GetItemCount() == 0:
+                errorMsg(self,"Please enter a value first!")
+                return
+
+            v = self.valueList.GetItem(0,0)
+            dv = self.valueList.GetItem(0,1)
+            newProp.value = v.GetText()
+            newProp.defaultValue = dv.GetText()
+
+        if self.elementType == "SimpleSequence":
+            # store the default value and the value
+            if self.valueList.GetItemCount() == 0:
+                    errorMsg(self,"Please enter a value first!")
+                    return
+
+            newProp = CC.SimpleSequenceProperty(tmpName,tmpMode,tmpType,tmpDes)
+
+
+            newProp.values = []
+            newProp.defaultValues = []
+
+            for x in range(self.valueList.GetItemCount()):
+                v = self.valueList.GetItem(x,0)
+                dv = self.valueList.GetItem(x,1)
+
+                newProp.values.append(v.GetText())
+                newProp.defaultValues.append(dv.GetText())
+
+        # store the enum if any
+        newProp.enum = self.enumBox.GetLineText(0)
+
+        # Check for the kind ex: allocation, configure, test, etc.
+        pos = self.kindChoice.GetSelection()
+        if pos == wx.NOT_FOUND:
+            errorMsg(self,"Please select a kind first!")
+            return
+        newProp.kind = self.kindChoice.GetString(pos)
+
+        # Check and store the range
+        tmpMin = self.minBox.GetLineText(0)
+        tmpMax = self.maxBox.GetLineText(0)
+
+        if tmpMin == 'min' or tmpMin == '':
+            tmpMin = -1
+
+        if tmpMax == 'max' or tmpMax == '':
+            tmpMax = -1
+
+        newProp.range = (tmpMin,tmpMax)
+
+        # Check and store the action
+        pos = self.actionChoice.GetSelection()
+        if pos == wx.NOT_FOUND:
+            if newProp.kind == "allocation":
+                errorMsg(self,"Please select an action first!")
+                return
+        else:
+            newProp.action = self.actionChoice.GetString(pos)
+
+        self.parent.active_comp.properties.append(newProp)
+        self.Close()
+
+        event.Skip()
+
+    def OnOkButton(self, event):
+        if self.editable:
+            # Check for the name
+            tmpName = self.nameBox.GetLineText(0)
+            if tmpName == '':
+                errorMsg(self,"Please enter a property name first!")
+                return
+            self.active_prop.name = tmpName
+
+            # Check for the id
+            tmpid = self.idBox.GetLineText(0)
+            if tmpid == '':
+                errorMsg(self,"Please enter a property id first!")
+                return
+            self.active_prop.id = tmpid
+
+            # Check for the mode
+            pos = self.modeChoice.GetSelection()
+            if pos == wx.NOT_FOUND:
+                errorMsg(self,"Please select a property mode first!")
+                return
+            tmpMode = self.modeChoice.GetString(pos)
+            self.active_prop.mode = tmpMode
+
+            # Get the description
+            tmpDes = self.description.GetValue()
+            self.active_prop.description = tmpDes
+
+            # Check for the type ex: bool, char, short, etc.
+            pos = self.typeChoice.GetSelection()
+            if pos == wx.NOT_FOUND:
+                errorMsg(self,"Please select a type first!")
+                return
+            tmpType = self.typeChoice.GetString(pos)
+            self.active_prop.type = tmpType
+
+            if self.elementType == "Simple":
+                # store the default value and the value
+                if self.valueList.GetItemCount() == 0:
+                    errorMsg(self,"Please enter a value first!")
+                    return
+
+                v = self.valueList.GetItem(0,0)
+                dv = self.valueList.GetItem(0,1)
+                self.active_prop.value = v.GetText()
+                self.active_prop.defaultValue = dv.GetText()
+
+            if self.elementType == "SimpleSequence":
+                # store the default value and the value
+                if self.valueList.GetItemCount() == 0:
+                    errorMsg(self,"Please enter a value first!")
+                    return
+
+                self.active_prop.values = []
+                self.active_prop.defaultValues = []
+
+                for x in range(self.valueList.GetItemCount()):
+                    v = self.valueList.GetItem(x,0)
+                    dv = self.valueList.GetItem(x,1)
+
+                    self.active_prop.values.append(v.GetText())
+                    self.active_prop.defaultValues.append(dv.GetText())
+
+            # store the enum if any
+            self.active_prop.enum = self.enumBox.GetLineText(0)
+
+            # Check for the kind ex: allocation, configure, test, etc.
+            pos = self.kindChoice.GetSelection()
+            if pos == wx.NOT_FOUND:
+                errorMsg(self,"Please select a kind first!")
+                return
+            self.active_prop.kind = self.kindChoice.GetString(pos)
+
+            # Check and store the range
+            tmpMin = self.minBox.GetLineText(0)
+            tmpMax = self.maxBox.GetLineText(0)
+
+            if tmpMin == 'min' or tmpMin == '':
+                tmpMin = -1
+
+            if tmpMax == 'max' or tmpMax == '':
+                tmpMax = -1
+
+            self.active_prop.range = (tmpMin,tmpMax)
+
+            # Check and store the action
+            pos = self.actionChoice.GetSelection()
+            if pos == wx.NOT_FOUND:
+                if self.active_prop.kind == "allocation":
+                    errorMsg(self,"Please select an action first!")
+                    return
+            else:
+                self.active_prop.action = self.actionChoice.GetString(pos)
+
+        else:
+            if self.elementType == "Simple":
+                # store the default value and the value
+                if self.valueList.GetItemCount() == 0:
+                    errorMsg(self,"Please enter a value first!")
+                    return
+
+                v = self.valueList.GetItem(0,0)
+                dv = self.valueList.GetItem(0,1)
+                self.active_prop.value = v.GetText()
+                self.active_prop.defaultValue = dv.GetText()
+
+            if self.elementType == "SimpleSequence":
+                # store the default value and the value
+                if self.valueList.GetItemCount() == 0:
+                    errorMsg(self,"Please enter a value first!")
+                    return
+
+                self.active_prop.values = []
+                self.active_prop.defaultValues = []
+
+                for x in range(self.valueList.GetItemCount()):
+                    v = self.valueList.GetItem(x,0)
+                    dv = self.valueList.GetItem(x,1)
+                    self.active_prop.values.append(v.GetText())
+                    self.active_prop.defaultValues.append(dv.GetText())
+
+        self.Close()
+
+    def OnKindChoiceChoice(self, event):
+        self.refreshDisplay()
+        event.Skip()
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/ComponentFrame.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/ComponentFrame.py	(revision 9975)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/ComponentFrame.py	(revision 9975)
@@ -0,0 +1,1093 @@
+#Boa:Frame:CompFrame
+
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+import wx.gizmos
+from wx.lib.anchors import LayoutAnchors
+import wx.grid
+import PortDialog
+import os, shutil, commands
+import importIDL
+import ComponentClass as CC
+from errorMsg import *
+import XML_gen.component_gen as component_gen
+import cPickle
+import PropertiesDialog
+import cfg
+from chmod import chmod
+import string
+
+def create(parent):
+    return CompFrame(parent)
+
+[wxID_COMPFRAME, wxID_COMPFRAMEACECHECKBOX, wxID_COMPFRAMETIMINGCHECKBOX, wxID_COMPFRAMEADDPORTBTN,
+ wxID_COMPFRAMEADDPROP, wxID_COMPFRAMEASSEMBLYCCHECKBOX,
+ wxID_COMPFRAMECLOSEBTN, wxID_COMPFRAMECOMPNAMEBOX, wxID_COMPFRAMECOMPDESCRBOX,
+ wxID_COMPFRAMEDEVICECHOICE, wxID_COMPFRAMENODECHOICE, wxID_COMPFRAMEPORTBOX,
+ wxID_COMPFRAMEPROPLIST, wxID_COMPFRAMEREMOVEBTN, wxID_COMPFRAMEREMOVEPROP,
+ wxID_COMPFRAMESTATICTEXT1, wxID_COMPFRAMESTATICTEXT2,
+ wxID_COMPFRAMESTATICTEXT3, wxID_COMPFRAMESTATICTEXT4,
+ wxID_COMPFRAMESTATICTEXT5, wxID_COMPFRAMESTATICTEXT6,
+ wxID_COMPFRAMESTATICTEXT7, wxID_COMPFRAMESTATICTEXT8, wxID_COMPFRAMESTATUSBARCOMPONENT,
+ wxID_COMPFRAMESTATICLINE1, wxID_COMPFRAMETEMPLATECHOICE,
+] = [wx.NewId() for _init_ctrls in range(26)]
+
+[wxID_COMPFRAMEMENUFILENEW, wxID_COMPFRAMEMENUFILEOPEN,
+ wxID_COMPFRAMEMENUFILESAVE, wxID_COMPFRAMEMENUFILESAVEAS,
+] = [wx.NewId() for _init_coll_menuFile_Items in range(4)]
+
+[wxID_COMPFRAMEPORTBOXPOPUPADD, wxID_COMPFRAMEPORTBOXPOPUPEXPAND,
+ wxID_COMPFRAMEPORTBOXPOPUPREMOVE,
+] = [wx.NewId() for _init_coll_portBoxPopup_Items in range(3)]
+
+[wxID_COMPFRAMEPROPLISTPOPUPADD, wxID_COMPFRAMEPROPLISTPOPUPEDIT,
+ wxID_COMPFRAMEPROPLISTPOPUPREMOVE,
+] = [wx.NewId() for _init_coll_propListPopup_Items in range(3)]
+
+[wxID_COMPFRAMEMENUCOMPONENTGENERATE] = [wx.NewId() for _init_coll_menuComponent_Items in range(1)]
+
+class CompFrame(wx.Frame):
+    def _init_coll_menuComponent_Items(self, parent):
+        # generated method, don't edit
+
+        parent.Append(help=u'', id=wxID_COMPFRAMEMENUCOMPONENTGENERATE,
+              kind=wx.ITEM_NORMAL, text=u'Generate Component')
+        self.Bind(wx.EVT_MENU, self.OnMenuComponentGenerateMenu,
+              id=wxID_COMPFRAMEMENUCOMPONENTGENERATE)
+
+    def _init_coll_menuBar1_Menus(self, parent):
+        # generated method, don't edit
+
+        parent.Append(menu=self.menuFile, title='File')
+        parent.Append(menu=self.menuComponent, title=u'Component')
+
+    def _init_coll_imageListPorts_Images(self, parent):
+        # generated method, don't edit
+
+        root = __file__
+        if os.path.islink (root):
+              root = os.path.realpath (root)
+        root = os.path.dirname (os.path.abspath (root))
+        parent.Add(bitmap=wx.Bitmap(root + '/images/uses.bmp', wx.BITMAP_TYPE_BMP),
+              mask=wx.NullBitmap)
+        parent.Add(bitmap=wx.Bitmap(root+ '/images/provides.bmp', wx.BITMAP_TYPE_BMP),
+              mask=wx.NullBitmap)
+
+    def _init_coll_menuFile_Items(self, parent):
+        # generated method, don't edit
+        parent.Append(help='', id=wxID_COMPFRAMEMENUFILENEW,
+              kind=wx.ITEM_NORMAL, text='New')
+        parent.Append(help='', id=wxID_COMPFRAMEMENUFILEOPEN,
+              kind=wx.ITEM_NORMAL, text=u'Open')
+        parent.Append(help='', id=wxID_COMPFRAMEMENUFILESAVE,
+              kind=wx.ITEM_NORMAL, text='Save')
+        parent.Append(help='', id=wxID_COMPFRAMEMENUFILESAVEAS,
+              kind=wx.ITEM_NORMAL, text='Save As')
+        self.Bind(wx.EVT_MENU, self.OnMenuFileSaveasMenu,
+              id=wxID_COMPFRAMEMENUFILESAVEAS)
+        self.Bind(wx.EVT_MENU, self.OnMenuFileSaveMenu,
+              id=wxID_COMPFRAMEMENUFILESAVE)
+        self.Bind(wx.EVT_MENU, self.OnMenuFileNewMenu,
+              id=wxID_COMPFRAMEMENUFILENEW)
+        self.Bind(wx.EVT_MENU, self.OnMenuFileOpenMenu,
+              id=wxID_COMPFRAMEMENUFILEOPEN)
+
+    def _init_coll_portBoxPopup_Items(self, parent):
+        # generated method, don't edit
+
+        parent.Append(help='', id=wxID_COMPFRAMEPORTBOXPOPUPADD,
+              kind=wx.ITEM_NORMAL, text=u'Add')
+        parent.Append(help='', id=wxID_COMPFRAMEPORTBOXPOPUPREMOVE,
+              kind=wx.ITEM_NORMAL, text=u'Remove')
+        parent.AppendSeparator()
+        parent.Append(help='', id=wxID_COMPFRAMEPORTBOXPOPUPEXPAND,
+              kind=wx.ITEM_NORMAL, text=u'Expand All')
+        self.Bind(wx.EVT_MENU, self.OnPortBoxPopupRemoveMenu,
+              id=wxID_COMPFRAMEPORTBOXPOPUPREMOVE)
+        self.Bind(wx.EVT_MENU, self.OnPortBoxPopupExpandMenu,
+              id=wxID_COMPFRAMEPORTBOXPOPUPEXPAND)
+        self.Bind(wx.EVT_MENU, self.OnPortBoxPopupAddMenu,
+              id=wxID_COMPFRAMEPORTBOXPOPUPADD)
+
+    def _init_coll_propListPopup_Items(self, parent):
+
+        parent.Append(help='', id=wxID_COMPFRAMEPROPLISTPOPUPADD,
+              kind=wx.ITEM_NORMAL, text=u'Add')
+        parent.Append(help='', id=wxID_COMPFRAMEPROPLISTPOPUPREMOVE,
+              kind=wx.ITEM_NORMAL, text=u'Remove')
+        parent.AppendSeparator()
+        parent.Append(help='', id=wxID_COMPFRAMEPROPLISTPOPUPEDIT,
+              kind=wx.ITEM_NORMAL, text=u'Edit')
+        self.Bind(wx.EVT_MENU, self.OnPropsListPopupRemoveMenu,
+              id=wxID_COMPFRAMEPROPLISTPOPUPREMOVE)
+        self.Bind(wx.EVT_MENU, self.OnPropsListPopupEditMenu,
+              id=wxID_COMPFRAMEPROPLISTPOPUPEDIT)
+        self.Bind(wx.EVT_MENU, self.OnPropsListPopupAddMenu,
+              id=wxID_COMPFRAMEPROPLISTPOPUPADD)
+
+    def _init_coll_propList_Columns(self, parent):
+        # generated method, don't edit
+
+        parent.InsertColumn(col=0, format=wx.LIST_FORMAT_LEFT,
+              heading=u'Properties', width=155)
+        parent.InsertColumn(col=1, format=wx.LIST_FORMAT_LEFT,
+              heading=u'Values', width=155)
+
+    def _init_utils(self):
+        # generated method, don't edit
+        self.menuFile = wx.Menu(title='')
+
+        self.menuComponent = wx.Menu(title='')
+
+        self.menuBar1 = wx.MenuBar()
+
+        self.portBoxPopup = wx.Menu(title='')
+
+        self.propListPopup = wx.Menu(title='')
+
+        self.imageListPorts = wx.ImageList(height=16, width=16)
+        self._init_coll_imageListPorts_Images(self.imageListPorts)
+
+        self._init_coll_menuFile_Items(self.menuFile)
+        self._init_coll_menuComponent_Items(self.menuComponent)
+        self._init_coll_menuBar1_Menus(self.menuBar1)
+        self._init_coll_portBoxPopup_Items(self.portBoxPopup)
+        self._init_coll_propListPopup_Items(self.propListPopup)
+
+    def _init_ctrls(self, prnt, _availableTemplates):
+        # generated method, don't edit
+        wx.Frame.__init__(self, id=wxID_COMPFRAME, name='CompFrame',
+              parent=prnt, pos=wx.Point(553, 276), size=wx.Size(656, 544),
+              style=wx.DEFAULT_FRAME_STYLE, title=u'OSSIE Component Editor')
+        self._init_utils()
+        self.SetClientSize(wx.Size(856, 544))
+        self.SetMenuBar(self.menuBar1)
+#        self.Center(wx.BOTH)
+        self.Bind(wx.EVT_CLOSE, self.OnCompFrameClose)
+        self.Bind(wx.EVT_ACTIVATE, self.OnCompFrameActivate)
+
+        self.statusBarComponent = wx.StatusBar(id=wxID_COMPFRAMESTATUSBARCOMPONENT,
+              name='statusBarComponent', parent=self, style=0)
+        self.SetStatusBar(self.statusBarComponent)
+
+        self.AddPortBtn = wx.Button(id=wxID_COMPFRAMEADDPORTBTN, label='Add Port',
+              name='AddPortBtn', parent=self, pos=wx.Point(387, 216),
+              size=wx.Size(100, 30), style=0)
+        self.AddPortBtn.Bind(wx.EVT_BUTTON, self.OnAddPortBtnButton,
+              id=wxID_COMPFRAMEADDPORTBTN)
+
+        self.RemoveBtn = wx.Button(id=wxID_COMPFRAMEREMOVEBTN, label='Remove Port',
+              name='RemoveBtn', parent=self, pos=wx.Point(387, 259),
+              size=wx.Size(100, 30), style=0)
+        self.RemoveBtn.Bind(wx.EVT_BUTTON, self.OnRemoveBtnButton,
+              id=wxID_COMPFRAMEREMOVEBTN)
+
+        self.addProp = wx.Button(id=wxID_COMPFRAMEADDPROP, label=u'Add Property',
+              name=u'addProp', parent=self, pos=wx.Point(384, 356),
+              size=wx.Size(100, 30), style=0)
+        self.addProp.Enable(True)
+        self.addProp.Bind(wx.EVT_BUTTON, self.OnaddPropButton,
+              id=wxID_COMPFRAMEADDPROP)
+
+        self.removeProp = wx.Button(id=wxID_COMPFRAMEREMOVEPROP,
+              label=u'Remove Property', name=u'removeProp', parent=self,
+              pos=wx.Point(384, 404), size=wx.Size(140, 32), style=0)
+        self.removeProp.Enable(True)
+        self.removeProp.Bind(wx.EVT_BUTTON, self.OnRemovePropButton,
+              id=wxID_COMPFRAMEREMOVEPROP)
+
+        self.staticText2 = wx.StaticText(id=wxID_COMPFRAMESTATICTEXT2,
+              label='Ports', name='staticText2', parent=self, pos=wx.Point(167,
+              89), size=wx.Size(65, 17), style=0)
+
+        self.CloseBtn = wx.Button(id=wxID_COMPFRAMECLOSEBTN, label='Close',
+              name='CloseBtn', parent=self, pos=wx.Point(530, 424),
+              size=wx.Size(85, 32), style=0)
+        self.CloseBtn.Bind(wx.EVT_BUTTON, self.OnCloseBtnButton,
+              id=wxID_COMPFRAMECLOSEBTN)
+
+        self.TimingcheckBox = wx.CheckBox(id=wxID_COMPFRAMETIMINGCHECKBOX,
+              label=u'Timing Port Support', name=u'TimingcheckBox', parent=self,
+              pos=wx.Point(634, 126), size=wx.Size(185, 21), style=0)
+        self.TimingcheckBox.SetValue(False)
+        self.TimingcheckBox.Bind(wx.EVT_CHECKBOX, self.OnTimingcheckBoxCheckbox,
+              id=wxID_COMPFRAMETIMINGCHECKBOX)
+
+        self.ACEcheckBox = wx.CheckBox(id=wxID_COMPFRAMEACECHECKBOX,
+              label=u'ACE Support', name=u'ACEcheckBox', parent=self,
+              pos=wx.Point(634, 157), size=wx.Size(125, 21), style=0)
+        self.ACEcheckBox.SetValue(False)
+        self.ACEcheckBox.Bind(wx.EVT_CHECKBOX, self.OnACEcheckBoxCheckbox,
+              id=wxID_COMPFRAMEACECHECKBOX)
+
+        self.PortBox = wx.TreeCtrl(id=wxID_COMPFRAMEPORTBOX, name=u'PortBox',
+              parent=self, pos=wx.Point(40, 112), size=wx.Size(312, 185),
+              style=wx.SIMPLE_BORDER | wx.TR_HAS_BUTTONS | wx.TR_HIDE_ROOT)
+        self.PortBox.SetImageList(self.imageListPorts)
+        self.PortBox.SetBestFittingSize(wx.Size(312, 185))
+        self.PortBox.Bind(wx.EVT_RIGHT_UP, self.OnPortBoxRightUp)
+
+        self.AssemblyCcheckBox = wx.CheckBox(id=wxID_COMPFRAMEASSEMBLYCCHECKBOX,
+              label=u'Assembly Controller', name=u'AssemblyCcheckBox',
+              parent=self, pos=wx.Point(384, 126), size=wx.Size(165, 21),
+              style=0)
+        self.AssemblyCcheckBox.SetValue(False)
+        self.AssemblyCcheckBox.Bind(wx.EVT_CHECKBOX,
+              self.OnAssemblyCcheckBoxCheckbox,
+              id=wxID_COMPFRAMEASSEMBLYCCHECKBOX)
+
+        self.compNameBox = wx.TextCtrl(id=wxID_COMPFRAMECOMPNAMEBOX,
+              name=u'compNameBox', parent=self, pos=wx.Point(138, 10),
+              size=wx.Size(215, 25), style=0, value=u'')
+
+        self.staticText1 = wx.StaticText(id=wxID_COMPFRAMESTATICTEXT1,
+              label=u'Component Name:', name='staticText1', parent=self,
+              pos=wx.Point(24, 13), size=wx.Size(110, 17), style=0)
+
+        self.compDescrBox = wx.TextCtrl(id=wxID_COMPFRAMECOMPDESCRBOX,
+              name=u'compDescrBox', parent=self, pos=wx.Point(110, 40),
+              size=wx.Size(243, 50), style=wx.TE_BESTWRAP | wx.TE_MULTILINE, value=u'')
+
+        self.staticText1_1 = wx.StaticText(id=wxID_COMPFRAMESTATICTEXT8,
+              label=u'Description:', name='staticText8', parent=self,
+              pos=wx.Point(24, 43), size=wx.Size(110, 17), style=0)
+
+        self.deviceChoice = wx.Choice(choices=[], id=wxID_COMPFRAMEDEVICECHOICE,
+              name=u'deviceChoice', parent=self, pos=wx.Point(453, 93),
+              size=wx.Size(136, 28), style=0)
+        self.deviceChoice.SetBestFittingSize(wx.Size(136, 28))
+        self.deviceChoice.Bind(wx.EVT_CHOICE, self.OnDeviceChoiceChoice,
+              id=wxID_COMPFRAMEDEVICECHOICE)
+
+        self.staticText3 = wx.StaticText(id=wxID_COMPFRAMESTATICTEXT3,
+              label=u'Waveform Deployment Settings', name='staticText3', parent=self,
+              pos=wx.Point(384, 24), size=wx.Size(100, 35), style=wx.TE_BESTWRAP | wx.TE_MULTILINE)
+
+        self.staticText3.SetFont(wx.Font(8,wx.SWISS,wx.NORMAL,wx.BOLD,True,u'Sans'))
+
+        self.nodeChoice = wx.Choice(choices=[], id=wxID_COMPFRAMENODECHOICE,
+              name=u'nodeChoice', parent=self, pos=wx.Point(453, 60),
+              size=wx.Size(136, 28), style=0)
+        self.nodeChoice.Bind(wx.EVT_CHOICE, self.OnNodeChoiceChoice,
+              id=wxID_COMPFRAMENODECHOICE)
+
+        self.staticText4 = wx.StaticText(id=wxID_COMPFRAMESTATICTEXT4,
+              label=u'Node', name='staticText4', parent=self, pos=wx.Point(384,
+              65), size=wx.Size(41, 17), style=0)
+
+        self.staticText5 = wx.StaticText(id=wxID_COMPFRAMESTATICTEXT5,
+              label=u'Device', name='staticText5', parent=self,
+              pos=wx.Point(384, 98), size=wx.Size(51, 17), style=0)
+
+        self.staticText6 = wx.StaticText(id=wxID_COMPFRAMESTATICTEXT6,
+              label=u'Component Generation Options', name='staticText6', parent=self,
+              pos=wx.Point(634, 24), size=wx.Size(100, 35), style=wx.TE_BESTWRAP | wx.TE_MULTILINE)
+        self.staticText6.SetFont(wx.Font(8,wx.SWISS,wx.NORMAL,wx.BOLD,True,u'Sans'))
+
+        self.staticText7 = wx.StaticText(id=wxID_COMPFRAMESTATICTEXT7,
+              label=u'Template', name='staticText7', parent=self,
+              pos=wx.Point(634, 65), size=wx.Size(222, 17), style=0)
+
+        self.propList = wx.ListView(id=wxID_COMPFRAMEPROPLIST, name=u'propList',
+              parent=self, pos=wx.Point(40, 320), size=wx.Size(312, 160),
+              style=wx.LC_SINGLE_SEL | wx.VSCROLL | wx.LC_REPORT | wx.LC_VRULES | wx.LC_HRULES | wx.SIMPLE_BORDER)
+        self.propList.SetBestFittingSize(wx.Size(312, 160))
+        self._init_coll_propList_Columns(self.propList)
+        #self.propList.Bind(wx.EVT_RIGHT_UP, self.OnPropListRightUp)
+        self.propList.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnPropListListItemRightClick)
+        self.propList.Bind(wx.EVT_LEFT_DCLICK,self.OnPropListLeftDclick)
+
+        self.staticLine1 = wx.StaticLine(id=wxID_COMPFRAMESTATICLINE1,
+              name='staticLine1', parent=self, pos=wx.Point(610, 17),
+              size=wx.Size(1, 200), style=wx.LI_VERTICAL)
+
+        self.templateChoice = wx.Choice(choices=_availableTemplates,
+              id=wxID_COMPFRAMETEMPLATECHOICE,
+              name=u'templateChoice', parent=self, pos=wx.Point(703, 60),
+              size=wx.Size(136, 28), style=0)
+        self.templateChoice.SetBestFittingSize(wx.Size(136, 28))
+        self.templateChoice.Bind(wx.EVT_CHOICE, self.OnTemplateChoiceChoice,
+              id=wxID_COMPFRAMETEMPLATECHOICE)
+
+    def __init__(self, parent):
+        # Constructor for ComponentFrame
+        self.wavedevPath = os.getcwd() + os.sep
+
+        self.wavedevPath = __file__
+        if os.path.islink (self.wavedevPath):
+            self.wavedevPath = os.path.realpath (self.wavedevPath)
+        self.wavedevPath = os.path.dirname (os.path.abspath (self.wavedevPath)) 
+
+        #NOTE: There still may be a better way to do this,
+        # assuming generate/templates always exists below this file, this will work
+        path = self.wavedevPath + '/generate/templates'
+        availableTemplates = commands.getoutput("ls -I __init__.py* " + path)
+        availableTemplates = availableTemplates.split()
+        self._init_ctrls(parent,availableTemplates)
+
+        self.templateChoice.SetSelection(0)
+        self.template = self.templateChoice.GetStringSelection()
+
+        self.parent = parent
+
+        self.saveComponentPath = None
+        self.calledByParent = False
+
+        if parent == None:  #OSSIE Component Editor being run in stand-alone mode
+            self.menuComponent.Enable(wxID_COMPFRAMEMENUCOMPONENTGENERATE,True)
+            self.compDescrBox.Enable(True)
+            cfg.LoadConfiguration(self)
+        else:
+            self.menuComponent.Enable(wxID_COMPFRAMEMENUCOMPONENTGENERATE,False)
+            self.compDescrBox.Enable(False)
+
+        self.Available_Ints = []
+        self.importStandardIdl()
+
+
+    def OnCompFrameActivate(self, event):
+        if self.calledByParent == True:
+            self.active_comp = self.parent.active_comp
+            self.displayPorts()
+            self.displayProps()
+
+            if self.active_comp.ace == True:
+                self.ACEcheckBox.SetValue(True)
+            else:
+                self.ACEcheckBox.SetValue(False)
+
+            if self.active_comp.timing == True:
+                self.TimingcheckBox.SetValue(True)
+            else:
+                self.TimingcheckBox.SetValue(False)
+
+            if self.active_comp.AssemblyController == True:
+                self.AssemblyCcheckBox.SetValue(True)
+            else:
+                self.AssemblyCcheckBox.SetValue(False)
+
+            if self.active_comp.generate == False:
+                self.AddPortBtn.Enable(False)
+                self.RemoveBtn.Enable(False)
+                self.addProp.Enable(False)
+                self.removeProp.Enable(False)
+                self.ACEcheckBox.Enable(False)
+                self.TimingcheckBox.Enable(False)
+            else:
+                self.AddPortBtn.Enable(True)
+                self.RemoveBtn.Enable(True)
+                self.addProp.Enable(True)
+                self.removeProp.Enable(True)
+                self.ACEcheckBox.Enable(True)
+                self.TimingcheckBox.Enable(True)
+
+            self.compNameBox.Clear()
+            self.compNameBox.WriteText(self.active_comp.name)
+
+            self.compDescrBox.Clear()
+            self.compDescrBox.WriteText(self.active_comp.description)
+
+            if self.active_comp.type != 'resource':
+                self.deviceChoice.Clear()
+                self.deviceChoice.Enable(False)
+                self.nodeChoice.Enable(False)
+            else:
+                self.deviceChoice.Enable(True)
+                self.nodeChoice.Enable(True)
+                self.displayPlatformInfo()
+
+            self.menuFile.Enable(wxID_COMPFRAMEMENUFILENEW,False)
+            self.menuFile.Enable(wxID_COMPFRAMEMENUFILEOPEN,False)
+
+            self.calledByParent = False
+
+
+################################################################################
+## File Menu / Frame Functionality
+################################################################################
+    def OnMenuFileSaveasMenu(self, event):
+        self.ComponentSave(True)
+        event.Skip()
+
+    def OnMenuFileSaveMenu(self, event):
+        self.ComponentSave(False)
+        event.Skip()
+
+    def OnMenuFileNewMenu(self, event):
+        self.active_comp = CC.Component("component1")
+        self.ACEcheckBox.SetValue(False)
+        self.TimingcheckBox.SetValue(False)
+        self.AssemblyCcheckBox.SetValue(False)
+        self.AddPortBtn.Enable(True)
+        self.RemoveBtn.Enable(True)
+        self.displayPorts()
+        self.compNameBox.Clear()
+        self.compNameBox.WriteText(self.active_comp.name)
+        self.compDescrBox.Clear()
+        self.compDescrBox.WriteText("Enter brief description of component")
+        event.Skip()
+
+    def OnMenuFileOpenMenu(self, event):
+        if len(self.homeDir) > 0:
+            tmpdir = self.homeDir
+        else:
+            tmpdir = os.path.expanduser("~")
+            if tmpdir == "~":
+                tmpdir = "/home"
+
+        tmpwildcard = "Component Files (*.cmp)|*.cmp"
+        dlg = wx.FileDialog(self, "Choose a file", tmpdir, "", tmpwildcard, wx.OPEN)
+        try:
+            returnCode = dlg.ShowModal()
+            if returnCode == wx.ID_OK:
+                tmpPath = dlg.GetPath()
+            elif returnCode == wx.ID_CANCEL:
+                dlg.Destroy()
+                return
+        finally:
+            dlg.Destroy()
+
+        f = open(tmpPath,'r')
+        tmpObject = cPickle.load(f)
+        if tmpObject[0] == 'component':
+            self.ComponentOpen(tmpPath,tmpObject[1])
+
+        event.Skip()
+
+    def ComponentSave(self,saveasFlag):
+        if saveasFlag == True or self.saveComponentPath == None:
+            tempLn = self.compNameBox.GetLineText(0)
+            if tempLn == '':
+                errorMsg(self,'Please enter a component name first')
+                return
+            self.active_comp.name = tempLn
+
+            tempDescr = self.compDescrBox.GetLineText(0)
+            if tempDescr == '':
+                errorMsg(self,'Please enter a component description first')
+                return
+            self.active_comp.description = tempDescr
+
+            if len(self.homeDir) > 0:
+                tmpdir = self.homeDir
+            else:
+                tmpdir = os.path.expanduser("~")
+                if tmpdir == "~":
+                    tmpdir = "/home"
+
+            dlg = wx.FileDialog(self, "Choose a file", tmpdir, tempLn + '.cmp', "Component File (*.cmp)|*.cmp", wx.SAVE)
+            try:
+                returnCode = dlg.ShowModal()
+                if returnCode == wx.ID_OK:
+                    self.saveComponentPath = dlg.GetPath()
+                elif returnCode == wx.ID_CANCEL:
+                    dlg.Destroy()
+                    return
+            finally:
+                dlg.Destroy()
+
+        f = open(self.saveComponentPath,'w')
+        cPickle.dump(('component',self.active_comp),f)
+
+    def ComponentOpen(self,newPath,newComp):
+        if newPath != None:
+            if self.saveComponentPath != None:
+                dlg = wx.MessageDialog(self, 'Do you want to save your changes to the active component first?',
+                      'Error', wx.YES_NO | wx.ICON_INFORMATION)
+                try:
+                    returnCode = dlg.ShowModal()
+                    if returnCode == wx.ID_YES:
+                        self.ComponentSave(False)
+                    elif returnCode == wx.ID_CANCEL:
+                        dlg.Destroy()
+                        return
+                finally:
+                    dlg.Destroy()
+
+            self.saveComponentPath = newPath
+
+        self.active_comp = newComp
+        self.displayPorts()
+        self.displayProps()
+
+        if self.active_comp.ace == True:
+            self.ACEcheckBox.SetValue(True)
+        else:
+            self.ACEcheckBox.SetValue(False)
+
+        if not hasattr(self.active_comp,'timing'):
+            self.active_comp.timing = False
+        if self.active_comp.timing == True:
+            self.TimingcheckBox.SetValue(True)
+        else:
+            self.TimingcheckBox.SetValue(False)
+
+        if self.active_comp.AssemblyController == True:
+            self.AssemblyCcheckBox.SetValue(True)
+        else:
+            self.AssemblyCcheckBox.SetValue(False)
+
+        if self.active_comp.generate == False:
+            self.AddPortBtn.Enable(False)
+            self.RemoveBtn.Enable(False)
+        else:
+            self.AddPortBtn.Enable(True)
+            self.RemoveBtn.Enable(True)
+
+        self.compNameBox.Clear()
+        self.compNameBox.WriteText(self.active_comp.name)
+
+        self.compDescrBox.Clear()
+        self.compDescrBox.WriteText(self.active_comp.description)
+
+    def OnCloseBtnButton(self, event):
+        if self.parent == None:
+            self.Show(False)
+            self.Close()
+            return
+        tempLn = self.compNameBox.GetLineText(0)
+        if tempLn == '':
+            errorMsg(self,'Please enter a component name first')
+            return
+
+        for c in self.parent.active_wave.components:
+            if c != self.active_comp and c.name == tempLn:
+                errorMsg(self,'Invalid name - a component by that name already exists')
+                return
+
+        #Component names with spaces do not work
+        if tempLn.find(' ') != -1:
+            errorMsg(self,'Resource names can not have spaces in them.\nReplacing spaces with "_".')
+            tempLn = tempLn.replace(' ','_')
+
+
+        self.active_comp.changeName(tempLn)
+
+        self.MakeModal(False)
+        self.parent.displayComps()
+        self.parent.displayNodes()
+        self.Show(False)
+        event.Skip()
+
+    def OnCompFrameClose(self, event):
+        self.MakeModal(False)
+        if self.parent != None:
+            self.parent.displayComps()
+        self.Show(False)
+        event.Skip()
+
+
+################################################################################
+## Miscellaneous Functionality
+################################################################################
+
+    def importStandardIdl(self):
+        '''Imports IDL from cf, standardinterfaces, and custominterfaces'''
+        #temporarily change self.parent to self so this works
+        #normally this function looks at the MainFrame - but not in standalone
+        changedParent = False
+        if self.parent == None:
+            self.parent = self
+            changedParent = True
+
+        if os.path.isfile(self.parent.ossieIncludePath + "cf.idl"):
+            cfIdl_file = self.parent.ossieIncludePath + "cf.idl"
+        else:
+            tmpstr = "Cannot find cf.idl in the OSSIE installation location:\n"
+            tmpstr += self.parent.ossieIncludePath
+            errorMsg(self.parent,tmpstr)
+
+        # for each file in the standardinterfaces directory, import all available
+        # interfaces (skip standardIdl files)
+
+        standard_idl_list = os.listdir(self.parent.stdIdlPath)
+
+        try:
+            custom_idl_list = os.listdir(self.parent.customIdlPath)
+        except OSError: # this will occur if customIdlPath was never set
+                        # as a result of customInterfaces not being found
+            custom_idl_list = []
+
+        if len(standard_idl_list) <= 0:
+            tmpstr = "Can't find any files in: " + self.parent.stdIdlPath
+            errorMsg(self.parent,tmpstr)
+            return
+
+        # Add the CF interfaces first - in case another file includes them, we
+        # don't want them asscociated with anything other than cf.idl
+        self.Available_Ints.extend(importIDL.getInterfaces(cfIdl_file))
+
+        # import standard interfaces
+        for standard_idl_file in standard_idl_list:
+            # standardIdl files are not included because they are aggregates of the other interfaces
+            if 'standardIdl' in standard_idl_file:
+                continue
+
+            if string.lower(os.path.splitext(standard_idl_file)[1]) != ".idl":
+                # ignore non idl files
+                continue
+
+            tempInts = importIDL.getInterfaces(self.parent.stdIdlPath+standard_idl_file)
+            for t in tempInts:
+                if t not in self.Available_Ints:
+                    self.Available_Ints.append(t)
+
+        # import custom interfaces
+        for custom_idl_file in custom_idl_list:
+            # ignore aggregate 'customInterfaces.idl' file
+            if 'customInterfaces' in custom_idl_file:
+                continue
+
+            if string.lower(os.path.splitext(custom_idl_file)[1]) != ".idl":
+                # ignore non idl files
+                continue
+
+            tempInts = importIDL.getInterfaces(self.parent.customIdlPath+custom_idl_file)
+            for t in tempInts:
+                if t not in self.Available_Ints:
+                   # print "Testing: " + t.name + " " + idl_file + " " + str(len(self.Available_Ints))
+                    self.Available_Ints.append(t)
+                    if t.name == 'timingStatus':
+                        self.timing_interface = CC.Interface(t.name, t.nameSpace, t.operations, t.filename, t.fullpath)
+                        self.timing_port = CC.Port('send_timing_report', self.timing_interface, "Uses", "data")
+#                    print "CF.py: " + t.name + "  " + str(len(t.operations))
+
+        if changedParent == True:
+            self.parent = None
+
+
+
+    def OnACEcheckBoxCheckbox(self, event):
+        if self.ACEcheckBox.GetValue() == True:
+            self.active_comp.ace = True
+        else:
+            self.active_comp.ace = False
+        event.Skip()
+
+    def OnTimingcheckBoxCheckbox(self, event):
+        if self.TimingcheckBox.GetValue() == True:
+            self.active_comp.timing = True
+        else:
+            self.active_comp.timing = False
+        event.Skip()
+
+    def OnAssemblyCcheckBoxCheckbox(self, event):
+        if self.AssemblyCcheckBox.GetValue() == True:
+            if self.parent != None:
+                for x in self.parent.active_wave.components:
+                    x.AssemblyController = False
+            self.active_comp.AssemblyController = True
+        else:
+            self.active_comp.AssemblyController = False
+        event.Skip()
+
+################################################################################
+## Port Functionality
+################################################################################
+
+    def displayPorts(self):
+        self.PortBox.DeleteAllItems()
+        troot = self.PortBox.AddRoot("the_root")
+        usesRoot = self.PortBox.AppendItem(troot,'Uses',image=0)
+        provRoot = self.PortBox.AppendItem(troot,'Provides',image=1)
+
+        for p in self.active_comp.ports:
+            if p.type == 'Uses':
+                tnm = p.name + "::" + p.interface.name
+                t1 = self.PortBox.AppendItem(usesRoot,tnm)
+                self.PortBox.SetPyData(t1,p)
+
+            if p.type == 'Provides':
+                tnm = p.name + "::" + p.interface.name
+                t2 = self.PortBox.AppendItem(provRoot,tnm)
+                self.PortBox.SetPyData(t2,p)
+        self.PortBox.Expand(usesRoot)
+        self.PortBox.Expand(provRoot)
+
+    def AddPort(self):
+        if self.active_comp.generate == False:
+            return
+        dlg = PortDialog.create(self)
+        try:
+            dlg.ShowModal()
+        finally:
+            dlg.Destroy()
+
+        self.displayPorts()
+
+    def RemovePort(self):
+        if self.active_comp.generate == False:
+            return
+        dlg = wx.MessageDialog(self, '("Are you sure you want to remove this port?")',
+          'Error', wx.YES_NO | wx.NO_DEFAULT | wx.ICON_INFORMATION)
+        try:
+            if dlg.ShowModal() == wx.ID_NO:
+                return
+        finally:
+            dlg.Destroy()
+
+        sn = self.PortBox.GetSelection()
+        if sn == self.PortBox.GetRootItem():
+            return
+        elif self.PortBox.GetItemParent(sn) == self.PortBox.GetRootItem():
+            # a main level component
+            return
+        else:
+            # a child component (port)
+            tc = self.PortBox.GetPyData(sn)
+            ti = self.active_comp.ports.index(tc)
+            del self.active_comp.ports[ti]
+
+        self.displayPorts()
+
+
+    def OnAddPortBtnButton(self, event):
+        self.AddPort()
+        event.Skip()
+
+    def OnRemoveBtnButton(self, event):
+        self.RemovePort()
+        event.Skip()
+
+    def OnPortBoxPopupExpandMenu(self, event):
+        troot = self.PortBox.GetRootItem()
+        cid1,cookie1 = self.PortBox.GetFirstChild(troot)
+        cid2,cookie2 = self.PortBox.GetNextChild(troot,cookie1)
+        self.PortBox.Expand(cid1)
+        self.PortBox.Expand(cid2)
+        event.Skip()
+
+    def OnPortBoxRightUp(self, event):
+        sn = self.PortBox.GetSelection()
+
+        if sn == self.PortBox.GetRootItem():
+            self.portBoxPopup.Enable(wxID_COMPFRAMEPORTBOXPOPUPREMOVE,False)
+        elif self.PortBox.GetItemParent(sn) == self.PortBox.GetRootItem():
+            # a main level item
+            self.portBoxPopup.Enable(wxID_COMPFRAMEPORTBOXPOPUPREMOVE,False)
+        else:
+            # a child component (ports in our case)
+            for x in self.portBoxPopup.GetMenuItems():
+                x.Enable(True)
+
+        if self.active_comp.generate == False:
+            self.portBoxPopup.Enable(wxID_COMPFRAMEPORTBOXPOPUPADD,False)
+            self.portBoxPopup.Enable(wxID_COMPFRAMEPORTBOXPOPUPREMOVE,False)
+        else:
+            self.portBoxPopup.Enable(wxID_COMPFRAMEPORTBOXPOPUPADD,True)
+
+        self.PortBox.PopupMenu(self.portBoxPopup)
+        event.Skip()
+
+    def OnPortBoxPopupRemoveMenu(self, event):
+        self.RemovePort()
+        event.Skip()
+
+    def OnPortBoxPopupAddMenu(self, event):
+        self.AddPort()
+        event.Skip()
+
+
+
+################################################################################
+## Deployment Functionality
+################################################################################
+
+    def displayDevices(self):
+        if self.parent == None:
+            return
+
+        pos = self.nodeChoice.GetSelection()
+        if pos == wx.NOT_FOUND:
+            return
+
+        tmpNode = self.nodeChoice.GetClientData(pos)
+
+
+        self.deviceChoice.Clear()
+        for x in tmpNode.Devices:
+            if x.type == 'executabledevice' or x.type == 'loadabledevice':
+                self.deviceChoice.Append(unicode(x.name),x)
+
+    def displayPlatformInfo(self):
+        if self.parent == None:
+            return
+
+        self.deviceChoice.Clear()
+        self.nodeChoice.Clear()
+
+        for x in self.parent.active_plat.nodes:
+            self.nodeChoice.Append(x.name,x)
+
+        tmpNode = None
+        if self.active_comp.device != None:
+            for x in self.parent.active_plat.nodes:
+                for d in x.Devices:
+                    if d == self.active_comp.device:
+                        tmpNode = x
+            if tmpNode != None:
+                pos = self.nodeChoice.FindString(tmpNode.name)
+                self.nodeChoice.SetSelection(pos)
+                for d in tmpNode.Devices:
+                    self.deviceChoice.Append(d.name,d)
+                pos = self.deviceChoice.FindString(self.active_comp.device.name)
+                self.deviceChoice.SetSelection(pos)
+
+            else:
+                tmpstr = 'ERROR! Cannot find the ' + self.active_comp.device.name
+                tmpstr += ' device in current Platform configuration.'
+                tmpstr += '\nSetting device assignment to None.'
+                errorMsg(self,tmpstr)
+                self.active_comp.device = None
+
+    def OnNodeChoiceChoice(self, event):
+        pos = self.nodeChoice.GetSelection()
+        if pos == wx.NOT_FOUND:
+            return
+        self.displayDevices()
+
+    def OnDeviceChoiceChoice(self, event):
+        pos = self.deviceChoice.GetSelection()
+        if pos == wx.NOT_FOUND:
+            return
+
+        tmpDev = self.deviceChoice.GetClientData(pos)
+        self.active_comp.device = tmpDev
+
+    def OnTemplateChoiceChoice(self, event):
+        pos = self.templateChoice.GetSelection()
+        if pos == wx.NOT_FOUND:
+            return
+
+        tmpTmpl = self.templateChoice.GetStringSelection()
+        self.template = tmpTmpl
+
+
+    ############################################################################
+    ## Properties Functionality
+    ############################################################################
+    def OnaddPropButton(self, event):
+        self.AddProperty()
+        event.Skip()
+
+    def OnRemovePropButton(self, event):
+        #sel = self.propList.GetFirstSelected()
+        self.RemoveProperty()
+        event.Skip()
+
+    def displayProps(self):
+        self.propList.DeleteAllItems()
+        pCount = 0
+        for p in self.active_comp.properties:
+            if p.elementType == "Simple":
+                self.propList.InsertStringItem(pCount,p.name)
+                self.propList.SetStringItem(pCount,1,str(p.value))
+            if p.elementType == "SimpleSequence":
+                self.propList.InsertStringItem(pCount,p.name)
+                ts = "["
+                for x in p.values:
+                    ts += x + ","
+                ts = ts[:-1] + "]"
+                self.propList.SetStringItem(pCount,1,ts)
+            self.propList.SetItemData(pCount,self.active_comp.properties.index(p))
+
+    def OnPropListListItemRightClick(self, event):
+        self.propList.PopupMenu(self.propListPopup)
+        event.Skip()
+
+    def EditProperty(self):
+        sel = self.propList.GetFocusedItem()
+        if self < 0:
+            return
+        item = self.propList.GetItem(sel)
+        tmpind = item.GetData()                # the index of the property is stored with the item
+        dlg = PropertiesDialog.create(self)
+        dlg.active_prop = self.active_comp.properties[tmpind]
+        dlg.editable = self.active_comp.generate
+        dlg.calledByParent = True
+        try:
+            dlg.ShowModal()
+        finally:
+            dlg.Destroy()
+
+        self.displayProps()
+
+    def AddProperty(self):
+        dlg = PropertiesDialog.create(self)
+        dlg.active_prop = None
+        dlg.editable = self.active_comp.generate
+        dlg.calledByParent = True
+        try:
+            dlg.ShowModal()
+        finally:
+            dlg.Destroy()
+
+        self.displayProps()
+
+    def RemoveProperty(self):
+        sel = self.propList.GetFocusedItem()
+        if sel >= 0:
+            tmpstr = "Are you sure you want to remove this property?"
+            if owdMsg(self,tmpstr):
+                for p in self.active_comp.properties:
+                    if p.name == self.propList.GetItemText(sel):
+                        ti = self.active_comp.properties.index(p)
+                        del self.active_comp.properties[ti]
+                        self.propList.DeleteItem(sel)
+                        break
+            self.displayProps()
+
+    def OnPropsListPopupEditMenu(self, event):
+        self.EditProperty()
+        event.Skip()
+
+    def OnPropsListPopupRemoveMenu(self, event):
+        self.RemoveProperty()
+        event.Skip()
+
+    def OnPropsListPopupAddMenu(self, event):
+        self.AddProperty()
+        event.Skip()
+
+    def OnPropListLeftDclick(self,event):
+        self.EditProperty()
+        event.Skip()
+
+    ############################################################################
+    ## Generate the Component XML and C++
+    ############################################################################
+    def OnMenuComponentGenerateMenu(self, event):
+
+        #select which template to use
+        if self.template == "basic_ports":
+            import WaveDev.wavedev.generate.templates.basic_ports.genStructure as genStruct
+        elif self.template == "custom_ports":
+            import WaveDev.wavedev.generate.templates.custom_ports.genStructure as genStruct
+        elif self.template == "py_comp":
+            import WaveDev.wavedev.generate.templates.py_comp.genStructure as genStruct
+        else:
+            errorMsg(self.parent, self.template + " is not supported in OnMenuComponentGenerateMenu within the componentFrame")
+            return
+
+        tempLn = self.compNameBox.GetLineText(0)
+        if tempLn == '':
+            errorMsg(self,'Please enter a component name first')
+            return
+
+        self.active_comp.name = tempLn
+
+        tempDescr = self.compDescrBox.GetLineText(0)
+        if tempDescr == '':
+            errorMsg(self,'Please enter a component description first')
+            return
+
+        self.active_comp.description = tempDescr
+
+        dlg = wx.DirDialog(self)
+        dlg.SetMessage("Please select the place to generate the code")
+        dlg.SetPath(os.path.expanduser('~'))
+        try:
+            if dlg.ShowModal() == wx.ID_OK:
+                savepath = dlg.GetPath()
+            else:
+                return
+        finally:
+            dlg.Destroy()
+
+        if savepath[len(savepath)-1] != '/':
+            savepath = savepath + '/'
+
+        self.path = savepath
+        self.path = self.path + self.active_comp.name
+
+        if os.path.exists(self.path) == False:
+                os.mkdir(self.path)
+
+        #if os.path.exists(self.path + '/aclocal.d') == False:
+        #    os.mkdir(self.path + '/aclocal.d')
+        #for f in os.listdir('generate/aclocal.d/'):
+        #    if not os.path.isdir(f):
+        #        shutil.copy('generate/aclocal.d/' + f,self.path + '/aclocal.d')
+        shutil.copy(self.wavedevPath + '/generate/reconf',self.path)
+        chmod(self.path + '/reconf', 0755)
+
+        if self.licensefile != "":
+                    shutil.copy(self.licensefile,self.path + '/LICENSE')
+
+        if self.active_comp.timing:
+                found_timing = False
+                for p in self.active_comp.ports:
+                        if p.interface.name == 'timingStatus':
+                                found_timing = True
+                if not found_timing:
+                        self.active_comp.ports.append(self.timing_port)
+
+        gen = genStruct.genAll(savepath, self.wavedevPath, None)
+        gen.writeCompMakefile(self.active_comp,self.path)
+        gen.writeConfAC(self.path, self.active_comp.name, self.active_comp.ace, False, self.installPath)
+        gen.genCompFiles(self.active_comp)
+
+        component_gen.gen_scd(self.active_comp, savepath, self.wavedevPath)
+        component_gen.gen_spd(self.active_comp, savepath, self.wavedevPath)
+        component_gen.gen_prf(self.active_comp, savepath, self.wavedevPath)
+
+class App(wx.App):
+    def OnInit(self):
+        self.name = 'comp_frame_app'
+        self.main = create(None)
+        self.main.Show()
+
+        #self.SetTopWindow(self.frame)
+        return True
+
+    def OnExit(self):
+        self.ExitMainLoop()    # inherited from wx.App
+
+def newComponentFrame():
+    wx.InitAllImageHandlers()
+    application = App()
+
+    application.main.active_comp = CC.Component("component1")
+    application.main.calledByParent = False
+    application.main.displayPorts()
+    application.main.compNameBox.WriteText("component1")
+    application.main.compDescrBox.WriteText("Enter component description here")
+    if application.main.active_comp.ace == True:
+        application.main.ACEcheckBox.SetValue(True)
+    else:
+        application.main.ACEcheckBox.SetValue(False)
+
+    if application.main.active_comp.timing == True:
+        application.main.TimingcheckBox.SetValue(True)
+    else:
+        application.main.TimingcheckBox.SetValue(False)
+
+    application.main.deviceChoice.Enable(False)
+    application.main.nodeChoice.Enable(False)
+    application.MainLoop()
+
+
+
+################################################################################
+## If Component Developer is run as a seperate application
+################################################################################
+
+if __name__ == "__main__":
+    newComponentFrame()
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/images/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/images/Makefile.am	(revision 9483)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/images/Makefile.am	(revision 9483)
@@ -0,0 +1,5 @@
+EXTRA_DIST = minus.bmp \
+	     plus.bmp \
+	     uses.bmp \
+	     provides.bmp \
+	     ossieLogo.bmp
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/importNode.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/importNode.py	(revision 9580)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/importNode.py	(revision 9580)
@@ -0,0 +1,226 @@
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import os, sys
+
+import xml.dom.minidom
+from xml.dom.minidom import Node
+from importResource import getSimpleProperty, getSimpleSequenceProperty
+
+import ComponentClass as CC
+from errorMsg import *
+
+availableTypes = ["boolean", "char", "double", "float", "short", "long",
+                    "objref", "octet", "string", "ulong","ushort"]
+availableKinds = ["allocation", "configure", "test", "execparam", "factoryparam"]
+availableActions = ["eq", "ne", "gt", "lt", "ge", "le", "external"]
+availableModes = ["readonly", "readwrite", "writeonly"]
+
+def getNode(inpath,Nname,parent):
+
+    scdPath = inpath + "DeviceManager" + ".scd.xml"
+    spdPath = inpath + "DeviceManager" + ".spd.xml"
+    prfPath = inpath + "DeviceManager" + ".prf.xml"
+    dcdPath = inpath + "DeviceManager" + ".dcd.xml"
+
+    # import the node description from the node's .spd.xml file
+    doc_node_spd = xml.dom.minidom.parse(spdPath)
+    softpkgNode = doc_node_spd.getElementsByTagName("softpkg")[0]
+    Ndescription = ''
+    for n in softpkgNode.childNodes:
+        if n.nodeName == "description":
+            nDescriptionNode = doc_node_spd.getElementsByTagName("description")
+            try:
+                Ndescription = nDescriptionNode[0].firstChild.data
+            except:
+                pass
+            break
+
+    newNode = CC.Node(name=Nname, path=inpath, description=Ndescription, generate=False)
+
+    #
+    # Build the node from the DCD
+    #
+    doc_dcd = xml.dom.minidom.parse(dcdPath)
+    partitioningNodeList = doc_dcd.getElementsByTagName('partitioning')
+    if len(partitioningNodeList) != 1:
+        errorMsg(parent,"Invalid file: " + dcdPath + " (partitioning)")
+        return None
+
+    try:
+        deviceconfigurationNode = doc_dcd.getElementsByTagName('deviceconfiguration')[0]
+    except:
+        errorMsg(parent,"Invalid file: " + dcdPath + " (deviceconfiguration)")
+        return None
+    newNode.id = deviceconfigurationNode.getAttribute("id")
+
+    #
+    componentplacementNodeList = doc_dcd.getElementsByTagName("componentplacement")
+    for componentplacementNode in componentplacementNodeList:
+        newComp = CC.Component(type='executabledevice')
+        newComp.name = componentplacementNode.getElementsByTagName("usagename")[0].firstChild.data
+
+        # componentinstantiation
+        # strip off the DCE: part of the id becuase it will get added back in later
+        tmpUUID = componentplacementNode.getElementsByTagName("componentinstantiation")[0].getAttribute("id")
+        newComp.uuid = str( tmpUUID ).strip("DCE:")
+
+        # componentfileref
+        tmpNode = componentplacementNode.getElementsByTagName("componentfileref")
+        newComp.file_uuid = str( tmpNode[0].getAttribute("refid") ).strip("DCE:") # is this strip necessary?  -JDG
+
+        local_SPD = ""
+        componentfileNodeList = doc_dcd.getElementsByTagName("componentfile")
+        for componentfileNode in componentfileNodeList:
+            if componentfileNode.getAttribute("id") == newComp.file_uuid:
+                localfileNodeList = componentfileNode.getElementsByTagName("localfile")
+                local_SPD = localfileNodeList[0].getAttribute("name")
+                del localfileNodeList
+                break
+        pathSPD = parent.installPath + "dev/" + local_SPD
+
+        if not os.path.exists(pathSPD):
+            errorMsg(parent, "Warning! Could not find " + pathSPD + ".\nCannot import node " + Nname)
+            return None
+
+        doc_spd = xml.dom.minidom.parse(pathSPD)
+        softpkgNode = doc_spd.getElementsByTagName("softpkg")[0]
+        newComp.baseName = softpkgNode.getAttribute("name")
+        #pathSCD = "/sdr/sca/xml/"+newComp.baseName+"/"+doc_spd.softpkg.descriptor.localfile.name
+        localfileNode = softpkgNode.getElementsByTagName("localfile")[0]
+        pathSCD = parent.installPath + "dev"  + localfileNode.getAttribute("name")
+
+        doc_scd = xml.dom.minidom.parse(pathSCD)
+
+        # Get the Ports
+        portsNodes = doc_scd.getElementsByTagName("ports")
+        for node in portsNodes:
+            providesPortsNodes = node.getElementsByTagName("provides")
+            usesPortsNodes = node.getElementsByTagName("uses")
+
+        # Provides ports
+        for node in providesPortsNodes:
+            tmpName = node.getAttribute("providesname")
+            tmpInt = getInterface( node.getAttribute("repid"), tmpName )
+            if tmpInt == None:
+                errorMsg(parent, "No repid found in ProvidesPort")
+                return None
+            portTypeNodeList = node.getElementsByTagName("porttype")
+            tmpType = portTypeNodeList[0].getAttribute("type")
+            newPort = CC.Port(tmpName,tmpInt,type='Provides',portType=tmpType)
+            newComp.ports.append(newPort)
+
+        # Uses ports
+        for node in usesPortsNodes:
+            tmpName = node.getAttribute("usesname")
+            tmpInt = getInterface( node.getAttribute("repid"), tmpName )
+            if tmpInt == None:
+                errorMsg(parent, "No repid fond in UsesPort")
+                return None
+            portTypeNodeList = node.getElementsByTagName("porttype")
+            tmpType = portTypeNodeList[0].getAttribute("type")
+            newPort = CC.Port(tmpName,tmpInt,type='Uses',portType=tmpType)
+            newComp.ports.append(newPort)
+
+        # Make sure that xml and code are not generated for this resource
+        newComp.generate = False
+
+        # Store the name of the file without the suffix (.scd.xml)
+        newComp.xmlName =  os.path.splitext(os.path.splitext(os.path.basename(pathSCD))[0])[0]
+
+        newNode.Devices.append(newComp)
+
+        #
+        # Import the properties from the PRF file
+        #
+        # If there are no properties, just return the component as is
+        #if pathPRF == None:
+        #    return newComp
+        #
+        #doc_prf = amara.parse(stripDoctype(prfPath))
+        ##doc_prf = binderytools.bind_file(prfPath)
+        #if not hasattr(doc_prf,'properties'):
+        #    errorMsg(parent,"Invalid file: " + prfPath)
+        #    return None
+        #
+        #if hasattr(doc_prf.properties,"simple"):
+        #    for s in doc_prf.properties.simple:
+        #        p = getSimpleProperty(s)
+        #        if p == None:
+        #            #errorMsg(parent,"Invalid file: " + prfPath)
+        #            continue
+        #        newComp.properties.append(p)
+        #
+        #if hasattr(doc_prf.properties,"simplesequence"):
+        #    for s in doc_prf.properties.simplesequence:
+        #        p = getSimpleSequenceProperty(s)
+        #        if p == None:
+        #            #errorMsg(parent,"Invalid file: " + prfPath)
+        #            continue
+        #        newComp.properties.append(p)
+
+    return newNode
+
+
+
+def getInterface(repid,name):
+    try:
+        repid = repid.strip('IDL:')
+        repid = repid[:repid.rfind(':')]
+        tmpNS = repid[:repid.find('/')]
+        tmpName = repid[repid.find('/')+1:]
+        newInt = CC.Interface(tmpName,nameSpace=tmpNS)
+        return newInt
+
+    except:
+        errorMsg(parent,"Can't read the Interface information for port: " + name)
+        return None
+
+
+def findFile(path,Rname,suf):
+    tmpf = None
+    if os.path.isfile(path + '/' + Rname +'Resource'+suf):
+        tmpf = path + '/' + Rname +'Resource' + suf
+    elif os.path.isfile(path + '/' + Rname + suf):
+        tmpf = path + '/' + Rname + suf
+    else:
+        tmpFiles = os.listdir(path)
+        for f in tmpFiles:
+            if len(f)>=8 and f[-8:] == suf:
+                tmpf = path + '/' + f
+                break
+    return tmpf
+
+def stripDoctype(xmlfile):
+    """Strips out the DOCTYPE checking because the dtd files are positioned
+       in a relative location to the SCA (OSSIE) filesystem, so when Amara
+       trys to validate against them, it bails out looking for the file.
+       Returns a string representation of the xml file without the DOCTYPE line."""
+
+    file = open(xmlfile, 'r')
+    xml = ''
+    line = file.readline()
+    while len(line) > 0:
+        if "DOCTYPE" in line:
+            break
+        xml += line
+        line = file.readline()
+    xml += file.read()
+
+    return xml
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/Makefile.am	(revision 9912)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/Makefile.am	(revision 9912)
@@ -0,0 +1,25 @@
+SUBDIRS = generate \
+	  images \
+	  XML_gen
+
+EXTRA_DIST = cfg.py \
+	     AboutDialog.py \
+	     ComponentClass.py \
+	     ComponentFrame.py \
+	     ConnectDialog.py \
+	     errorMsg.py \
+	     importIDL.py \
+	     importNode.py \
+	     importResource.py \
+	     MainFrame.py \
+	     NodeDialog.py \
+	     PlatformClass.py \
+	     PortDialog.py \
+	     PropertiesDialog.py \
+	     WaveformClass.py \
+	     uuidgen.py \
+	     wd.py \
+		 chmod.py \
+		 datatypemap.py \
+	     __init__.py
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/importResource.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/importResource.py	(revision 8046)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/wavedev/importResource.py	(revision 8046)
@@ -0,0 +1,318 @@
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import os, sys
+import xml.dom.minidom
+from xml.dom.minidom import Node
+import ComponentClass as CC
+from errorMsg import *
+
+availableTypes = ["boolean", "char", "double", "float", "short", "long",
+                    "objref", "octet", "string", "ulong","ushort"]
+availableKinds = ["allocation", "configure", "test", "execparam", "factoryparam"]
+availableActions = ["eq", "ne", "gt", "lt", "ge", "le", "external"]
+availableModes = ["readonly", "readwrite", "writeonly"]
+
+def getResource(path,Rname,parent):
+    
+    scdPath = findFile(path,Rname,".scd.xml")                
+    if scdPath == None:         
+        errorMsg(parent,"No scd file found for: " + Rname)
+        return
+    
+    spdPath = findFile(path,Rname,".spd.xml")
+    prfPath = findFile(path,Rname,".prf.xml")
+    
+    #
+    # Build the main component or device from the SCD file    
+    #
+    doc_scd = xml.dom.minidom.parse(scdPath)
+    try:
+        componenttypeNode = doc_scd.getElementsByTagName("componenttype")
+        componenttype = componenttypeNode[0].childNodes[0].data
+    except:
+        errorMsg(parent,"Invalid file: " + scdPath)
+        return None
+    
+    doc_spd = xml.dom.minidom.parse(spdPath)
+
+    # get resource description
+    # note: this is not the same as the implementation description
+    softpkgNode = doc_spd.getElementsByTagName("softpkg")[0]
+    Rdescription = ''
+    for n in softpkgNode.childNodes:
+        if n.nodeName == "description":
+            resDescriptionNode = doc_spd.getElementsByTagName("description")
+            try:
+                Rdescription = resDescriptionNode[0].firstChild.data
+            except:
+                pass
+            break
+
+    #Instantiate a new component of the appropriate type
+    if componenttype == u'resource':
+        newComp = CC.Component(name=Rname,type='resource',description=Rdescription)
+    elif componenttype == u'executabledevice':
+        newComp = CC.Component(name=Rname,type='executabledevice',description=Rdescription)
+    elif componenttype == u'loadabledevice':
+        newComp = CC.Component(name=Rname,type='loadabledevice',description=Rdescription)
+    elif componenttype == u'device':
+        newComp = CC.Component(name=Rname,type='device',description=Rdescription)
+    else:
+        errorMsg(parent,"Can't identify resource type for: " + Rname)
+        return None
+        
+    # Get the Ports
+    portsNodes = doc_scd.getElementsByTagName("ports")
+    for node in portsNodes:
+        providesPortsNodes = node.getElementsByTagName("provides")
+        usesPortsNodes = node.getElementsByTagName("uses")
+
+    # Provides ports
+    for node in providesPortsNodes:
+        tmpName = node.getAttribute("providesname")
+        tmpInt = getInterface( node.getAttribute("repid"), tmpName )
+        if tmpInt == None:
+            return None
+        portTypeNodeList = node.getElementsByTagName("porttype")
+        tmpType = portTypeNodeList[0].getAttribute("type")
+        newPort = CC.Port(tmpName,tmpInt,type='Provides',portType=tmpType)
+        newComp.ports.append(newPort)
+
+    # Uses ports
+    for node in usesPortsNodes:
+        tmpName = node.getAttribute("usesname")
+        tmpInt = getInterface( node.getAttribute("repid"), tmpName )
+        if tmpInt == None:
+            return None
+        portTypeNodeList = node.getElementsByTagName("porttype")
+        tmpType = portTypeNodeList[0].getAttribute("type")
+        newPort = CC.Port(tmpName,tmpInt,type='Uses',portType=tmpType)
+        newComp.ports.append(newPort)
+
+    # Make sure that xml and code are not generated for this resource
+    newComp.generate = False        
+    
+    # Store the name of the file without the suffix (.scd.xml)
+    i = scdPath.rfind("/")
+    if i != -1:
+        newComp.xmlName = scdPath[i+1:-8]
+    else:
+        newComp.xmlName = scdPath[:-8]
+    
+    #
+    # Import the properties from the PRF file
+    #
+    # If there are no properties, just return the component as is
+    if prfPath == None:
+        return newComp
+    doc_prf = xml.dom.minidom.parse(prfPath)
+    try:
+        propertyNodeList = doc_prf.getElementsByTagName("properties")
+    except:
+        errorMsg(parent,"Invalid file: " + prfPath)
+        return None
+    
+    # get simple properties
+    simplePropertyNodeList = doc_prf.getElementsByTagName("simple")
+    for node in simplePropertyNodeList:
+        p = getSimpleProperty(node)
+        if p == None:
+            print "There was an error parsing simple properties in the PRF file " + prfPath
+            continue
+        newComp.properties.append(p)
+
+    # get simple sequence properties
+    simpleSequencePropertyNodeList = doc_prf.getElementsByTagName("simplesequence")
+    for node in simpleSequencePropertyNodeList:
+        p = getSimpleSequenceProperty(node, prfPath)
+        if p == None:
+            print "There was an error parsing simple sequence properties in the PRF file " + prfPath
+            continue
+        newComp.properties.append(p)
+
+    return newComp
+
+def getInterface(repid,name):
+    try:
+        repid = repid.strip('IDL:')
+        repid = repid[:repid.rfind(':')]
+        tmpNS = repid[:repid.find('/')]
+        tmpName = repid[repid.find('/')+1:]
+        newInt = CC.Interface(tmpName,nameSpace=tmpNS)
+        return newInt
+        
+    except:
+        errorMsg(parent,"Can't read the Interface information for port: " + name)
+        return None
+    
+    
+def findFile(path,Rname,suf):
+    tmpf = None
+    if os.path.isfile(path + '/' + Rname +'Resource'+suf):
+        tmpf = path + '/' + Rname +'Resource' + suf
+    elif os.path.isfile(path + '/' + Rname + suf):
+        tmpf = path + '/' + Rname + suf     
+    else:
+        tmpFiles = os.listdir(path)
+        for f in tmpFiles:
+            if len(f)>=8 and f[-8:] == suf:
+                tmpf = path + '/' + f
+                break
+    return tmpf
+
+def stripDoctype(xmlfile):
+    """Strips out the DOCTYPE checking because the dtd files are positioned 
+       in a relative location to the SCA (OSSIE) filesystem, so when Amara
+       trys to validate against them, it bails out looking for the file.
+       Returns a string representation of the xml file without the DOCTYPE line."""
+   
+    file = open(xmlfile, 'r')
+    xml = ''
+    line = file.readline()
+    while len(line) > 0:
+        if "DOCTYPE" in line:
+            break
+        xml += line
+        line = file.readline()
+    xml += file.read()
+
+    return xml
+                                                                    
+
+def getSimpleProperty(n):
+    tmpName = n.getAttribute("name")
+    tmpID   = n.getAttribute("id")
+    tmpType = n.getAttribute("type")
+    tmpMode = n.getAttribute("mode")
+    tmpDes = n.getAttribute("description")
+
+    if tmpName == "" or tmpID == "" or tmpType == "" or tmpMode == "":
+        return None
+    if tmpMode not in availableModes:
+        return None
+    if tmpType not in availableTypes:
+        return None
+    
+    newProp = CC.SimpleProperty(tmpName,tmpMode,tmpType,description=tmpDes)
+   
+    # Set ID
+    #UUID in the sad file will need to match the UUID in the prf (tmpID is from prf)
+    newProp.id = tmpID
+
+    # Get/set property value
+    valueNodeList = n.getElementsByTagName("value")
+    value = valueNodeList[0].childNodes[0].data
+    newProp.value = newProp.defaultValue = str(value)
+    del valueNodeList, value
+    
+    # Get/set property units
+    unitsNodeList = n.getElementsByTagName("units")
+    if len(unitsNodeList) > 0:
+        units = unitsNodeList[0].childNodes[0].data
+        newProp.units = str(s.units)
+    #del unitsNodeList, units
+    
+    # TODO: Get/set min/max values
+    # TODO: Get/set enum
+    
+    # Get/set kind
+    kindNodeList = n.getElementsByTagName("kind")
+    kindtype = kindNodeList[0].getAttribute("kindtype")
+    if kindtype == "":
+        return None
+    newProp.kind = str(kindtype)
+    del kindNodeList, kindtype
+    
+    # Get/set action
+    actionNodeList = n.getElementsByTagName("action")
+    if len(actionNodeList) > 0:
+        actiontype = actionNodeList[0].getAttribute("type")
+        newProp.action = str(actiontype)
+    #del actionNodeList, actiontype
+        
+    return newProp
+    
+def getSimpleSequenceProperty(n, prfPath):
+    tmpName = n.getAttribute("name")
+    tmpID   = n.getAttribute("id")
+    tmpType = n.getAttribute("type")
+    tmpMode = n.getAttribute("mode")
+    tmpDes = n.getAttribute("description")
+
+    if tmpName == "" or tmpID == "" or tmpType == "" or tmpMode == "":
+        return None
+    if tmpMode not in availableModes:
+        return None
+    if tmpType not in availableTypes:
+        return None
+    
+    newProp = CC.SimpleSequenceProperty(tmpName,tmpMode,tmpType,description=tmpDes)
+   
+    # Set ID
+    #UUID in the sad file will need to match the UUID in the prf (tmpID is from prf)
+    newProp.id = tmpID
+
+
+    # Get/set property values
+    newProp.values = []
+    newProp.defaultValues = []
+    valuesNodeList = n.getElementsByTagName("values")
+    
+    try:
+        valueNodeList = valuesNodeList[0].getElementsByTagName("value")
+    except:
+        valueNodeList = n.getElementsByTagName("value") #cbd
+        #print "\nERROR in " + prfPath
+        #print "ERROR parsing prf file.  You may be missing a values tag in a simple sequence property.\n"
+        #sys.exit()
+        print "\nWarning in " + prfPath
+        print "Warning parsing prf file.  You may be missing a values tag in a simple sequence property.\n"
+
+    for valueNode in valueNodeList:
+        tmpVal = valueNode.childNodes[0].data
+        newProp.values.append(str(tmpVal))
+        newProp.defaultValues.append(str(tmpVal))
+    del valueNodeList
+
+    # Get/set property units
+    unitsNodeList = n.getElementsByTagName("units")
+    if len(unitsNodeList) > 0:
+        units = unitsNodeList[0].childNodes[0].data
+        newProp.units = str(s.units)
+    #del unitsNodeList, units
+    
+    # TODO: Get/set min/max values
+    # TODO: Get/set enum
+    
+    # Get/set kind
+    kindNodeList = n.getElementsByTagName("kind")
+    kindtype = kindNodeList[0].getAttribute("kindtype")
+    if kindtype == "":
+        return None
+    newProp.kind = str(kindtype)
+    del kindNodeList, kindtype
+
+    # Get/set action
+    actionNodeList = n.getElementsByTagName("action")
+    if len(actionNodeList) > 0:
+        actiontype = actionNodeList[0].getAttribute("type")
+        newProp.action = str(actiontype)
+    #del actionNodeList, actiontype
+
+    return newProp
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/LICENSE
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/LICENSE	(revision 1003)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/LICENSE	(revision 1003)
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/.project
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/.project	(revision 9974)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/.project	(revision 9974)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>WaveDev</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.python.pydev.PyDevBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.python.pydev.pythonNature</nature>
+	</natures>
+</projectDescription>
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/INSTALL
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/INSTALL	(revision 4329)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/INSTALL	(revision 4329)
@@ -0,0 +1,38 @@
+############################################################
+## Instructions for Installing the OSSIE Waveform Developer
+############################################################
+
+Dependencies:
+* omniORB
+* omniORBpy
+* wxPython
+* OSSIE Core Framework
+* standardInterfaces (from ossie.mprg.org)
+
+(see http://ossie.mprg.org for more on installing these dependencies)
+
+- Once you unpackage the contents of the tarball there is no setup or
+  install file - just some configuration
+
+Configuration
+-------------
+
+If you have not already done so create a file called ossie.pth and put it
+in your python site-packages directory.
+Usually /usr/lib/python2.X/site-packages or /usr/local/lib/python2.X/site-packages
+
+- ossie.pth should contain the following lines (in addition to anything else
+that may or may not be in there):
+
+
+######################
+/usr/local/lib/python2.X/site-packages    ##(unless this is where you put the file)
+/full/path/to/WaveDev
+######################
+
+
+Running OSSIE Waveform Developer
+--------------------------------
+
+enter /path/to/WaveDev/wavedev and type:
+$ python wd.py
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/Makefile.am	(revision 9483)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/Makefile.am	(revision 9483)
@@ -0,0 +1,8 @@
+SUBDIRS = wavedev
+
+EXTRA_DIST = wavedev.cfg \
+	     __init__.py \
+	     INSTALL \
+	     LICENSE \
+	     README.txt 
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/README.txt
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/README.txt	(revision 4393)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/README.txt	(revision 4393)
@@ -0,0 +1,40 @@
+README.TXT
+
+------------
+Instructions
+------------
+
+1. Start the Waveform Developer python interface from the /wavedev/ directoy.
+
+       python wd.py
+
+2. To create the sample application, click on Help->Sample Waveform from the menu.
+   A basic application will be shown with a component list and related connections.
+
+3. Click Waveform->Generate from the menu and select the desired output directory.
+
+4. The waveform is now ready to be populated. Exit the Waveform Developer
+
+5. To build the waveform:
+   >> cd /path/to/generated_code/
+
+   enter each of the top-level directories created and type:
+   >> ./reconf
+   >> ./configure
+   >> make
+   >> make install
+
+7. To run:
+
+  - go to the base sdr installation directory: /sdr (default)
+
+  - start the naming service and the event service
+    (usually omniNames.sh)
+
+  - run the nodeBooter
+    >> nodeBooter -D -d /nodes/default_GPP_node.dcd.xml -P /sdr/dom -p /sdr/dev
+
+  - run your waveform from the base waveforms directory (default is
+    /sdr/dom/waveforms)
+    >> wavLoader.py <your waveform>_DAS.xml
+
Index: /ossiedev/branches/0.8.x/trunk/tools/WaveDev/.pydevproject
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WaveDev/.pydevproject	(revision 9974)
+++ /ossiedev/branches/0.8.x/trunk/tools/WaveDev/.pydevproject	(revision 9974)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?>
+
+<pydev_project>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+</pydev_project>
Index: /ossiedev/branches/0.8.x/trunk/tools/ALF
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/ALF	(revision 8156)
+++ /ossiedev/branches/0.8.x/trunk/tools/ALF	(revision 8156)
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+
+import alf.ALF
+
+alf.ALF.main ()
+
Index: /ossiedev/branches/0.8.x/trunk/tools/OEF-feature/.project
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/OEF-feature/.project	(revision 9607)
+++ /ossiedev/branches/0.8.x/trunk/tools/OEF-feature/.project	(revision 9607)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>OEF-feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
Index: /ossiedev/branches/0.8.x/trunk/tools/OEF-feature/build.properties
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/OEF-feature/build.properties	(revision 9607)
+++ /ossiedev/branches/0.8.x/trunk/tools/OEF-feature/build.properties	(revision 9607)
@@ -0,0 +1,3 @@
+bin.includes = feature.xml
+src.includes = feature.xml,\
+               build.properties
Index: /ossiedev/branches/0.8.x/trunk/tools/OEF-feature/feature.xml
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/OEF-feature/feature.xml	(revision 10560)
+++ /ossiedev/branches/0.8.x/trunk/tools/OEF-feature/feature.xml	(revision 10560)
@@ -0,0 +1,734 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="edu.vt.ossie.OWDFeature"
+      label="OSSIE Waveform Developer Feature (for OSSIE 0.8.1)"
+      version="1.1.7"
+      provider-name="Virginia Tech">
+
+   <description url="http://ossie.wireless.vt.edu/">
+      OSSIE is an open source Software Defined Radio (SDR) development
+      effort based at Wireless@Virginia Tech. OSSIE is primarily intended
+      to enable research and education in SDR and wireless communications.
+      This feature provides Eclipse support for developing SDR components
+      and waveforms.  It requires that you have already installed
+      OSSIE on your system.
+   </description>
+
+   <copyright>
+      (c) 2008 Virginia Tech
+   </copyright>
+
+   <license url="http://www.gnu.org/licenses/gpl.html">
+      GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. &lt;http://fsf.org/&gt;
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers&apos; and authors&apos; protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users&apos; and
+authors&apos; sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users&apos; freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  &quot;This License&quot; refers to version 3 of the GNU General Public License.
+
+  &quot;Copyright&quot; also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  &quot;The Program&quot; refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as &quot;you&quot;.  &quot;Licensees&quot; and
+&quot;recipients&quot; may be individuals or organizations.
+
+  To &quot;modify&quot; a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a &quot;modified version&quot; of the
+earlier work or a work &quot;based on&quot; the earlier work.
+
+  A &quot;covered work&quot; means either the unmodified Program or a work based
+on the Program.
+
+  To &quot;propagate&quot; a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To &quot;convey&quot; a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays &quot;Appropriate Legal Notices&quot;
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The &quot;source code&quot; for a work means the preferred form of the work
+for making modifications to it.  &quot;Object code&quot; means any non-source
+form of a work.
+
+  A &quot;Standard Interface&quot; means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The &quot;System Libraries&quot; of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+&quot;Major Component&quot;, in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The &quot;Corresponding Source&quot; for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work&apos;s
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users&apos; Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work&apos;s
+users, your or third parties&apos; legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program&apos;s source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    &quot;keep intact all notices&quot;.
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+&quot;aggregate&quot; if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation&apos;s users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A &quot;User Product&quot; is either (1) a &quot;consumer product&quot;, which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, &quot;normally used&quot; refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  &quot;Installation Information&quot; for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  &quot;Additional permissions&quot; are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered &quot;further
+restrictions&quot; within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An &quot;entity transaction&quot; is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party&apos;s predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A &quot;contributor&quot; is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor&apos;s &quot;contributor version&quot;.
+
+  A contributor&apos;s &quot;essential patent claims&quot; are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, &quot;control&quot; includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor&apos;s essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a &quot;patent license&quot; is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To &quot;grant&quot; such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  &quot;Knowingly relying&quot; means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient&apos;s use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is &quot;discriminatory&quot; if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others&apos; Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License &quot;or any later version&quot; applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy&apos;s
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM &quot;AS IS&quot; WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the &quot;copyright&quot; line and a pointer to where the full notice is found.
+
+    &lt;one line to give the program&apos;s name and a brief idea of what it does.&gt;
+    Copyright (C) &lt;year&gt;  &lt;name of author&gt;
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    &lt;program&gt;  Copyright (C) &lt;year&gt;  &lt;name of author&gt;
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w&apos;.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c&apos; for details.
+
+The hypothetical commands `show w&apos; and `show c&apos; should show the appropriate
+parts of the General Public License.  Of course, your program&apos;s commands
+might be different; for a GUI interface, you would use an &quot;about box&quot;.
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a &quot;copyright disclaimer&quot; for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+&lt;http://www.gnu.org/licenses/&gt;.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+&lt;http://www.gnu.org/philosophy/why-not-lgpl.html&gt;.
+   </license>
+
+   <url>
+      <update label="OSSIE Eclipse Update Site" url="http://ossie.wireless.vt.edu/eclipse/"/>
+      <discovery label="OSSIE Eclipse Update Site" url="http://ossie.wireless.vt.edu/eclipse_internal/"/>
+   </url>
+
+   <requires>
+      <import plugin="org.eclipse.core.runtime" version="3.2.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.core.filesystem" version="1.1.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.debug.ui" version="3.2.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.ui" version="3.3.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.ui.ide" version="3.3.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.ui.console" version="3.1.100" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.cdt.core"/>
+      <import plugin="org.eclipse.cdt.managedbuilder.core"/>
+      <import plugin="com.tools.logging"/>
+      <import feature="org.eclipse.cdt" version="5.0.2" match="greaterOrEqual"/>
+      <import feature="org.python.pydev.feature" version="1.5.0" match="greaterOrEqual"/>
+      <import feature="org.tigris.subversion.subclipse" version="1.6.13"/>
+      <import feature="org.tigris.subversion.clientadapter.feature" version="1.6.12"/>
+      <import feature="org.tigris.subversion.clientadapter.svnkit.feature" version="1.6.12"/>
+   </requires>
+
+   <plugin
+         id="com.tools.logging"
+         download-size="0"
+         install-size="0"
+         version="1.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="edu.vt.ossie.OWDPlugin"
+         download-size="0"
+         install-size="0"
+         version="1.1.7"
+         unpack="false"/>
+
+</feature>
Index: /ossiedev/branches/0.8.x/trunk/tools/OEF-feature/build.xml
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/OEF-feature/build.xml	(revision 10272)
+++ /ossiedev/branches/0.8.x/trunk/tools/OEF-feature/build.xml	(revision 10272)
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="edu.vt.ossie.OWDFeature" default="build.update.jar" basedir=".">
+
+    <property name="feature.name"    value="${ant.project.name}"/>
+    <property name="feature.version" value="1.1.5"/>
+
+	<target name="init">
+		<property name="feature.temp.folder" value="${basedir}/feature.temp.folder"/>
+		<property name="feature.destination" value="${basedir}"/>
+	</target>
+
+	<target name="all.plugins" depends="init">
+		<ant antfile="build.xml" dir="../OEF" target="${target}">
+		</ant>
+	</target>
+	<target name="all.features" depends="init">
+	</target>
+	<target name="update.feature" depends="init">
+	</target>
+
+	<target name="all.children" depends="init,all.features,all.plugins,update.feature">
+	</target>
+
+	<target name="children" if="include.children">
+		<antcall target="all.children"/>
+	</target>
+
+	<target name="build.jars" depends="init" description="Build all the jars for the feature: ${feature.name}.">
+		<antcall target="all.children">
+			<param name="target" value="build.jars"/>
+		</antcall>
+	</target>
+
+	<target name="build.sources" depends="init">
+		<antcall target="all.children">
+			<param name="target" value="build.sources"/>
+		</antcall>
+	</target>
+
+	<target name="build.zips" depends="init">
+		<antcall target="all.children">
+			<param name="target" value="build.zips"/>
+		</antcall>
+	</target>
+
+	<target name="build.update.jar" depends="init" description="Build the feature jar of: ${feature.name} for an update site.">
+		<antcall target="all.children">
+			<param name="target" value="build.update.jar"/>
+		</antcall>
+		<property name="feature.base" value="${feature.temp.folder}"/>
+		<delete dir="${feature.temp.folder}"/>
+		<mkdir dir="${feature.temp.folder}"/>
+		<antcall target="gather.bin.parts" inheritAll="false">
+			<param name="arch" value="*"/>
+			<param name="ws" value="*"/>
+			<param name="nl" value="*"/>
+			<param name="os" value="*"/>
+			<param name="feature.base" value="${feature.temp.folder}"/>
+		</antcall>
+		<jar destfile="${feature.destination}/${feature.name}_${feature.version}.jar" basedir="${feature.temp.folder}/features/${feature.name}_${feature.version}"/>
+		<delete dir="${feature.temp.folder}"/>
+	</target>
+
+	<target name="gather.bin.parts" depends="init" if="feature.base">
+		<mkdir dir="${feature.base}/features/${feature.name}_${feature.version}"/>
+		<antcall target="children">
+			<param name="destination.temp.folder" value="${feature.base}/plugins"/>
+			<param name="target" value="gather.bin.parts"/>
+		</antcall>
+		<copy todir="${feature.base}/features/${feature.name}_${feature.version}" failonerror="true" overwrite="false">
+			<fileset dir="${basedir}">
+				<include name="feature.xml"/>
+			</fileset>
+		</copy>
+		<eclipse.idReplacer featureFilePath="${feature.base}/features/${feature.name}_${feature.version}/feature.xml"  selfVersion="${feature.version}" featureIds="" pluginIds=""/>
+		<antcall target="rootFiles${os}_${ws}_${arch}"/>
+	</target>
+	<target name="rootFiles*_*_*">
+	</target>
+	<target name="rootFilesgroup_group_group">
+		<antcall target="rootFiles*_*_*"/>
+	</target>
+
+	<target name="zip.distribution" depends="init" description="Create a zip containing all the plug-ins and features for the feature: ${feature.name}.">
+		<delete dir="${feature.temp.folder}"/>
+		<mkdir dir="${feature.temp.folder}"/>
+		<antcall target="gather.bin.parts">
+			<param name="arch" value="*"/>
+			<param name="ws" value="*"/>
+			<param name="nl" value="*"/>
+			<param name="include.children" value="true"/>
+			<param name="feature.base" value="${feature.temp.folder}"/>
+			<param name="os" value="*"/>
+		</antcall>
+		<zip destfile="${feature.destination}/${feature.name}_${feature.version}.bin.dist.zip" basedir="${feature.temp.folder}" filesonly="false" whenempty="skip" update="false"/>
+		<delete dir="${feature.temp.folder}"/>
+	</target>
+
+	<target name="zip.sources" depends="init">
+		<delete dir="${feature.temp.folder}"/>
+		<mkdir dir="${feature.temp.folder}"/>
+		<antcall target="all.children">
+			<param name="destination.temp.folder" value="${feature.temp.folder}/plugins/${feature.name}.source_${feature.version}/src"/>
+			<param name="include.children" value="true"/>
+			<param name="target" value="gather.sources"/>
+		</antcall>
+		<zip destfile="${feature.destination}/${feature.name}_${feature.version}.src.zip" basedir="${feature.temp.folder}" filesonly="true" whenempty="skip" update="false"/>
+		<delete dir="${feature.temp.folder}"/>
+	</target>
+
+	<target name="zip.logs" depends="init">
+		<delete dir="${feature.temp.folder}"/>
+		<mkdir dir="${feature.temp.folder}"/>
+		<antcall target="all.children" inheritAll="false">
+			<param name="destination.temp.folder" value="${feature.temp.folder}/plugins"/>
+			<param name="include.children" value="true"/>
+			<param name="target" value="gather.logs"/>
+		</antcall>
+		<zip destfile="${feature.destination}/${feature.name}_${feature.version}.log.zip" basedir="${feature.temp.folder}" filesonly="true" whenempty="skip" update="false"/>
+		<delete dir="${feature.temp.folder}"/>
+	</target>
+
+	<target name="clean" depends="init" description="Clean the feature: ${feature.name} of all the zips, jars and logs created.">
+		<delete file="${feature.destination}/${feature.name}_${feature.version}.jar"/>
+		<delete file="${feature.destination}/${feature.name}_${feature.version}.bin.dist.zip"/>
+		<delete file="${feature.destination}/${feature.name}_${feature.version}.log.zip"/>
+		<delete file="${feature.destination}/${feature.name}_${feature.version}.src.zip"/>
+		<delete dir="${feature.temp.folder}"/>
+		<antcall target="all.children">
+			<param name="target" value="clean"/>
+		</antcall>
+	</target>
+
+	<target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
+		<eclipse.convertPath fileSystemPath="/Users/edwards/Documents/ossieWorkspace/OWD-feature/" property="resourcePath"/>
+		<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
+		<antcall target="all.children">
+			<param name="target" value="refresh"/>
+		</antcall>
+	</target>
+	<target name="gather.sources">
+		<antcall target="children">
+			<param name="destination.temp.folder" value="${feature.temp.folder}/plugins/${feature.name}.source_${feature.version}/src"/>
+			<param name="target" value="gather.sources"/>
+		</antcall>
+	</target>
+
+	<target name="gather.logs" depends="init">
+		<mkdir dir="${feature.temp.folder}"/>
+		<antcall target="all.children" inheritAll="false">
+			<param name="destination.temp.folder" value="${feature.temp.folder}/plugins"/>
+			<param name="target" value="gather.logs"/>
+		</antcall>
+	</target>
+
+</project>
Index: /ossiedev/branches/0.8.x/trunk/tools/WAVEDASH
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/WAVEDASH	(revision 10386)
+++ /ossiedev/branches/0.8.x/trunk/tools/WAVEDASH	(revision 10386)
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+
+import wavedash.src.WavedashView
+
+wavedash.src.WavedashView.main ()
+
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/LICENSE
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/LICENSE	(revision 6441)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/LICENSE	(revision 6441)
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/profiles/process_stats.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/profiles/process_stats.py	(revision 8264)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/profiles/process_stats.py	(revision 8264)
@@ -0,0 +1,70 @@
+## Copyright 2005, 2006, 2007, 2008 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE ALF Waveform Application Visualization Environment
+##
+## ALF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## ALF is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import profile
+import pstats
+import os
+import re
+
+
+if __name__ == "__main__":
+
+    profile_files = os.listdir(".")
+
+    my_stats = None
+
+
+    for file in profile_files:
+        if file.find(".profile") != -1:
+            if my_stats == None:
+                my_stats = pstats.Stats(file)
+            else:
+                my_stats.add(file)
+    
+    
+
+    my_stats.strip_dirs()
+
+    #my_stats.sort_stats('time')
+    #my_stats.print_stats()
+
+
+    
+    my_stats.sort_stats('cumulative')
+    my_stats.print_stats()
+
+    #my_stats.sort_stats('name')
+    #my_stats.print_stats()
+
+    #my_stats.print_callers()
+    #my_stats.print_callees()
+
+
+    '''
+    my_stats.sort_stats('line')
+    my_stats.print_stats()
+    
+
+    my_stats.sort_stats('calls')
+    my_stats.print_stats(50)
+
+
+    '''
+
+
+
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/profiles/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/profiles/Makefile.am	(revision 9483)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/profiles/Makefile.am	(revision 9483)
@@ -0,0 +1,2 @@
+EXTRA_DIST = process_stats.py
+
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/ALFNSChoiceDialog.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/ALFNSChoiceDialog.py	(revision 10499)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/ALFNSChoiceDialog.py	(revision 10499)
@@ -0,0 +1,84 @@
+## Copyright 2005, 2006, 2007, 2008, 2009 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE ALF Waveform Application Visualization Environment
+##
+## ALF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## ALF is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+from namingserviceDialog import NamingserviceDialog
+
+
+class ALFNSChoiceDialog(wx.Dialog):
+    def __init__(self, parent):
+        wx.Dialog.__init__(self,
+                parent=None,
+                id=-1,
+                title='Warning!',
+                pos=wx.DefaultPosition,
+                size=wx.Size(400, 100))
+        self.parent = parent
+
+        panel = wx.Panel(self)
+        vbox = wx.BoxSizer(wx.VERTICAL)
+        hbox = wx.BoxSizer(wx.HORIZONTAL)
+        
+
+        text = wx.StaticText(panel, -1, "The naming service is not running locally!")
+        startLocallyButton = wx.Button(panel, -1, 'Start Locally')
+        connectRemoteButton = wx.Button(panel, -1, 'Connect Remotely')
+        cancelButton = wx.Button(panel, -1, 'Cancel')
+        startLocallyButton.Bind(wx.EVT_BUTTON, self.startLocally)
+        connectRemoteButton.Bind(wx.EVT_BUTTON, self.connectRemote)
+        cancelButton.Bind(wx.EVT_BUTTON, self.OnExit)
+
+        hbox.Add(startLocallyButton, 1, wx.LEFT, 5)
+        hbox.Add(connectRemoteButton, 1, wx.LEFT | wx.RIGHT, 5)
+        hbox.Add(cancelButton, 1, wx.RIGHT, 5)
+
+        vbox.Add(text, 0, wx.ALIGN_CENTER| wx.TOP, 10)
+        vbox.Add(hbox, 1, wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, 10)
+        panel.SetSizer(vbox)
+        vbox.Fit(self)
+        self.Center()
+        self.ShowModal()
+        
+        self.Destroy()
+
+  
+    def startLocally(self, event):
+        self.parent.nbUtils.startNamingService()
+        self.EndModal(-1)
+        
+    def connectRemote(self, event):
+        self.parent.namingservice_dialog = NamingserviceDialog(self.parent)
+        self.EndModal(-1)
+
+    def OnExit(self, event):
+        self.EndModal(-2)
+        #self.GetParent().Destroy()
+        
+def main():
+    app = wx.App()
+    frame = wx.Frame(None, -1, "test")
+    frame.Center()
+    frame.Show()
+    anscd = ALFNSChoiceDialog(frame)
+    app.MainLoop()
+    
+        
+if __name__ == '__main__':
+    main()  
+        
+  
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/ALF.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/ALF.py	(revision 10633)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/ALF.py	(revision 10633)
@@ -0,0 +1,1229 @@
+#! /bin/env python
+
+## Copyright 2005, 2006, 2007, 2008 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE ALF Waveform Application Visualization Environment
+##
+## ALF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## ALF is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+from wx.lib import ogl
+
+try:   # mac framework
+    from wavedev import ComponentClass as CC
+    from wavedev import WaveformClass
+    import CF, CF__POA
+    import customInterfaces
+    import standardInterfaces
+    import importResource
+    import importIDL
+
+except ImportError:  # 0.6.2
+    from WaveDev.wavedev import ComponentClass as CC
+    from WaveDev.wavedev import WaveformClass
+    import ossie.standardinterfaces.standardInterfaces as standardInterfaces
+    import ossie.custominterfaces.customInterfaces as customInterfaces
+    import ossie.cf.CF as CF
+    import ossie.cf.CF__POA as CF__POA
+    import WaveDev.wavedev.importResource as importResource
+    import WaveDev.wavedev.importIDL as importIDL
+
+from omniORB import CORBA, PortableServer
+import CosNaming
+import sys
+import importWaveform
+import ALFshapes, ALFtiming
+
+import xml.dom.minidom
+from xml.dom.minidom import Node
+
+import os
+import ALFutils
+
+import connectTool
+from namingserviceDialog import NamingserviceDialog
+import compform
+import shutil
+import shlex
+import subprocess
+import ConfigParser
+from ALFNodeBooterUtils import ALFNodeBooterUtils
+from ALFNSChoiceDialog import ALFNSChoiceDialog
+from ALFNodeBooterDialog import ALFNodeBooterDialog
+
+import wx.lib.foldpanelbar as fpb
+
+#----------------------------------------------------------------------
+# Create unique IDs for menu items and toolbar items for associating
+# events with a particular action
+[wxID_TOOLBAR_TIMING_TOOL, wxID_TOOLBAR_REFRESH_TOOL,
+wxID_TOOLBAR_TIMING_DISPLAY_TOOL, wxID_TOOLBAR_CONNECT_TOOL,
+wxID_TOOLBAR_NAMINGSERVICE_DIALOG, wxID_TOOLBAR_LAUNCH_WAVEDASH,
+wxID_TOOLBAR_START_NODEBOOTER] = [wx.NewId() for x in range(7)]
+
+[wxID_NSBOX_POPUP_DISPLAY, wxID_NSBOX_POPUP_START, 
+ wxID_NSBOX_POPUP_STOP, wxID_NSBOX_POPUP_UNINSTALL] = [
+                                                 wx.NewId() for x in range(4)]
+
+[wxID_INSTALLBOX_POPUP_INSTALL_START, wxID_COMPONENTSBOX_POPUP_INSTALL_START, 
+ wxID_INSTALLBOX_POPUP_INSTALL, wxID_COMPONENTSBOX_POPUP_INSTALL] = [wx.NewId() for x in range(4)]
+
+OSSIE_CONFIG_FILE = '.ossie.cfg'
+#----------------------------------------------------------------------
+class alfApp(wx.App):
+    def OnInit(self):
+        self.main = alfFrame(None)
+        self.main.Show()
+        self.SetTopWindow(self.main)
+        return True
+
+#----------------------------------------------------------------------
+class alfFrame(wx.Frame):
+    def _init_ctrls(self, parent):
+        wx.Frame.__init__(self, id=-1, name='CompFrame',
+            parent=parent, pos=wx.DefaultPosition, size=wx.Size(1100, 770),
+            style=wx.DEFAULT_FRAME_STYLE, title=u'ALF Waveform Debugger - OSSIE Waveform Workshop')
+        
+        # Initialize graphics
+        ogl.OGLInitialize()
+        ALFshapes.initializeColours()
+
+        # Create the sash window and layout
+        self._leftWindow = wx.SashLayoutWindow(self, 101, wx.DefaultPosition,
+            wx.Size(240, 600), wx.NO_BORDER | wx.SW_3D | wx.CLIP_CHILDREN)
+            
+        self._leftWindow.SetDefaultSize(wx.Size(300, 400))
+        self._leftWindow.SetOrientation(wx.LAYOUT_VERTICAL)
+        self._leftWindow.SetAlignment(wx.LAYOUT_LEFT)
+        self._leftWindow.SetSashVisible(wx.SASH_RIGHT, True)
+        self._leftWindow.SetExtraBorderSize(10)
+
+        self.ID_WINDOW_TOP = 100
+        self.ID_WINDOW_LEFT = 101
+        self.ID_WINDOW_RIGHT = 102
+        self.ID_WINDOW_BOTTOM = 103
+
+        self._leftWindow.Bind(wx.EVT_SASH_DRAGGED_RANGE, self.OnFoldPanelBarDrag,
+            id=100, id2=103)
+        self.Bind(wx.EVT_SIZE, self.OnFoldPanelSize)
+        
+        # Instantiate the main canvas
+        self.canvas = MainWindow(self, self)
+
+        # Create the fold panel and add its windows
+        self._fpb_pnl = None
+        self.CreateFoldPanel()
+        
+        # Create the status and toolbars
+        self.CreateStatusBar(1, wx.ST_SIZEGRIP)
+        self.CreateToolBar()
+
+        # Make a popup box for the Naming Service / Manage Waveforms functionality
+        self.nsBoxPopup = wx.Menu(title=u'')
+        self.init_nsBoxPopup_Items(self.nsBoxPopup)
+        
+        # Make a popup box for the Launch Waveforms functionality
+        self.installBoxPopup = wx.Menu(title=u'')
+        self.init_installBoxPopup_Items(self.installBoxPopup)
+
+        # Make a popup box for the Launch Components asWaveforms functionality
+        self.componentsBoxPopup = wx.Menu(title=u'')
+        self.init_componentsBoxPopup_Items(self.componentsBoxPopup)
+
+        self.setupToolbar()
+        
+        self.Bind(wx.EVT_CLOSE, self.OnClose)
+        self.connections = {'127.0.0.1': []}
+        self.namingservice = ['127.0.0.1', '']
+        self.nodeBooterProcess = None
+        self.nbUtils = ALFNodeBooterUtils()
+        if not self.nbUtils.namingServiceIsRunning():
+            anscd = ALFNSChoiceDialog(self)
+        
+
+    def __init__(self,parent):
+        self.active_wave = None
+        self.timing_display = None
+        self.tools = None
+        self.connect_frame = None
+        self.waveform_displays = {}
+
+        # WARNING: if alf is restarted and waveforms are left running
+        # counters will overlap and cause a crash :/
+        self.compform_counter = 0
+
+        self._init_ctrls(parent)
+        self.Available_Ints = ALFutils.importStandardIdl(self)
+        self.rootContext = None
+        self.domMgr = None
+        self.fileMgr = None
+        
+        
+        self.init_CORBA()
+        
+        ALFutils.LoadConfiguration(self)
+
+        self.waveformData = {}
+        self.tool_frames = []
+        self.last_waveform_data_update = None
+        self.dasXML_list = []
+        self.availableWaveforms = {}
+        self.availableComponents = {}
+        self.connections = {'127.0.0.1': []}
+
+        if self.rootContext != None and self.fileMgr != None:
+            self.DisplayInstalledWaveforms()
+            self.DisplayAvailableWaveforms()
+            self.DisplayAvailableComponents()
+
+    def init_CORBA(self):
+        """Initialize an orb and try to connect to the DomainManager"""
+
+        try:
+            sys.argv.index('-ORBInitRef')
+        except ValueError:
+            sys.argv.append('-ORBInitRef')
+            sys.argv.append('NameService=corbaname::'+self.namingservice[0])
+            
+        #find the host Ip from the command line args
+        isNSonLocalHost = False
+        for i in range(len(sys.argv)):
+            arg = sys.argv[i]
+            if arg.find("corbaname::") != -1:
+                hostIP = arg[arg.index("::")+2:]
+                if hostIP == '127.0.0.1':
+                    isNSonLocalHost = True
+                    break
+
+        try:
+            self.orb.destroy()
+        except:
+            pass
+
+        self.orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
+        self.obj = self.orb.resolve_initial_references("NameService")
+        
+        try:
+            self.rootContext = self.obj._narrow(CosNaming.NamingContext)
+        except:
+            newNS = False
+            while not newNS:
+                ts = "Failed to narrow the root naming context.\n"
+                ts += "Are the Naming Service and nodeBooter running on "+self.namingservice[0]+"?"
+                errorMsg(self, ts)
+                self.namingservice_dialog = NamingserviceDialog(self)
+                if self.namingservice_dialog.GetReturnCode() == 1:
+                    newNS = True
+            return
+        
+        #comp form feature is enabled only when NamingService is running on localhost.
+        if ( isNSonLocalHost is True ):
+            self.componentsBox.Enable(True)
+        else:
+            self.componentsBox.Enable(False)
+            wx.MessageBox("Warning: Comp Form feature will be disabled when naming service is running remotely")
+        
+        if self.rootContext is None:
+            errorMsg(self,"Failed to narrow the root naming context")
+            self.domMgr = None
+            return
+
+        name = [CosNaming.NameComponent("DomainName1",""),
+            CosNaming.NameComponent("DomainManager","")]
+            
+        try:
+            self.obj = self.rootContext.resolve(name)
+        except:
+            errorMsg(self,"DomainManager name not found")
+            self.domMgr = None
+            return
+
+        self.domMgr = self.obj._narrow(CF.DomainManager)
+         #get the reference to FileManager to perform all file operations (list, open etc.. )
+        try:
+            self.fileMgr = self.domMgr._get_fileMgr()
+        except:
+            msg = "init_CORBA(): FATAL Error: Could not get file Manager from Domain manager\n"
+            msg = msg + "Is nodeBooter Running??"
+            errorMsg (self, msg)
+            self.fileMgr = None
+            return
+            
+ 
+    #---------------------------------------------------------------
+    # Setup the display
+    #---------------------------------------------------------------
+    def init_nsBoxPopup_Items(self, parent):
+        """Setup the popup menu for the Naming Service / Manage Waveforms box"""
+
+        parent.Append(help='', id=wxID_NSBOX_POPUP_DISPLAY, kind=wx.ITEM_NORMAL, 
+                      text=u'Display')
+        self.nsBox.Bind(wx.EVT_MENU, self.OnNsBoxPopupDisplayMenu, 
+                        id=wxID_NSBOX_POPUP_DISPLAY)
+        
+        parent.Append(help='', id=wxID_NSBOX_POPUP_START, kind=wx.ITEM_NORMAL, 
+                      text=u'Start')
+        self.nsBox.Bind(wx.EVT_MENU, self.OnNsBoxPopupStartMenu, 
+                        id=wxID_NSBOX_POPUP_START)
+
+        parent.Append(help='', id=wxID_NSBOX_POPUP_STOP, kind=wx.ITEM_NORMAL, 
+                      text=u'Stop')
+        self.nsBox.Bind(wx.EVT_MENU, self.OnNsBoxPopupStopMenu, 
+                        id=wxID_NSBOX_POPUP_STOP)
+
+        parent.Append(help='', id=wxID_NSBOX_POPUP_UNINSTALL, kind=wx.ITEM_NORMAL, 
+                      text=u'Uninstall')
+        self.nsBox.Bind(wx.EVT_MENU, self.OnNsBoxPopupUninstallMenu, 
+                        id=wxID_NSBOX_POPUP_UNINSTALL)
+    
+    def init_installBoxPopup_Items(self, parent):
+        """Setup the popup menu for the Launch Waveforms box"""
+
+        parent.Append(help='', id=wxID_INSTALLBOX_POPUP_INSTALL_START, 
+                        kind=wx.ITEM_NORMAL, text=u'Install and Start')
+        self.installBox.Bind(wx.EVT_MENU, self.OnInstallBoxPopupInstallStartMenu, 
+                        id=wxID_INSTALLBOX_POPUP_INSTALL_START)
+
+        parent.Append(help='', id=wxID_INSTALLBOX_POPUP_INSTALL, 
+                        kind=wx.ITEM_NORMAL, text=u'Install')
+        self.installBox.Bind(wx.EVT_MENU, self.OnInstallBoxPopupInstallMenu, 
+                        id=wxID_INSTALLBOX_POPUP_INSTALL)
+       
+    def init_componentsBoxPopup_Items(self, parent):
+        """Setup the popup menu for the Launch Components as Waveforms box"""
+
+        parent.Append(help='', id=wxID_COMPONENTSBOX_POPUP_INSTALL_START, 
+                        kind=wx.ITEM_NORMAL, text=u'Install and Start')
+        self.componentsBox.Bind(wx.EVT_MENU, self.OnComponentsBoxPopupInstallStartMenu, 
+                        id=wxID_COMPONENTSBOX_POPUP_INSTALL_START)
+
+        parent.Append(help='', id=wxID_COMPONENTSBOX_POPUP_INSTALL, 
+                        kind=wx.ITEM_NORMAL, text=u'Install')
+        self.componentsBox.Bind(wx.EVT_MENU, self.OnComponentsBoxPopupInstallMenu, 
+                        id=wxID_COMPONENTSBOX_POPUP_INSTALL)
+ 
+    def CreateFoldPanel(self):
+        self._fpb_pnl = fpb.FoldPanelBar(self._leftWindow, -1, wx.DefaultPosition,
+            wx.Size(-1,-1), 0)
+	
+        # Create the image list for the fold button icons
+        Images = wx.ImageList(16,16)
+        Images.Add(ALFutils.GetExpandedIconBitmap())
+        Images.Add(ALFutils.GetCollapsedIconBitmap())
+            
+        # Add the Launch Waveforms box
+        item = self._fpb_pnl.AddFoldPanel("Launch Waveform Applications", 
+                                          collapsed=False,
+                                          foldIcons=Images)
+        self.installBox = wx.TreeCtrl(name=u'installBox', 
+                                      parent=item,
+                                      size = wx.Size(-1,200), 
+                                      style = wx.TR_HIDE_ROOT | 
+                                              wx.TR_HAS_BUTTONS | 
+                                              wx.SIMPLE_BORDER)
+        self._fpb_pnl.AddFoldPanelWindow(item, self.installBox, 
+                                         fpb.FPB_ALIGN_WIDTH, 4) 
+        self.installBox.Bind(wx.EVT_RIGHT_UP, self.OnInstallBoxRightUp)
+        self.installBox.Bind(wx.EVT_LEFT_DCLICK, self.OnInstallBoxLeftDclick)
+
+        # Add the Launch Components as Waveforms box
+        item = self._fpb_pnl.AddFoldPanel("Launch Components as Applications", 
+                                          collapsed=False,
+                                          foldIcons=Images)
+        self.componentsBox = wx.TreeCtrl(name=u'componentsBox', 
+                                         parent=item,
+                                         size = wx.Size(-1,200), 
+                                         style = wx.TR_HIDE_ROOT | 
+                                                 wx.TR_HAS_BUTTONS | 
+                                                 wx.SIMPLE_BORDER)
+        self._fpb_pnl.AddFoldPanelWindow(item, self.componentsBox, 
+                                         fpb.FPB_ALIGN_WIDTH, 4) 
+        self.componentsBox.Bind(wx.EVT_RIGHT_UP, self.OnComponentsBoxRightUp)
+        self.componentsBox.Bind(wx.EVT_LEFT_DCLICK, 
+                                self.OnComponentsBoxLeftDclick)
+
+        # Add the Manage Waveforms box
+        item = self._fpb_pnl.AddFoldPanel("Manage Applications", 
+                                          collapsed=False, 
+                                          foldIcons=Images)
+        self.nsBox = wx.TreeCtrl(name=u'nsBox', parent=item,
+                                 size = wx.Size(-1,200), 
+                                 style = wx.TR_HIDE_ROOT | 
+                                         wx.TR_HAS_BUTTONS | 
+                                         wx.SIMPLE_BORDER)
+        self.nsBox.Bind(wx.EVT_RIGHT_UP, self.OnNsBoxRightUp)
+        self.nsBox.Bind(wx.EVT_LEFT_DCLICK, self.OnNsBoxLeftDclick)
+        self._fpb_pnl.AddFoldPanelWindow(item, self.nsBox, 
+                                         fpb.FPB_ALIGN_WIDTH, 4) 
+
+        self._leftWindow.SizeWindows()
+       
+        
+    def setupToolbar(self):
+        toolbar = self.GetToolBar()
+        tsize = (20,20)
+        test_bmp = wx.ArtProvider.GetBitmap(wx.ART_REDO, wx.ART_TOOLBAR, tsize)
+        toolbar.AddSimpleTool(wxID_TOOLBAR_REFRESH_TOOL,test_bmp,shortHelpString="Refresh")
+        toolbar.AddSeparator()
+
+        root = __file__
+        if os.path.islink (root):
+            root = os.path.realpath (root)
+        root = os.path.dirname (os.path.abspath (root))
+
+        time_img = wx.Image(root + '/images/timing.png',type=wx.BITMAP_TYPE_PNG)
+        time_img.Rescale(24,24)
+        time_bmp = wx.BitmapFromImage(time_img)
+        toolbar.AddCheckTool(wxID_TOOLBAR_TIMING_TOOL,time_bmp,shortHelp="Enable Timing")
+        self.timing_view_state = False
+
+        time_img = wx.Image(root + '/images/timing_display.png',type=wx.BITMAP_TYPE_PNG)
+        time_img.Rescale(24,24)
+        time_bmp = wx.BitmapFromImage(time_img)
+        toolbar.AddCheckTool(wxID_TOOLBAR_TIMING_DISPLAY_TOOL,time_bmp,shortHelp="Toggle Timing Display")
+        
+        toolbar.AddSeparator()
+
+
+        connect_bmp = wx.ArtProvider.GetBitmap(wx.ART_COPY, wx.ART_TOOLBAR, tsize)
+        toolbar.AddSimpleTool(wxID_TOOLBAR_CONNECT_TOOL,connect_bmp,shortHelpString="Connect Tool")
+
+        toolbar.AddSeparator()
+
+        net_img = wx.Image(root + '/images/network.png',type=wx.BITMAP_TYPE_PNG)
+        net_img.Rescale(24,24)
+        net_bmp = wx.BitmapFromImage(net_img)
+        toolbar.AddSimpleTool(wxID_TOOLBAR_NAMINGSERVICE_DIALOG,net_bmp,shortHelpString="Select Naming Service")
+        
+        toolbar.AddSeparator()
+        wavedash_img = wx.Image(root + '/images/launch_wavedash.png', type=wx.BITMAP_TYPE_PNG)
+        wavedash_img.Rescale(24,24)
+        wavedash_bmp = wx.BitmapFromImage(wavedash_img)
+        toolbar.AddSimpleTool(wxID_TOOLBAR_LAUNCH_WAVEDASH, wavedash_bmp, shortHelpString="Launch Wavedash to configure waveforms")
+
+        toolbar.AddSeparator()
+        nodeBooter_img = wx.Image(root + '/images/nbstart.png', type = wx.BITMAP_TYPE_PNG)
+        nodeBooter_img.Rescale(24, 24)
+        nodeBooter_bmp = wx.BitmapFromImage(nodeBooter_img)
+        toolbar.AddSimpleTool(wxID_TOOLBAR_START_NODEBOOTER, nodeBooter_bmp, shortHelpString="Start NodeBooter")
+        toolbar.Bind(wx.EVT_TOOL, self.OnToolBarClick)
+        
+        toolbar.Realize()
+
+    # ---------------------------------------------------
+    # Event handling for toolbar
+    # ---------------------------------------------------
+    def OnToolBarClick(self,event):
+        tb = self.GetToolBar()
+        if event.GetId() == wxID_TOOLBAR_TIMING_TOOL:
+            if tb.GetToolState(wxID_TOOLBAR_TIMING_TOOL):
+                if self.active_wave == None:
+                    errorMsg(self,"Please select and display a waveform first!")        
+                    tb.ToggleTool(wxID_TOOLBAR_TIMING_TOOL, False)
+                    return
+                tb.EnableTool(wxID_TOOLBAR_TIMING_DISPLAY_TOOL, True)
+                tb.SetToolShortHelp(wxID_TOOLBAR_TIMING_TOOL, "Disable Timing")
+                self.timing_display = ALFtiming.TimingDisplay(self.active_wave.naming_context, self)
+            else:
+                self.timing_display = None
+                tb.EnableTool(wxID_TOOLBAR_TIMING_DISPLAY_TOOL, False)
+                tb.SetToolShortHelp(wxID_TOOLBAR_TIMING_TOOL, "Enable Timing")
+                self.refreshDisplay()
+
+        if event.GetId() == wxID_TOOLBAR_TIMING_DISPLAY_TOOL:
+            if tb.GetToolState(wxID_TOOLBAR_TIMING_DISPLAY_TOOL):
+                tb.SetToolShortHelp(wxID_TOOLBAR_TIMING_DISPLAY_TOOL, "Disable Timing Graphics")
+                self.timing_view_state = True
+            else:
+                tb.SetToolShortHelp(wxID_TOOLBAR_TIMING_DISPLAY_TOOL, "Enable Timing Graphics")
+                self.timing_view_state = False
+
+        elif event.GetId() == wxID_TOOLBAR_CONNECT_TOOL:
+            if self.connect_frame:
+                self.connect_frame.Raise()
+            else:
+                self.connect_frame = connectTool.create(self)
+
+        elif event.GetId() == wxID_TOOLBAR_NAMINGSERVICE_DIALOG:
+            self.namingservice_dialog = NamingserviceDialog(self)
+            
+        elif event.GetId() == wxID_TOOLBAR_LAUNCH_WAVEDASH:
+            namingService = "-ORBInitRef NameService=corbaname::" + self.namingservice[0]
+            if (os.path.exists("/usr/local/bin/WAVEDASH")):
+                os.spawnl(os.P_NOWAIT, "/usr/local/bin/WAVEDASH", namingService, "")
+            elif (os.path.exists("/usr/bin/WAVEDASH")):
+                os.spawnl(os.P_NOWAIT, "/usr/bin/WAVEDASH", namingService, "")
+            else:
+                errorMsg(self, "Failed to launch WAVEDASH. Executable(WAVEDASH) not found in /usr/local/bin/ and /usr/bin/ !!!")
+                return
+
+
+        # Refresh the display: Naming Service, Waveform List, and Canvas
+        elif event.GetId() == wxID_TOOLBAR_REFRESH_TOOL:
+            self.refreshDisplay(True)
+            self.DisplayInstalledWaveforms()
+            self.DisplayAvailableWaveforms()
+            self.DisplayAvailableComponents()
+            tb.ToggleTool(wxID_TOOLBAR_REFRESH_TOOL, False)
+        
+        elif event.GetId() == wxID_TOOLBAR_START_NODEBOOTER:
+            anbd = ALFNodeBooterDialog(self)
+            
+            if anbd.GetReturnCode() == 0:
+                self.namingservice[0] = '127.0.0.1'
+                self.init_CORBA()
+                self.refreshDisplay(True)
+                self.DisplayInstalledWaveforms()
+                self.DisplayAvailableWaveforms()
+                self.DisplayAvailableComponents()
+            
+    def processTimingEvent(self, component_name, port_name, function_name, description, time_s, time_us, number_samples):
+        if self.active_wave == None or (self.active_wave.naming_context not in component_name):
+            errorMsg(self,"Cannot find waveform containing: " + component_name)
+
+        cname = component_name[component_name.rfind('/')+1:]
+        if self.active_wave != None:
+            for comp in self.active_wave.components:
+                if comp.name == cname:
+                    comp.shape.processTimingEvent(port_name, function_name, description, time_s, time_us, number_samples)
+
+
+        
+    # ---------------------------------------------------------
+    # Event handling for the FoldPanel
+    # --------------------------------------------------------
+    def OnFoldPanelSize(self, event):
+        wx.LayoutAlgorithm().LayoutWindow(self, self.canvas)
+        event.Skip()
+    
+    def OnFoldPanelBarDrag(self, event):
+        if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE:
+            return
+                
+        if event.GetId() == self.ID_WINDOW_LEFT:
+            self._leftWindow.SetDefaultSize(wx.Size(event.GetDragRect().width, 400))
+                
+        # Leaves bits of itself behind sometimes
+        wx.LayoutAlgorithm().LayoutWindow(self, self.canvas)
+        self.canvas.Refresh()
+            
+        event.Skip()
+
+    # ---------------------------------------------------------
+    # Event handling for Naming Service / Manage Waveforms box
+    # --------------------------------------------------------
+    def OnNsBoxRightUp(self, event):
+        self.nsBox.PopupMenu(self.nsBoxPopup)
+        event.Skip()
+
+    def OnNsBoxLeftDclick(self, event):
+        self.DisplayWaveform()
+        event.Skip()
+
+    def OnNsBoxPopupDisplayMenu(self, event):
+        self.DisplayWaveform()
+        event.Skip()
+
+    def OnNsBoxPopupStartMenu(self, event):
+        self.StartApplication()
+        event.Skip()
+
+    def OnNsBoxPopupStopMenu(self, event):
+        self.StopApplication()
+        event.Skip()
+
+    def OnNsBoxPopupUninstallMenu(self, event):
+        self.UninstallWaveform()
+        event.Skip()
+
+    def DisplayWaveform(self):
+        sn = self.nsBox.GetSelection()
+        if sn == self.nsBox.GetRootItem():
+            errorMsg(self,'Please select a waveform!')
+            return
+        snPrnt = self.nsBox.GetItemParent(sn)
+        if snPrnt != self.nsBox.GetRootItem():
+            errorMsg(self,'Please select a waveform!')
+            return
+
+        wave_name = self.nsBox.GetItemText(sn)
+        app = self.nsBox.GetPyData(sn)
+        if app is None:
+            errorMsg(self,'No application associated with this entry!')
+            return
+            
+        # Check to see if a waveform is already active
+        if self.active_wave != None:
+            self.refreshDisplay(True)
+
+        # Set item bold and all others set to plain text
+        troot = self.nsBox.GetRootItem()
+        if self.nsBox.GetChildrenCount(troot) <= 0:
+            return
+        cid1,cookie1 = self.nsBox.GetFirstChild(troot)
+        self.nsBox.SetItemBold(cid1, False)
+        for x in range(self.nsBox.GetChildrenCount(troot,recursively=False)-1):
+            cid2,cookie2 = self.nsBox.GetNextChild(troot,cookie1)
+            self.nsBox.SetItemBold(cid2, False)
+            cid1 = cid2
+            cookie1 = cookie2
+
+        self.nsBox.SetItemBold(sn, True)
+        self.nsBox.SelectItem(sn, False)
+
+        # Check to see if this waveform has previously been displayed
+        # If so, then update the display and return
+        if self.waveform_displays.has_key(wave_name):
+            # Clear the canvas and get ready to display the waveform
+            #print "already imported this waveform .... displaying..."
+            tmpdisplay = self.waveform_displays[wave_name]
+#            self.refreshDisplay(True)
+            self.active_wave = tmpdisplay.waveform
+            self.canvas.updateDisplay(tmpdisplay)
+            return
+
+# NOTE: use CF::FileManager list to find SAD file
+#sadfile wud resemble like "/waveforms/ossie_demo/ossie_demo.sad.xml
+        sadfile = app._get_profile()
+        sadfile = sadfile.replace('//','')
+        wav_name = sadfile.replace('.sad.xml','')
+# No need to prepend /sdr/dom to sad file. CF:FileManager takes the relative path.
+        #sadpath = '/sdr/dom/' + sadfile
+        sadpath = sadfile
+
+        self.active_wave = importWaveform.getWaveform(sadpath, self, self.Available_Ints)
+        self.active_wave.naming_context = str(wave_name)
+
+        tmpdisplay = self.AddWaveformShape(self.active_wave)
+        self.waveform_displays[wave_name] = tmpdisplay 
+
+        self.canvas.updateDisplay(tmpdisplay)
+
+            
+    def DisplayInstalledWaveforms(self):
+        self.nsBox.DeleteAllItems()
+        nsRoot = self.nsBox.AddRoot("ns_root")
+        
+        if self.domMgr == None or self.rootContext == None:
+            return
+
+        dom_obj = self.rootContext.resolve([CosNaming.NameComponent("DomainName1","")])
+        dom_context = dom_obj._narrow(CosNaming.NamingContext) 
+        if dom_context is None:
+            return
+
+        try:
+            appSeq =  self.domMgr._get_applications()
+        except:
+            newNS = False
+            while not newNS:
+                ts = 'Could not got a list of applications from the domain manager. Is nodeBooter running on this system?'
+                errorMsg(self, ts)
+                self.namingservice_dialog = NamingserviceDialog(self)
+                if self.namingservice_dialog.GetReturnCode() == 1:
+                    newNS = True
+            return
+
+
+        members = dom_context.list(1000) 
+        for m in members[0]:
+            wav_name = str(m.binding_name[0].id)
+            wav_obj = dom_context.resolve([CosNaming.NameComponent(wav_name,"")])
+            wav_context = wav_obj._narrow(CosNaming.NamingContext)
+            if wav_context is None:
+                continue
+
+            contextApp = None
+            foundApp = False
+            for app in appSeq:
+                compNameCon = app._get_componentNamingContexts()
+                for compElementType in  compNameCon:
+                    if wav_name in compElementType.elementId:
+                        waveformApp = app
+                        foundApp = True
+                        #print compElementType.componentId + " " + compElementType.elementId
+                        break
+
+            if not foundApp:
+                print "Could not find associated application for: " + wav_name
+                continue
+
+            t1 = self.nsBox.AppendItem(nsRoot,wav_name)
+            self.nsBox.SetPyData(t1,waveformApp)
+            
+            # Set item bold if it is the active waveform
+            if self.active_wave is not None:
+                if self.active_wave.naming_context == wav_name:
+                    self.nsBox.SetItemBold(t1, True)
+                    
+        self.nsBox.SortChildren(nsRoot)
+
+    # ---------------------------------------------------------
+    # Event handling and control for Launch Waveforms box
+    # --------------------------------------------------------
+    def DisplayAvailableWaveforms(self):
+        self.installBox.DeleteAllItems()
+        self.availableWaveforms.clear()
+        installRoot = self.installBox.AddRoot("install_root")
+        
+        
+        sadFileObjList = self.fileMgr.list("/*.sad.xml")
+        dasFileObjList = self.fileMgr.list("/*_DAS.xml")
+        
+        #if SAD and DAS file count differ, then report error
+        if len(sadFileObjList) != len(dasFileObjList):
+            errorMsg(self, "Mismatch in SAD and DAS files")
+            
+
+        for fIndex in range(len(sadFileObjList)):
+            sadObj = sadFileObjList[fIndex]
+            dasObj = dasFileObjList[fIndex]
+            
+            #get SAD and DAS file names
+            #the file name is stored as an absolute path to the FileManager file system
+            #e.g file name = dom/waveforms/ossie_demo/ossie_demo.sad.xml
+            #throughout ALF,we store the filenames in the model as relative to the
+            #FileManager root dir (/sdr/dom). Hence strip off dom/ from the object filename
+        
+            sad_file = sadObj.name[sadObj.name.find("/"):]
+            das_file = dasObj.name[dasObj.name.find("/"):]
+            #e.g. sad_file = /xml/waveforms/ossie_demo/ossie_demo.sad.xml
+            #we need to extract the waveform name part from the above file name
+            #find the position of the rightmost "/" and extract the substring till
+            #last 8 chars (that corresponds to .spd.xml).
+            wavename = sad_file[sad_file.rfind("/")+1:-8]
+            
+            #make sure that both SAD and DAS files are in the same directory
+            #remove the file name alone and compare the directory paths of SAD and DAS file
+            if ( sad_file[:sad_file.rfind("/")] != das_file[:das_file.rfind("/")] ):
+                errorMsg(self, "Invalid SAD or DAS file - " + sad_file + " " + das_file )
+                continue
+            if ( das_file.find(wavename) == -1 ):
+                errorMsg (self, "SAD and DAS files mismatch")
+                continue
+            
+            #self.installpath is set to /sdr/dom by default
+            full_sad_file = self.installPath + sad_file
+            full_das_file = self.installPath + das_file
+      
+            
+            if (not self.availableWaveforms.has_key(wavename)):
+                self.availableWaveforms[wavename] = (sad_file, full_sad_file, das_file, full_das_file)
+            else:
+                #duplicate waveforms found
+                errorMsg(self, "Duplicate " + wavename + " waveform found\n")
+                continue
+            
+        # Populate the display at the Domain level
+        for waveform in self.availableWaveforms.keys():
+            t1 = self.installBox.AppendItem(installRoot,waveform)
+            self.installBox.SetPyData(t1,self.availableWaveforms[waveform])
+            self.installBox.SetItemBold(t1,False)
+
+        self.installBox.SortChildren(installRoot)
+
+
+    # -----------------------------------------------------------------
+    # Event handling and control for Launch Components as Waveforms box
+    # -----------------------------------------------------------------
+    def DisplayAvailableComponents(self):
+        self.componentsBox.DeleteAllItems()
+        self.availableComponents.clear()
+        installRoot = self.componentsBox.AddRoot("install_root")
+        
+        #get the list of spd files under /sdr/dom/xml
+        spdFiles = ALFutils.getFileList(self.fileMgr, "dom/xml", "*.spd.xml")
+        for spd_file in spdFiles:   
+             compname = spd_file[spd_file.rfind("/")+1:-8]
+             #installPath is set to /sdr/dom by default
+             compNameAndDir = spd_file[:spd_file.rfind("/")]
+
+             if self.availableComponents.has_key(compname):
+                 errorMsg(self, "Conflicting component name: " + compname)
+                 continue
+            
+             self.availableComponents[compname] = (compname, compNameAndDir)
+    
+        # Populate the display at the Domain level
+        for component in self.availableComponents.keys():
+            t1 = self.componentsBox.AppendItem(installRoot,component)
+            self.componentsBox.SetPyData(t1,self.availableComponents[component])
+            self.componentsBox.SetItemBold(t1,False)
+
+        self.componentsBox.SortChildren(installRoot)
+
+
+    def OnInstallBoxRightUp(self, event):
+        self.installBox.PopupMenu(self.installBoxPopup)
+        event.Skip()
+    
+    def OnInstallBoxPopupInstallMenu(self, event):
+        self.InstallWaveformFromBox(False)
+        event.Skip()
+       
+    def OnInstallBoxPopupInstallStartMenu(self, event):
+        self.InstallWaveformFromBox(True)
+        event.Skip()
+
+    def OnInstallBoxLeftDclick(self, event):
+        self.InstallWaveformFromBox(True)
+        event.Skip()
+
+    def OnComponentsBoxRightUp(self, event):
+        self.componentsBox.PopupMenu(self.componentsBoxPopup)
+        event.Skip()
+
+    def OnComponentsBoxPopupInstallMenu(self, event):
+        ''' Install but do not start compform '''
+        self.InstallCompform(False)
+        event.Skip()
+
+    def OnComponentsBoxPopupInstallStartMenu(self, event):
+        ''' Install and start the selected compform '''
+        self.InstallCompform(True)
+        event.Skip()
+
+    def OnComponentsBoxLeftDclick(self, event):
+        ''' Install and start the selected compform '''
+        self.InstallCompform(True)
+        event.Skip()
+
+    def InstallWaveformFromBox(self, start_flag):
+        selection = self.installBox.GetSelection()
+        name_SAD, absolute_name_SAD, name_DAS, absolute_name_DAS = self.installBox.GetPyData(selection)
+
+        self.InstallWaveform(name_SAD, absolute_name_SAD, 
+                             name_DAS, absolute_name_DAS, start_flag)
+
+
+    def InstallWaveform(self,name_SAD, absolute_name_SAD, 
+                        name_DAS, absolute_name_DAS, start_flag = True):
+        ''' Installs waveform application as an (SCA) application.  By default
+            the (SCA) application will be started '''
+         
+        #name_SAD - contains the path of the SAD file relative the framework filesystem
+        #e.g. the framework file system is mounted at /sdr/dom. then the value of name_SAD
+        #would be /waveforms/ossie_demo/ossie_demo.sad.xml
+           
+        #doc_sad = xml.dom.minidom.parse(absolute_name_SAD)
+        doc_sad = ALFutils.getDOM (self.fileMgr, name_SAD)
+        if doc_sad is None:
+            return
+        app_name = doc_sad.getElementsByTagName("softwareassembly")[0].getAttribute("name")
+        _appFacProps = []
+        devMgrSeq = self.domMgr._get_deviceManagers()
+        available_dev_seq = []
+        for devmgr in range(len(devMgrSeq)):
+            devMgr = devMgrSeq[devmgr]
+            curr_devSeq = devMgr._get_registeredDevices()
+            for dev in range(len(curr_devSeq)):
+                curr_dev = curr_devSeq[dev]
+                available_dev_seq.append(curr_dev._get_identifier())
+                #print curr_dev._get_identifier()
+
+        self.domMgr.installApplication(name_SAD)
+        
+        # Parse the device assignment sequence, ensure
+        #Use FileManager to open files.
+        
+        doc_das = ALFutils.getDOM(self.fileMgr, name_DAS)
+        deviceassignmenttypeNodeList = doc_das.getElementsByTagName("deviceassignmenttype")
+
+        for deviceassignmenttypeNode in deviceassignmenttypeNodeList:
+            # look for assigndeviceid nodes
+            assigndeviceidNodeList = deviceassignmenttypeNode.getElementsByTagName("assigndeviceid")
+            if len(assigndeviceidNodeList) == 0:
+                ts = "Could not find \"assigndeviceid\" tag\nAborting install"
+                errorMsg(self, ts)
+                return
+
+            # get assigndeviceid tag value (DCE:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
+            assigndeviceid = assigndeviceidNodeList[0].firstChild.data
+
+            # ensure assigndeviceid is in list of available devices
+            if assigndeviceid not in available_dev_seq:
+                ts = "Could not find the required device: " + str(assigndeviceid)
+                ts += "\nAborting install"
+                errorMsg(self, ts)
+                return
+                
+        _devSeq = self.BuildDevSeq(name_DAS)
+        _applicationFactories = self.domMgr._get_applicationFactories()
+
+        # attempt to match up the waveform application name to 
+        # a application factory of the same name
+        app_factory_num = -1
+        for app_num in range(len(_applicationFactories)):
+            if _applicationFactories[app_num]._get_name()==app_name:
+                app_factory_num = app_num
+                break
+    
+        if app_factory_num == -1:
+            print "Application factory not found"
+            sys.exit(-1)
+
+        # use the application factor I found above to create an instance
+        # of an application
+        try:
+            app = _applicationFactories[app_factory_num].create(_applicationFactories[app_factory_num]._get_name(),_appFacProps,_devSeq)
+        except:
+            print "Unable to create application - make sure that all appropriate nodes are installed"
+            return(None)
+        
+        if start_flag:
+            # start the application
+            app.start()
+        
+        naming_context_list = app._get_componentNamingContexts()
+        naming_context = naming_context_list[0].elementId.split("/")
+        application_name = app._get_name()
+        waveform_name = naming_context[1]
+        
+        
+#        self.refreshDisplay()
+        self.DisplayInstalledWaveforms()
+        if self.connect_frame:
+            self.connect_frame.refreshDisplay()
+
+        return app
+
+    def InstallCompform(self, start_flag = False):
+        ''' This method will take the component selected from the GUI
+            and create the necessary files to define a Waveform Application
+            consisting of a single instance of this component.  The files will
+            then be passed to the InstallWaveform method which will create
+            an (SCA) application from the Waveform Application.   '''
+
+
+        print "WARNING: if your node's GPP UUID is not DCE:5ba336ee-aaaa-aaaa-aaaa-00123f573a7f this will not work...\n"
+        # get component name from the list
+        selection = self.componentsBox.GetSelection()
+        compName, compNameAndDir = self.componentsBox.GetPyData(selection)
+
+        self.compform_counter = self.compform_counter + 1
+
+        tmp_dir_name = "/_tmp_alf_waveforms/"  # this is where I put my temporary
+                                              # xml files
+        tmp_wave_name = "_" + compName + str(self.compform_counter)
+
+
+        #make the directory to put the XML
+        if self.fileMgr.exists(tmp_dir_name) == False:
+            try:
+                #for some weird reasons, fileMgr.exists(...) looks by default in /sdr/dom/
+                #but mkdir(...) creates a directory under /sdr/dev :-(
+                #as a temp fix, use "dom/_tmp_alf_waveforms"
+                print "creating _tmp_alf_waveforms directory\n"
+                self.fileMgr.mkdir("dom" + tmp_dir_name)   
+            except:
+                errorMsg(self,"Cannot create temporary directory in the waveform directory.\n"
+                              "You may need to change the temporary directory to one that you have write permissions to")
+        
+        #Ticket 272:could not create a second instance of a component as a waveform if ALF is restarted.   
+        #Fix: loop into _tmp_alf_waveforms/ directory and see if tmp waveforms exists already
+        #with the same name. If found, increment the counter and form a new name for the temp
+        #waveform. Repeat this until you find a new name.
+        while (self.fileMgr.exists(tmp_dir_name + tmp_wave_name) == True ):
+            print "InstallCompform(): ", tmp_wave_name + " exists already...Regenerating new name ", "at ", tmp_dir_name
+            self.compform_counter = self.compform_counter + 1
+            tmp_wave_name = "_" + compName + str(self.compform_counter)
+
+        if self.fileMgr.exists(tmp_dir_name + tmp_wave_name) == False:   
+            try:
+                #Add "dom" to the directory because of the above said weird reasons
+                print tmp_dir_name, tmp_wave_name
+                self.fileMgr.mkdir("dom" + tmp_dir_name + tmp_wave_name)
+                
+            except:
+                errorMsg(self,"Cannot create temporary directory in the waveform directory.\n"
+                              "You may need to change the temporary directory to one that you have write permissions to")
+                return
+                
+                
+        #till this place, all file related operations are done through framework fileManager
+        #generating temp compform files is done by Wavedev code. hence, passing the sdr install
+        #path of the component files that should be in config/alf.cfg under installpath
+        my_compform = compform.compform(compName, self.installPath + '/' +compNameAndDir, 
+                                        self.installPath + '/' +tmp_dir_name, tmp_wave_name)
+        my_compform.create()
+
+
+        print "WARNING: tmp files generated in " + tmp_dir_name
+
+        tmp_dir_name =  tmp_dir_name +  tmp_wave_name + "/"
+        
+        self.DisplayAvailableWaveforms()
+        #the second and fourth arguments are kind of redundant. but passing to keep inline
+        #with the previous version of this code. can be removed in future.
+        self.InstallWaveform(tmp_dir_name + tmp_wave_name + ".sad.xml", 
+                             tmp_dir_name + tmp_wave_name + ".sad.xml",
+                             tmp_dir_name + tmp_wave_name + "_DAS.xml",
+                             tmp_dir_name + tmp_wave_name + "_DAS.xml", 
+                             start_flag)
+        
+    def StartApplication(self):
+        selection = self.nsBox.GetSelection()
+        app_ref = self.nsBox.GetPyData(selection)
+        app_ref.start()
+        self.DisplayInstalledWaveforms()
+
+
+    def StopApplication(self):
+        selection = self.nsBox.GetSelection()
+        app_ref = self.nsBox.GetPyData(selection)
+        app_ref.stop()
+        self.DisplayInstalledWaveforms()
+
+    def UninstallWaveform(self):
+        selection = self.nsBox.GetSelection()
+        waveform_name = self.nsBox.GetItemText(selection)
+        if self.active_wave is not None:
+            if self.active_wave.naming_context == waveform_name:
+                self.refreshDisplay(True)
+        if self.waveform_displays.has_key(waveform_name):
+            # close any tool frames associated with waveform display
+            tmp_display = self.waveform_displays[waveform_name]
+            while len(tmp_display.tool_frames) > 0:
+                tf = tmp_display.tool_frames.pop()
+                tf.Close()
+            self.waveform_displays.pop(waveform_name)
+        app_ref = self.nsBox.GetPyData(selection)
+#        self.domMgr.uninstallApplication(app_ref._get_identifier()) # not sure if we need this or not
+
+        # Remove any connections we made with the connect tool to/from this waveform
+        for connection in reversed(self.connections[self.namingservice[0]]):
+            if waveform_name in connection['appNames']:
+                try:
+                    resourceRef = self.rootContext.resolve(connection['name'])
+                    resourceHandle = resourceRef._narrow(CF.Resource)
+                    portReference = resourceHandle.getPort(connection['port'])
+                    portHandle = portReference._narrow(CF.Port)
+                    portHandle.disconnectPort(connection['id'])
+                    self.connections[self.namingservice[0]].remove(connection)
+                except e:
+                    print e
+                    dial = wx.MessageDialog(self, 'Disconnect failed.', 'Failed', wx.OK)
+                    dial.ShowModal()
+
+
+        app_ref.releaseObject()
+#        self.refreshDisplay()
+        self.DisplayInstalledWaveforms()
+
+        if self.connect_frame:
+            self.connect_frame.refreshDisplay()
+
+
+    def BuildDevSeq(self, dasXML):
+        doc_das = ALFutils.getDOM(self.fileMgr, dasXML)
+        if doc_das is None:
+            return None
+        # create node list of "deviceassignmenttype"
+        deviceassignmenttypeNodeList = doc_das.getElementsByTagName("deviceassignmenttype")
+
+        ds = []
+        for n in deviceassignmenttypeNodeList:
+            componentid = n.getElementsByTagName("componentid")[0].firstChild.data
+            assigndeviceid = n.getElementsByTagName("assigndeviceid")[0].firstChild.data
+            ds.append(CF.DeviceAssignmentType(str(componentid),str(assigndeviceid)))
+
+        return ds
+    
+
+    #----------------------------------------------------------------------------
+    # Waveform level controls and functions
+    #----------------------------------------------------------------------------
+    def refreshDisplay(self, init = False):
+#        self.DisplayInstalledWaveforms()
+        
+        dc = wx.ClientDC(self.canvas)
+        self.canvas.PrepareDC(dc)
+
+        if init:
+            if self.active_wave != None and self.timing_view_state:
+                for comp in self.active_wave.components:
+                    for gauge in comp.shape.gauge_shapes:
+                        gauge.gauge.Show(False)
+                    
+            self.active_wave = None
+            self.timing_display = None
+
+            self.canvas.diagram.RemoveAllShapes()
+            self.canvas.shapes = []
+           
+            tb = self.GetToolBar()
+            tb.ToggleTool(wxID_TOOLBAR_TIMING_DISPLAY_TOOL, False)
+            self.timing_view_state = False
+            tb.SetToolShortHelp(wxID_TOOLBAR_TIMING_DISPLAY_TOOL, "Enable Timing Graphics")
+            tb.ToggleTool(wxID_TOOLBAR_TIMING_TOOL, False)
+            tb.SetToolShortHelp(wxID_TOOLBAR_TIMING_TOOL, "Enable Timing")
+            #self.canvas.diagram = ogl.Diagram()
+            #self.canvas.SetDiagram(self.canvas.diagram)
+            #self.canvas.diagram.SetCanvas(self.canvas)
+        
+        self.canvas.Refresh()
+
+    def AddWaveformShape(self, waveform):
+        tmpdisplay = ALFshapes.WaveformShapes(waveform, self.canvas)
+        for comp in waveform.components:
+            tmpdisplay.AddComponentShape(comp)
+        tmpdisplay.ConnectComponents()
+
+        return tmpdisplay
+
+
+    def updateWaveformData(self, data):
+        for d in data:
+            self.waveformData[d[0]] = d[1]
+
+        self.last_waveform_data_update = self.waveformData.copy()
+
+        for frame in self.tool_frames:
+            if hasattr(frame, 'updateWaveformData'):
+                frame.updateWaveformData(self.waveformData)
+
+    def removeToolFrame(self, frame):
+        if frame not in self.tool_frames:
+            return
+        else:
+            index = self.tool_frames.index(frame)
+            del self.tool_frames[index]
+            
+    def OnClose(self, event):
+        if self.nodeBooterProcess != None:
+            dlg = wx.MessageDialog(self,
+                                   "NodeBooter was started by ALF.\n" +
+                                   "Would you like to terminate it?",
+                                   "Confirm NodeBooter Termination", wx.YES | wx.NO | wx.ICON_QUESTION)
+            result = dlg.ShowModal()
+            if result == wx.ID_YES:
+                print "Terminating nodeBooter"
+                self.nodeBooterProcess.terminate()
+        self.Destroy()
+    
+    
+    
+#----------------------------------------------------------------------
+class MainWindow(ogl.ShapeCanvas):
+    def __init__(self, parent, frame):
+        ogl.ShapeCanvas.__init__(self, parent)
+
+        maxWidth  = 3000
+        maxHeight = 1500
+        self.SetScrollbars(20, 20, maxWidth/20, maxHeight/20)
+
+        self.frame = frame
+        self.SetBackgroundColour("LIGHT BLUE") #wxWHITE)
+        self.diagram = ogl.Diagram()
+        self.SetDiagram(self.diagram)
+        self.diagram.SetCanvas(self)
+        self.shapes = []
+
+        dsBrush = wx.Brush("WHEAT", wx.SOLID)
+        
+    def updateDisplay(self, waveformdisplay):
+        dc = wx.ClientDC(self)
+        self.PrepareDC(dc)
+        for compshape in waveformdisplay.shapes:
+            self.AddShape(compshape)
+            compshape.Show(True)
+        
+        self. diagram.Redraw(dc)
+        self.Refresh()
+        								
+    def OnDestroy(self, evt):
+        # Do some cleanup
+        for shape in self.diagram.GetShapeList():
+            if shape.GetParent() == None:
+                shape.SetCanvas(None)
+                shape.Destroy()
+        self.diagram.Destroyparent
+        
+    def setOSSIEProperty(self, sectionName, propertyName, propertyValue):
+        configFile = os.getenv('HOME') + '/' + OSSIE_CONFIG_FILE
+        configParser = ConfigParser.SafeConfigParser()
+        #check to see if a config file already exists
+        if os.path.exists(configFile):
+            #if so, read in its properties so they don't get lost
+            configParser.read(configFile)
+        if not configParser.has_section(sectionName):
+            configParser.add_section(sectionName)
+        configParser.set(sectionName, propertyName, propertyValue)
+        f = open(configFile, 'w')
+        configParser.write(f)
+        f.close()
+            
+    def getOSSIEProperty(self, sectionName, propertyName):
+        configFile = os.getenv('HOME') + '/' + OSSIE_CONFIG_FILE
+        if os.path.exists(configFile):
+            configParser = ConfigParser.SafeConfigParser()
+            configParser.read(configFile)
+            if configParser.has_option(sectionName, propertyName):
+                return configParser.get(sectionName, propertyName)
+        return None
+#----------------------------------------------------------------------
+
+def errorMsg(self,msg):
+    dlg = wx.MessageDialog(self,msg,'Error', wx.OK | wx.ICON_INFORMATION)
+    try:
+        dlg.ShowModal()
+    finally:
+        dlg.Destroy()
+    return
+                                
+
+def main():
+    app = alfApp(0)
+    app.MainLoop()
+
+
+# # If not profiling:
+if __name__ == '__main__':
+    main()
+
+
+'''
+# A script created by Drew Cormier for profiling
+# code developed for his thesis 
+if __name__ == "__main__":
+
+    import profile
+    import pstats
+
+    # bias the profile to remove profiling overhead
+    # note that the number being passed to 
+    # bias varies based on what system I am using
+    #
+    # Aquire this number for my linux machine using
+    # >>> p.calibrate(10000000)
+    profile.bias = 1.6989519401052302e-05
+
+    profile.run("main()", "alf_profile_1")
+
+    my_stats = pstats.Stats("alf_profile_1")
+
+    my_stats.sort_stats('cumulative')
+    my_stats.print_stats(10)
+
+    my_stats.sort_stats('time')
+    my_stats.print_stats(10)
+'''
+
+
+
+
+
+
+
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/ALFNodeBooterDialog.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/ALFNodeBooterDialog.py	(revision 10498)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/ALFNodeBooterDialog.py	(revision 10498)
@@ -0,0 +1,163 @@
+## Copyright 2005, 2006, 2007, 2008, 2009 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE ALF Waveform Application Visualization Environment
+##
+## ALF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## ALF is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+from ALFNodeBooterUtils import ALFNodeBooterUtils
+
+
+class ALFNodeBooterDialog(wx.Dialog):
+    def __init__(self, parent):
+        wx.Dialog.__init__(self,
+                           parent=None,
+                           id=-1,
+                           title='NodeBooter Dialog',
+                           pos=wx.DefaultPosition)
+        self.parent = parent
+        
+        try:
+            temp = self.parent.getOSSIEProperty('ossie', 'default.domain.manager')
+            if not temp is None:
+                self.domFileName = temp[temp.rfind('/') + 1:]
+                self.domDirName = temp[:temp.rfind('/') + 1]
+            else:
+                self.domFileName = 'DomainManager.dmd.xml'
+                self.domDirName = 'dom/domain/'
+        
+            temp = self.parent.getOSSIEProperty('ossie', 'default.device.manager')
+            if not temp is None:
+                self.devFileName = temp[temp.rfind('/') + 1:]
+                self.devDirName = temp[:temp.rfind('/') + 1]
+            else:
+                self.devFileName = 'DeviceManager.dcd.xml'
+                self.devDirName = 'dev/nodes/default_GPP_node/'
+                
+            
+        except AttributeError:
+            self.domFileName = 'DomainManager.dmd.xml'
+            self.domDirName = 'dom/domain/'
+            self.devFileName = 'DeviceManager.dcd.xml'
+            self.devDirName = 'dev/nodes/default_GPP_node/'
+            
+        panel = wx.Panel(self)
+    
+        hbox2 = wx.BoxSizer(wx.HORIZONTAL)
+        hbox3 = wx.BoxSizer(wx.HORIZONTAL)
+        hbox4 = wx.BoxSizer(wx.HORIZONTAL)
+        
+        vbox = wx.BoxSizer(wx.VERTICAL)
+        
+        self.domCheckBox = wx.CheckBox(panel)
+        self.domCheckBox.SetValue(True)
+        domLabel = wx.StaticText(panel, label='Start Domain Manager:')
+        self.domText = wx.TextCtrl(panel)
+        self.domText.SetValue(self.domFileName)
+        domBrowseButton = wx.Button(panel, label='Browse')
+        domBrowseButton.Bind(wx.EVT_BUTTON, self.OnDomBrowse)
+        
+        self.devCheckBox = wx.CheckBox(panel)
+        self.devCheckBox.SetValue(True)
+        devLabel = wx.StaticText(panel, label='Start Device Manager:')
+        self.devText = wx.TextCtrl(panel)
+        self.devText.SetValue(self.devFileName)
+        devBrowseButton = wx.Button(panel, label='Browse')
+        devBrowseButton.Bind(wx.EVT_BUTTON, self.OnDevBrowse)
+        
+        cancelButton = wx.Button(panel, label='Cancel')
+        cancelButton.Bind(wx.EVT_BUTTON, self.OnCancel)
+        startButton = wx.Button(panel, label = 'Start')
+        startButton.Bind(wx.EVT_BUTTON, self.OnStart)
+        
+        hbox2.Add(self.domCheckBox, 0, wx.Left, 5)
+        hbox2.Add(domLabel, 1, wx.ALL, 5)
+        hbox2.Add(self.domText, 1, wx.ALL, 5)
+        hbox2.Add(domBrowseButton, 1, wx.ALL, 5)
+        
+        hbox3.Add(self.devCheckBox, 0    , wx.Left, 5)
+        hbox3.Add(devLabel, 1, wx.ALL, 5)
+        hbox3.Add(self.devText, 1, wx.ALL, 5)
+        hbox3.Add(devBrowseButton, 1, wx.ALL, 5)
+        
+        hbox4.Add(cancelButton, 1, wx.ALL, 5)
+        hbox4.Add(startButton, 1, wx.ALL, 5)
+
+        vbox.Add(hbox2, 0, wx.EXPAND, 5)
+        vbox.Add(hbox3, 0, wx.EXPAND, 5)
+        vbox.Add(hbox4, 0, wx.EXPAND, 5)
+        
+        panel.SetSizer(vbox)
+        
+        vbox.Fit(self)
+        startButton.SetFocus()
+        self.ShowModal()
+        self.Destroy()
+        
+    def OnDomBrowse(self, event):
+        dlg = wx.FileDialog(self, "Choose a Domain Manager", '/sdr/dom/domain', "", "*.dmd.xml", wx.OPEN)
+        temp = dlg.ShowModal()
+        if temp == wx.ID_OK:
+            self.domChanged = True
+            self.domFileName=dlg.GetFilename()
+            self.domDirName=dlg.GetDirectory() + '/'
+            if self.domDirName.startswith('/sdr/'):
+                self.domDirName = self.domDirName[5:]
+            self.domText.SetValue(self.domFileName)
+            
+        
+    def OnDevBrowse(self, event):
+        dlg = wx.FileDialog(self, "Choose a Device Manager", '/sdr/dev/nodes', "", "*.dcd.xml", wx.OPEN)
+        temp = dlg.ShowModal()
+        if temp == wx.ID_OK:
+            self.devChanged = True
+            self.devFileName=dlg.GetFilename()
+            self.devDirName=dlg.GetDirectory() + '/'
+            if self.devDirName.startswith('/sdr/'):
+                self.devDirName = self.devDirName[5:]
+            self.devText.SetValue(self.devFileName)
+            
+            
+    def OnCancel(self, event):
+        self.EndModal(-1)
+        
+    def OnStart(self, event):
+        command = '/usr/local/bin/nodeBooter'
+
+        if self.domCheckBox.GetValue():
+            command += ' -D'
+            command += ' ' + self.domDirName + self.domFileName 
+        if self.devCheckBox.GetValue():
+            command += ' -d'
+            command += ' ' + self.devDirName + self.devFileName
+            
+        nbUtils = ALFNodeBooterUtils()
+        nbUtils.startNodeBooterWithCommand(command)
+        if self.domCheckBox.GetValue():
+            self.EndModal(0)
+        else:
+            self.EndModal(1)
+    
+def main():
+    app = wx.App()
+    frame = wx.Frame(None, -1, "test")
+    frame.Show()
+    nbd = NodeBooterDialog(frame)
+    app.MainLoop()
+    
+        
+if __name__ == '__main__':
+    main()        
+        
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/ALFNodeBooterUtils.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/ALFNodeBooterUtils.py	(revision 10600)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/ALFNodeBooterUtils.py	(revision 10600)
@@ -0,0 +1,95 @@
+## Copyright 2005, 2006, 2007, 2008, 2009 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE ALF Waveform Application Visualization Environment
+##
+## ALF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## ALF is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import os
+import subprocess
+import shlex
+import time
+import ConfigParser
+import wx
+
+
+class ALFNodeBooterUtils:
+    def __init__(self):
+        pass
+    
+    def nodeBooterIsRunning(self):
+        #run ps and check for nodebooter
+        processes = os.popen('ps x | grep nodeBooter').read()
+        processes = processes.split()
+        return ('/usr/local/bin/nodeBooter' in processes or '/usr/bin/nodeBooter' in processes)
+
+    def startNodeBooter(self, domainManager = 'dom/domain/DomainManager.dmd.xml', deviceManager = 'dev/nodes/default_GPP_node/DeviceManager.dcd.xml'):
+        configFile = os.getenv('HOME') + '/.ossie.cfg'
+        if os.path.exists(configFile):
+            configParser = ConfigParser.SafeConfigParser()
+            configParser.read(configFile)
+            domainManager = configParser.get("ossie", "default.domain.manager")
+            deviceManager = configParser.get("ossie", "default.device.manager")
+        command = '/usr/local/bin/nodeBooter -D ' + domainManager + ' -d ' + deviceManager
+        args = shlex.split(command)
+        print "NodeBooter not running. Starting now..."
+        nodeBooterProcess = subprocess.Popen(args, cwd='/sdr')
+        #pause for a couple seconds to let nodeBooter start up
+        #otherwise occasionally alf or wavedash will start up
+        #before nodebooter finishes and give errors
+        time.sleep(2)
+        return nodeBooterProcess
+    
+    def startNodeBooterWithCommand(self, command):
+        args = shlex.split(str(command))
+        print "NodeBooter not running. Starting now..."
+        nodeBooterProcess = subprocess.Popen(args, cwd='/sdr')
+        #pause for a couple seconds to let nodeBooter start up
+        #otherwise occasionally alf or wavedash will start up
+        #before nodebooter finishes and give errors
+        time.sleep(2)
+            
+            
+    def namingServiceIsRunning(self):
+        namecltResult = os.popen('nameclt list').read()
+        if namecltResult.startswith('DomainName'):
+            return True
+        return False;
+    
+    def startNamingService(self):
+        configFile = os.getenv('HOME') + '/.ossie.cfg'
+        if os.path.exists(configFile):
+            configParser = ConfigParser.SafeConfigParser()
+            configParser.read(configFile)
+            nsCommand = configParser.get('ossie', 'naming.service.start.command')
+            if not nsCommand == None:
+                if nsCommand.startswith('sudo'):
+                    dialog = wx.TextEntryDialog(None, 'Please enter your root password to restart the naming service:', 'Restart Naming Service', '', style = wx.TE_PASSWORD | wx.OK | wx.CANCEL)
+                    if dialog.ShowModal() == wx.ID_OK:
+                        password = dialog.GetValue()
+                        command = 'echo ' + '\"' + password + '\"' + ' | sudo -kS ' + nsCommand[5:]
+                        subprocess.Popen(command, shell=True)
+                        time.sleep(2)
+                else:
+                        subprocess.Popen(nsCommand, shell=True)
+        else:
+            #default case
+            nsCommand = 'sudo service omniorb4-nameserver restart'
+            dialog = wx.TextEntryDialog(None, 'Please enter your root password to restart the naming service:', 'Restart Naming Service', '', style = wx.TE_PASSWORD | wx.OK | wx.CANCEL)
+            if dialog.ShowModal() == wx.ID_OK:
+                password = dialog.GetValue()
+                command = 'echo ' + '\"' + password + '\"' + ' | sudo -kS ' + nsCommand[5:]
+                subprocess.Popen(command, shell=True)
+                time.sleep(2)
+            
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/ALFshapes.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/ALFshapes.py	(revision 8264)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/ALFshapes.py	(revision 8264)
@@ -0,0 +1,803 @@
+## Copyright 2005, 2006, 2007, 2008 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE ALF Waveform Application Visualization Environment
+##
+## ALF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## ALF is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+from wx.lib import ogl
+import ALF
+
+# This module defines the shapes used in ALF
+#--------------------------------------------------------------------------------------------------------------
+[wxID_PORT_POPUP_INFO, wxID_PORT_POPUP_COLOR] = [wx.NewId() for x in range(2)]
+[wxID_COMP_POPUP_SENDTO] = [wx.NewId() for x in range(1)]
+[wxID_PORT_MENU_INFO] = [wx.NewId() for x in range(1)]
+[wxID_COMP_POPUP_USES, wxID_COMP_POPUP_PROVIDES] = [wx.NewId() for x in range(2)]
+
+brushList = []
+def initializeColours():
+    colourDB = wx.ColourDatabase()
+    colourStrs = ["LIGHT BLUE", "GREEN", "GOLD", "SIENNA", "VIOLET",
+        "WHEAT", "RED", "DARK GREEN", "DIM GREY", "STEEL BLUE", "ORANGE",
+        "YELLOW GREEN", "THISTLE", "WHITE", "CYAN", "CORNFLOWER BLUE"]
+    for x in colourStrs:
+        brushList.append(wx.Brush(colourDB.Find(x)))
+
+#--------------------------------------------------------------------------------------------------------------
+class ComponentShape(ogl.CompositeShape, ogl.DividedShape):
+    """ComponentShape provides a graphical representation of an SCA component using OGL."""
+    def __init__(self, canvas, component, wave_display):
+        """__init__(self, canvas, component)
+
+        Constructor for ComponentShape.  Sets up default shape sizes, regions, and constraints."""
+
+        ogl.CompositeShape.__init__(self)
+        self.compSizeX = 150
+        self.compSizeY = 100
+        ogl.DividedShape.__init__(self, self.compSizeX, self.compSizeY)
+	
+        self.SetCanvas(canvas)
+        self.component = component
+        self.canvas = canvas
+        self.wave_display = wave_display    # Stores reference to encapsulating object - handles tool updates
+
+        self.portSizeX = 10
+        self.portSizeY = 10
+        self.gaugeSizeX = 50
+        self.gaugeSizeY = self.portSizeY
+        self.portSpacing = 4
+        
+        nameRegion = ogl.ShapeRegion()
+        nameRegion.SetText(component.name)
+        nameRegion.SetProportions(0.0, 0.1)
+        nameRegion.SetFormatMode(ogl.FORMAT_CENTRE_HORIZ)
+        #nameRegion.SetFont(wx.Font(8, wx.SWISS, wx.BOLD, wx.BOLD))
+        self.AddRegion(nameRegion)
+        self.SetRegionSizes()
+        self.ReformatRegions(canvas)
+
+        self.constraining_shape = ogl.RectangleShape(self.compSizeX, self.compSizeY)
+        self.uses_shapes = []
+        self.prov_shapes = []
+        self.gauge_shapes = []
+
+        self.active_provides_port = None
+
+        self.constraining_shape.SetBrush(wx.GREY_BRUSH)
+        self.AddChild(self.constraining_shape)
+        
+        for p in component.ports:
+            self.addPort(p)
+
+        uses_constraints = []
+        provides_constraints = []
+        uses_constraints = self.createPortConstraints(self.constraining_shape, self.uses_shapes,"RIGHT")
+        provides_constraints = self.createPortConstraints(self.constraining_shape, self.prov_shapes,"LEFT")
+
+        for x in uses_constraints:
+            self.AddConstraint(x)
+        for x in provides_constraints:
+            self.AddConstraint(x)
+           
+        self.setupTimingDisplay()
+        self.Recompute()
+
+        # If we don't do this, the shapes will be able to move on their
+        # own, instead of moving the composite
+        self.constraining_shape.SetDraggable(False)
+        for x in self.uses_shapes:
+            x.SetDraggable(False)
+        for x in self.prov_shapes:
+            x.SetDraggable(False)
+
+        # If we don't do this the shape will take all left-clicks for itself
+        self.constraining_shape.SetSensitivityFilter(0)
+        
+        # Setup a wx.Window so that we can support "right-click"ing
+        self.window = wx.Window(self.GetCanvas(), id=-1, size=wx.Size(-1,-1))
+        self.window.Show(False)
+
+        self.compPopup = wx.Menu(title='')
+        self.usesMenu = wx.Menu(title='')
+        self.providesMenu = wx.Menu(title='')
+        self._init_compPopup_Items(self.compPopup)
+
+
+    def _init_usesMenu_Items(self, parent):
+        """Initialize the menu that displays options for the uses ports in a component."""
+        for port in self.component.ports:
+            if port.type == "Uses":
+                parent.AppendMenu(help='', id=-1, submenu=port.shape.portMenu, text=port.name)
+                port.shape.setupPortMenuEventBindings(self.window)
+    
+    def _init_providesMenu_Items(self, parent):
+        for port in self.component.ports:
+            if port.type == "Provides":
+                parent.AppendMenu(help='', id=-1, submenu=port.shape.portMenu, text=port.name)
+                port.shape.setupPortMenuEventBindings(self.window)
+
+    def _init_compPopup_Items(self, parent):
+        self._init_usesMenu_Items(self.usesMenu)
+        self._init_providesMenu_Items(self.providesMenu)
+        parent.AppendMenu(help='', id=-1, submenu=self.usesMenu, text='Uses')
+        parent.AppendMenu(help='', id=-1, submenu=self.providesMenu, text='Provides')
+
+    def addPort(self, port):
+        """Add a PortShape object to the component"""
+
+        cs = PortShape(port, self.component, self.wave_display, self.portSizeX, self.portSizeY, self.GetCanvas())
+        if port.type == "Uses":
+            cs.SetBrush(wx.BLACK_BRUSH)
+            self.uses_shapes.append(cs)
+        else:
+            self.prov_shapes.append(cs)
+        
+        port.shape = cs 
+        cs.port = port
+
+        self.AddChild(cs)
+
+    def createPortConstraints(self, constraining_shape, shapes, orientation):
+        """Create the contstraints needed to display the ports in relation to the component.
+           Uses ports on the right and provides ports on the left."""
+        if len(shapes) == 0:
+            return []
+        if orientation == "RIGHT":
+            position = ogl.CONSTRAINT_RIGHT_OF
+        else:
+            position = ogl.CONSTRAINT_LEFT_OF
+            
+        constraints = []
+        if len(shapes) > 0:
+            constraints.append(ogl.Constraint(position,constraining_shape, [shapes[0]]))
+            topShape = bottomShape = shapes[0]
+            for x in range(1,len(shapes)):
+                constraints.append(ogl.Constraint(ogl.CONSTRAINT_ALIGNED_LEFT,
+                    topShape, [shapes[x]]))
+                
+                tmpCon = None
+                if x%2:
+                    tmpCon = ogl.Constraint(ogl.CONSTRAINT_ABOVE, topShape, [shapes[x]])
+                    constraints.append(tmpCon)
+                    tmpCon.SetSpacing(0,self.portSpacing)
+                    topShape = shapes[x]
+                else:
+                    tmpCon = ogl.Constraint(ogl.CONSTRAINT_BELOW, bottomShape, [shapes[x]])
+                    constraints.append(tmpCon)
+                    tmpCon.SetSpacing(0,self.portSpacing)
+                    bottomShape = shapes[x]
+            return constraints
+
+        else:
+            return None
+
+    def processTimingEvent(self, port_name, function_name, description, time_s, time_us, number_samples):
+        """Process the timing event received by passing it on to the appropriate port or gauge."""
+
+        for port in self.component.ports:
+            if port.name == port_name:
+                # Setup the gauges is displaying graphics
+                if port.type == "Uses":
+                    if not port.shape.gauge.show_gauge:
+                        if self.canvas.frame.timing_view_state:
+                            port.shape.gauge.ShowGauge(True)
+                    else:
+                        if not self.canvas.frame.timing_view_state:
+                            port.shape.gauge.ShowGauge(False)
+                    if self.active_provides_port != None and port.shape.gauge.provides_port == None:
+                        port.shape.gauge.provides_port = self.active_provides_port
+                        
+                # Initialize the active provides port on the component: used for displaying gauges
+                if port.type == "Provides" and self.active_provides_port == None:
+                    self.active_provides_port = port
+                    
+                # Update gauges if displaying graphics
+                if self.canvas.frame.timing_view_state:
+                    for g in self.gauge_shapes:
+                        g.processTimingEvent(port, description)
+
+                port.shape.processTimingEvent(function_name, description, time_s, time_us, number_samples)
+
+    def setupTimingDisplay(self):
+        """Setup the initial timing display for the component."""
+
+        for port in self.component.ports:
+            if port.type == "Uses":
+                self.addGauge(port)
+
+    def addGauge(self, port):
+        """Add a new GaugeShape to the component to be used when displaying timing events."""
+    
+        new_gauge = GaugeShape(self.gaugeSizeX,self.gaugeSizeY,self.GetCanvas(),port)
+        port.shape.gauge = new_gauge
+        self.gauge_shapes.append(new_gauge)
+        self.AddChild(new_gauge)
+        self.createGaugeConstraint(port.shape, new_gauge)
+        new_gauge.SetDraggable(False)
+       
+    def createGaugeConstraint(self, constraining_shape, shape):
+        """Create the contraints used to display the gauges in relation to uses ports they represent."""
+
+        position1 = ogl.CONSTRAINT_LEFT_OF
+        constraint = ogl.Constraint(position1, constraining_shape, [shape])
+        self.AddConstraint(constraint)
+        
+        position2 = ogl.CONSTRAINT_CENTRED_VERTICALLY
+        constraint = ogl.Constraint(position2, constraining_shape, [shape])
+        self.AddConstraint(constraint)
+
+    def ReformatRegions(self, canvas=None):
+        """Used to format the regions of a composite shape."""
+    
+        rnum = 0
+        if canvas is None:
+            canvas = self.GetCanvas()
+        dc = wx.ClientDC(canvas)  # used for measuring
+        for region in self.GetRegions():
+            text = region.GetText()
+            self.FormatText(dc, text, rnum)
+            rnum += 1
+
+    def GetChildShapes(self):
+        tmpshapes = []
+        tmpshapes.append(self.constraining_shape)
+        for x in self.uses_shapes:
+            tmpshapes.append(x)
+            tmpshapes.extend(x.GetChildShapes())
+        for x in self.prov_shapes:
+            tmpshapes.append(x)
+            tmpshapes.extend(x.GetChildShapes())
+            tmpshapes.extend(x.GetLines())
+        return tmpshapes 
+
+    #--------------------------
+    # Event handling
+    #--------------------------
+    def OnRightClick(self, x, y, keys=0, attachment=0):
+        """Event handler for the Right Click event on the ComponentShape."""
+
+        self.window.PopupMenu(self.compPopup)
+    
+    def OnLeftClick(self, x, y, keys = 0, attachment = 0):
+        """Event handler for the Left Click event on the ComponentShape."""
+
+        shape = self
+        canvas = self.GetCanvas()
+        dc = wx.ClientDC(canvas)
+        canvas.PrepareDC(dc)
+
+        if shape.Selected():
+            shape.Select(False, dc)
+            canvas.Redraw(dc)
+        else:
+            redraw = False
+            shapeList = canvas.GetDiagram().GetShapeList()
+            toUnselect = []
+            for s in shapeList:
+                if s.Selected():
+                    # If we unselect it now then some of the objects in
+                    # shapeList will become invalid (the control points are
+                    # shapes too!) and bad things will happen...
+                    toUnselect.append(s)
+
+            shape.Select(True, dc)
+
+            if toUnselect:
+                for s in toUnselect:
+                    s.Select(False, dc)
+                canvas.Redraw(dc)
+
+#----------------------------------------------------------------------
+
+class PortShape(ogl.RectangleShape):
+    def __init__(self, port, parent_component, wave_display, w=0.0, h=0.0, canvas=None):
+        ogl.RectangleShape.__init__(self, w, h)
+        self.port = port
+        self.parent_component = parent_component
+        self.SetCanvas(canvas)
+        self.brushIndex = 0
+        self.gauge = None
+        self.show_timing_display = False    # Used to keep from having to refresh port display when
+                                            # timing display is turned off
+        self.wave_display = wave_display
+
+        # Store the timing info; each operation function supported by the port's
+        # interface has a tuple, [0,0], for both input and output timing events
+        self.timingData = {}
+        
+        # The operations are populated when ALF is loaded and the interfaces are imported
+        for op in self.port.interface.operations:
+            self.timingData[op.name] = {}
+            self.timingData[op.name]['begin'] = [0,0,0,0,0]   # [sec, usec, num_samples]
+            self.timingData[op.name]['end'] = [0,0,0,0,0]     # [sec, usec, num_samples]
+        
+        self.window = wx.Window(self.GetCanvas(), id=-1, size=wx.Size(-1,-1))
+        self.window.Show(False)
+
+        self.id_tool_dict = {}
+        self.wxID_PORT_INFO = wx.NewId()
+
+        self.portMenu = wx.Menu(title='')
+        self.portMenuId = wx.NewId()
+        self._init_portMenu_Items(self.portMenu)
+        self.port_info_shape = None
+
+    def setupPortMenuEventBindings(self, window):
+        """Bind the menu events to the OnPortMenu event handler with the proper ids."""
+        
+        # Bind the PortInfo click first since they all have it
+        window.Bind(wx.EVT_MENU, self.OnPortMenuInfoMenu, id=self.wxID_PORT_INFO)       # Bind component event
+        self.window.Bind(wx.EVT_MENU, self.OnPortMenuInfoMenu, id=self.wxID_PORT_INFO)  # Bind port event
+
+        # Bind the tool events now
+        for x in self.id_tool_dict.keys():
+            window.Bind(wx.EVT_MENU, self.OnPortMenu, id=x)         # Bind component event
+            self.window.Bind(wx.EVT_MENU, self.OnPortMenu, id=x)    # Bind port event
+    
+    def _init_portMenu_Items(self, parent):
+        self.portMenu.Append(id=self.wxID_PORT_INFO, kind=wx.ITEM_NORMAL, text='Info')
+        self.portMenu.AppendSeparator()
+        
+        if self.GetCanvas().frame.tools == None:
+            return
+            
+        supportedTools = None
+        supportedTools = self.GetCanvas().frame.tools.getSupportedTools(self.port.interface.nameSpace, self.port.interface.name)
+
+        if supportedTools != None:
+            for x in supportedTools:
+                newid = wx.NewId()
+                self.portMenu.Append(id=newid, kind=wx.ITEM_NORMAL, text=str(x.name))
+                self.id_tool_dict[newid] = x
+
+    def processTimingEvent(self, function_name, description, time_s, time_us, number_samples):
+        """Process the timing event for this port.  Store the timing information in self.timingData
+           and forward the event to display if enabled."""
+
+        opname = function_name
+        opwhere = description
+        old_time_us = 0
+        old_time_s = 0
+        if opname not in self.timingData.keys():
+            print "This shouldn't really ever print, because the operations should have all already been imported"
+            self.timingData[opname] = {}
+            self.timingData[opname]['begin'] = [0,0,0,0,0]
+            self.timingData[opname]['end'] = [0,0,0,0,0]
+            old_time_s = time_s
+            old_time_us = time_us
+        else:
+            old_time_s = self.timingData[opname][opwhere][0]
+            old_time_us = self.timingData[opname][opwhere][1]
+        
+        self.timingData[opname][opwhere] = [time_s, time_us, number_samples, old_time_s, old_time_us]   # store timing info
+        if self.port_info_shape != None:
+            self.port_info_shape.UpdateText()
+        if self.GetCanvas().frame.timing_view_state:
+            if opwhere == "end":
+                locker = wx.MutexGuiLocker()
+                self.SetBrush(brushList[self.brushIndex])
+                canvas = self.GetCanvas()
+                dc = wx.ClientDC(canvas)
+                canvas.PrepareDC(dc)
+           
+                r = self.GetRegions()
+                x,y = r[0].GetSize()
+                rect = wx.Rect(self.GetX()-x/2,self.GetY()-y/2,x,y)
+                canvas.RefreshRect(rect)
+                canvas.frame.Update()
+                
+                self.brushIndex = (self.brushIndex+1)%(len(brushList))
+
+            # Set local flag for timing display
+            if not self.show_timing_display:
+                self.show_timing_display = True
+        else:
+            # Timing display has been turned off, but the port display hasn't been refreshed yet
+            if self.show_timing_display:
+                locker = wx.MutexGuiLocker()
+                if (self.port.type == "Uses"):
+                    self.SetBrush(wx.BLACK_BRUSH)
+                else:
+                    self.SetBrush(wx.WHITE_BRUSH)
+                canvas = self.GetCanvas()
+                dc = wx.ClientDC(canvas)
+                canvas.PrepareDC(dc)
+           
+                r = self.GetRegions()
+                x,y = r[0].GetSize()
+                rect = wx.Rect(self.GetX()-x/2,self.GetY()-y/2,x,y)
+                canvas.RefreshRect(rect)
+                canvas.frame.Update()
+                
+                self.show_timing_display = False
+    
+    def GetChildShapes(self):
+        tmpshapes = []
+        if self.gauge != None:
+            tmpshapes.append(self.gauge)
+        tmpshapes.extend(self.GetLines())
+        return tmpshapes
+
+    
+    #--------------------------
+    # Event handling
+    #--------------------------
+    def OnPortMenu(self, event):
+        id = event.GetId()
+        if self.id_tool_dict.has_key(id):
+            self.displayTool(self.id_tool_dict[id])
+
+    def OnRightClick(self, x, y, keys=0, attachment=0):
+        self.window.PopupMenu(self.portMenu)
+    
+    def OnPortMenuInfoMenu(self, event):
+        self.displayPortInfoPopup()
+    
+    def displayPortInfoPopup(self):
+        ds = PortInfoShape(240,150,self.GetCanvas(),self.port, self)
+        ds.SetDraggable(True, True)
+        ds.SetBrush(wx.Brush("WHEAT", wx.SOLID))
+        dc = wx.ClientDC(self.GetCanvas())
+        self.GetCanvas().PrepareDC(dc)
+        ds.SetCanvas(self.GetCanvas)
+        ds.SetShadowMode(ogl.SHADOW_RIGHT)
+        self.GetCanvas().diagram.AddShape(ds)
+
+        ds.Show(True)
+
+        self.GetCanvas().shapes.append(ds)
+        line = ogl.LineShape()
+        line.SetCanvas(self.GetCanvas())
+        line.SetPen(wx.BLACK_PEN)
+        line.SetBrush(wx.BLACK_BRUSH)
+        line.AddArrow(ogl.ARROW_ARROW)
+        line.MakeLineControlPoints(2)
+        self.AddLine(line, ds)
+        self.GetCanvas().diagram.AddShape(line)
+        line.Show(True)
+        ds.line = line
+                                                                                                                        
+        ds.Move(dc, self.GetX()+25, self.GetY()+150)
+        self.port_info_shape = ds
+    
+    def displayTool(self, tool):
+        if tool.module == None:
+            # NOTE: alf_plugins is now the package that contains all tools
+            exec_string = "from alf_plugins." + tool.packagename + " import "
+            exec_string += tool.modulename + " as tool_module"
+            exec exec_string
+
+            tool.module = tool_module
+        else:
+            tool_module = tool.module
+            reload(tool_module)
+
+        naming_context = ("DomainName1", self.GetCanvas().frame.active_wave.naming_context, self.parent_component.name)
+        #newframe = tool_module.create(self.GetCanvas().frame, str(self.port.interface.nameSpace),
+        newframe = tool_module.create(self.wave_display, str(self.port.interface.nameSpace),
+            str(self.port.interface.name), naming_context, str(self.port.name))
+        newframe.Show(True)
+        #self.GetCanvas().frame.tool_frames.append(newframe)
+        self.wave_display.tool_frames.append(newframe)
+        #wav_data = self.GetCanvas().frame.last_waveform_data_update
+        wav_data = self.wave_display.last_waveform_data_update
+        if wav_data != None:
+            if hasattr(newframe, 'updateWaveformData'):
+                newframe.updateWaveformData(wav_data)
+   
+#----------------------------------------------------------------------
+
+class PortInfoShape(ogl.DividedShape):
+    def __init__(self, x=0.0, y=0.0, canvas=None, port=None, parent_port=None):
+    
+        ogl.DividedShape.__init__(self, x, y)
+
+        nameRegion = ogl.ShapeRegion()
+        nameRegion.SetText(port.name)
+        nameRegion.SetProportions(0.0, 0.2)
+        nameRegion.SetFormatMode(ogl.FORMAT_CENTRE_HORIZ)
+        self.AddRegion(nameRegion)
+       
+        intRegion = ogl.ShapeRegion()
+        ts = port.interface.nameSpace + "::" + port.interface.name
+        intRegion.SetText(ts)
+        intRegion.SetProportions(0.0, 0.3)
+        intRegion.SetFormatMode(ogl.FORMAT_CENTRE_HORIZ)
+        self.AddRegion(intRegion)
+        self.canvas = canvas
+        
+        opRegion = ogl.ShapeRegion()
+        self.parent_port = parent_port
+        ts = ''
+
+        for op in port.interface.operations:
+            ts += op.cxxReturnType + " " + op.name + " ("
+            for x in range(len(op.params)):
+                param = op.params[x]
+                ts += param.direction + " " + param.cxxType + " " + param.name
+                if x != len(op.params)-1:
+                    ts += ", "
+                else:
+                    ts += ")"
+            if (self.parent_port.timingData[op.name]['end'][2] != 0):
+                time_diff = (self.parent_port.timingData[op.name]['end'][0]-self.parent_port.timingData[op.name]['end'][3])+((self.parent_port.timingData[op.name]['end'][1]-self.parent_port.timingData[op.name]['end'][4])/1000000.0)
+                throughput = self.parent_port.timingData[op.name]['end'][2]/time_diff
+                ts += "\n\tThroughput: " + "%.2f" % throughput + " sps"
+            if op != port.interface.operations[len(port.interface.operations)-1]:
+                ts += "\n"
+
+        opRegion.SetText(ts)
+        opRegion.SetProportions(0.0, 0.5)
+        opRegion.SetFormatMode(ogl.FORMAT_CENTRE_HORIZ)
+        x,y = opRegion.GetSize()
+        self.text_region = opRegion
+        self.port = port
+        self.AddRegion(opRegion)
+
+        self.SetRegionSizes()
+        self.ReformatRegions(canvas)
+    
+    def UpdateText(self):
+        ts=''
+        for op in self.port.interface.operations:
+            ts += op.cxxReturnType + " " + op.name + " ("
+            for x in range(len(op.params)):
+                param = op.params[x]
+                ts += param.direction + " " + param.cxxType + " " + param.name
+                if x != len(op.params)-1:
+                    ts += ", "
+                else:
+                    ts += ")"
+            if (self.parent_port.timingData[op.name]['end'][2] != 0):
+                time_diff = (self.parent_port.timingData[op.name]['end'][0]-self.parent_port.timingData[op.name]['end'][3])+((self.parent_port.timingData[op.name]['end'][1]-self.parent_port.timingData[op.name]['end'][4])/1000000.0)
+                throughput = self.parent_port.timingData[op.name]['end'][2]/time_diff
+                ts += "\n\tThroughput: " + "%.2f" % throughput + " sps"
+            if op != self.port.interface.operations[len(self.port.interface.operations)-1]:
+                ts += "\n"
+
+        self.text_region.SetText(ts)
+        self.ReformatRegions(self.canvas)
+        locker = wx.MutexGuiLocker()
+        
+        canvas = self.GetCanvas()
+        dc = wx.ClientDC(canvas)
+        canvas.PrepareDC(dc)
+        r = self.GetRegions()
+        x,y = r[2].GetSize()
+        rect = wx.Rect(self.GetX()-x/2,self.GetY(),x,y)
+        canvas.RefreshRect(rect)
+        canvas.frame.Update()
+        #self.GetCanvas().Refresh()
+
+
+    def ReformatRegions(self, canvas=None):
+        rnum = 0
+        if canvas is None:
+            canvas = self.GetCanvas()
+        dc = wx.ClientDC(canvas)  # used for measuring
+        for region in self.GetRegions():
+            text = region.GetText()
+            self.FormatText(dc, text, rnum)
+            rnum += 1
+    
+    #--------------------------
+    # Event handling
+    #--------------------------
+    def OnSizingEndDragLeft(self, pt, x, y, keys, attch):
+        ogl.DividedShape.OnSizingEndDragLeft(self, pt, x, y, keys, attch)
+        self.SetRegionSizes()
+        self.ReformatRegions()
+        self.GetCanvas().Refresh()
+
+    def OnRightClick(self, x, y, keys=0, attachment=0):
+        # Remove info box and line from canvas
+        self.parent_port.port_info_shape = None
+        dc = wx.ClientDC(self.GetCanvas())
+        self.GetCanvas().PrepareDC(dc)
+        if self.Selected():
+            self.Select(False, dc)
+        self.RemoveLine(self.line)
+        self.GetCanvas().diagram.RemoveShape(self.line)
+        self.GetCanvas().diagram.RemoveShape(self)
+        self.GetCanvas().Refresh()
+
+    def OnLeftClick(self, x, y, keys = 0, attachment = 0):
+        shape = self
+        canvas = self.GetCanvas()
+        dc = wx.ClientDC(canvas)
+        canvas.PrepareDC(dc)
+
+        if shape.Selected():
+            shape.Select(False, dc)
+            canvas.Redraw(dc)
+        else:
+            redraw = False
+            shapeList = canvas.GetDiagram().GetShapeList()
+            toUnselect = []
+            for s in shapeList:
+                if s.Selected():
+                    # If we unselect it now then some of the objects in
+                    # shapeList will become invalid (the control points are
+                    # shapes too!) and bad things will happen...
+                    toUnselect.append(s)
+
+            shape.Select(True, dc)
+
+            if toUnselect:
+                for s in toUnselect:
+                    s.Select(False, dc)
+                canvas.Redraw(dc)
+
+#----------------------------------------------------------------------
+class GaugeShape(ogl.RectangleShape):
+    def __init__(self, w=0.0, h=0.0, canvas=None, port=None):
+        ogl.RectangleShape.__init__(self, w, h)
+        self.uses_port = port
+        self.provides_port = None
+        if canvas != None:
+            self.SetCanvas(canvas)
+        self.gauge_range = 100
+
+        self.gauge = wx.Gauge(self.GetCanvas(), id=-1, range=self.gauge_range,
+            size=wx.Size(int(w),int(h)), style=wx.GA_HORIZONTAL)
+        self.gauge.Show(False)
+        self.show_gauge = False
+        self.gauge.SetValue(75)
+        self.delta = 5
+    
+    def ShowGauge(self, show):
+        if show:
+            locker = wx.MutexGuiLocker()
+            self.show_gauge = True
+            self.Show(True)
+            self.gauge.Show(True)
+            self.GetCanvas().Refresh()
+        else:
+            locker = wx.MutexGuiLocker()
+            self.show_gauge = False
+            self.Show(False)
+            self.gauge.Show(False)
+            self.GetCanvas().Refresh()
+            
+    def processTimingEvent(self, port, description):
+        if self.GetCanvas().frame.timing_view_state:
+            locker = wx.MutexGuiLocker()
+            current_value = self.gauge.GetValue()
+            if port == self.uses_port:
+                if self.GetCanvas().frame.timing_view_state:
+                    if current_value - self.delta < 0:
+                        self.gauge.SetValue(self.gauge_range)
+                    else:    
+                        self.gauge.SetValue(current_value - self.delta)
+            if port == self.provides_port:
+                if self.GetCanvas().frame.timing_view_state:
+                    if current_value + self.delta > self.gauge_range:
+                        self.gauge.SetValue(0)
+                    else:    
+                        self.gauge.SetValue(current_value + self.delta)
+    
+    #--------------------------
+    # Event handling
+    #--------------------------
+    def OnMovePost(self, dc, x, y, oldX, oldY, display):
+        r = self.GetRegions()
+        rx,ry = r[0].GetSize()
+        gauge_size = self.gauge.GetSizeTuple()
+        if rx != gauge_size[0] or ry != gauge_size[1]:
+            self.gauge.SetSize(wx.Size(rx,ry))
+            
+        self.gauge.Move((x-rx/2,y-ry/2))
+    
+    def OnDraw(self, dc):
+        if not self.show_gauge:
+            self.Show(False)
+        ogl.RectangleShape.OnDraw(self, dc)
+
+# -------------------------------------------------------------------------------------------------
+class WaveformShapes(wx.Window):
+    """A wrapper class to encapsulate all the shapes and tool data for a waveform instance"""
+    def __init__(self, waveform, canvas):
+        self.waveform = waveform
+        self.canvas = canvas
+        self.tool_frames = []
+        self.shapes = []
+        self.lines = []
+
+        # This is a little bit of a workaround so we can pass an instance of this class
+        # to spawned tools so they can have encapsulated metadata
+        self.window = wx.Window(canvas, id=-1, size=wx.Size(-1,-1))
+        wx.Window.__init__(self,parent=self.window, id=-1)
+        self.window.Show(False)
+        
+        # Structures to deal with storage and updating of tools
+        self.waveformData = {}
+        self.last_waveform_data_update = None
+        self.tool_frames = []
+
+        self.comp_locationX = 100
+        self.comp_locationY = 200
+
+    def AddTool(self, frame):
+        self.tool_frames.append(frame)
+
+    def AddComponentShape(self, comp):
+        tmpshape = ComponentShape(self.canvas, comp, self)
+        
+        # Composites have to be moved for all children to get in place
+        dc = wx.ClientDC(self.canvas)
+        self.canvas.PrepareDC(dc)
+        tmpshape.Move(dc, self.comp_locationX, self.comp_locationY)
+
+        tmpshape.SetX(self.comp_locationX)
+        tmpshape.SetY(self.comp_locationY)
+        tmpshape.SetPen(wx.BLACK_PEN)
+        tmpshape.SetBrush(wx.RED_BRUSH)
+
+        comp.shape = tmpshape
+
+        self.shapes.extend(tmpshape.GetChildShapes())
+        self.shapes.append(tmpshape)
+        self.comp_locationX += 200
+
+    def ConnectComponents(self):
+        """Show the connections between components with lines"""
+
+        dc = wx.ClientDC(self.canvas)
+        self.canvas.PrepareDC(dc)
+
+        for comp in self.waveform.components:
+            for con in comp.connections:
+                if not hasattr(con.localPort,"shape"):
+                    return
+                if not hasattr(con.remotePort,"shape"):
+                    return
+                fromShape = con.localPort.shape
+                toShape = con.remotePort.shape
+
+                line = ogl.LineShape()
+                line.SetCanvas(self.canvas)
+                line.SetPen(wx.BLACK_PEN)
+                line.SetBrush(wx.BLACK_BRUSH)
+                line.AddArrow(ogl.ARROW_ARROW)
+                line.MakeLineControlPoints(2)
+                fromShape.AddLine(line, toShape)
+
+                #self.lines.append(line)
+                self.shapes.append(line)
+                #self.diagram.AddShape(line)
+                #line.Show(True)
+
+                # for some reason, the shapes have to be moved for the line to show up...
+                #fromShape.Move(dc, fromShape.GetX(), fromShape.GetY())
+        
+    def updateWaveformData(self, data):
+        for d in data:
+            self.waveformData[d[0]] = d[1]
+
+        self.last_waveform_data_update = self.waveformData.copy()
+
+        for frame in self.tool_frames:
+            if hasattr(frame, 'updateWaveformData'):
+                frame.updateWaveformData(self.waveformData)
+
+    def removeToolFrame(self, frame):
+        if frame not in self.tool_frames:
+            return
+        else:
+            index = self.tool_frames.index(frame)
+            del self.tool_frames[index]
+                                                        
+
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/namingserviceDialog.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/namingserviceDialog.py	(revision 10597)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/namingserviceDialog.py	(revision 10597)
@@ -0,0 +1,113 @@
+## Copyright 2005, 2006, 2007, 2008, 2009 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE ALF Waveform Application Visualization Environment
+##
+## ALF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## ALF is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+
+class NamingserviceDialog(wx.Dialog):
+    def __init__(self, parent):
+        wx.Dialog.__init__(self,
+                parent=parent,
+                id=-1,
+                title='Target Naming Service Selection',
+                pos=wx.DefaultPosition,
+                size=wx.Size(310, 170))
+
+        panel = wx.Panel(self, -1)
+
+        vbox = wx.BoxSizer(wx.VERTICAL)
+        hbox = wx.BoxSizer(wx.HORIZONTAL)
+
+        st = wx.StaticBox(panel, -1, 'Hosts', wx.Point(5,5), wx.Size(300, 95))
+
+        self.rbLocalhost = wx.RadioButton(panel, -1, 'Localhost (127.0.0.1)', wx.Point(15,30), wx.DefaultSize, wx.RB_GROUP)
+        self.rbNethost = wx.RadioButton(panel, -1, 'Network Host:', wx.Point(15,55))
+        self.tcNethost = wx.TextCtrl(panel, -1, '', wx.Point(130, 55), size=wx.Size(120, -1))
+        self.tcNethost.SetMaxLength(15)
+        self.tcNethost.SetValue(self.GetParent().namingservice[1])
+        self.tcNethost.Bind(wx.EVT_TEXT, self.checkNetHost)
+
+        
+        if(self.GetParent().namingservice[0] == '127.0.0.1') :
+            self.rbLocalhost.SetValue(True)
+        else:
+            self.rbNethost.SetValue(True)
+
+        
+
+        applyButton = wx.Button(self, -1, 'Apply', wx.DefaultPosition, wx.Size(70,30))
+        closeButton = wx.Button(self, -1, 'Cancel', wx.DefaultPosition, wx.Size(70,30))
+       # exitButton = wx.Button(self, -1, 'Exit', wx.DefaultPosition, wx.Size(70,30))
+        applyButton.Bind(wx.EVT_BUTTON, self.OnApply)
+        closeButton.Bind(wx.EVT_BUTTON, self.OnClose)
+       # exitButton.Bind(wx.EVT_BUTTON, self.OnExit)
+
+        hbox.Add(applyButton, 1)
+        hbox.Add(closeButton, 1, wx.LEFT, 5)
+       # hbox.Add(exitButton, 1, wx.LEFT, 5)
+
+        vbox.Add(panel, 1)
+        vbox.Add(hbox, 0, wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, 10)
+
+        self.SetSizer(vbox)
+
+        self.Center()
+        self.ShowModal()
+        
+        self.Destroy()
+
+    def OnApply(self, event):
+        parent = self.GetParent()
+        reload = False
+
+        if(self.rbLocalhost.GetValue()):
+            parent.namingservice[0] = '127.0.0.1'
+        elif(self.rbNethost.GetValue()):
+            parent.namingservice[0] = self.tcNethost.GetValue().encode('ascii', 'ignore')
+            parent.namingservice[1] = parent.namingservice[0]
+
+            
+        if parent.namingservice[0] not in parent.connections:
+            parent.connections[parent.namingservice[0]] = []
+        
+        self.EndModal(1)
+        parent.init_CORBA()
+        parent.refreshDisplay(True)
+        parent.DisplayInstalledWaveforms()
+        parent.DisplayAvailableWaveforms()
+        parent.DisplayAvailableComponents()
+        
+        #disable compform feature when naming service is running remotely
+        if (parent.namingservice[0] == '127.0.0.1'):
+            parent.componentsBox.Enable(True)
+        else:
+            wx.MessageBox("Warning: Comp Form feature will be disabled when naming service is running remotely")
+            parent.componentsBox.Enable(False)
+            
+        if parent.connect_frame:
+            parent.connect_frame.refreshDisplay()
+
+    def OnClose(self, event):
+        self.EndModal(1)
+
+    def OnExit(self, event):
+        self.EndModal(1)
+        self.GetParent().Destroy()
+        
+    def checkNetHost(self, event):
+        self.rbNethost.SetValue(True);
+        self.rbLocalhost.SetValue(False);
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/ALFtiming.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/ALFtiming.py	(revision 8264)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/ALFtiming.py	(revision 8264)
@@ -0,0 +1,130 @@
+## Copyright 2005, 2006, 2007, 2008 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE ALF Waveform Application Visualization Environment
+##
+## ALF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## ALF is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+from omniORB import CORBA
+import CosNaming
+
+try:   # mac 
+    import customInterfaces__POA
+    import standardInterfaces__POA
+    import CF, CF__POA
+
+except:    # 0.6.2
+    import ossie.standardinterfaces.standardInterfaces__POA as standardInterfaces__POA
+    import ossie.custominterfaces.customInterfaces__POA as customInterfaces__POA
+    import ossie.cf.CF as CF 
+    import ossie.cf.CF__POA as CF__POA
+
+import time, threading, sys
+
+last_time = 0 # used so ALF won't kill the waverform when it exits
+class my_timing_structure(customInterfaces__POA.timingStatus):
+    def __init__(self, orb, parent):
+        self.orb = orb
+        self.parent = parent
+        if not hasattr(parent, "processTimingEvent"):
+            print "Calling function does not support timing events"
+            sys.exit(1)
+
+    def send_timing_event(self, component_name, port_name, function_name, description, time_s, time_us, number_samples):
+        #print "Component name: " + component_name
+        #print "Port name: " + port_name
+        #print "Time(s): " + str(time_s)
+        #print "Time(us): " + str(time_us)
+        #print "Description: " + description
+        #print "-----------------------"
+        self.parent.processTimingEvent(str(component_name),str(port_name),
+            str(function_name),str(description), long(time_s),long(time_us),long(number_samples))
+        last_time = time.time()
+
+class TimingDisplay:
+    def __init__(self, waveform_naming_context_text, parent):
+        self.connected_ports = []
+        self.orb = None
+        
+        self.createTimingPortList(waveform_naming_context_text)
+        
+        # Create the orb
+        self.timing_struct = my_timing_structure(self.orb,parent)
+        obj_poa = self.orb.resolve_initial_references("RootPOA")
+        poaManager = obj_poa._get_the_POAManager()
+        poaManager.activate()
+        obj_poa.activate_object(self.timing_struct)
+
+        for porthandle in self.connected_ports:
+            porthandle.connectPort(self.timing_struct._this(), "thisismyconnectionid_timing")
+
+    def createTimingPortList(self, waveform_naming_context_text):
+        self.orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
+        obj = self.orb.resolve_initial_references("NameService")
+    
+        rootContext = obj._narrow(CosNaming.NamingContext)
+  
+        if rootContext is None:
+            print "Failed to narrow the root naming context"
+            sys.exit(1)
+    
+        #name = [CosNaming.NameComponent("DomainName1","")]
+        name = [CosNaming.NameComponent("DomainName1",""),
+                CosNaming.NameComponent(waveform_naming_context_text,"")]
+
+        #domain_context = obj2._narrow(CosNaming.NamingContext);
+        
+        #name2 = [CosNaming.NameComponent(waveform_naming_context_text,"")]
+        #obj3 = domain_context.resolve(name2)
+        
+        try:
+            wav_obj = rootContext.resolve(name)
+    
+        except:
+            print waveform_naming_context_text + " could not be found"
+            sys.exit(1)
+        
+        waveform_context = wav_obj._narrow(CosNaming.NamingContext);
+        
+
+            
+        #waveform_context = obj._narrow(CosNaming.NamingContext)
+        if waveform_context is None:
+            print "Could not narrow to: " + waveform_naming_context_text
+            sys.exit(1)
+     
+
+        # Create a list of port handles to resources containing the timingStatus interface
+        members = waveform_context.list(100)
+        for m in members[0]:
+            res_name = m.binding_name[0]
+            res = waveform_context.resolve([res_name])
+            res_handle = res._narrow(CF.Resource)
+            if res_handle is None:
+                continue
+            
+            PortReference = res_handle.getPort("send_timing_report")
+            if PortReference is None:
+                continue
+            PortHandle = PortReference._narrow(CF.Port)
+            if PortHandle != None:
+                self.connected_ports.append(PortHandle)
+
+    def __del__(self):
+        for porthandle in self.connected_ports:
+            porthandle.disconnectPort("thisismyconnectionid_timing")
+
+        while(time.time() - last_time) < 1.0:
+            time.sleep(.3)
+
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/importResourceForALF.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/importResourceForALF.py	(revision 9942)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/importResourceForALF.py	(revision 9942)
@@ -0,0 +1,342 @@
+## Copyright 2005, 2006, 2007 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Developer.
+##
+## OSSIE Waveform Developer is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## OSSIE Waveform Developer is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import os, sys, wx
+import xml.dom.minidom
+from xml.dom.minidom import Node
+from WaveDev.wavedev import ComponentClass as CC
+import ALFutils
+
+availableTypes = ["boolean", "char", "double", "float", "short", "long",
+                    "objref", "octet", "string", "ulong","ushort"]
+availableKinds = ["allocation", "configure", "test", "execparam", "factoryparam"]
+availableActions = ["eq", "ne", "gt", "lt", "ge", "le", "external"]
+availableModes = ["readonly", "readwrite", "writeonly"]
+
+def errorMsg(self,msg):
+    dlg = wx.MessageDialog(self,msg,'Error', wx.OK | wx.ICON_INFORMATION)
+    try:
+        dlg.ShowModal()
+    finally:
+        dlg.Destroy()
+    return
+
+def getResource(path,Rname,parent):
+#    
+#    scdPath = findFile(path,Rname,".scd.xml")                
+#    if scdPath == None:         
+#        errorMsg(parent,"No scd file found for: " + Rname)
+#        return
+#    
+#    spdPath = findFile(path,Rname,".spd.xml")
+#    prfPath = findFile(path,Rname,".prf.xml")
+    
+    #converting from unicode to string.
+    scdPath = str(path + "/" + Rname + ".scd.xml")
+    spdPath = str(path + "/" + Rname + ".spd.xml")
+    prfPath = str(path + "/" + Rname + ".prf.xml")
+    
+    #return if any of these three files does not exist
+    if not (parent.fileMgr.exists(scdPath) or \
+        parent.fileMgr.exists(spdPath) or \
+        parent.fileMgr.exists(prfPath) ):
+        errorMsg(parent, "Some files (scd/spd/prf) missing for " + Rname + " in " + path )
+        return
+    
+    #
+    # Build the main component or device from the SCD file    
+    #
+    #doc_scd = xml.dom.minidom.parse(scdPath)
+    doc_scd = ALFutils.getDOM(parent.fileMgr, scdPath)
+    try:
+        componenttypeNode = doc_scd.getElementsByTagName("componenttype")
+        componenttype = componenttypeNode[0].childNodes[0].data
+    except:
+        errorMsg(parent,"Invalid file: " + scdPath)
+        return None
+    
+    #doc_spd = xml.dom.minidom.parse(spdPath)
+    doc_spd = ALFutils.getDOM(parent.fileMgr, spdPath)
+
+    # get resource description
+    # note: this is not the same as the implementation description
+    softpkgNode = doc_spd.getElementsByTagName("softpkg")[0]
+    Rdescription = ''
+    for n in softpkgNode.childNodes:
+        if n.nodeName == "description":
+            resDescriptionNode = doc_spd.getElementsByTagName("description")
+            try:
+                Rdescription = resDescriptionNode[0].firstChild.data
+            except:
+                pass
+            break
+
+    #Instantiate a new component of the appropriate type
+    if componenttype == u'resource':
+        newComp = CC.Component(name=Rname,type='resource',description=Rdescription)
+    elif componenttype == u'executabledevice':
+        newComp = CC.Component(name=Rname,type='executabledevice',description=Rdescription)
+    elif componenttype == u'loadabledevice':
+        newComp = CC.Component(name=Rname,type='loadabledevice',description=Rdescription)
+    elif componenttype == u'device':
+        newComp = CC.Component(name=Rname,type='device',description=Rdescription)
+    else:
+        errorMsg(parent,"Can't identify resource type for: " + Rname)
+        return None
+        
+    # Get the Ports
+    portsNodes = doc_scd.getElementsByTagName("ports")
+    for node in portsNodes:
+        providesPortsNodes = node.getElementsByTagName("provides")
+        usesPortsNodes = node.getElementsByTagName("uses")
+
+    # Provides ports
+    for node in providesPortsNodes:
+        tmpName = node.getAttribute("providesname")
+        tmpInt = getInterface( node.getAttribute("repid"), tmpName )
+        if tmpInt == None:
+            return None
+        portTypeNodeList = node.getElementsByTagName("porttype")
+        tmpType = portTypeNodeList[0].getAttribute("type")
+        newPort = CC.Port(tmpName,tmpInt,type='Provides',portType=tmpType)
+        newComp.ports.append(newPort)
+
+    # Uses ports
+    for node in usesPortsNodes:
+        tmpName = node.getAttribute("usesname")
+        tmpInt = getInterface( node.getAttribute("repid"), tmpName )
+        if tmpInt == None:
+            return None
+        portTypeNodeList = node.getElementsByTagName("porttype")
+        tmpType = portTypeNodeList[0].getAttribute("type")
+        newPort = CC.Port(tmpName,tmpInt,type='Uses',portType=tmpType)
+        newComp.ports.append(newPort)
+
+    # Make sure that xml and code are not generated for this resource
+    newComp.generate = False        
+    
+    # Store the name of the file without the suffix (.scd.xml)
+    i = scdPath.rfind("/")
+    if i != -1:
+        newComp.xmlName = scdPath[i+1:-8]
+    else:
+        newComp.xmlName = scdPath[:-8]
+    
+    #
+    # Import the properties from the PRF file
+    #
+    # If there are no properties, just return the component as is
+    if prfPath == None:
+        return newComp
+    #doc_prf = xml.dom.minidom.parse(prfPath)
+    doc_prf = ALFutils.getDOM(parent.fileMgr, prfPath)
+    try:
+        propertyNodeList = doc_prf.getElementsByTagName("properties")
+    except:
+        errorMsg(parent,"Invalid file: " + prfPath)
+        return None
+    
+    # get simple properties
+    simplePropertyNodeList = doc_prf.getElementsByTagName("simple")
+    for node in simplePropertyNodeList:
+        p = getSimpleProperty(node)
+        if p == None:
+            print "There was an error parsing simple properties in the PRF file " + prfPath
+            continue
+        newComp.properties.append(p)
+
+    # get simple sequence properties
+    simpleSequencePropertyNodeList = doc_prf.getElementsByTagName("simplesequence")
+    for node in simpleSequencePropertyNodeList:
+        p = getSimpleSequenceProperty(node, prfPath)
+        if p == None:
+            print "There was an error parsing simple sequence properties in the PRF file " + prfPath
+            continue
+        newComp.properties.append(p)
+
+    return newComp
+
+def getInterface(repid,name):
+    try:
+        repid = repid.strip('IDL:')
+        repid = repid[:repid.rfind(':')]
+        tmpNS = repid[:repid.find('/')]
+        tmpName = repid[repid.find('/')+1:]
+        newInt = CC.Interface(tmpName,nameSpace=tmpNS)
+        return newInt
+        
+    except:
+        errorMsg(parent,"Can't read the Interface information for port: " + name)
+        return None
+    
+## Not used for this version of importResource. We use the framework file manager object.
+def findFile(path,Rname,suf):
+    tmpf = None
+    if os.path.isfile(path + '/' + Rname +'Resource'+suf):
+        tmpf = path + '/' + Rname +'Resource' + suf
+    elif os.path.isfile(path + '/' + Rname + suf):
+        tmpf = path + '/' + Rname + suf     
+    else:
+        tmpFiles = os.listdir(path)
+        for f in tmpFiles:
+            if len(f)>=8 and f[-8:] == suf:
+                tmpf = path + '/' + f
+                break
+    return tmpf
+
+#not used in this version of importResource
+def stripDoctype(xmlfile):
+    """Strips out the DOCTYPE checking because the dtd files are positioned 
+       in a relative location to the SCA (OSSIE) filesystem, so when Amara
+       trys to validate against them, it bails out looking for the file.
+       Returns a string representation of the xml file without the DOCTYPE line."""
+   
+    file = open(xmlfile, 'r')
+    xml = ''
+    line = file.readline()
+    while len(line) > 0:
+        if "DOCTYPE" in line:
+            break
+        xml += line
+        line = file.readline()
+    xml += file.read()
+
+    return xml
+                                                                    
+
+def getSimpleProperty(n):
+    tmpName = n.getAttribute("name")
+    tmpID   = n.getAttribute("id")
+    tmpType = n.getAttribute("type")
+    tmpMode = n.getAttribute("mode")
+    tmpDes = n.getAttribute("description")
+
+    if tmpName == "" or tmpID == "" or tmpType == "" or tmpMode == "":
+        return None
+    if tmpMode not in availableModes:
+        return None
+    if tmpType not in availableTypes:
+        return None
+    
+    newProp = CC.SimpleProperty(tmpName,tmpMode,tmpType,description=tmpDes)
+   
+    # Set ID
+    #UUID in the sad file will need to match the UUID in the prf (tmpID is from prf)
+    newProp.id = tmpID
+
+    # Get/set property value
+    valueNodeList = n.getElementsByTagName("value")
+    value = valueNodeList[0].childNodes[0].data
+    newProp.value = newProp.defaultValue = str(value)
+    del valueNodeList, value
+    
+    # Get/set property units
+    unitsNodeList = n.getElementsByTagName("units")
+    if len(unitsNodeList) > 0:
+        units = unitsNodeList[0].childNodes[0].data
+        newProp.units = str(s.units)
+    #del unitsNodeList, units
+    
+    # TODO: Get/set min/max values
+    # TODO: Get/set enum
+    
+    # Get/set kind
+    kindNodeList = n.getElementsByTagName("kind")
+    kindtype = kindNodeList[0].getAttribute("kindtype")
+    if kindtype == "":
+        return None
+    newProp.kind = str(kindtype)
+    del kindNodeList, kindtype
+    
+    # Get/set action
+    actionNodeList = n.getElementsByTagName("action")
+    if len(actionNodeList) > 0:
+        actiontype = actionNodeList[0].getAttribute("type")
+        newProp.action = str(actiontype)
+    #del actionNodeList, actiontype
+        
+    return newProp
+    
+def getSimpleSequenceProperty(n, prfPath):
+    tmpName = n.getAttribute("name")
+    tmpID   = n.getAttribute("id")
+    tmpType = n.getAttribute("type")
+    tmpMode = n.getAttribute("mode")
+    tmpDes = n.getAttribute("description")
+
+    if tmpName == "" or tmpID == "" or tmpType == "" or tmpMode == "":
+        return None
+    if tmpMode not in availableModes:
+        return None
+    if tmpType not in availableTypes:
+        return None
+    
+    newProp = CC.SimpleSequenceProperty(tmpName,tmpMode,tmpType,description=tmpDes)
+   
+    # Set ID
+    #UUID in the sad file will need to match the UUID in the prf (tmpID is from prf)
+    newProp.id = tmpID
+
+
+    # Get/set property values
+    newProp.values = []
+    newProp.defaultValues = []
+    valuesNodeList = n.getElementsByTagName("values")
+    
+    try:
+        valueNodeList = valuesNodeList[0].getElementsByTagName("value")
+    except:
+        valueNodeList = n.getElementsByTagName("value") #cbd
+        #print "\nERROR in " + prfPath
+        #print "ERROR parsing prf file.  You may be missing a values tag in a simple sequence property.\n"
+        #sys.exit()
+        print "\nWarning in " + prfPath
+        print "Warning parsing prf file.  You may be missing a values tag in a simple sequence property.\n"
+
+    for valueNode in valueNodeList:
+        tmpVal = valueNode.childNodes[0].data
+        newProp.values.append(str(tmpVal))
+        newProp.defaultValues.append(str(tmpVal))
+    del valueNodeList
+
+    # Get/set property units
+    unitsNodeList = n.getElementsByTagName("units")
+    if len(unitsNodeList) > 0:
+        units = unitsNodeList[0].childNodes[0].data
+        newProp.units = str(s.units)
+    #del unitsNodeList, units
+    
+    # TODO: Get/set min/max values
+    # TODO: Get/set enum
+    
+    # Get/set kind
+    kindNodeList = n.getElementsByTagName("kind")
+    kindtype = kindNodeList[0].getAttribute("kindtype")
+    if kindtype == "":
+        return None
+    newProp.kind = str(kindtype)
+    del kindNodeList, kindtype
+
+    # Get/set action
+    actionNodeList = n.getElementsByTagName("action")
+    if len(actionNodeList) > 0:
+        actiontype = actionNodeList[0].getAttribute("type")
+        newProp.action = str(actiontype)
+    #del actionNodeList, actiontype
+
+    return newProp
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/config/alf.cfg
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/config/alf.cfg	(revision 9577)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/config/alf.cfg	(revision 9577)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<alfconfiguration>
+    <version>Version 0.5.0</version>
+    <installpath>/sdr/dom</installpath>
+    <stdidlpath></stdidlpath>
+    <ossieincludepath></ossieincludepath>
+    <homedir></homedir>
+</alfconfiguration>
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/config/toolconfig.xml
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/config/toolconfig.xml	(revision 8158)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/config/toolconfig.xml	(revision 8158)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<toolconfiguration>
+    <tool>
+        <name>ALF</name>
+        <startfile>ALF.py</startfile>
+        <modulename></modulename>
+        <packagename></packagename>
+    </tool>
+</toolconfiguration>
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/config/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/config/Makefile.am	(revision 9483)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/config/Makefile.am	(revision 9483)
@@ -0,0 +1,4 @@
+EXTRA_DIST = alf.cfg \
+	     toolconfig.xml \
+	     example1.xml
+
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/config/example1.xml
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/config/example1.xml	(revision 8158)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/config/example1.xml	(revision 8158)
@@ -0,0 +1,26 @@
+<automations>
+    <producer>
+        <name>My only producer</name>
+        <toolname>AWG</toolname>
+    </producer>
+
+    <consumer>
+        <name>My first consumer</name>
+        <header>1</header>
+        <install_at_startup>True</install_at_startup>
+        <waveform>pass_data_waveform</waveform>
+        <componentInstance>pass_data</componentInstance>
+        <port>cshort_in</port>
+
+    </consumer>
+
+    <consumer>
+        <name>My second consumer</name>
+        <header>2</header>
+        <install_at_startup>True</install_at_startup>
+        <waveform>pass_data_waveform</waveform>
+        <componentInstance>pass_data</componentInstance>
+        <port>cshort_in</port>
+    </consumer>
+
+</automations>
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/images/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/images/Makefile.am	(revision 10589)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/images/Makefile.am	(revision 10589)
@@ -0,0 +1,6 @@
+EXTRA_DIST = timing_display.png \
+			 timing.png \
+			 launch_wavedash.png \
+			 network.png \
+                         nbstart.png
+
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/loadAutomationFile.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/loadAutomationFile.py	(revision 10142)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/loadAutomationFile.py	(revision 10142)
@@ -0,0 +1,453 @@
+## Copyright 2005, 2006, 2007, 2008 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE ALF Waveform Application Visualization Environment
+##
+## ALF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## ALF is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import xml.dom.minidom  # builtin python XML parser
+import compform
+import os
+
+
+#try:  # 0.6.2
+from alf_plugins.AWG import AWG
+import ossie.standardinterfaces.standardInterfaces__POA as standardInterfaces__POA
+import ossie.cf.CF as CF
+import cProfile as profile
+import pstats
+#except ImportError:  # pre 0.6.2
+#    import tools.AWG.AWG as AWG
+#    import standardInterfaces__POA
+#    import CF
+#    import profile
+
+import time
+
+import CosNaming    # narrowing naming context stuff
+import sys       
+from omniORB import CORBA
+
+
+class automation(standardInterfaces__POA.complexShort):
+    def __init__(self, parent, automation_file):
+        ''' Parse the XML file to give a list of producers and a list
+            of consumers '''
+       
+        self.connectToolRef = parent
+        self.alfFrameRef = parent.alfFrameRef
+
+        self._init_ORB()    # gives me self.orb and self.rootContext
+
+# NOTE: use CF::FileManager to obtain file locations'
+        self.waveform_XML_dir = '/waveforms/'
+        self.comp_XML_dir = '/xml/'
+
+        self.header_len = 1
+
+        self.profiling_on = False        # True or False
+        self.profile_counter = 0
+        self.my_profile = profile.Profile()
+        # bias is needed when using profile module (not cProfile)
+        # This bias is system dependent
+        #self.my_profile.bias = 1.6989519401052302e-05
+        # profile.bias = 1.6989519401052302e-05
+        
+        self.packet_counter = 0
+
+        # parse the XML file
+        automationXML = xml.dom.minidom.parse(automation_file)
+
+        # producers:
+        self.producers_list = []
+        producersXML = automationXML.getElementsByTagName('producer')
+        for producerXML in producersXML:
+            producer_dict = {}
+            for n in producerXML.childNodes:
+                if n.nodeName != u"#text":
+                    # strip() method removes blank spaces
+                    producer_dict[n.nodeName] = n.firstChild.data.strip()
+            self.producers_list.append(producer_dict)
+
+
+        # consumers
+        self.consumers_list = []
+        consumersXML = automationXML.getElementsByTagName("consumer")
+        for consumerXML in consumersXML:
+            consumer_dict = {}
+            for n in consumerXML.childNodes:
+                if n.nodeName != u"#text":
+                    # strip() method removes blank spaces 
+                    consumer_dict[n.nodeName] = n.firstChild.data.strip()
+                    if n.nodeName == u'install_at_startup':
+                        if not(
+                        n.firstChild.data.find("True")!=-1 
+                     or n.firstChild.data.find("False")!=-1):
+                            print "ERROR: XML node install_at_startup must be either true or false"
+                            return
+            self.consumers_list.append(consumer_dict)
+
+
+        # Look for consumer applications that need to be installed at startup
+        # and install them.
+        counter = 0
+        while counter < len(self.consumers_list):
+
+            if self.consumers_list[counter].has_key('waveformInstance'):
+                self.consumers_list[counter] = self._find_app_ref(
+                                                self.consumers_list[counter])
+        
+                # set install at startup to true so that the initial
+                # connection will be set up
+                self.consumers_list[counter]['install_at_startup'] = 'True'
+
+            elif self.consumers_list[counter]['install_at_startup'].find('True')!=-1:
+                self.consumers_list[counter] = self._install_necessary_waveform(self.consumers_list[counter])
+            counter += 1
+
+
+        # Look for producer applications that need to be installed at startup
+        # and install them.
+        counter = 0
+        while counter < len(self.producers_list):
+            
+            if self.producers_list[counter].has_key('waveformInstance'):
+                self.producers_list[counter] = self._find_app_ref(
+                                                self.producers_list[counter])
+                # set install at startup to true so that the initial
+                # connection will be set up
+                self.producers_list[counter]['install_at_startup'] = 'True'
+                counter += 1
+                continue
+
+            self.producers_list[counter] = self._install_necessary_waveform(self.producers_list[counter])
+            counter += 1
+
+        self._create_initial_connections()
+
+
+    def _init_ORB(self):
+        ''' creates self.orb and self.rootContext '''
+        self.orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
+        obj = self.orb.resolve_initial_references("NameService")
+        self.rootContext = obj._narrow(CosNaming.NamingContext)
+        if self.rootContext is None:
+            print "Failed to narrow the root naming context"
+            sys.exit(1)
+
+
+    def _find_app_ref(self, prod_or_cons_dict):
+        ''' This method will use the waveformInstace key of the incomming
+            dictionary to find an application reference.  The application
+            reference ("app_ref") will be added to the dictionary '''
+       
+        appSeq = self.alfFrameRef.domMgr._get_applications()
+        for tmp_app in appSeq:
+            compNameCon = tmp_app._get_componentNamingContexts()
+            for compElementType in compNameCon:
+                if prod_or_cons_dict['waveformInstance'] in compElementType.elementId:
+                    print "found the application"
+                    prod_or_cons_dict['app_ref'] = tmp_app
+                    break
+
+        return prod_or_cons_dict
+
+
+    def _install_necessary_waveform(self, prod_or_cons_dict):
+        ''' Private.  Installs an application based on incomming dictionary.
+            The dictionary should originate from the XML file that was
+            parsed durring startup'''
+
+        #for dict in objects_list:
+        if prod_or_cons_dict.has_key('toolname'):
+            # If I'm dealing with an alf tool
+            prod_or_cons_dict['tool_ref'] = self.create_tool(prod_or_cons_dict)
+
+        else:
+            # Do the necessary installation of waveform or compform
+            # make initial connections when necessary            
+            if 'waveform' not in prod_or_cons_dict:
+                if 'component' not in prod_or_cons_dict:
+                    print "ERROR: producer or consumer defined in XML file does not seem to have a waveformInstance, a toolname, a waveform, or a component"
+                else:
+                    # Install compform
+                    prod_or_cons_dict['app_ref'] = self.install_compform_from_dict(prod_or_cons_dict)
+
+                    compNamingCon = prod_or_cons_dict['app_ref']._get_componentNamingContexts()
+
+                    waveInstName = compNamingCon[0].elementId.split('/')[1]
+                    prod_or_cons_dict['waveformInstance'] = waveInstName
+
+                prod_or_cons_dict['waveformInstance'] = prod_or_cons_dict['app_ref']._get_componentNamingContexts()
+
+            else:  # have a waveform to install
+                prod_or_cons_dict['app_ref'] = self.install_waveform_from_dict(prod_or_cons_dict)
+                compNamingCon = prod_or_cons_dict['app_ref']._get_componentNamingContexts()
+
+                waveInstName = compNamingCon[0].elementId.split('/')[1]
+                prod_or_cons_dict['waveformInstance'] = waveInstName
+                    
+
+        return prod_or_cons_dict
+
+
+    def create_tool(self, tool_dict):
+        if tool_dict['toolname'] == "AWG":
+            return AWG.create_from_other_tool(self.connectToolRef)
+
+
+    def install_compform_from_dict(self, compform_dict):
+        compName = str(compform_dict['component'])
+        compNameAndDir = self.comp_XML_dir + compName 
+
+        self.alfFrameRef.compform_counter = self.alfFrameRef.compform_counter + 1
+
+        tmp_dir_name = "/sdr/dom/_tmp_alf_waveforms/"  # this is where I put my temporary
+                                              # xml files
+        tmp_wave_name = "_" + compName + str(self.alfFrameRef.compform_counter)
+
+
+        #make the directory to put the XML
+        if os.path.exists(tmp_dir_name) == False:
+            try:
+                os.mkdir(tmp_dir_name)   
+            except:
+                errorMsg(self,"Cannot create temporary directory in the waveform directory.  You may need to change the temporary directory to one that you have write permissions to")
+
+        if os.path.exists(tmp_dir_name + tmp_wave_name) == False:   
+            try:
+                os.mkdir(tmp_dir_name + tmp_wave_name)
+            except:
+                errorMsg(self,"Cannot create temporary directory in the waveform directory.  You may need to change the temporary directory to one that you have write permissions to")
+                return
+ 
+
+        # assumes that alf is in /sdr/tools
+        my_compform = compform.compform(compName, compNameAndDir, 
+                                        tmp_dir_name, tmp_wave_name)
+        my_compform.create()
+
+     
+        print "WARNING: tmp files generated in " + tmp_dir_name
+
+        tmp_dir_name = tmp_dir_name +  tmp_wave_name + "/"
+
+        app_ref = self.alfFrameRef.InstallWaveform(tmp_wave_name + ".sad.xml", 
+                                   tmp_dir_name + tmp_wave_name + ".sad.xml",
+                                   tmp_wave_name + "_DAS.xml",
+                                   tmp_dir_name + tmp_wave_name + "_DAS.xml")
+
+        return app_ref
+
+
+
+    def install_waveform_from_dict(self, waveform_dict):
+        ''' Installs a waveform application as an SCA application based on 
+            the given dictionary.  Dictionary should originate from the 
+            XML parsing done durring module initialization'''
+        wave_name = str(waveform_dict['waveform'])
+ 
+        name_SAD = self.waveform_XML_dir + wave_name + '/' + wave_name + '.sad.xml'
+        absolute_name_SAD = '' # no longer used
+
+        name_DAS = self.waveform_XML_dir + wave_name + '/' + wave_name + '_DAS.xml'
+        absolute_name_DAS = '' # No longer used
+
+        app_ref = self.alfFrameRef.InstallWaveform(name_SAD, absolute_name_SAD,
+                                         name_DAS, absolute_name_DAS)
+
+        return app_ref
+
+
+    def _create_initial_connections(self):
+        ''' This is where I set up the initial connections 
+            for applications installed at startup'''
+
+        counter = 0
+        for consumer in self.consumers_list:
+            if consumer[u'install_at_startup'].find(u'True') != -1:
+                self.consumers_list[counter]['PortHandle'] = self.connect_to_consumer_comp(consumer)
+            counter +=1
+
+        counter = 0
+        for producer in self.producers_list:
+            if producer.has_key('toolname'):
+                continue  # connecting to the tool is handled elsewhere
+            else:
+                self.producers_list[counter]['PortHandle'] = self.connect_to_producer_component(producer)
+
+            counter += 1
+
+
+    def connect_to_consumer_comp(self, consumer_dict):
+        ''' Connects the consumer component's provides port to self.  
+            returns a port handle'''
+
+        # Format the domain, waveform, and component name so that
+        # the root context can understand it
+        name = [CosNaming.NameComponent("DomainName1" ,"" ),
+           CosNaming.NameComponent(str(consumer_dict['waveformInstance']) ,"" ),
+           CosNaming.NameComponent(str(consumer_dict['componentInstance']) ,"" )]
+
+        # Attempt to get a reference to the resource
+        try:
+            ResourceRef = self.rootContext.resolve(name)
+        except:
+            # could not find the resource.  Something has gone wrong.  Throw error.
+            print "Required resource not found in the naming service"
+            sys.exit(1)
+
+        # connect to an existing port
+        ResourceHandle = ResourceRef._narrow(CF.Resource)
+        PortReference = ResourceHandle.getPort(str(consumer_dict['port']))
+            
+        if PortReference is None:
+            # the component's getPort method did not give me a port reference for some reason
+            print "WANRING: failed to get Port Reference from consumerresource"
+
+
+        # return portHandle
+        # Assuming complexShort
+        return PortReference._narrow(standardInterfaces__POA.complexShort)
+
+
+    def connect_to_producer_component(self, producer_dict):
+        ''' Returns a PortHandle that will allow you to call disconnect later'''
+
+        name = [CosNaming.NameComponent("DomainName1" ,"" ),
+           CosNaming.NameComponent(str(producer_dict['waveformInstance']) ,"" ),
+           CosNaming.NameComponent(str(producer_dict['componentInstance']) ,"" )]
+
+        try:
+            ResourceRef = self.rootContext.resolve(name)
+        except:
+            print "FATAL ERROR:  Required resource (producer) not found in connect_to_producer_component method"
+            sys.exit(1)
+
+        ResourceHandle = ResourceRef._narrow(CF.Resource)
+
+        # get a reference to the uses port
+        PortReference = ResourceHandle.getPort(str(producer_dict[u'port']))
+        if PortReference is None:
+            print "getPort from a producer component did not return a valid port reference"
+        PortHandle = PortReference._narrow(CF.Port)
+
+        PortHandle.connectPort(self._this(),
+                             "connection_id:_" + str(producer_dict['port']))
+
+
+    def stripHeader(self, data):
+        return data[self.header_len: len(data)]
+
+
+
+    # -------------------------------------------------------------------
+    # Begin push packet methods:
+
+    def pushPacketMetaData(self, I_data, Q_data, metadata):
+        print "WARNING: metadata not yet supported in automations.py"
+        print "metadata is being ignored"
+
+        # TODO: get the metadata that describes where the packet is going, 
+        # and inset it to the beginning of the packet
+        self.pushPacket(I_data, Q_data)
+
+
+    def pushPacket(self, I_data, Q_data):
+
+        if self.profiling_on:
+            tmp_filename = "profiles/pushPacket_" + str(self.profile_counter) + ".profile"
+
+            self.my_profile.runctx("tmp_self._pushPacket(I_data, Q_data)",
+                    None,
+                    {"tmp_self": self, "I_data": I_data, "Q_data": Q_data})
+            self.my_profile.dump_stats(tmp_filename)
+
+            self.profile_counter += 1
+
+        else:   # profiling off
+            self._pushPacket(I_data, Q_data)
+    
+    def _pushPacket(self, I_data, Q_data):
+       
+        consumer_index = -1  # I have to start at -1 so that I increment
+                             # the index before the main body of the for 
+                             # loop.  This way i never miss the incrementation
+                             # if I use a continue statement
+
+        current_packet_header = I_data[0]
+        
+        I_data = self.stripHeader(I_data)
+        Q_data = self.stripHeader(Q_data)
+
+        for consumer in self.consumers_list:
+
+            consumer_index += 1
+            if int(consumer[u'header']) == abs(current_packet_header):
+
+                if current_packet_header >= 0:
+                    # send data to the consumer, install if necessary
+     
+                    if consumer.has_key('app_ref'):
+                        # application already installed, send it data
+                        consumer['PortHandle'].pushPacket(I_data, Q_data)
+
+                    else:
+                        # install the application, connect, then send data
+                        self.consumers_list[consumer_index] = self._install_necessary_waveform(consumer)
+                        self.consumers_list[consumer_index]['PortHandle'] = self.connect_to_consumer_comp(consumer)
+                        self.consumers_list[consumer_index]['PortHandle'].pushPacket(I_data, Q_data)
+
+
+
+                else:   # current_packet_header < 0
+                        # this is the uninstall case
+                    
+                    I_data = self.stripHeader(I_data)
+                    Q_data = self.stripHeader(Q_data)
+                    if consumer.has_key('PortHandle'):
+
+                        # send the last piece of data
+                        consumer['PortHandle'].pushPacket(I_data, Q_data)
+   
+
+                    else:     
+                        # Header is negative and connection does not exist
+                        # install the application, connect, send data, then uninstall
+
+                        self.consumers_list[consumer_index] = self._install_necessary_waveform(consumer)
+            
+                        self.consumers_list[consumer_index]['PortHandle'] = self.connect_to_consumer_comp(consumer)
+
+                        self.consumers_list[consumer_index]['PortHandle'].pushPacket(I_data, Q_data)
+
+
+                    # uninstall the consumer application
+                    self.consumers_list[consumer_index]['app_ref'].releaseObject()
+
+                    # remove unwanted keys from the appropriate consumers dictionary
+                    del self.consumers_list[consumer_index]['app_ref']
+                    del self.consumers_list[consumer_index]['PortHandle']
+                    del self.consumers_list[consumer_index]['waveformInstance']    
+
+
+    # end push packet methods
+    # --------------------------------------------------------------------
+
+
+    def __del__(self):
+        pass
+
+
+
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/importWaveform.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/importWaveform.py	(revision 9942)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/importWaveform.py	(revision 9942)
@@ -0,0 +1,228 @@
+## Copyright 2005, 2006, 2007, 2008 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE ALF Waveform Application Visualization Environment
+##
+## ALF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## ALF is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import os, sys
+import xml.dom.minidom
+from xml.dom.minidom import Node
+
+try:  # mac ossie
+    import WaveformClass as WC
+    import ComponentClass as CC
+    from errorMsg import *
+    from XML_gen import xmlBeautify
+
+except ImportError:     # 0.6.2
+    import WaveDev.wavedev.WaveformClass as WC
+    import WaveDev.wavedev.ComponentClass as CC
+    from WaveDev.wavedev.errorMsg import *
+    import WaveDev.wavedev.importResource as importResource
+    from WaveDev.wavedev.XML_gen import xmlBeautify
+    
+import copy
+import ALFutils
+import importResourceForALF
+
+def getWaveform(sad_path, parent, interfaces):
+ 
+    # Create a binding of the SAD file
+    #Get the dom from ALFutils. if the file is not found, the ALFutils module 
+    #will take care of reporting error
+    doc_sad = ALFutils.getDOM(parent.fileMgr, sad_path) 
+    if doc_sad is None:
+        return None
+
+    # TODO: validate SAD file against the dtd
+    # try to find "softwareassembly" node
+    try:
+        softwareassemblyNode = doc_sad.getElementsByTagName("softwareassembly")[0]
+    except:
+        errorMsg(parent, "Invalid SAD file: " + sad_path + "; no \"softwareassembly\" tag")
+        return None
+    
+    # try to find "componentfiles" node
+    try:
+        componentfilesNode = softwareassemblyNode.getElementsByTagName("componentfiles")[0]
+    except:
+        errorMsg(parent, "Invalid SAD file: " + sad_path + "; no \"componentfiles\" tag")
+        return None
+
+    # At this point, assume SAD file validates against the DTD; no longer
+    # necessary to use try/except statements
+    waveform_name = softwareassemblyNode.getAttribute("name")
+    new_waveform = WC.Waveform(str(waveform_name))
+
+    # Get list of "componentfile" nodes from SAD file
+    componentfileNodeList = componentfilesNode.getElementsByTagName("componentfile")
+    
+    # Dictionary storing mapping of componentfile ids to file names (unicode)
+    compfiles = {}  
+    for componentfileNode in componentfileNodeList:
+        localfilename = componentfileNode.getElementsByTagName("localfile")[0].getAttribute("name")
+        #localfilename resembles "/xml/TxDemo/TxDemo.spd.xml". taht itself should be enough
+        #to open the file through FileManager. No need to add /sdr/dom
+        tmps = localfilename
+        #have to pass the parent(alf frame object) so that getBaseName can make use of fileMgr
+        base_name = getBaseName(parent, tmps)
+        # TODO: this next line is a dirty hack: use the python os module to strip name from path
+        tmps = tmps[0:tmps.rfind('/')]  # remove actual file name (importResource format)
+        componentfileid = componentfileNode.getAttribute("id")
+        compfiles[componentfileid] = (tmps,base_name)
+
+    # Create the component objects from the componentplacement section
+    componentplacementNodeList = softwareassemblyNode.getElementsByTagName("componentplacement")
+    for componentplacementNode in componentplacementNodeList:
+        # get refid
+        componentfilerefNode = componentplacementNode.getElementsByTagName("componentfileref")[0]
+        refid = componentfilerefNode.getAttribute("refid")
+
+        # get component path from compfiles dictionary
+        comp_path = compfiles[refid][0]
+
+        # get componentinstantiation id (strip off "DCE:")
+        componentinstantiationNode = componentplacementNode.getElementsByTagName("componentinstantiation")[0]
+        comp_id = str(componentinstantiationNode.getAttribute("id")).replace("DCE:","")
+
+        # get component base name from compfiles dictionary
+        comp_base_name = str(compfiles[refid][1])
+
+        # get usagename
+        usagenameNode = componentinstantiationNode.getElementsByTagName("usagename")[0]
+        comp_name = str(usagenameNode.firstChild.data)
+
+        new_comp = importResourceForALF.getResource(comp_path, comp_base_name, parent)
+        new_comp.name = comp_name
+        new_comp.uuid = comp_id
+        new_comp.file_uuid = str(refid.replace(comp_base_name + '_',''))
+        new_waveform.components.append(new_comp)
+    
+    # Assign interfaces based on import IDL - gets the operations right this way
+    for comp in new_waveform.components:
+        assignInterfaces(comp,interfaces)
+    
+    # Find and set the AssemblyController through its refid
+    assemblycontrollerNode = softwareassemblyNode.getElementsByTagName("assemblycontroller")[0]
+    # NOTE: first and only child is "componentinstantiationref"
+    componentinstantiationrefNode = assemblycontrollerNode.getElementsByTagName("componentinstantiationref")[0]
+    ac = str(componentinstantiationrefNode.getAttribute("refid"))
+    ac = ac.replace("DCE:","")
+    for c in new_waveform.components:
+        if c.uuid == ac:
+            c.AssemblyController = True
+
+
+    # Create the connections
+    connectinterfaceNodeList = softwareassemblyNode.getElementsByTagName("connectinterface")
+
+    if len(connectinterfaceNodeList) != 0:
+        for connectinterfaceNode in connectinterfaceNodeList:
+            usesportNode = connectinterfaceNode.getElementsByTagName("usesport")[0]
+            usesid = usesportNode.getElementsByTagName("usesidentifier")[0].firstChild.data
+            # NOTE: first and only child of "findby" node is "namingservice"
+            findbyNode = usesportNode.getElementsByTagName("findby")[0]
+            nsname = findbyNode.getElementsByTagName("namingservice")[0].getAttribute("name")
+            usesid = str(usesid)
+            nsname = str(nsname)
+
+            uses_comp = getCompFromNSName(nsname,new_waveform)
+
+            # Check for providesport
+            providesportNodeList = connectinterfaceNode.getElementsByTagName("providesport")
+            if len(providesportNodeList) != 0:
+                # "providesport" tag exists
+                providesportNode = providesportNodeList[0]
+
+                # get providesidentifier
+                providesidentifierNode = providesportNode.getElementsByTagName("providesidentifier")[0]
+                providesid = str(providesidentifierNode.firstChild.data)
+
+                # get namingservice name
+                # NOTE: first and only child of "findby" node is "namingservice"
+                findbyNode = providesportNode.getElementsByTagName("findby")[0]
+                nsname = str(findbyNode.getElementsByTagName("namingservice")[0].getAttribute("name"))
+                provides_comp = getCompFromNSName(nsname,new_waveform)
+            else:
+                # "providesport" tag does not exist
+                # Probably is a hardware port located directly on the naming service
+                # Not supporting this quite yet
+                continue
+                # NOTE: the next line is only supported with amara
+                if not hasattr(ci, 'findby'):
+                    errorMsg(parent, "Invalid SAD file")
+                    return None
+                
+                nsname = str(ci.findby.namingservice.name)
+
+
+            uses_port = None
+            provides_port = None
+
+            #try statement is a temporary fix to ALF's inability to display devices
+            try:
+                for port in uses_comp.ports:
+                    if port.name == usesid:
+                        uses_port = port
+                for port in provides_comp.ports:
+                    if port.name == providesid:
+                        provides_port = port
+
+                # Unfortunately there is no information stored in the XML about which component
+                # initiated the connection in OWD - so we'll say that uses is always the local port
+                new_connection = CC.Connection(uses_port, provides_port, provides_comp)
+
+                uses_comp.connections.append(new_connection)
+            except:
+                pass    #skip the device
+
+    return new_waveform
+
+
+# Find and return the component from its naming service name
+def getCompFromNSName(nsname, waveform):
+    nsname = nsname.replace("DomainName1/","")
+    i = nsname.rfind('/')
+    if i >= 0:
+        nsname = nsname[i+1:]
+    
+    for comp in waveform.components:
+        if comp.name == nsname:
+            return comp
+
+    return None
+
+# parse the spd file and return the name of the component base class
+def getBaseName(alfFrame, spd_path):
+    # Create a binding of the SAD file
+    doc_spd = ALFutils.getDOM (alfFrame.fileMgr, spd_path)
+    if doc_spd is None:
+        print "INvalid doc_spd - spd_path = ",spd_path 
+        return None
+    # TODO: validate against dtd
+    try:
+        softpkgNode = doc_spd.getElementsByTagName("softpkg")[0]
+    except:
+        errorMsg(parent, "Invalid SPD file: " + spd_path + "; no \"softpkg\" node found")
+        return None
+        
+    return str(softpkgNode.getAttribute("name"))
+    
+def assignInterfaces(comp, interfaces):
+    for port in comp.ports:
+        for i in interfaces:
+            if i.name == port.interface.name and i.nameSpace == port.interface.nameSpace:
+                port.interface = copy.deepcopy(i)
+    
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/compform.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/compform.py	(revision 9578)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/compform.py	(revision 9578)
@@ -0,0 +1,130 @@
+#!/usr/bin/env python
+
+## Copyright 2005, 2006, 2007, 2008 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE ALF Waveform Application Visualization Environment
+##
+## ALF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## ALF is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+'''generates a waveform out of a single component
+command line inputs: 
+1. component name (in /sdr/dom/xml)
+2. directory to put the waveform source code
+3. waveform name (optional).  if you do not specify waveform name, 
+   name will be componentname_waveform'''
+
+try: # mac
+    import XML_gen.application_gen as app_gen
+    import ComponentClass
+    import WaveformClass
+    import importResource
+except:    # 0.6.2
+    import WaveDev.wavedev.XML_gen.application_gen as app_gen
+    import WaveDev.wavedev.ComponentClass as ComponentClass
+    import WaveDev.wavedev.WaveformClass as WaveformClass
+    import WaveDev.wavedev.importResource as importResource
+
+import sys
+import os
+
+class compform:
+    def __init__(self, comp_in, compNameAndDir, genPath, waveName):
+        self.comp_in = comp_in
+        self.complist = None
+        self.genPath = genPath
+        self.waveName = waveName
+        self.wavedevPath = compNameAndDir
+        self.compNameAndDir = compNameAndDir
+
+    def create(self):
+        self.get_the_resource()
+        self.create_complist()
+        self.create_files()
+
+    def get_the_resource(self):
+        '''gets the component in the form of a ComponentClass object'''
+
+        self.component = importResource.getResource(self.compNameAndDir, 
+                                                    self.comp_in, 
+                                                    self)
+  
+
+    def create_complist(self):
+        '''Creates a component list out of the single component 
+           for the application_gen function in WaveDev.'''
+        active_wave = WaveformClass.Waveform()
+        
+        self.component.AssemblyController = True
+        tmp_device = fake_device()
+
+        self.component.device = tmp_device
+
+        #append the single component to the waveform
+        active_wave.components.append(self.component)   
+        self.complist = active_wave.components
+
+    def create_files(self):
+
+        # generate the sad file:
+        app_gen.genxml(self.complist, self.genPath, self.wavedevPath, self.waveName)  
+
+        # generate the DAS file
+        app_gen.genDAS(self.complist, self.genPath, self.wavedevPath, self.waveName)   
+
+class fake_device:
+    '''this is available so that my component can be assigned to a device'''
+    def __init__(self):
+        # using the uuid from default_GPP_node
+        self.uuid = "5ba336ee-aaaa-aaaa-aaaa-00123f573a7f"
+
+
+if __name__ == "__main__":
+    '''parse the input arguments, and make function calls to 
+       create the waveform'''
+ 
+    #check to make sure all the command line arguments are present
+    if len(sys.argv) == 1 or len(sys.argv) == 2 or len(sys.argv) > 4:
+        print "i'm going to want a component, an install dir and an optional waveform name"
+        sys.exit()
+
+    comp_in = sys.argv[1]   #name of the component that will be used
+    genPath = sys.argv[2]   #where the generated XML will go
+
+    #if the user did not specify a waveform name, create one
+    if len(sys.argv) == 3:
+        waveName = comp_in + "_waveform"
+    #if the user did set a waveform name, read it from the command line
+    elif len(sys.argv) == 4:
+        waveName = sys.argv[3] 
+
+    print "waveform name is " + waveName
+
+    #make the directory to put the XML   
+    if os.path.exists(genPath+waveName) == False:   
+        os.mkdir(genPath+'/'+waveName)
+
+# NOTE: use CF::FileManager to obtain file location
+    comp_in = "/sdr/dom/xml/" + comp_in
+
+    my_compform = compform(comp_in, genPath, waveName)
+
+    my_compform.create()
+
+    app_gen.writeWaveSetuppy(genPath, waveName)   # generates a setup.py file
+
+
+    
+
+   
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/Makefile.am
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/Makefile.am	(revision 10512)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/Makefile.am	(revision 10512)
@@ -0,0 +1,19 @@
+SUBDIRS = config \
+	  images \
+	  profiles 
+
+EXTRA_DIST = ALF.py \
+	     ALFshapes.py \
+	     ALFtiming.py \
+	     ALFutils.py \
+	     compform.py \
+	     connectTool.py \
+	     importWaveform.py \
+	     loadAutomationFile.py \
+		 namingserviceDialog.py \
+		 importResourceForALF.py \
+		 ALFNodeBooterUtils.py \
+	     __init__.py \
+	     ALFNSChoiceDialog.py \
+	     ALFNodeBooterDialog.py 
+
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/ALFutils.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/ALFutils.py	(revision 9942)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/ALFutils.py	(revision 9942)
@@ -0,0 +1,341 @@
+## Copyright 2005, 2006, 2007, 2008 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE ALF Waveform Application Visualization Environment
+##
+## ALF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## ALF is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import os, sys
+import xml.dom.minidom
+from xml.dom.minidom import Node
+import wx
+try:  # mac
+    import importIDL
+except ImportError:
+    import WaveDev.wavedev.importIDL as importIDL
+
+class Tool:
+    def __init__ (self):
+        self.name = ''
+        self.startfile = ''
+        self.modulename = ''
+        self.packagename = ''
+        self.interface = []
+        self.module = None
+        
+class ToolInterface:
+    def __init__ (self):
+        self.name = ''
+        self.namespace = ''
+        
+class ToolList:
+    def __init__ (self, tooldir):
+        self.tooldir = tooldir
+        self.tooldirlist = os.listdir(self.tooldir)
+        self.config_filename = "toolconfig.xml"
+        self.tool_dict={}
+        for curr_dir in self.tooldirlist:
+            #print curr_dir
+            if not os.path.isdir(self.tooldir + "/" + curr_dir):
+                continue
+            if not os.path.exists(self.tooldir+"/"+curr_dir+"/"+self.config_filename):
+                continue
+            config_file = open(self.tooldir+"/"+curr_dir+"/"+self.config_filename,'r')
+            if config_file is None:
+                print "Configuration could not be opened in " + self.tooldir+"/"+curr_dir
+                continue
+            doc_config = xml.dom.minidom.parse(config_file)
+            try:
+                toolconfigurationNode = doc_config.getElementsByTagName("toolconfiguration")[0]
+            except:
+                print "Configuration file in " + self.tooldir + "/" + curr_dir + \
+                      " lacks \"toolconfiguration\" tag"
+                continue
+
+            # get list of "tool" nodes, continue of none found
+            toolNodeList = toolconfigurationNode.getElementsByTagName("tool")
+            if len(toolNodeList) == 0:
+                continue
+
+            # check for interfaces
+            if len(toolNodeList[0].getElementsByTagName("interfaces"))==0:
+                continue
+
+            for toolNode in toolNodeList:
+                this_tool = Tool()
+
+                # get tool name
+                if toolNode.getElementsByTagName("name")[0].hasChildNodes():
+                    this_tool.name = str(toolNode.getElementsByTagName("name")[0].firstChild.data)
+                else:
+                    raise StandardError, "error loading tool from file " + \
+                            self.tooldir + '/' + curr_dir + '/' + self.config_filename + \
+                            " : tool has no name"
+
+                # get startfile
+                if toolNode.getElementsByTagName("startfile")[0].hasChildNodes():
+                    this_tool.name = str(toolNode.getElementsByTagName("name")[0].firstChild.data)
+                else:
+                    raise StandardError, "error loading tool from file " + \
+                            self.tooldir + '/' + curr_dir + '/' + self.config_filename + \
+                            " : tool has no startfile"
+
+                # get module name
+                if toolNode.getElementsByTagName("modulename")[0].hasChildNodes():
+                    this_tool.modulename = str(toolNode.getElementsByTagName("modulename")[0].firstChild.data)
+                else:
+                    this_tool.modulename = "<unknown module>"
+
+                # get package name
+                if toolNode.getElementsByTagName("packagename")[0].hasChildNodes():
+                    this_tool.packagename = str(toolNode.getElementsByTagName("packagename")[0].firstChild.data)
+                else:
+                    this_tool.packagename = "<unknown package>"
+
+                # get list of "interface" nodes, assuming they exist under "interfaces" node
+                interfaceNodeList = toolNode.getElementsByTagName("interface")
+                if len(interfaceNodeList) > 0:
+                    for interfaceNode in interfaceNodeList:
+                        this_interface = ToolInterface()
+                        this_interface.name = str(interfaceNode.getAttribute("name"))
+                        this_interface.namespace = str(interfaceNode.getAttribute("namespace"))
+                        this_tool.interface.append(this_interface)
+                    for i in range(0,len(this_tool.interface)):
+                        if not self.tool_dict.has_key(this_tool.interface[i].namespace):
+                            self.tool_dict[this_tool.interface[i].namespace]={}
+                            #print "Creating interface ns: " + this_tool.interface[i].namespace
+                        if not self.tool_dict[this_tool.interface[i].namespace].has_key(this_tool.interface[i].name):
+                            self.tool_dict[this_tool.interface[i].namespace][this_tool.interface[i].name]=[]
+                            #print "Creating interface name: " + this_tool.interface[i].name
+                        self.tool_dict[this_tool.interface[i].namespace][this_tool.interface[i].name].append(this_tool)
+    def getSupportedTools(self,namespace,interface):
+        if not self.tool_dict.has_key(namespace):
+            return None
+        if not self.tool_dict[namespace].has_key(interface):
+            return None
+        return self.tool_dict[namespace][interface]
+
+
+#----------------------------------------------------------------------
+def LoadConfiguration(frame_obj):
+    # Load configuration file
+#    alf_cfg = "alf.cfg"
+    root = __file__
+    if os.path.islink (root):
+        root = os.path.realpath (root)
+    root = os.path.dirname (os.path.abspath (root))
+    alf_cfg = root + '/config/alf.cfg'
+    if not os.path.isfile(alf_cfg):
+        print 'Configuration file "alf.cfg" missing from path'
+        return None
+    alfcfgfile = open(alf_cfg, 'r')
+    doc_cfg = xml.dom.minidom.parse(alfcfgfile)
+    alfconfigurationNodeList = doc_cfg.getElementsByTagName("alfconfiguration")
+    if len(alfconfigurationNodeList) == 0:
+        raise StandardError, "ALF configuration file does not include \"alfconfiguration\" node"
+
+    if doc_cfg.getElementsByTagName("version")[0].hasChildNodes():
+        frame_obj.version = str(doc_cfg.getElementsByTagName("version")[0].firstChild.data)
+    else:
+        frame_obj.version = "Version Unknown"
+
+    if doc_cfg.getElementsByTagName("installpath")[0].hasChildNodes():
+        frame_obj.installPath = str(doc_cfg.getElementsByTagName("installpath")[0].firstChild.data)
+    else:
+        frame_obj.installPath = ""
+
+    if doc_cfg.getElementsByTagName("stdidlpath")[0].hasChildNodes():
+        frame_obj.stdidlpath = str(doc_cfg.getElementsByTagName("stdidlpath")[0].firstChild.data)
+    else:
+        frame_obj.stdidlpath = ""
+
+    if doc_cfg.getElementsByTagName("ossieincludepath")[0].hasChildNodes():
+        frame_obj.ossieincludepath = str(doc_cfg.getElementsByTagName("ossieincludepath")[0].firstChild.data)
+    else:
+        frame_obj.ossieincludepath = ""
+
+    if doc_cfg.getElementsByTagName("homedir")[0].hasChildNodes():
+        frame_obj.homedir = str(doc_cfg.getElementsByTagName("homedir")[0].firstChild.data)
+    else:
+        frame_obj.homedir = "/sdr"
+    
+    # Find all tools in the tools directory
+    # NOTE: Tools directory is now now the alf_plugins module in site_packages
+    #tooldir = frame_obj.installpath+"/tools"
+    # NOTE: There may be a better way of finding the alf_plugins directory, but this works
+    tooldir = __import__('alf_plugins').__file__
+    if os.path.islink (tooldir):
+        tooldir = os.path.realpath (tooldir)
+    tooldir = os.path.dirname (os.path.abspath (tooldir))
+    frame_obj.tools = ToolList(tooldir)
+
+#----------------------------------------------------------------------
+def importStandardIdl(parent):   
+            
+    #if os.path.isfile(self.parent.ossieIncludePath + "cf.idl"):
+    #    cfIdl_file = self.parent.ossieIncludePath + "cf.idl"
+    if os.path.isfile("/usr/local/include/ossie/" + "cf.idl"):
+        cfIdl_file = "/usr/local/include/ossie/" + "cf.idl"
+    else:
+        tmpstr = "Cannot find cf.idl in the OSSIE installation location:\n"
+        tmpstr += parent.ossieIncludePath
+        errorMsg(parent,tmpstr)
+
+    # for each file in the standardinterfaces directory, import all available
+    # interfaces (skip standardIdl files)
+    stdIdlPath = "/usr/local/include/standardinterfaces/"
+    idlList = os.listdir(stdIdlPath)
+    if len(idlList) <= 0:
+        tmpstr = "Can't find any files in: " + parent.stdIdlPath
+        errorMsg(parent,tmpstr)
+        return
+        
+    # Add the CF interfaces first - in case another file includes them, we
+    # don't want them asscociated with anything other than cf.idl
+    Available_Ints = []
+    Available_Ints.extend(importIDL.getInterfaces(cfIdl_file))
+        
+    for idl_file in idlList:
+        # standardIdl files are not included because they are aggregates of the other interfaces
+        if 'standardIdl' in idl_file:
+            continue
+
+        if 'customInterfaces' in idl_file:
+            continue
+            
+        if idl_file[-3:] != "idl":
+            continue
+            
+        tempInts = importIDL.getInterfaces(stdIdlPath+idl_file)
+        for t in tempInts:
+            if t not in Available_Ints:
+               # print "Testing: " + t.name + " " + idl_file + " " + str(len(self.Available_Ints))
+                Available_Ints.append(t)
+	        #if t.name == 'timingStatus':
+		    #    self.timing_interface = CC.Interface(t.name, t.nameSpace, t.operations, t.filename, t.fullpath)
+			#self.timing_port = CC.Port('send_timing_report', self.timing_interface, "Uses", "data")
+#		    print "CF.py: " + t.name + "  " + str(len(t.operations))
+
+    return Available_Ints
+
+#----------------------------------------------------------------------
+def GetCollapsedIconData():
+    return \
+'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\
+\x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\
+\x00\x01\x8eIDAT8\x8d\xa5\x93-n\xe4@\x10\x85?g\x03\n6lh)\xc4\xd2\x12\xc3\x81\
+\xd6\xa2I\x90\x154\xb9\x81\x8f1G\xc8\x11\x16\x86\xcd\xa0\x99F\xb3A\x91\xa1\
+\xc9J&\x96L"5lX\xcc\x0bl\xf7v\xb2\x7fZ\xa5\x98\xebU\xbdz\xf5\\\x9deW\x9f\xf8\
+H\\\xbfO|{y\x9dT\x15P\x04\x01\x01UPUD\x84\xdb/7YZ\x9f\xa5\n\xce\x97aRU\x8a\
+\xdc`\xacA\x00\x04P\xf0!0\xf6\x81\xa0\xf0p\xff9\xfb\x85\xe0|\x19&T)K\x8b\x18\
+\xf9\xa3\xe4\xbe\xf3\x8c^#\xc9\xd5\n\xa8*\xc5?\x9a\x01\x8a\xd2b\r\x1cN\xc3\
+\x14\t\xce\x97a\xb2F0Ks\xd58\xaa\xc6\xc5\xa6\xf7\xdfya\xe7\xbdR\x13M2\xf9\
+\xf9qKQ\x1fi\xf6-\x00~T\xfac\x1dq#\x82,\xe5q\x05\x91D\xba@\xefj\xba1\xf0\xdc\
+zzW\xcff&\xb8,\x89\xa8@Q\xd6\xaaf\xdfRm,\xee\xb1BDxr#\xae\xf5|\xddo\xd6\xe2H\
+\x18\x15\x84\xa0q@]\xe54\x8d\xa3\xedf\x05M\xe3\xd8Uy\xc4\x15\x8d\xf5\xd7\x8b\
+~\x82\x0fh\x0e"\xb0\xad,\xee\xb8c\xbb\x18\xe7\x8e;6\xa5\x89\x04\xde\xff\x1c\
+\x16\xef\xe0p\xfa>\x19\x11\xca\x8d\x8d\xe0\x93\x1b\x01\xd8m\xf3(;x\xa5\xef=\
+\xb7w\xf3\x1d$\x7f\xc1\xe0\xbd\xa7\xeb\xa0(,"Kc\x12\xc1+\xfd\xe8\tI\xee\xed)\
+\xbf\xbcN\xc1{D\x04k\x05#\x12\xfd\xf2a\xde[\x81\x87\xbb\xdf\x9cr\x1a\x87\xd3\
+0)\xba>\x83\xd5\xb97o\xe0\xaf\x04\xff\x13?\x00\xd2\xfb\xa9`z\xac\x80w\x00\
+\x00\x00\x00IEND\xaeB`\x82' 
+
+def GetCollapsedIconBitmap():
+    return wx.BitmapFromImage(GetCollapsedIconImage())
+
+def GetCollapsedIconImage():
+    import cStringIO
+    stream = cStringIO.StringIO(GetCollapsedIconData())
+    return wx.ImageFromStream(stream)
+
+#----------------------------------------------------------------------
+def GetExpandedIconData():
+    return \
+'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\
+\x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\
+\x00\x01\x9fIDAT8\x8d\x95\x93\xa1\x8e\xdc0\x14EO\xb2\xc4\xd0\xd2\x12\xb7(mI\
+\xa4%V\xd1lQT4[4-\x9a\xfe\xc1\xc2|\xc6\xc2~BY\x83:A3E\xd3\xa0*\xa4\xd2\x90H!\
+\x95\x0c\r\r\x1fK\x81g\xb2\x99\x84\xb4\x0fY\xd6\xbb\xc7\xf7>=\'Iz\xc3\xbcv\
+\xfbn\xb8\x9c\x15 \xe7\xf3\xc7\x0fw\xc9\xbc7\x99\x03\x0e\xfbn0\x99F+\x85R\
+\x80RH\x10\x82\x08\xde\x05\x1ef\x90+\xc0\xe1\xd8\ryn\xd0Z-\\A\xb4\xd2\xf7\
+\x9e\xfbwoF\xc8\x088\x1c\xbbae\xb3\xe8y&\x9a\xdf\xf5\xbd\xe7\xfem\x84\xa4\
+\x97\xccYf\x16\x8d\xdb\xb2a]\xfeX\x18\xc9s\xc3\xe1\x18\xe7\x94\x12cb\xcc\xb5\
+\xfa\xb1l8\xf5\x01\xe7\x84\xc7\xb2Y@\xb2\xcc0\x02\xb4\x9a\x88%\xbe\xdc\xb4\
+\x9e\xb6Zs\xaa74\xadg[6\x88<\xb7]\xc6\x14\x1dL\x86\xe6\x83\xa0\x81\xba\xda\
+\x10\x02x/\xd4\xd5\x06\r\x840!\x9c\x1fM\x92\xf4\x86\x9f\xbf\xfe\x0c\xd6\x9ae\
+\xd6u\x8d \xf4\xf5\x165\x9b\x8f\x04\xe1\xc5\xcb\xdb$\x05\x90\xa97@\x04lQas\
+\xcd*7\x14\xdb\x9aY\xcb\xb8\\\xe9E\x10|\xbc\xf2^\xb0E\x85\xc95_\x9f\n\xaa/\
+\x05\x10\x81\xce\xc9\xa8\xf6><G\xd8\xed\xbbA)X\xd9\x0c\x01\x9a\xc6Q\x14\xd9h\
+[\x04\xda\xd6c\xadFkE\xf0\xc2\xab\xd7\xb7\xc9\x08\x00\xf8\xf6\xbd\x1b\x8cQ\
+\xd8|\xb9\x0f\xd3\x9a\x8a\xc7\x08\x00\x9f?\xdd%\xde\x07\xda\x93\xc3{\x19C\
+\x8a\x9c\x03\x0b8\x17\xe8\x9d\xbf\x02.>\x13\xc0n\xff{PJ\xc5\xfdP\x11""<\xbc\
+\xff\x87\xdf\xf8\xbf\xf5\x17FF\xaf\x8f\x8b\xd3\xe6K\x00\x00\x00\x00IEND\xaeB\
+`\x82' 
+
+def GetExpandedIconBitmap():
+    return wx.BitmapFromImage(GetExpandedIconImage())
+
+def GetExpandedIconImage():
+    import cStringIO
+    stream = cStringIO.StringIO(GetExpandedIconData())
+    return wx.ImageFromStream(stream)
+
+def getDOM(fileMgr, fileName):
+        #get the file descriptor from the framework
+        #file path should be absolute to the Framework file system
+        #e.g. if framework is mounted on /sdr/dom, then the path of a
+        #sad file would like "/waveforms/ossie_demo/ossie_demo.sad.xml
+        
+        #try:
+            #print "getDOM() - fileName = ", fileName 
+            fd = fileMgr.open(str(fileName), True)
+            domObj = xml.dom.minidom.parse(fd)
+            fd.close()
+            return domObj
+#        except:
+#            print sys.exc_info()[0]
+#            errorMsg = str(sys.exc_info()[1])
+#            errorMsg = errorMsg + "\ngetDOM(): Could not create DOM for file '" + fileName + "'"
+#            print str(errorMsg)
+#            return None
+#    
+def getFileList(fileMgr, dir=None, filetype= ""):
+    """ This function searches for the given filetype (e.g. *.sad.xml)
+    under the dir through the FileManager. the directory dir is relative 
+    to the FileManager mount directory (/sdr/dom)
+    """
+    
+    fileNames = []
+    try:
+        fileObjList = fileMgr.list("/"+filetype) #FileMgr list func demands a /
+        #fileObjList is a CORBA sequence of CF:File objects. extract the file name 
+        
+        if fileObjList is not None:
+            for fileObj in fileObjList:
+                #the file name is stored as an absolute path to the FileManager file system
+                #e.g file name = dom/waveforms/ossie_demo/ossie_demo.sad.xml
+                #throughout wavedash,we store the filenames in the model as relative to the
+                #FileManager root dir (/sdr/dom). Hence strip off dom/ from the returned filename
+                if dir is not None:
+                    if ( fileObj.name.find(dir) != -1 ):
+                        fName = fileObj.name[fileObj.name.find("/"):]
+                        fileNames.append(fName)
+    except:
+        error = str(sys.exc_info()[1])
+        error = error + "\n getFileList(): Could not get list of files from FileManager '"
+        print str(error)
+        return None
+    
+    return fileNames
+#----------------------------------------------------------------------
Index: /ossiedev/branches/0.8.x/trunk/tools/alf/connectTool.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/alf/connectTool.py	(revision 10142)
+++ /ossiedev/branches/0.8.x/trunk/tools/alf/connectTool.py	(revision 10142)
@@ -0,0 +1,561 @@
+## Copyright 2005, 2006, 2007, 2008 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE ALF Waveform Application Visualization Environment
+##
+## ALF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## ALF is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE Waveform Developer; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+
+import re
+import sys       # for system commands (e.g., argv and argc stuff)
+import CosNaming   # narrowing naming context stuff
+import random   # for generating random connection id
+
+try:   #mac / older OSSIE versions
+    import standardInterfaces__POA
+    import CF, CF__POA    # core framework stuff
+except ImportError:   #0.6.2
+    import ossie.standardinterfaces.standardInterfaces__POA as standardInterfaces__POA
+    import ossie.cf.CF as CF
+    import ossie.cf.CF__POA as CF__POA    
+
+from wx.lib.anchors import LayoutAnchors  # used by splitter window
+
+import loadAutomationFile
+import importWaveform
+
+def create(parent):
+    ''' returns a wx frame representing the connect tool'''
+    win = MainFrame(parent, -1)
+    win.CenterOnParent()
+    return win
+
+
+
+def errorMsg(self,msg):
+    ''' Brings up a wx error message that says msg (first argument)'''
+    dlg = wx.MessageDialog(self,msg,'Error', wx.OK | wx.ICON_INFORMATION)
+    try:
+        dlg.ShowModal()
+    finally:
+        dlg.Destroy()
+    return
+
+
+
+class MainFrame(wx.Frame):
+    ''' The main window where all of the connect tool's wx stuff resides'''
+
+    def __init__(self, parent, id):
+        self.alfFrameRef = parent
+
+        self._init_ctrls(self.alfFrameRef)   # initialize the wx stuff
+       
+        if __name__ != '__main__':      # this statement allows me to run the tool
+                                        # as a standalone without OSSIE to do 
+                                        # design work
+         self.refreshDisplay()
+
+        # This argument sets a default value for the automations file
+        #self.automationFileEditor.write('/sdr/automation_files/AM_FM_router.xml')
+        self.automationFileEditor.write('automationFileExamples')
+
+        self.parent = parent
+
+        if False:        
+         # Now Create the menu bar and items
+         self.mainmenu = wx.MenuBar()
+
+         menu = wx.Menu()
+         menu.Append(205, 'E&xit', 'Enough of this already!')
+         self.Bind(wx.EVT_MENU, self.OnFileExit, id=205)
+         self.mainmenu.Append(menu, '&File')
+        
+         menu = wx.Menu()
+         menu.Append(300, '&About', 'About this thing...')
+         self.Bind(wx.EVT_MENU, self.OnHelpAbout, id=300)
+         self.mainmenu.Append(menu, '&Help')
+
+         self.SetMenuBar(self.mainmenu)
+
+         # Bind the close event so we can disconnect the ports
+         self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
+
+        self.Show(True)
+        
+    def _init_ctrls(self, prnt):
+        ''' Initialize the wx controls'''
+
+        frame_size = wx.Size(770, 350)
+
+        wx.Frame.__init__(self, id=-1, name='', parent=prnt,
+                          pos=wx.Point(10, 20), size=frame_size,
+                          style=wx.DEFAULT_FRAME_STYLE, 
+                          title='Connection Tool')
+
+
+        panel = wx.Panel(self, -1)
+
+
+        # --------------------------------------------------------------------
+        # create the top sizer
+
+
+        # Static Texts (labels)
+        self.blankLabel  = wx.StaticText(id=-1, label='',
+                                        name='blankLabel', parent=panel, 
+                                        size=wx.Size(150, 30), style=0)
+        self.usesLabel = wx.StaticText(id=-1, label='Select Uses Port:',
+                                        name='usesLabel', parent=panel, 
+                                        size=wx.Size(250, 30), 
+                                        style=wx.ALIGN_CENTER)
+        self.providesLabel = wx.StaticText(id=-1, label='Select Provides Port:',
+                                        name='providesLabel', parent=panel, 
+                                        size=wx.Size(250, 30), 
+                                        style = wx.ALIGN_CENTER)
+        treeSize = (350,200)
+        
+        #Changing to Tree style listing of waveforms/components/ports from previously used Choice style
+        self.usesTree = wx.TreeCtrl(parent=panel, id=-1, size=treeSize , style=wx.TR_HIDE_ROOT|wx.TR_HAS_BUTTONS)
+        self.providesTree = wx.TreeCtrl(parent=panel, id=-1, size=treeSize , style=wx.TR_HIDE_ROOT|wx.TR_HAS_BUTTONS)
+        
+        # connect button
+        self.ConnectBtn = wx.Button(id = -1, label='Connect',
+                                    parent=panel)
+        self.ConnectBtn.Bind(wx.EVT_BUTTON, self.OnConnectBtn, id=-1)
+        
+        blankLabel2 = wx.StaticText(label = '', parent = panel)
+        blankLabel3 = wx.StaticText(label = '', parent = panel)
+        blankLabel4 = wx.StaticText(label = '', parent = panel)
+
+
+        flexSizer1 = wx.FlexGridSizer(cols=3, hgap=6, vgap = 6)
+        flexSizer1.AddMany([blankLabel2, self.usesLabel, self.providesLabel, 
+                            blankLabel3, self.usesTree, self.providesTree,
+                            blankLabel4, self.ConnectBtn])
+        # --------------------------------------------------------------------
+        # second sizer
+        vSizer1 = wx.BoxSizer(wx.VERTICAL)
+        self.connectionsLabel = wx.StaticText(parent = panel,
+                                            label = "Connections:")
+        self.connectionsListBox = wx.ListBox(parent=panel,
+                                            size=wx.Size(700,150),
+                                            style=wx.LB_MULTIPLE,
+                                            )
+        self.DisconnectBtn = wx.Button(parent=panel,
+                                            label='Disconnect')
+        self.DisconnectBtn.Bind(wx.EVT_BUTTON, self.OnDisconnectBtn)
+        vSizer1.Add(self.connectionsLabel, 0, wx.ALL, 5)
+        vSizer1.Add(self.connectionsListBox, 0, wx.ALL, 5)
+        vSizer1.Add(self.DisconnectBtn, 0, wx.ALL, 5)
+        # --------------------------------------------------------------------
+
+
+        # --------------------------------------------------------------------
+        # third sizer
+        hSizer1 = wx.BoxSizer(wx.HORIZONTAL)
+        self.automationFileEditor = wx.TextCtrl(id=-1,
+                                        name=u'automationFileEditor', 
+                                        parent=panel, 
+                                        size=wx.Size(350, 30), 
+                                        style=0, value=u'')
+        self.browseAutomationBtn = wx.Button(id = -1, 
+                                           label='Browse',
+                                    parent=panel, 
+                                    size=wx.Size(80, 30))
+        self.browseAutomationBtn.Bind(wx.EVT_BUTTON, 
+                                    self.onBrowseAutomationButton,
+                                    id=-1)
+        self.loadAutomationBtn = wx.Button(id = -1, 
+                                           label='Load Automation File',
+                                    parent=panel, 
+                                    size=wx.Size(180, 30))
+        self.loadAutomationBtn.Bind(wx.EVT_BUTTON, 
+                                    self.onLoadAutomationFileButton,
+                                    id=-1)
+        hSizer1.Add(self.automationFileEditor, 0, wx.ALL, 5)
+        hSizer1.Add(self.browseAutomationBtn, 0, wx.ALL, 5)
+        hSizer1.Add(self.loadAutomationBtn, 0, wx.ALL, 5)
+        # --------------------------------------------------------------------
+
+
+
+        # --------------------------------------------------------------------
+        # assemble main sizer from other sizers
+
+        # topLabel = wx.StaticText(label = 'Connect Tool.  OSSIE 0.6.2', 
+        #                         parent = panel)
+
+        mainSizer = wx.BoxSizer(wx.VERTICAL)
+        
+        mainSizer.Add(flexSizer1, 0 , wx.EXPAND|wx.ALL, 10)
+        mainSizer.Add(wx.StaticLine(panel), 0 , wx.EXPAND|wx.TOP|wx.BOTTOM, 5)
+        mainSizer.Add(vSizer1, 0, wx.EXPAND|wx.ALL, 10)
+        mainSizer.Add(wx.StaticLine(panel), 0 , wx.EXPAND|wx.TOP|wx.BOTTOM, 5)
+        mainSizer.Add(hSizer1, 0, wx.EXPAND|wx.ALL, 10)
+
+        panel.SetSizer(mainSizer)
+        mainSizer.Fit(self)
+        # --------------------------------------------------------------------
+        
+
+    def refreshDisplay(self):
+        self.getAvailableConnections()
+        self.setAvailableApplications()
+        self.connectionsListBox.SetItems([x['display'] for x in self.alfFrameRef.connections[self.alfFrameRef.namingservice[0]]])
+
+
+    def getAvailableConnections(self):
+        ''' Get a list of objects I can potentially connect to'''
+
+        # Initialize my dictionary 
+        self.avail_connects = {}
+
+        dom_obj = self.alfFrameRef.rootContext.resolve(
+                           [CosNaming.NameComponent("DomainName1","")])
+        dom_context = dom_obj._narrow(CosNaming.NamingContext) 
+        if dom_context is None:
+            return
+
+        # get a list of applications running in the domain
+        appSeq =  self.alfFrameRef.domMgr._get_applications()
+        apps = {}
+        for app in appSeq:
+            sadfile = app._get_profile()
+            sadfile = sadfile.replace('//','')
+            # NOTE:  Use CF::FileManager to obtain location
+
+            waveform = importWaveform.getWaveform(sadfile, self.alfFrameRef, self.alfFrameRef.Available_Ints)
+            for comp in waveform.components:
+                for port in comp.ports:
+                    if apps.has_key(waveform.name):
+                        if apps[waveform.name].has_key(comp.name):
+                            apps[waveform.name][comp.name][port.name] = port.type
+                        else:
+                            apps[waveform.name][comp.name] = {port.name: port.type}
+                    else:
+                        apps[waveform.name] = {comp.name: {port.name: port.type}}
+
+        p = re.compile("^(OSSIE::.+)_\d+$")
+        members = dom_context.list(1000)
+        for m in members[0]:
+            wav_name = str(m.binding_name[0].id)
+
+            wav_obj = dom_context.resolve(
+                                [CosNaming.NameComponent(wav_name,"")])
+            wav_context = wav_obj._narrow(CosNaming.NamingContext)
+            if wav_context is None:
+                continue
+
+            m = p.match(wav_name)
+            if m:
+                if apps[m.group(1)]:
+                    self.avail_connects[wav_name] = apps[m.group(1)]
+                else:
+                    print "Could not find associated application for: " + wav_name
+                    continue
+
+    def setAvailableApplications(self):
+        ''' Assumes that I have a list of available applications. Populates
+            the Uses and Provides tree with those applications/components/ports.
+        '''
+
+        usesRoot = self.usesTree.AddRoot("Uses")
+        providesRoot = self.providesTree.AddRoot("Provides")
+         
+        for w in self.avail_connects.keys():
+            uApp = self.usesTree.AppendItem(usesRoot, w )
+            pApp = self.providesTree.AppendItem(providesRoot, w)
+            for c in self.avail_connects[w].keys():
+                uComp = self.usesTree.AppendItem(uApp, c)
+                pComp = self.providesTree.AppendItem(pApp, c)
+                for p,type in self.avail_connects[w][c].iteritems():
+                    if type == "Uses":
+                        uPort = self.usesTree.AppendItem(uComp, p)
+                        self.usesTree.SetPyData(uPort, "Uses")
+                    elif type == "Provides":
+                        pPort = self.providesTree.AppendItem(pComp, p)
+                        self.providesTree.SetPyData(pPort, "Provides")         
+
+    def OnPAppSelection(self, event):
+        ''' Should occur when the user has selected a provides application.
+            Adds a list of the available components in the selected application
+            to the wx.choice for provides components.'''
+
+        choice = str(self.pAppChoice.GetStringSelection())
+        self.pCompChoice.Clear()
+        self.pPortChoice.Clear()
+        if choice != '(Choose Application)':
+            self.pCompChoice.Append('(Choose Component)')
+            for c in self.avail_connects[choice].keys():
+                self.pCompChoice.Append(c)
+            self.pCompChoice.SetSelection(0)
+
+        event.Skip()
+    
+    def OnUAppSelection(self,event):
+        ''' Should occur when the user has selected a uses application.
+            Adds a list of the available components in the selected application
+            to the wx.choice for uses components.'''
+
+        choice = str(self.uAppChoice.GetStringSelection())
+        self.uCompChoice.Clear()
+        self.uPortChoice.Clear()
+        if choice != '(Choose Application)':
+            self.uCompChoice.Append('(Choose Component)')
+            for c in self.avail_connects[choice].keys():
+                self.uCompChoice.Append(c)
+            self.uCompChoice.SetSelection(0)
+
+        event.Skip()
+
+    def OnPCompSelection(self, event):
+        ''' Should occur when the user has selected a provides component.
+            Adds a list of the available ports in the selected proviedes
+            component to the wx.choice for provides ports.'''
+
+        app_choice = str(self.pAppChoice.GetStringSelection())
+        comp_choice = str(self.pCompChoice.GetStringSelection())
+        self.pPortChoice.Clear()
+        if comp_choice != '(Choose Component)':
+            self.pPortChoice.Append('(Choose Port)')
+            for p,type in self.avail_connects[app_choice][comp_choice].iteritems():
+                if type == "Provides":
+                    self.pPortChoice.Append(p)
+            self.pPortChoice.SetSelection(0)
+
+        event.Skip()
+
+    def OnUCompSelection(self, event):
+        ''' Should occur when the user has selected a uses component.
+            Adds a list of the usesavailable ports in the selected 
+            component to the wx.choice for uses ports.'''
+
+        app_choice = str(self.uAppChoice.GetStringSelection())
+        comp_choice = str(self.uCompChoice.GetStringSelection())
+        self.uPortChoice.Clear()
+        if comp_choice != '(Choose Component)':
+            self.uPortChoice.Append('(Choose Port)')
+            for p,type in self.avail_connects[app_choice][comp_choice].iteritems():
+                if type == "Uses":
+                    self.uPortChoice.Append(p)
+            self.uPortChoice.SetSelection(0)
+
+        event.Skip()
+
+    def OnConnectBtn(self,event):
+        ''' This is what happens when you press the connect button.
+            Retrieves the selected apps, components, and ports.
+            Then calls connect method.'''
+
+#get the selected uses and provides port from teh trees
+        selUPort = self.usesTree.GetSelection()
+        selPPort = self.providesTree.GetSelection()
+        
+        #All uses ports are attached with a string metadata "Uses" and all 
+        #provides ports are attached with "Provides". If user selects a component
+        #or a waveform from the tree, the PyData would be None.
+        
+        if ( self.usesTree.GetItemPyData(selUPort) != "Uses" or
+             self.providesTree.GetItemPyData(selPPort) != "Provides" ):
+            dial = wx.MessageDialog(self, 'Please select a valid uses port and provides port to make a connection.', 'Ports Not Selected', wx.OK)
+            dial.ShowModal()
+            return
+        
+        selUComp = self.usesTree.GetItemParent(selUPort)
+        selUApp = self.usesTree.GetItemParent(selUComp)
+        
+        selPComp = self.providesTree.GetItemParent(selPPort)
+        selPApp = self.providesTree.GetItemParent(selPComp)
+        
+        uPortName = str(self.usesTree.GetItemText(selUPort))
+        pPortName = str(self.usesTree.GetItemText(selPPort))
+        uCompInstName = str(self.usesTree.GetItemText(selUComp))
+        pCompInstName = str(self.providesTree.GetItemText(selPComp))
+        uAppInstName = str(self.providesTree.GetItemText(selUApp))
+        pAppInstName = str(self.providesTree.GetItemText(selPApp))
+        
+        self.Connect( uAppInstName, uCompInstName, uPortName,
+                          pAppInstName, pCompInstName, pPortName)
+    
+        event.Skip()
+
+
+    def Connect(self, uAppInstName, uCompInstName, uPortName,
+                      pAppInstName, pCompInstName, pPortName):
+ 
+        rootContext = self.GetParent().rootContext
+        if rootContext is None:
+            print "Failed to narrow the root naming context"
+            sys.exit(1)
+
+        # get a reference to the provides port:
+        # don't forget OSSIE:: in waveform name
+        pname = [CosNaming.NameComponent('DomainName1',''),
+                 CosNaming.NameComponent(pAppInstName,''),
+                 CosNaming.NameComponent(pCompInstName,'')]
+        
+        try:
+            pResourceRef = rootContext.resolve(pname)
+        except:
+            print "provides resource not found"
+            sys.exit(1)
+     
+        pResourceHandle = pResourceRef._narrow(CF.Resource)
+        pPortReference = pResourceHandle.getPort(pPortName)
+        
+
+        # get a reference to the uses port:
+        # don't forget OSSIE:: in waveform name
+        uname = [CosNaming.NameComponent('DomainName1',''),
+                 CosNaming.NameComponent(uAppInstName,''),
+                 CosNaming.NameComponent(uCompInstName,'')]
+        try:
+            uResourceRef = rootContext.resolve(uname)
+     
+        except:
+            print "uses resource not found"
+            sys.exit(1)
+     
+        uResourceHandle = uResourceRef._narrow(CF.Resource)
+
+        # get a reference to the uses port
+        uPortReference = uResourceHandle.getPort(uPortName)
+        if uPortReference is None:
+            print "Failed to get Port reference"
+            return
+        uPortHandle = uPortReference._narrow(CF.Port)
+         
+
+        # connect to the Uses port by passing a ref to my provides port
+        # make up some arbitrary connectionid that will be used for 
+        # disconnectPort later
+        try:
+            connection_id = str(random.randint(100000,999999)) + "_" + uPortName
+            uPortHandle.connectPort(pPortReference, connection_id)
+            
+            connection_display = uAppInstName + ":" + uCompInstName + ":" + uPortName + "-->" + pAppInstName + ":" + pCompInstName + ":" + pPortName
+            connection = {
+                    'name': uname,
+                    'port': uPortName,
+                    'id': connection_id,
+                    'appNames': [uAppInstName, pAppInstName],
+                    'display': connection_display,
+                }
+            self.alfFrameRef.connections[self.alfFrameRef.namingservice[0]].append(connection)
+            self.connectionsListBox.Append(connection['display'])
+        except e:
+            print e
+            dial = wx.MessageDialog(self, 'Connection failed.', 'Failed', wx.OK)
+            dial.ShowModal()
+
+    def OnDisconnectBtn(self,event):
+        for x in reversed(self.connectionsListBox.GetSelections()):
+            connection = self.alfFrameRef.connections[self.alfFrameRef.namingservice[0]][x]
+            try:
+                rootContext = self.GetParent().rootContext
+                resourceRef = rootContext.resolve(connection['name'])
+                resourceHandle = resourceRef._narrow(CF.Resource)
+                portReference = resourceHandle.getPort(connection['port'])
+                if portReference is None:
+                    print "Failed to get port reference for disconnect."
+                    return
+                portHandle = portReference._narrow(CF.Port)
+                portHandle.disconnectPort(connection['id'])
+                del self.alfFrameRef.connections[self.alfFrameRef.namingservice[0]][x]
+                self.connectionsListBox.Delete(x)
+            except e:
+                print e
+                dial = wx.MessageDialog(self, 'Disconnect failed.', 'Failed', wx.OK)
+                dial.ShowModal()
+
+    def onBrowseAutomationButton(self,event):
+        ''' This is what happens when the Browse button is pressed.
+            Will load a file dialog and allow the user to browse for an
+            automation file.'''
+        dlg = wx.FileDialog(self, "Choose automation file", "", "", "XML Files (*.xml)|*.xml|All Files|*", wx.FD_OPEN)
+        if dlg.ShowModal() == wx.ID_OK:
+            self.automationFileEditor.Clear()
+            self.automationFileEditor.write(dlg.GetPath())
+        dlg.Destroy()
+
+    def onLoadAutomationFileButton(self,event):
+        ''' This is what happens when the Load Automation File button is pressed.
+            Will get the filename from the GUI and then start up the loadAutomationFile
+            modue '''
+
+        # get the name of the file
+        automations_file = self.automationFileEditor.GetLineText(0)
+        self.automation = loadAutomationFile.automation(self, automations_file)
+        event.Skip()
+
+    def pushPacket(self, I , Q):
+        ''' Other ports in the Domain can call push packet on me.  I will forward the
+            packet to the instance of loadAutomationFile'''
+        self.automation.pushPacket(I,Q)
+
+
+    def pushPacketMetaData(self, I, Q, metadata):
+        ''' Other ports in the Domain can call push packet on me.  I will forward the
+            packet to the instance of loadAutomationFile'''
+
+        # depeding on how metadata is defined, this method might change !!
+
+        self.automation.pushPacketMetaData(I,Q, metadata)
+
+
+
+    # --------------------------------------------------------------
+    # Wx details:
+
+    def OnFileExit(self, event):
+        ''' This is what will happen when you select File -> Exit 
+            in the menu bar'''
+        self.Close()      #close the frame
+  
+    def OnHelpAbout(self, event):
+        '''Stuff that gets displayed when you select Help -> About in the menu bar'''
+        from wx.lib.dialogs import ScrolledMessageDialog
+        about = ScrolledMessageDialog(self, "Connection Tool.\nA product of Wireless@VT.\n\nOSSIE 0.6.2.", "About...")
+        about.ShowModal()
+
+    def OnCloseWindow(self,event):
+        '''This is what happens when you close the GUI'''
+        if hasattr(self.parent, 'removeToolFrame'):
+            self.parent.removeToolFrame(self)
+        self = None
+        event.Skip()
+
+
+class MyApp(wx.App):
+    '''for development purposes only'''
+    def OnInit(self):
+        frame = create(None)
+        self.SetTopWindow(frame)
+        return True
+
+
+if __name__ == '__main__':
+    '''for development and debugging purposes only'''
+    print "WARNING:  Running this tool in the command line is intended for testing new GUI layouts only.  For this tool to function properly, it must be called from ALF"
+    app= MyApp(0)
+    app.MainLoop()
+
+
+
+
+
+
+
Index: /ossiedev/branches/0.8.x/trunk/tools/wavedash/.project
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/wavedash/.project	(revision 9765)
+++ /ossiedev/branches/0.8.x/trunk/tools/wavedash/.project	(revision 9765)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>wavedash</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.python.pydev.PyDevBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.python.pydev.pythonNature</nature>
+	</natures>
+</projectDescription>
Index: /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/WavedashServer.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/WavedashServer.py	(revision 10583)
+++ /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/WavedashServer.py	(revision 10583)
@@ -0,0 +1,112 @@
+from WavedashController import Controller
+from BaseHTTPServer import HTTPServer
+import WaveformModel
+
+class WavedashServer(HTTPServer):
+    
+    def initializeWavedashController(self):
+        self.ctrlr = Controller(False)
+        self.ctrlr.createWidgetContainer()
+        self.ctrlr.CORBAutils.init_CORBA(False)
+        self.ctrlr.buildModel()
+        
+    def handleRequest(self, request):
+        requestSplit = request.split()
+        
+        command = requestSplit[0]
+        if command == "getWaveformSadFile":
+            self.getWaveformSadFile(requestSplit[1])
+        else:
+            methodToRun = getattr(self.ctrlr, requestSplit[0])
+        
+            if methodToRun.__name__ == "installWaveform":
+                methodToRun(requestSplit[1], True)
+            else:
+                methodToRun(requestSplit[1])
+            
+    def getWaveformSadFile(self, waveformName):
+        waveform = self.ctrlr.model.getWaveform(waveformName, 1)
+        return waveform.sadFile
+    def getWaveformDasFile(self, waveformName):
+        waveform = self.ctrlr.model.getWaveform(waveformName, 1)
+        return waveform.dasFile
+    
+    def configure(self, params):
+        waveName = params['waveform']
+        compName = params['component']
+        propName = params['property']
+        newValue = params['value']
+        wave = self.ctrlr.model.getWaveform(waveName, WaveformModel.INSTANCE_WAVEFORM)
+        comp = wave.getComponent(compName)
+        prop = comp.findPropertyByName(propName)
+            
+        propType = prop.getType()[1]
+        if propType in ['short', 'ushort', 'int', 'uint'] :
+            self.ctrlr.model.configure(waveName, compName, propName, int(newValue))
+        elif propType in ['long', 'ulong']:
+            self.ctrlr.model.configure(waveName, compName, propName, long(newValue))
+        elif propType in ['double', 'float']:
+            self.ctrlr.model.configure(waveName, compName, propName, float(newValue))
+        elif propType in ['char', 'string']:
+            self.ctrlr.model.configure(waveName, compName, propName, str(newValue))
+        elif propType in ['boolean']:
+            if str(newValue).lower() in trueValues:
+                self.ctrlr.model.configure(waveName, compName, propName, True)
+            else:
+                self.ctrlr.model.configure(waveName, compName, propName, False)
+                    
+    def query(self, params):
+        waveName = params['waveform']
+        compName = params['component']
+        propProvided = True
+        try:
+            propName = params['property']
+        except KeyError:
+            propProvided = False
+            
+        wave = self.ctrlr.model.getWaveform(waveName, WaveformModel.INSTANCE_WAVEFORM)
+        comp = wave.getComponent(compName)
+            
+        if not propProvided:
+            result = ''
+            for prop in comp.getAllProperties():
+                #list = []
+                #list = ctrlr.CORBAutils.query(waveName, args2[0], list)
+                #for l in list:
+                 #   prop = comp.findPropertyByID(l.id)
+                result += 'name:  ' + prop.getName() + '<br>'
+                result +=  'id:    ' + prop.getID() + '<br>'
+                result += 'type:  ' + prop.getType()[1] + '<br>'
+                result += 'value: ' + str(prop.getValue()) + '<br>'
+                result += '\n'
+            return result
+            
+        else:
+            prop = comp.findPropertyByName(propName)
+            if prop:
+                return prop.getValue()
+            else:
+                return 'Error: could not find property: ', args2[1]  
+    
+    def getSystemWaveforms(self):
+        list = self.ctrlr.model.getSystemWaveforms()
+        return list
+    
+    def getInstanceWaveforms(self, parent):
+        list = self.ctrlr.model.getInstanceWaveforms(parent)
+        return list
+    
+    def installWaveform(self, params):
+        self.ctrlr.installWaveform(params['waveform'], True)
+        
+    def uninstallWaveform(self, params):
+        self.ctrlr.uninstallWaveform(params['waveform'])
+    
+    def startWaveform(self, params):
+        self.ctrlr.startWaveform((params['waveform']))
+        
+    def stopWaveform(self, params):
+        self.ctrlr.stopWaveform((params['waveform']))
+        
+        
+    
Index: /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/wavecli.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/wavecli.py	(revision 10603)
+++ /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/wavecli.py	(revision 10603)
@@ -0,0 +1,201 @@
+#! /usr/bin/env python
+
+## Copyright 2005, 2006, 2007, 2008 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Application Visualization Environment
+##
+## WaveDash is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## WaveDash is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE WaveDash; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+import sys
+from optparse import OptionParser
+from wavedash.src.WavedashController import Controller
+import wavedash.src.WaveformModel 
+
+[ SYSTEM_WAVEFORM, INSTANCE_WAVEFORM, RUNNING_WAVEFORM ] = [1, 2, 3]
+
+def main(argv):
+    try:
+        ctrlr = Controller(False)
+        ctrlr.createWidgetContainer()
+        ctrlr.CORBAutils.init_CORBA(False)
+        ctrlr.buildModel()  
+    except:
+         print 'Something went wrong connecting to the naming service or building the model.'
+    else:
+    
+        parser = OptionParser()
+        parser.add_option('-i', '--interactive', action='store_true', help='Run wavecli.py in interactive mode')
+        parser.add_option('--install', dest='waveformToInstall', help='install a waveform')
+        parser.add_option('--start', dest='waveformToStart', help='start a waveform')
+        parser.add_option('--stop', dest='waveformToStop', help='stop a waveform')
+        parser.add_option('--uninstall', dest='waveformToUninstall', help='uninstall a waveform')
+        parser.add_option('--listSystemWaveforms', action='store_true', help='list all waveforms installed on the system')
+        parser.add_option('--listWaveformInstances', dest='waveformToList', help='list all running instances of of a particular waveform')
+        parser.add_option('--listAllInstances', action='store_true', help='list all waveform instances currently running')
+        parser.add_option('--configure', dest='waveformToConfigure', help='Configure a waveform. You must supply a waveform, a component, a property, and a value for that property.')
+        parser.add_option('--query', dest='waveformToQuery', help='Query a waveform. You must supply a waveform and a component')
+        (options, args) = parser.parse_args()
+        
+        if options.waveformToInstall:
+            if options.waveformToInstall in [wave.getName() for wave in ctrlr.model.getSystemWaveforms()]:
+                installed = ctrlr.installWaveform(options.waveformToInstall, False)
+                if installed:
+                    print 'Successfully installed ' + installed
+            else:
+                print options.waveformToInstall + ' not found.'
+        
+        elif options.waveformToStart:
+            ctrlr.startWaveform(options.waveformToStart)
+        
+        elif options.waveformToStop:
+            ctrlr.stopWaveform(options.waveformToStop)
+        
+        elif options.waveformToUninstall:
+            ctrlr.uninstallWaveform(options.waveformToUninstall)
+        
+        elif options.listSystemWaveforms:
+            list = ctrlr.model.getSystemWaveforms()
+            for waveform in list:
+                print str(waveform.getName())
+        
+        elif options.waveformToList:
+            list = ctrlr.model.getInstanceWaveforms(options.waveformToList)
+            if list != None:
+                for waveform in list:
+                    print str(waveform.getName())
+        
+        elif options.listAllInstances:
+            systemWaveforms = ctrlr.model.getSystemWaveforms()
+            for waveform in systemWaveforms:
+                instances = ctrlr.model.getInstanceWaveforms(waveform.getName())
+                if instances != None:
+                    for instance in instances:
+                        print str(instance.getName())
+        
+        elif options.waveformToConfigure:
+            waveName = options.waveformToConfigure
+            compName = args[0]
+            propName = args[1]
+            newValue = args[2]
+            wave = ctrlr.model.getWaveform(waveName, INSTANCE_WAVEFORM)
+            comp = wave.getComponent(compName)
+            prop = comp.findPropertyByName(propName)
+            
+            trueValues = ["t", "true", "yes", "on", "1"]
+            
+            propType = prop.getType()[1]
+            if propType in ['short', 'ushort', 'int', 'uint'] :
+                ctrlr.model.configure(waveName, compName, propName, int(newValue))
+            elif propType in ['long', 'ulong']:
+                ctrlr.model.configure(waveName, compName, propName, long(newValue))
+            elif propType in ['double', 'float']:
+                ctrlr.model.configure(waveName, compName, propName, float(newValue))
+            elif propType in ['char', 'string']:
+                ctrlr.model.configure(waveName, compName, propName, str(newValue))
+            elif propType in ['boolean']:
+                if str(newValue).lower() in trueValues:
+                    ctrlr.model.configure(waveName, compName, propName, True)
+                else:
+                    ctrlr.model.configure(waveName, compName, propName, False)
+                    
+        
+        elif options.waveformToQuery:
+            waveName = options.waveformToQuery
+            compName = args[0] 
+            wave = ctrlr.model.getWaveform(waveName, INSTANCE_WAVEFORM)
+            comp = wave.getComponent(compName)
+            
+            #if no property name is provided then look up and print all of the 
+            #component's properties
+            if len(args) == 1:
+                for prop in comp.getAllProperties():
+                #list = []
+                #list = ctrlr.CORBAutils.query(waveName, args[0], list)
+                #for l in list:
+                 #   prop = comp.findPropertyByID(l.id)
+                    print 'name:  ', prop.getName()
+                    print 'id:    ', prop.getID()
+                    print 'type:  ', prop.getType()[1]
+                    print 'value: ', prop.getValue()
+                    print
+           
+            #if a property name was provided, only print that property's value        
+            elif len(args) == 2:
+                prop = comp.findPropertyByName(args[1])
+                if prop:
+                    print prop.getValue()
+                else:
+                    print 'Error: could not find property: ', args[1]
+                
+        elif options.interactive:
+            interactiveMode(ctrlr)
+        else:
+            print 'No option provided. Exiting.'
+            
+def interactiveMode(ctrlr):
+        availableWaveforms = ctrlr.model.getSystemWaveforms()
+        numAvailableWaveforms = len(availableWaveforms)
+        print 'Found ' + str(numAvailableWaveforms) + ' available applications\n'
+        i = 1
+        for w in availableWaveforms:
+            print str(i) + '. ' + str(w.getName()) 
+            i = i + 1
+            
+        print
+        print 'n - Install application number n'
+        print 'x - exit'
+        
+        valid = False
+        while not valid:
+            choice = raw_input('Selection: ')
+            try:
+                if choice == 'x':
+                    valid = True
+                elif int(choice) > 0 and int(choice) <= numAvailableWaveforms:
+                    valid = True
+                else:
+                    print 'Invalid selection.'
+                    valid = False
+            except:
+                print 'Invalid selection.'
+                valid = False
+    
+        if choice == 'x':
+            pass
+        else:
+            choice = int(choice)
+            instance = ctrlr.installWaveform(availableWaveforms[choice -1].getName(), False)
+            if instance:
+                print 'Application installed. Ready to run or uninstall'
+                while not (choice == 's' or choice == 'u'):
+                    print 's - start application'
+                    print 'u - uninstall application'
+                    choice = raw_input('Selection: ')
+                    if choice == 's':
+                        ctrlr.startWaveform(instance)
+                        while choice != 't':
+                            print 't - stop application'
+                            choice = raw_input('Selection: ')
+                            if choice == 't':
+                                ctrlr.stopWaveform(instance)
+                    elif choice == 'u':
+                        ctrlr.uninstallWaveform(instance)
+                        interactiveMode(ctrlr)
+        
+def usage():
+    print "usage here"
+
+if __name__ == '__main__':
+    main(sys.argv[1:]) 
+    
Index: /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/WavedashView.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/WavedashView.py	(revision 10633)
+++ /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/WavedashView.py	(revision 10633)
@@ -0,0 +1,1251 @@
+## Copyright 2005, 2006, 2007, 2008 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Application Visualization Environment
+##
+## WaveDash is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## WaveDash is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE WaveDash; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+import os
+import WaveformModel
+import WavedashUtils as utils
+from wx.lib import scrolledpanel
+from WaveformModel import WaveformListener
+from ComponentModel import ComponentListener
+from PropertyModel import PropertyListener
+from WavedashButton import WavedashButton
+from WavedashController import Controller
+from WavedashPreferencePage import WavedashPreferencePage
+from NSChoiceDialog import NSChoiceDialog
+from NodeBooterDialog import NodeBooterDialog
+
+OSSIE_WAVEAPP_DIMENSION = (600,600)                                                    
+OSSIE_TITLE = 'WaveDash Waveform Dashboard - OSSIE Waveform Workshop'
+START_ICON_FILE = "/resources/start.png"
+STOP_ICON_FILE = "/resources/stop.png"
+UNINSTALL_ICON_FILE = "/resources/LET-U.jpg"
+NAMINGSERVICE_ICON_FILE = "/resources/network.png"
+REFRESH_ICON_FILE = "/resources/refresh.png"
+NODEBOOTER_ICON_FILE = "/resources/nbstart.png"
+
+
+class WavedashView(wx.Frame, WaveformListener, 
+                   ComponentListener, PropertyListener):
+    """ This is top level frame that acts as primary UI """
+    def __init__(self, controller, amodel):
+        wx.Frame.__init__(self, parent=None, id=-1, title=OSSIE_TITLE )
+#                          size = OSSIE_WAVEAPP_DIMENSION)
+        #Create the model and register the frame to the listeners of 
+        #Waveform, Component and Property Models.
+        
+        self.controller = controller
+        self.model = amodel
+        self.model.addWaveformListener(self)
+        self.model.addComponentListener(self)
+        self.model.addPropertyListener(self)
+        
+        self.toolbar = None
+        self.createToolBar()
+        
+        #notebook to hold the waveform panels
+        self.mainPanel = wx.Panel(self)
+        self.notebook = wx.Notebook(self.mainPanel)
+        #bind notebook to page changed event
+        self.notebook.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnNbPageChange, self.notebook)
+        
+        #sizers to manage the notebook
+        self.nbSizer = wx.BoxSizer()
+        self.nbSizer.Add(self.notebook, 1, wx.EXPAND)
+        self.mainPanel.SetSizer(self.nbSizer)
+        
+        self.statusBar = None
+        self.createMenus()
+        
+        
+        
+        
+        self.wpanels = [] # this list holds the panel objects of the installed waveforms
+        self.prpPopupMenus = {} #this dict is of the form {'wPanelRef':{window, popUpMenu}}
+        self.compPopupMenus = {}
+        self.tempProp = None
+        self.tempComp = None
+        
+        self.configureButtons = []
+        
+        self.trueValues = ["t", "true", "yes", "on", "1"]
+        
+            
+        self.Bind(wx.EVT_CLOSE, self.OnClose)
+        
+        self.SetSize(OSSIE_WAVEAPP_DIMENSION)
+        self.Center()
+        self.Show()
+        
+        if not self.controller.namingServiceIsRunning():
+            nscd = NSChoiceDialog(self)        
+    
+          
+    def createToolBar(self):
+        self.toolbar = self.CreateToolBar()
+        rsize = (20, 20)
+        refreshImg = wx.ArtProvider.GetBitmap(wx.ART_REDO, wx.ART_TOOLBAR, rsize)
+        refresh = self.toolbar.AddSimpleTool(-1,refreshImg ,shortHelpString="Refresh")
+        self.Bind(wx.EVT_TOOL, self.OnRefresh, refresh)
+        
+        root = self.getRoot()
+        
+        selectNSIcon = wx.Image(root + NAMINGSERVICE_ICON_FILE, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
+        selectNS = self.toolbar.AddSimpleTool(-1, selectNSIcon, shortHelpString="Configure Naming Service address")
+        
+        startIcon = wx.Image(root + START_ICON_FILE, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
+        stopIcon = wx.Image(root + STOP_ICON_FILE, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
+        uninstallIcon = wx.Image(root + UNINSTALL_ICON_FILE, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
+        start = self.toolbar.AddSimpleTool(-1, startIcon, shortHelpString="Start waveform")
+        stop = self.toolbar.AddSimpleTool(-1, stopIcon, shortHelpString="Stop Waveform")
+        uninstall = self.toolbar.AddSimpleTool(-1, uninstallIcon, shortHelpString="Uninstall waveform")
+        
+        startNodeBooterIcon = wx.Image(root + NODEBOOTER_ICON_FILE, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
+        startNodeBooter = self.toolbar.AddSimpleTool(-1, startNodeBooterIcon, shortHelpString="Start NodeBooter")
+        
+        
+        self.Bind(wx.EVT_TOOL, self.OnStart, start)
+        self.Bind(wx.EVT_TOOL, self.OnStop, stop)
+        self.Bind(wx.EVT_TOOL, self.OnUninstall, uninstall)
+        self.Bind(wx.EVT_TOOL, self.OnSelectNS, selectNS)
+        self.Bind(wx.EVT_TOOL, self.OnStartNodeBooter, startNodeBooter)
+    
+    def OnStart(self, event):
+        activeWform = self.model.getActiveWaveform()
+        if activeWform is None:
+                utils.showMessage("Start Failed!!! No waveform is running now",
+                                    utils.NON_FATAL)
+                return
+        status = self.controller.startWaveform(activeWform.getName())
+    
+    def OnStop(self, event):
+        activeWform = self.model.getActiveWaveform()
+        if activeWform is None:
+            utils.showMessage("Stop Failed!!! No waveform is running now", 
+                               utils.NON_FATAL)
+            return
+        status = self.controller.stopWaveform(activeWform.getName())
+    
+    def OnUninstall(self, event):    
+        selWform = self.model.getActiveWaveform()
+        if selWform is None:
+                utils.showMessage("Uninstall Failed!!! No waveform is running now",
+                                   utils.NON_FATAL)
+                return
+
+        #iterate through a slice of the whole list rather than
+        #the list itself so prevent errors
+        for button in self.configureButtons[:]:
+            if(button.isWaveformButton == True and button.getParentName() == selWform.getName()):
+                self.configureButtons.remove(button)
+
+        for button in self.configureButtons[:]:
+            if(button.isComponentButton == True and button.getGrandParentName() == selWform.getName()):
+                self.configureButtons.remove(button)
+                 
+        success = self.model.removeWaveform(selWform)
+            
+    def OnSelectNS(self, event):
+        self.controller.selectNS()
+        
+    def OnStartNodeBooter(self, event):
+        nbd = NodeBooterDialog(self)
+        
+        if nbd.GetReturnCode() == 0:
+            self.controller.CORBAutils.setNamingService('127.0.0.1')
+            self.controller.CORBAutils.init_CORBA()
+            self.controller.refresh()
+
+    def createMenus(self):
+        menuBar = wx.MenuBar()
+        #These features are not yet implemented in 0.7.3
+#        fileMenu = wx.Menu()
+#        openLayout = fileMenu.Append(-1, '&Open Layout')
+#        saveLayout = fileMenu.Append(-1, '&Save Layout')
+#        saveLayoutAs = fileMenu.Append(-1, 'S&ave Layout As')
+#        exit = fileMenu.Append(-1, 'E&xit\tCtrl-Q')
+#        
+#        self.Bind(wx.EVT_MENU, self.OnOpenLayout, openLayout)
+#        self.Bind(wx.EVT_MENU, self.OnSaveLayout, saveLayout)
+#        self.Bind(wx.EVT_MENU, self.OnSaveLayoutAs, saveLayoutAs)
+#        self.Bind(wx.EVT_MENU, self.OnExit, exit)    
+#        
+        waveformsMenu = wx.Menu()      
+        componentsMenu = wx.Menu()
+        optionsMenu = wx.Menu()
+        self.updateOnRefresh = optionsMenu.Append(501, 'Update Properties on Refresh', 'Update Properties on Refresh', kind=wx.ITEM_CHECK)
+        self.preferences = optionsMenu.Append(502, 'Wavedash Preferences', 'Wavedash Preferences', kind=wx.ITEM_NORMAL)
+        self.updateOnRefresh.Check(False)
+        self.Bind(wx.EVT_MENU, self.OnUpdateOnRefreshCheck, self.updateOnRefresh)
+        self.Bind(wx.EVT_MENU, self.OpenPreferences, self.preferences)
+        
+#        preferencesMenu = wx.Menu()
+#        widgetSettings = preferencesMenu.Append(-1, '&Widget Settings')
+#        self.Bind(wx.EVT_MENU, self.OnWidgetSettings,widgetSettings)
+#        
+        helpMenu = wx.Menu()
+        about = helpMenu.Append(-1,'&About')
+        self.Bind(wx.EVT_MENU, self.OnAbout, about)
+        
+#        menuBar.Append(fileMenu, '&File')
+        menuBar.Append(waveformsMenu, '&Waveforms')
+        #waveformsMenu.AppendSeparator()
+        menuBar.Append(componentsMenu, '&Components')
+        #menuBar.Append(preferencesMenu, '&Preferences')
+        menuBar.Append(optionsMenu, '&Options')
+        menuBar.Append(helpMenu, '&Help')
+        
+        self.SetMenuBar(menuBar)
+    
+    def createWaveformPanel(self, parent, waveform, preview = False):
+       # if(waveform.name == "w1_1"):
+            #print "in createWaveform Panel"
+            #for comp in waveform.components:
+             #   for prop in comp.properties:
+              #      print str(prop.id) + ": "  + str(prop.getValue())
+        
+        wPanel = scrolledpanel.ScrolledPanel(parent, -1, name=waveform.getName())
+        wSizer = wx.BoxSizer(wx.VERTICAL)
+        componentList = waveform.getAllComponents()
+        
+        
+                    
+        for component in componentList:
+            cPanel = self.createComponentPanel(wPanel,component, preview)
+            wSizer.Add(cPanel, 0, wx.ALIGN_LEFT | wx.GROW, 10)
+            
+        wSizer.AddSpacer(10)
+        
+        root = self.getRoot()
+        refreshIcon = wx.Image(root + REFRESH_ICON_FILE, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
+
+        updateWaveformButton = WavedashButton(wPanel, wx.NewId(), refreshIcon)
+        updateWaveformButton.setParentName(waveform.getName())
+        updateWaveformButton.setGrandParentName("none")
+        updateWaveformButton.setIsWaveformButton()
+        updateWaveformButton.Enable(self.updateOnRefresh.IsChecked())
+        wPanel.Bind(wx.EVT_BUTTON, self.OnUpdateWaveformClicked, updateWaveformButton)
+
+        self.configureButtons.append(updateWaveformButton)
+        wSizer.Add(updateWaveformButton, flag=wx.ALIGN_RIGHT)
+            
+        wPanel.SetSizer(wSizer)
+        wPanel.SetupScrolling(True, True, 20, 20)
+        
+        #No need to add the panels to the wpanels list when preview is On
+        if preview is False:
+            self.wpanels.append(wPanel)
+        
+        wSizer.Fit(wPanel)
+        return wPanel
+               
+    def createComponentPanel(self, wPanel, component, preview = False):
+        cPanel = wx.Panel(wPanel, -1, name=component.getName())
+        component.setPanel(cPanel)
+        sbox = wx.StaticBox(cPanel, -1, component.getName())
+        sboxSizer = wx.StaticBoxSizer(sbox, wx.VERTICAL)
+        prpWidgetList = []
+
+        root = self.getRoot()
+
+        if not component.isVisible():
+            cPanel.Hide()
+        
+        propertyList = component.getAllProperties()
+        #properites of a component are laid on the component panel using a gridbag sizer
+        #Each widget takes one cell except a Slider which spans across multiple columns
+       # if(component.parent.name == "w1_1"):
+        #    print "in addComponentPanel"
+         #   for prop in component.properties:
+          #      print str(prop.id) + ": "  + str(prop.getValue())
+        
+        for property in propertyList:
+            widget = property.getWidget()
+            
+            plabel = wx.StaticText(cPanel, -1, property.getName(), name = property.getName())
+            pWindow = self.mapWidgetToWindow(cPanel, property, widget)
+            pWindow.SetToolTipString(property.getDesc())
+            property.setWindow(pWindow)
+            
+            if not property.isVisible():
+                plabel.Hide()
+                pWindow.Hide()
+            
+            if preview is True:
+                #Don't allow any manipulation on properties in Preview form.
+                pWindow.Enable(False)
+                
+            #Create a popup menu for this property 
+            self.attachPopupMenuToProp(wPanel, pWindow, property)
+            
+            windowType = pWindow.__class__
+            eventType = wx.EVT_KILL_FOCUS
+            
+            #Find the type of event corresponding to the window in use
+            if windowType is wx.TextCtrl or windowType is wx.SpinCtrl:
+                pWindow.Bind(wx.EVT_TEXT_ENTER, self.OnPropValueChanged, pWindow)
+                pWindow.Bind(wx.EVT_KILL_FOCUS, self.OnPropValueChanged, pWindow)
+            elif windowType is wx.Slider:
+                pWindow.Bind(wx.EVT_COMMAND_SCROLL, self.OnPropValueChanged, pWindow)
+            elif windowType is wx.CheckBox:
+                pWindow.Bind(wx.EVT_CHECKBOX, self.OnPropValueChanged, pWindow)
+            
+            #checkbox has a label associated with itself. so no need to add separate label 
+            if pWindow.__class__ is wx.CheckBox:
+                plabel.SetLabel("")
+                
+    
+            
+            prpWidgetList.append(plabel)
+            prpWidgetList.append(pWindow)
+        
+        #prpWidgetList contains the label and widgets for all the properties of this component
+        #addPropToCompSizer creates a new gridbagsizer and adds the labels and widgets contained
+        #in the prpWidgetList
+        
+        gbagSizer = self.addPropToCompSizer(prpWidgetList)
+        
+        
+        
+        sboxSizer.SetMinSize(gbagSizer.GetMinSize())
+        sboxSizer.Add(gbagSizer, 1, wx.ALIGN_CENTER | wx.EXPAND, 10)
+        
+        refreshIcon = wx.Image(root + REFRESH_ICON_FILE, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
+        
+        updateComponentButton = WavedashButton(cPanel, wx.NewId(), refreshIcon )
+        updateComponentButton.setParentName(component.getName())
+        updateComponentButton.setGrandParentName(component.getParent().getName())
+        updateComponentButton.setIsComponentButton()
+        updateComponentButton.Enable(self.updateOnRefresh.IsChecked())
+        cPanel.Bind(wx.EVT_BUTTON, self.OnUpdateComponentClicked, updateComponentButton)
+        self.configureButtons.append(updateComponentButton)
+        sboxSizer.Add(updateComponentButton, flag=wx.ALIGN_RIGHT)  
+        
+        
+        
+        cPanel.SetSizer(sboxSizer)
+     
+        #After layingout the widgets (labels & controls) for all the properties, 
+        #attach a popupmenu at component level. i.e. for each component panel
+        
+        self.attachPopupToComponent(component, cPanel)
+        return cPanel
+    
+    def addPropToCompSizer(self, propList):
+        #IMPORTANT NOTE: proplist should have items in the following way.
+        #[label, window, label, window, label, window, .... ]
+        index = 0
+        gridSizer = wx.GridSizer(2,4,5,5)
+       
+        while (index < len(propList) ):
+            plabel = propList[index]
+            pWindow = propList[index+1]
+            
+            #if the windows are hidden, don't add them to the sizer.
+            #They will be added when the user select the properties again.
+            if (not plabel.IsShown()) or (not pWindow.IsShown()):
+                index = index + 2
+                continue
+            gridSizer.Add(plabel, 0)
+            gridSizer.Add(pWindow, 0)
+            index = index + 2
+        return gridSizer
+     
+    def attachPopupToComponent(self, component, cPanel):
+        cPopup = wx.Menu(title='')
+        moveUp = cPopup.Append(wx.NewId(), 'Move up')
+        moveDown = cPopup.Append(wx.NewId(), 'Move Down')
+        save = cPopup.Append(wx.NewId(), 'Save')
+        saveAs = cPopup.Append(wx.NewId(), 'Save As')
+        
+        #save and saveAs will be implemented in next release.disable for now
+        save.Enable(False)
+        saveAs.Enable(False)
+        
+        prpMenu = wx.Menu()
+        #All properties are enabled by default.
+        prpList = component.getAllProperties()
+        for prp in prpList:
+            chkMenuItem = prpMenu.AppendCheckItem(wx.NewId(), prp.getName())
+            chkMenuItem.Check(True)
+            self.Bind(wx.EVT_MENU, self.OnPropertySelect, chkMenuItem)
+            
+        cPopup.AppendMenu(wx.NewId(), 'Properties', prpMenu)
+        
+        wPanel = cPanel.GetParent()
+        
+        if self.compPopupMenus.has_key(wPanel):
+            cPanelDict = self.compPopupMenus[wPanel]
+            if cPanelDict.has_key(cPanel.GetName()) is False:
+                cPanelDict[str(cPanel.GetName())] = cPopup
+        else:
+            self.compPopupMenus[wPanel] = {cPanel.GetName():cPopup}
+        
+        self.Bind(wx.EVT_MENU, self.OnComponentMoveUp, moveUp)
+        self.Bind(wx.EVT_MENU, self.OnComponentMoveDown, moveDown)
+        
+        cPanel.Bind(wx.EVT_RIGHT_DOWN, self.OnComponentRightClick)
+        
+    
+    def OnComponentRightClick(self, event):
+        src = event.GetEventObject()
+        curWPanel = self.getCurrentPanel()
+        #Storing the reference to current component panel in a temp variable
+        #This temp will be used to map the context menu and the component menu in
+        #the event handler for PropertySelect and other items in Context menu also.
+        
+        self.tempComp = src
+        for wpanel in self.compPopupMenus.keys():
+            if wpanel is curWPanel:
+                windowDict = self.compPopupMenus[wpanel]
+                src.PopupMenu(windowDict[str(src.GetName())])
+    
+    def attachPopupMenuToProp(self, wPanel, window, property):
+        pSubMenu = wx.Menu(title='')
+        #default = property.getWidget()
+        default = self.controller.getDefaultWidget(property.getType())
+        optList = self.controller.getOptionalWidgets(property.getType())
+        
+        mItem = pSubMenu.AppendRadioItem(wx.NewId(), default.type)
+        self.Bind(wx.EVT_MENU, self.PropPopupHandler, id = mItem.GetId())
+        for optWidget in optList:
+            mItem = pSubMenu.AppendRadioItem(wx.NewId(), optWidget.type)
+            self.Bind(wx.EVT_MENU, self.PropPopupHandler, id = mItem.GetId())
+            if property.getWidget().type == optWidget.type:
+                mItem.Check(True)
+            
+        pSubMenu.AppendSeparator()
+        configure = pSubMenu.Append(wx.NewId(), 'Configure')
+        self.Bind(wx.EVT_MENU, self.PropConfigureHandler, id = configure.GetId())
+        
+        #Configure shuold be enabled only for slider and spin buttons.
+        #If other options are enabled, then disable the Configure Menu Item
+        self.propPopUpUpdate(pSubMenu)
+        
+        chgMenu = wx.Menu(title='')
+        chgMenuItem = wx.MenuItem(chgMenu, wx.NewId(), 'Change To', subMenu = pSubMenu)
+        chgMenu.AppendItem(chgMenuItem)
+        
+        #Associate the pop Menu with the window
+        cpRef = property.getParent().getName() + '/' + property.getName()
+        
+        if self.prpPopupMenus.has_key(wPanel):
+            subDict = self.prpPopupMenus[wPanel]
+            if subDict.has_key(cpRef) is False:
+                subDict[cpRef] = chgMenu
+        else:
+            self.prpPopupMenus[wPanel] = {cpRef:chgMenu}
+        
+        window.Bind(wx.EVT_RIGHT_DOWN, self.OnPropRightClick)
+        
+    def OnPropRightClick(self, event):
+        src = event.GetEventObject()
+        curPanel = self.getCurrentPanel()
+        #The widget(actual wxPython windows) on which the Popupmenu is invoked is
+        #stored in a temp variable to access it later during the events generated 
+        #by PopUpMenu
+        
+        self.tempProp = src
+        for wpanel in self.prpPopupMenus.keys():
+            if wpanel is curPanel:
+ 
+        #===============================================================================
+        #  A pop-up menu is associated with each property. the member variable prpPopupMenus
+        #  is a hash object indexed by waveform names. Value of a hash object points to another
+        #  hash which indexes the popup menus by component_name/property_name.
+        #=============================================================================== 
+
+                windowDict = self.prpPopupMenus[wpanel]
+                cpRef = src.GetParent().GetName() + '/' + src.GetName()
+                src.GetParent().PopupMenu(windowDict[cpRef])
+            
+    
+    def PropPopupHandler(self, event):
+        srcId = event.GetId()
+        mItems = event.GetEventObject().GetMenuItems()
+        
+        #Enable the configure option only slider and spin box to set their min and
+        #max values.
+        
+        self.propPopUpUpdate(event.GetEventObject())
+        
+        for mItem in mItems:
+            if mItem.GetId() == srcId:        
+                #self.tempProp is set to identify the property when Popupmenu is invoked.    
+                property = self.tempProp
+                component = property.GetParent()
+                wform = component.GetParent()
+                wformRef = self.model.getActiveWaveform()
+                compRef = wformRef.getComponent(component.GetName())
+                propRef = compRef.findPropertyByName(property.GetName())
+                self.model.changePropertyWidget(component.GetName(), 
+                                                property.GetName(), mItem.GetItemLabel())
+                
+
+    def PropConfigureHandler(self, event):
+        propertyCtrl = self.tempProp
+        cPanel = propertyCtrl.GetParent()
+        wPanel = cPanel.GetParent()
+        
+        #Get reference to the property thruogh its compnent and waveform.
+        #Then, get the widget reference from the property
+        wform = self.model.getActiveWaveform()
+        component = wform.getComponent(cPanel.GetName())
+        property = component.findPropertyByName(propertyCtrl.GetName())
+        
+        widget = property.getWidget()
+        
+        if propertyCtrl.__class__ is wx.SpinCtrl \
+            or propertyCtrl.__class__ is wx.Slider:
+            curMin, curMax = property.getRange()
+            curValue = property.getValue()
+            #curMin = widget.getMin()
+            #curMax = widget.getMax()
+            title = 'Widget Configuration'
+            confDialog = utils.ConfigureWidget(self, title, curValue)
+            confDialog.setMin(curMin)
+            confDialog.setMax(curMax)
+            
+            confDialog.ShowModal()
+            
+            #Get the new min and max once the dialog is destroyed in the
+            #event handlers of Ok and Cancel defined in ConfigureWidget
+            newMin = confDialog.getMin() 
+            newMax = confDialog.getMax()
+                        
+            #No need to udpate the model if the values are not changed
+            if (newMin == curMin) and (newMax == curMax):
+                return
+            else:
+                # the newMin and newMax values will be updated to the range attribute of the property
+                status = self.model.configurePropertyWidget(cPanel.GetName(), propertyCtrl.GetName(), newMin, newMax)
+                if status is False:
+                    utils.showMessage("Invalid range of values (" + str(newMin) + "," + str(newMax) + ")" , utils.NON_FATAL)
+                return
+    
+    def propPopUpUpdate(self, menu):     
+        menuItems = menu.GetMenuItems()
+        confItemId = menu.FindItem('Configure')
+        confItem = menu.FindItemById(confItemId)
+        confItem.Enable(False)
+        
+        for mItem in menuItems:
+            if mItem.GetItemLabel() == "spin" or mItem.GetItemLabel() == "slider":
+                if mItem.IsChecked():
+                    confItem.Enable(True) 
+        
+    def mapWidgetToWindow(self, parent, property, widget):
+        window = None
+        label = None
+        pValue = property.getValue()
+
+        widgetType = widget.type
+        
+        if widgetType == "text":                    
+            window = wx.TextCtrl(parent, -1, str(pValue), style = wx.TE_PROCESS_ENTER)
+        elif widgetType == "spin":
+            minV, maxV = property.getRange()
+            window = wx.SpinCtrl(parent, -1, str(pValue), min = minV, max = maxV, style = wx.TE_PROCESS_ENTER)
+        elif widgetType == "slider":
+            minV, maxV = property.getRange()
+            if widget.parameters["style"] == "HORIZONTAL":
+                styleV = wx.SL_HORIZONTAL | wx.SL_LABELS
+            elif widget.parameters["style"] == "VERTICAL":
+                styleV = wx.SL_VERTICAL | wx.SL_LABELS
+            window = wx.Slider(parent, -1, int(pValue), minValue = minV, maxValue = maxV, style = styleV, size=(120,35))
+        elif widgetType == "checkbox":
+            window = wx.CheckBox(parent, -1, property.getName())
+        elif widgetType == "listbox":
+            if (pValue is not None) and (type(pValue) is list):
+                window = wx.TextCtrl(parent, -1, str(pValue))
+            else:
+                window = wx.TextCtrl(parent, -1, str(None))
+        else:
+            window = wx.TextCtrl(parent, -1, str(pValue))
+        
+        if window is not None:
+            window.SetName(property.getName())    
+        return window
+    
+    def OnPropValueChanged(self, event):
+        if(self.updateOnRefresh.IsChecked()):
+            return
+        src = event.GetEventObject()
+        prp = src.GetName()
+        comp = src.GetParent().GetName()
+        wName = src.GetParent().GetParent().GetName()
+        wform = self.model.getWaveform(wName, WaveformModel.INSTANCE_WAVEFORM)
+        #This event is triggered whenever a property widget loses its focus.
+        #A widget loses its focus when the user switch to another widget in the same window
+        #or select a different waveform.
+        if wform is None:
+            #if event triggered as a result of object destroy or from Waveform Preview Dialog
+            #then no need to update the value. Just return
+            return
+        
+        compRef = wform.getComponent(comp)
+        prpRef = compRef.findPropertyByName(prp)
+        
+        curVal = self.formatWidgetToModel(src.GetValue(), prpRef.getType())
+        preVal = prpRef.getValue()
+        
+     
+        if curVal is not None:
+            
+            #if both the values are equal then no need to call configure()
+            if preVal == curVal:
+                #in cases where a boolean property was changed to a different
+                #text value but the same boolean value (ie True changed to 1)
+                #the model won't configure since the actual value didnt change
+                #so we have to call formatModelToWidget to change the text back
+                # to True or False
+                if(prpRef.type[1] == "boolean"):
+                    self.formatModelToWidget(src, curVal)
+                return
+            else:
+                #print "configuring: wName = " + str(wName) + ", comp = " + str(comp) + ", prp = " + str(prp) + ", curVal = " + str(curVal)
+                status = self.model.configure(wName, comp, prp, curVal)
+                
+                #leave the text box as it is if status is True
+                #if the configure operation failed, revert the text value to the value stored in 
+                #the model.
+                if status is False:
+                    msg = "Could not configure " + prp
+                    utils.showMessage(msg, utils.NON_FATAL)
+                    self.formatModelToWidget(src, preVal)
+                    #src.SetValue(str(preVal))
+                elif prpRef.type[1] == "boolean":
+                    self.formatModelToWidget(src, curVal)
+                
+        else:
+            msg = "Invalid value for %s/%s" % (comp, prp) + "\nEnter only '" + prpRef.getType()[1] + "' values"
+            msg = msg + "\nFor sequence types, enter values separated by comma" 
+            msg = msg + " and enclosed within [] e.g. [10,20,30]"
+            
+            utils.showMessage(msg, utils.NON_FATAL)
+            self.formatModelToWidget(src, preVal)     
+            self.Layout()   
+            
+    
+    def formatModelToWidget(self, widget, value):
+        if widget.__class__ is wx.TextCtrl:
+            widget.SetValue(str(value))
+        elif widget.__class__ is wx.SpinCtrl:           
+            widget.SetValue(int(value))
+        elif widget.__class__ is wx.Slider:
+            widget.SetValue(int(value))
+        elif widget.__class__ is wx.CheckBox:
+            if value == "True" or value == 1:
+                widget.SetValue(True)
+            else:
+                widget.SetValue(False)
+        
+                
+         
+    def formatWidgetToModel(self, curVal, propType):
+        """ Converts the string literal into the suitable data type
+        as configured for the property"""
+        val = None
+        #propType is a tuple containing the (xmlType,datatype)
+        #e.g. ('simple','short')
+        xmlType = propType[0]
+        dtype = propType[1]
+
+        try:
+            if (xmlType == "simple"):
+                if dtype == "short" or dtype == "ushort":
+                    val = int(curVal)
+                elif dtype == "int" or dtype == "uint":
+                    val = int(curVal)
+                elif dtype == "long" or dtype == "ulong":
+                    val = long(curVal)
+                elif dtype == "double" or dtype == "float":
+                    val = float(curVal)
+                elif dtype == "char":
+                    val = str(curVal) 
+                elif dtype == "boolean":
+                    if str(curVal).lower() in self.trueValues:
+                        val = True
+                    else:
+                        val = False
+                elif dtype == "string":
+                    val = str(curVal)
+                else:
+                    val = None
+            #sequence values are represented as list of values separated
+            #by a comma. e.g. '[10,20,30]'
+            
+            elif (xmlType == "simplesequence"):
+                if dtype == "float":
+                    val = []
+                    #strip the open and close bracket
+                    listVal = curVal.lstrip('[')
+                    listVal = listVal.rstrip(']')
+                    for lVal in listVal.split(','):
+                        val.append(float(lVal))
+                if dtype == "string":
+                    val = []
+                    #strip the open and close bracket
+                    listVal = curVal.lstrip('[')
+                    listVal = listVal.rstrip(']')
+                    for lVal in listVal.split(','):
+                        val.append(str(lVal))
+                if dtype == "short" or dtype == "int":
+                    val = []
+                    #strip the open and close bracket
+                    listVal = curVal.lstrip('[')
+                    listVal = listVal.rstrip(']')
+                    for lVal in listVal.split(','):
+                        val.append(int(lVal))
+                    
+        except(ValueError):
+            val = None
+        
+        return val
+        
+    def AddToWaveformsMenu(self, newWaveform, type):
+        wMenu = self.FindMenuInMenuBar('Waveforms')
+        
+        if type == WaveformModel.SYSTEM_WAVEFORM:
+            wSubMenu = wx.Menu()
+            install = wSubMenu.Append(-1, 'Install')
+            installAndStart = wSubMenu.Append(-1, 'Install and Start')
+            viewWform = wSubMenu.Append(-1, 'Preview')
+            properties = wSubMenu.Append(-1, 'Properties')
+            
+            wMenu.InsertMenu(0,-1, newWaveform, wSubMenu) #insert at the start of the list
+            
+            self.Bind(wx.EVT_MENU, self.OnWaveformInstall, install)
+            self.Bind(wx.EVT_MENU, self.OnWaveformInstallAndStart, installAndStart)
+            self.Bind(wx.EVT_MENU, self.OnWaveformPreview, viewWform)
+            self.Bind(wx.EVT_MENU, self.OnWaveformProperties, properties)
+                
+    def AddToComponentsMenu(self, newComponent, isVisible):
+        cMenu = self.FindMenuInMenuBar('Components')
+        citem = cMenu.AppendCheckItem(-1, newComponent)
+        self.Bind(wx.EVT_MENU, self.OnComponentMenuClick, citem)
+        
+        if isVisible:
+            citem.Check(True)
+    
+    def OnWaveformInstall(self, event):
+        chosenMenu = event.GetEventObject()
+        parent = chosenMenu.GetParent()
+        
+        for mItem in parent.GetMenuItems():
+            if mItem.GetSubMenu() is chosenMenu:
+                self.controller.installWaveform(mItem.GetItemLabel(), False)
+                break
+    
+    def OnWaveformInstallAndStart(self, event):
+        chosenMenu = event.GetEventObject()
+        parent = chosenMenu.GetParent()
+        
+        for mItem in parent.GetMenuItems():
+            if mItem.GetSubMenu() is chosenMenu:
+                self.controller.installWaveform(mItem.GetItemLabel(), True)
+                break
+    
+    def OnPropertySelect(self, event):
+        srcId = event.GetId()
+        pMenu = event.GetEventObject()
+        mItemList = pMenu.GetMenuItems()
+        for mItem in mItemList:
+            if srcId == mItem.GetId():
+                propName = mItem.GetItemLabel()
+                #self.tempComp has the reference to the component panel on which
+                #the context menu is invoked in ComponentRightClick Handler
+                compName = self.tempComp.GetName()
+                self.model.updatePropertyState(compName, propName, mItem.IsChecked())
+                break
+    
+    def OnComponentMoveUp(self, event):       
+        compName = self.tempComp.GetName()
+        wformName = self.tempComp.GetParent().GetName()
+        self.model.moveComponentUp(wformName, compName)
+    
+    def OnComponentMoveDown(self, event):
+        compName = self.tempComp.GetName()
+        wformName = self.tempComp.GetParent().GetName()
+        self.model.moveComponentDown(wformName, compName)
+            
+    
+    def OnWaveformPreview(self, event):
+        chosenMenu = event.GetEventObject()
+        parent = chosenMenu.GetParent()
+        
+        for mItem in parent.GetMenuItems():
+            if mItem.GetSubMenu() is chosenMenu:
+                wformName = mItem.GetItemLabel()
+                waveform = self.model.getWaveform(wformName, WaveformModel.SYSTEM_WAVEFORM)
+                title = 'Preview - ' + wformName 
+                
+                previewFrame = wx.Frame(self, -1, title, OSSIE_WAVEAPP_DIMENSION)
+                wPanel = self.createWaveformPanel(previewFrame, waveform, preview = True)
+                wPanel.Show()
+                previewFrame.Show()
+                break
+    
+    def OnWaveformProperties(self, event):
+        chosenMenu = event.GetEventObject()
+        parent = chosenMenu.GetParent()
+        
+        for mItem in parent.GetMenuItems():
+            if mItem.GetSubMenu() is chosenMenu:
+                wformName = mItem.GetItemLabel()
+                wformObj = self.model.getWaveform(wformName, WaveformModel.SYSTEM_WAVEFORM)
+                print str(wformObj)
+                title = wformName + " - Properties"
+                wformProperties = str(wformObj)
+                dlg = wx.MessageDialog(None, wformProperties, title, wx.OK | wx.ICON_INFORMATION)
+                try:
+                    dlg.ShowModal()
+                finally:
+                    dlg.Destroy()
+    
+    #Event Handler for page change. Update the active waveform on each page change
+    def OnNbPageChange(self, event):
+        pageId = event.GetSelection()
+        #GetPage() returns the reference to waveform panel object
+        wPanel = self.notebook.GetPage(pageId)
+        #update active waveform in the model
+        self.model.setActiveWaveform(wPanel.GetName())
+    
+    def OnComponentMenuClick(self, event):
+        cMenu = event.GetEventObject()
+        mItemList = cMenu.GetMenuItems()
+        for mItem in mItemList:
+            self.model.updateComponentState(mItem.GetItemLabel(), mItem.IsChecked())
+        
+    def UpdateComponentMenu(self, wform):
+        
+        componentList = wform.getAllComponents()
+        compMenu = self.FindMenuInMenuBar('Components')
+        #clear the existing items in Component Menu 
+        for mItem in compMenu.GetMenuItems():
+            compMenu.DeleteItem(mItem)
+            
+        #Now update the component Menu wit the components of currently selected waveform
+        for component in componentList:
+            self.AddToComponentsMenu(component.getName(), component.isVisible())
+        
+    #listeners of WaveformListener interface
+    def waveformAdded(self, event):
+        wform = event.getSource()
+        #if(wform.name == "w1"):
+         #   print "in waveform Added"
+          #  for comp in wform.components:
+           #     for prop in comp.properties:
+                #        print str(prop.id) + ": "  + str(prop.getValue())
+                    
+                    
+        
+        #create the panel only if it is a instance waveform.
+        #For system waveform, just add it to the menu
+        wType = wform.getType()
+        if wType == WaveformModel.INSTANCE_WAVEFORM:
+            wPanel = self.createWaveformPanel(self.notebook, wform)
+            self.notebook.AddPage(wPanel, wform.getName())
+            
+        self.AddToWaveformsMenu(wform.getName(), wType)
+    
+    def waveformRemoved(self, event):
+        
+        srcWform = event.getSource()
+        #if waveform removed is a SYSTEM_WAVEFORM, i.e. the one found in /sdr/dom/waveforms,
+        #remove the waveform from the Waveforms Menu
+        if srcWform is not None and srcWform.getType() == WaveformModel.SYSTEM_WAVEFORM:
+            wformsMenu = self.FindMenuInMenuBar('Waveforms')
+            menuItems = wformsMenu.GetMenuItems()
+            for mItem in menuItems:
+                if mItem.GetItemLabel() == srcWform.getName():
+                    wformsMenu.DeleteItem(mItem)
+                    break
+            return
+     
+        curPanelId = self.notebook.GetSelection()
+        curPanel = self.notebook.GetCurrentPage()
+        wformName = curPanel.GetName()
+        self.wpanels.remove(curPanel)
+        #remove the panel from the notebook
+        self.notebook.RemovePage(curPanelId)
+        #destroy the waveform panel object
+        curPanel.Destroy()
+        
+        msg = ("%s Uninstalled !" % wformName)
+        utils.showMessage(msg, utils.INFO)
+        
+        #AdvanceSelection() sets the next available page active
+        #and trigger EVT_NOTEBOOK_PAGE_CHANGED event. The event
+        #handler OnNbPageChange() would be called that sets the
+        #active waveform thruogh model.SetActiveWaveform()
+        
+        self.notebook.AdvanceSelection(True)
+        
+        #if no running waveforms on the system?
+        if self.notebook.GetPageCount() == 0:
+            compMenu = self.FindMenuInMenuBar('Components')
+            #clear the existing items in Component Menu 
+            for mItem in compMenu.GetMenuItems():
+                compMenu.DeleteItem(mItem)
+            self.model.setActiveWaveform(None)
+            self.SetSize(OSSIE_WAVEAPP_DIMENSION)
+        #notebook.AdvanceSelection() will not trigger PAGE_CHANGED event if there is 
+        #only one panel left. Hence, set the active form explicitly.
+        elif self.notebook.GetPageCount() == 1:
+            nextActiveWform = self.notebook.GetCurrentPage().GetName()
+            self.model.setActiveWaveform(nextActiveWform)
+        
+    def waveformSelected(self, event):
+        wform = event.getSource()
+        #If no waveform is there, just update the title and status Bar and return
+        if wform is None:
+            self.SetTitle(OSSIE_TITLE)
+            #self.updateStatusBar()
+            return   
+        self.SetTitle(OSSIE_TITLE + ' (' + wform.getName() + ')')
+        #Component menu needs to be updated per waveform basis.        
+        self.UpdateComponentMenu(wform)
+        self.Layout()
+        
+    def componentStateChanged(self, cEvent):
+        """ A listener method of ComponentListener class that is triggerred
+        whenever a component is selected/deselected in the Component Menu"""
+
+        wPanel = self.getCurrentPanel()
+        cPanelList = wPanel.GetChildren()
+        wPanelSizer = wPanel.GetSizer()     
+        componentList = self.model.getActiveWaveform().getAllComponents()
+        
+        #Detach all the existing panels from the sizer 
+        for cPanel in cPanelList:
+            if wPanelSizer.GetItem(cPanel) != None:
+                wPanelSizer.Detach(cPanel)
+                cPanel.Hide()
+        
+        #Update the sizer to be inline with the order of components in Waveform Model
+        for cmp in componentList:
+            if cmp.isVisible():
+                #print cmp.getPosition()
+                for cPanel in cPanelList:
+                    if cPanel.GetName() == cmp.getName():
+                        wPanelSizer.Add(cPanel, 0, wx.ALL | wx.EXPAND, 5)
+                        cPanel.Show()
+                        break
+        
+        wPanelSizer.Layout()
+        wPanel.Refresh()
+    
+    def propertyStateChanged(self, event):
+        property = event.getSource()
+        component = property.getParent()
+        wPanel = self.getCurrentPanel()
+        cPanel = wPanel.FindWindowByName(component.getName())
+        cPanelSizer = cPanel.GetSizer() 
+        #Component Panel sizer is a static box sizer. ACtual widgets are contained in a
+        #gridbag sizer which in turn contained in this static box sizer
+        
+        cgsizer = cPanelSizer.GetChildren()[0].GetSizer()
+        propWidgetsList = cgsizer.GetChildren()
+        
+        #propWidgetsList stores the list of labels and widgets of properties in SizerItem format.
+        #Get the actual window from the SizerItem object before acting on the window
+        
+        #removing all the widgets contained in the sizer
+        for prpWid in propWidgetsList:
+            #prpWid is of type wx.SizerItem. Use GetWindow() to get the window tracked by this SizerItem
+            actW = prpWid.GetWindow()
+            if cgsizer.GetItem(actW) != None:
+                cgsizer.Detach(actW)
+                actW.Hide()
+        
+        prpList = component.getAllProperties()
+        propWidgetsList = cPanel.GetChildren()
+     
+        #NOTE: The while loop inside the for loop iterates over the children of 
+        #the component panel. Since StaticBoxSizer is used to layout the properties,
+        #the first child of the component panel (cPanel) will always be the StaticBox
+        #object which should not be added to the gridbagsizer in addPropToCompSizer 
+        #method. Hence, iterating from 1 to length of the propWidgetsList.
+        # (see the value of index )
+        
+        newPrpList = []
+        index = 1
+        for prp in prpList:
+            if prp.isVisible():
+                index = 1
+                while ( index < (len(propWidgetsList)) ):
+                    actW = propWidgetsList[index]
+                    
+                    if actW.GetName() == prp.getName():
+                        newPrpList.append(actW)
+                        actW.Show()
+                    index = index + 1    
+        
+        newCgSizer = self.addPropToCompSizer(newPrpList)
+        cPanelSizer.Remove(cgsizer)
+        cPanelSizer.Add(newCgSizer, 1, wx.ALIGN_CENTER | wx.EXPAND, 10)
+        cPanelSizer.Layout()
+        wPanel.GetSizer().Layout()
+                      
+            
+    def propertyWidgetChanged(self, event):
+        property = event.getSource()
+        compRef = property.getParent()
+        wPanel = self.getCurrentPanel()
+        
+        
+        # DO NOT CALL replaceComponentPanel() DIRECTLY FROM HERE AS IT INVOLVES
+        # A CALL TO window.Destroy() METHOD. THIS METHOD IS STILL IN THE CONTEXT
+        # OF EVENT HANDLER INVOKED AS A RESULT OF RIGHT CLICK ON PROPERTY WIDGET.
+        # CALLING replaceComponentPanel() DIRECTLY FROM HERE WOULD **CRASH** THE 
+        # APPLICATION.
+        
+        wx.CallAfter(self.replaceComponentPanel, wPanel, compRef )
+    
+    def propertyRangeChanged(self, event):
+        propertyCtrl = self.tempProp
+        propRef = event.getSource()
+        newMin, newMax = propRef.getRange()
+        propertyCtrl.SetRange(newMin, newMax)
+        
+        #if GUI widget's current value is changed because new min, max values
+        #we have to update the new value to the model as well.
+        curWidVal = self.formatWidgetToModel(propertyCtrl.GetValue(), propRef.getType())
+        preVal = propRef.getValue()
+        if preVal == curWidVal:
+            pass
+        else:
+            pName = propertyCtrl.GetName()
+            cName = propertyCtrl.GetParent().GetName()
+            wName = propertyCtrl.GetParent().GetParent().GetName()
+        
+            status = self.model.configure(wName, cName, pName, curWidVal)
+            #leave the text box as it is if status is True
+            #if the configure operation failed, revert the text value to the value stored in 
+            #the model.
+            if status is False:
+                msg = "Could not configure " + pName
+                utils.showMessage(msg, utils.NON_FATAL)
+                self.formatModelToWidget(propertyCtrl, preVal)
+            
+        return
+#        if propertyCtrl.__class__ is wx.SpinCtrl:
+#            propertyCtrl.SetRange(newMin, newMax)
+#        if propertyCtrl.__class__ is wx.Slider:
+#            propertyCtrl.SetMin(newMin)
+#            propertyCtrl.SetMax(newMax)
+    
+    def FindMenuInMenuBar(self, title):
+        pos = self.GetMenuBar().FindMenu(title)
+        return self.GetMenuBar().GetMenu(pos)
+    
+    def getCurrentPanel(self):
+        return self.notebook.GetCurrentPage()
+    
+    def replaceComponentPanel(self, wPanel, component):
+        
+#        Find the component to be replaced from the children list of current
+#        active waveform panel. Replace the Old component panel in the waveform
+#        panel's sizer with the compnent panel created new and then destroy the 
+#        old component panel
+#        
+        for button in self.configureButtons:
+            if button.isComponentButton and button.getParentName() == component.getName():
+                self.configureButtons.remove(button)
+        
+        oldCPanel = wPanel.FindWindowByName(component.getName())
+        newCPanel = self.createComponentPanel(wPanel, component)
+        wSizer = wPanel.GetSizer()         
+        wSizer.Replace(oldCPanel, newCPanel)
+      
+        wSizer.Fit(wPanel)        
+        wPanel.SetSizer(wSizer)
+        wSizer.Layout()
+        oldCPanel.Destroy()
+        
+    def OnRefresh(self, event):
+        self.controller.refresh()
+        
+    def waveformRefresh(self, event):
+        wformsTobeRemoved = event.getSource()
+        wformMenu = self.FindMenuInMenuBar('Waveforms')
+            
+        for wformName in wformsTobeRemoved:
+            wPanel = self.getWaveformPanel(wformName)
+            self.wpanels.remove(wPanel)
+            self.compPopupMenus.pop(wPanel)
+            self.prpPopupMenus.pop(wPanel)
+            wPanel.Destroy()
+                    
+            #update the menu display
+            menuItems = wformMenu.GetMenuItems()
+                
+            #remove the selected waveform from the menu list 
+            for mItem in menuItems:
+                if mItem.GetItemLabel() == wformName :
+                    wformMenu.RemoveItem(mItem)
+                    mItem.Destroy()
+                    break
+        
+        for wPanel in self.wpanels:
+            cPanelList = wPanel.GetChildren()
+            wformRef = self.model.getWaveform(wPanel.GetName(), WaveformModel.INSTANCE_WAVEFORM)
+            for cPanel in cPanelList:
+                compRef = wformRef.getComponent(cPanel.GetName())
+                prpList = compRef.getAllProperties()
+                prpWidgetList = cPanel.GetChildren()
+                
+                for prpW in prpWidgetList:
+                    if type(prpW) is wx.TextCtrl: 
+                        prpW.SetValue(str(compRef.findPropertyByName(prpW.GetName()).getValue()))
+                    elif type(prpW) is wx.SpinCtrl:
+                        prpW.SetValue(int(compRef.findPropertyByName(prpW.GetName()).getValue()))
+                    elif type(prpW) is wx.Slider:
+                        prpW.SetValue(int(compRef.findPropertyByName(prpW.GetName()).getValue()))
+            
+        if (self.model.getActiveWaveform() is None):
+            nextActiveWform = None
+            #make the first available waveform active
+            menuItems = wformMenu.GetMenuItems()
+            for mItem in menuItems:
+                if mItem.IsCheckable():
+                    mItem.Check()
+                    nextActiveWform = mItem.GetItemLabel()
+                    break
+            
+            #no running waveforms on the system
+            if nextActiveWform is None:
+                self.SetSize(OSSIE_WAVEAPP_DIMENSION)
+                return
+            self.model.setActiveWaveform(nextActiveWform)
+                    
+    def getWaveformPanel(self, wformName):
+        for wPanel in self.wpanels:
+            if (wformName == wPanel.GetName()):
+                return wPanel
+                
+      
+    def OnOpenLayout(self, event):
+        pass
+    def OnSaveLayout(self, event):
+        self.model.waveformToXML()
+        pass
+    def OnSaveLayoutAs(self, event):
+        pass
+    def OnClose(self, event):
+        if self.controller.nodeBooterProcess != None:
+            dlg = wx.MessageDialog(self,
+                                   "NodeBooter was started by WaveDash.\n" +
+                                   "Would you like to terminate it?",
+                                   "Confirm NodeBooter Termination", wx.YES | wx.NO | wx.ICON_QUESTION)
+            result = dlg.ShowModal()
+            if result == wx.ID_YES:
+                print "Terminating nodeBooter"
+                self.controller.nodeBooterProcess.terminate()
+        self.Destroy()
+
+    def OnWidgetSettings(self, event):
+        pass
+    def OnAbout(self, event):
+        dlg = wx.MessageDialog(self, "WaveDash\nPart of the OSSIE Toolset",
+                               "About WaveDash")
+        dlg.ShowModal()
+        
+    def OnUpdateOnRefreshCheck(self, event):
+        for button in self.configureButtons:
+            button.Enable(self.updateOnRefresh.IsChecked())
+            
+    def OpenPreferences(self, event):
+        PreferencePage = WavedashPreferencePage(self, self.controller)
+        PreferencePage.Show()
+            
+    def OnUpdateComponentClicked(self, event):
+        src = event.GetEventObject()
+        compName = src.GetParent().GetName()
+        wName = src.GetParent().GetParent().GetName()
+        self.updateComponent(compName, wName)
+        
+    def OnUpdateWaveformClicked(self, event):
+        src = event.GetEventObject()
+        wName = src.GetParent().GetName()
+        self.updateWaveform(wName)
+        
+    def updateWaveform(self, waveformName):
+        wform = self.model.getWaveform(waveformName, WaveformModel.INSTANCE_WAVEFORM)
+        for component in wform.getAllComponents():
+            self.updateComponent(component.getName(), wform.getName())
+                
+    def updateComponent(self, componentName, waveformName):
+        wform = self.model.getWaveform(waveformName, WaveformModel.INSTANCE_WAVEFORM)
+        compRef = wform.getComponent(componentName)
+        for property in compRef.getAllProperties():
+            curVal = self.formatWidgetToModel(property.getWindow().GetValue(), property.getType())
+            preVal = property.getValue()
+          
+    
+            if curVal is not None:
+            
+            #if both the values are equal then no need to call configure()
+                if preVal == curVal:
+                    pass
+                else:
+                    status = self.model.configure(waveformName, componentName, property.getName(), curVal)
+                    #leave the text box as it is if status is True
+                    #if the configure operation failed, revert the text value to the value stored in 
+                    #the model.
+                    if status is False:
+                        msg = "Could not configure " + property.getName()
+                        utils.showMessage(msg, utils.NON_FATAL)
+                        self.formatModelToWidget(property.getWindow(), preVal)
+                        #src.SetValue(str(preVal))
+                    elif property.type[1] == "boolean":
+                        self.formatModelToWidget(property.getWindow(), curVal)
+                
+            else:
+                msg = "Invalid value for %s/%s" % (componentName, property.getName()) + "\nEnter only '" + property.getType()[1] + "' values"
+                msg = msg + "\nFor sequence types, enter values separated by comma" 
+                msg = msg + " and enclosed within [] e.g. [10,20,30]"
+            
+                utils.showMessage(msg, utils.NON_FATAL)
+                self.formatModelToWidget(property.getWindow(), preVal)     
+                self.Layout()
+            
+    def getRoot(self):
+        root = __file__
+        if os.path.islink (root):
+            root = os.path.realpath (root)
+        root = os.path.dirname (os.path.abspath (root))
+        return root
+
+def main():
+    app = wx.App()
+    ctrlr = Controller()
+    ctrlr.createWidgetContainer()
+   
+    frame = WavedashView(ctrlr, ctrlr.model)
+
+    ctrlr.CORBAutils.init_CORBA()
+    ctrlr.buildModel()
+
+    app.MainLoop()
+        
+if __name__ == '__main__':
+    main() 
+
+    
Index: /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/WavedashButton.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/WavedashButton.py	(revision 10303)
+++ /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/WavedashButton.py	(revision 10303)
@@ -0,0 +1,23 @@
+import wx
+
+class WavedashButton(wx.BitmapButton):
+    
+    def setParentName(self, newParentName):
+        self.parentName = newParentName
+        
+    def getParentName(self):
+        return self.parentName
+    
+    def setGrandParentName(self, newGrandParentName):
+        self.grandParentName = newGrandParentName
+        
+    def getGrandParentName(self):
+        return self.grandParentName
+    
+    def setIsComponentButton(self):
+        self.isComponentButton = True
+        self.isWaveformButton = False
+        
+    def setIsWaveformButton(self):
+        self.isWaveformButton = True
+        self.isComponentButton = False
Index: /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/WavedashPreferencePage.py
===================================================================
--- /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/WavedashPreferencePage.py	(revision 10449)
+++ /ossiedev/branches/0.8.x/trunk/tools/wavedash/src/WavedashPreferencePage.py	(revision 10449)
@@ -0,0 +1,118 @@
+#! /bin/env python
+
+## Copyright 2005, 2006, 2007, 2008 Virginia Polytechnic Institute and State University
+##
+## This file is part of the OSSIE Waveform Application Visualization Environment
+##
+## WaveDash is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## WaveDash is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with OSSIE WaveDash; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import wx
+
+DEFAULT_DEVICE_MANAGER_FILE = 'DeviceManager.dcd.xml'
+DEFAULT_DEVICE_MANAGER_DIR = 'dev/nodes/default_GPP_node'
+DEFAULT_DOMAIN_MANAGER_FILE = 'DomainManager.dmd.xml'
+DEFAULT_DOMAIN_MANAGER_DIR = 'dom/domain'
+
+class WavedashPreferencePage(wx.Frame):
+    def __init__(self, parent, controller):
+        wx.Frame.__init__(self, 
+                          parent = parent, 
+                          title='Wavedash Preference Page')
+        self.devChanged = False
+        self.domChanged = False
+
+        self.controller = controller
+        panel = wx.Panel(self, -1)
+        managerSizer = wx.GridBagSizer(3, 4)
+        
+       
+        self.devLabel = wx.StaticText(panel, -1, 'Default Device Manager:')
+        self.deviceManager = wx.TextCtrl(panel, -1, 'DeviceManager.dcd.xml', size=wx.Size(120, -1))
+        self.deviceBrowseButton = wx.Button(panel, -1, 'Browse')
+        self.Bind(wx.EVT_BUTTON, self.OnDeviceBrowseClick, self.deviceBrowseButton)
+        self.domLabel = wx.StaticText(panel, -1, 'Default Domain Manager:')
+        self.domainManager = wx.TextCtrl(panel, -1, 'DomainManager.dmd.xml', size=wx.Size(120, -1))
+        self.domainBrowseButton = wx.Button(panel, -1, 'Browse')
+        self.Bind(wx.EVT_BUTTON, self.OnDomainBrowseClick, self.domainBrowseButton)
+        self.okButton = wx.Button(panel, -1, 'OK')
+        self.Bind(wx.EVT_BUTTON, self.OnOKClick, self.okButton)
+        self.restoreDefaultsButton = wx.Button(panel, -1, 'Restore Defaults')
+        self.Bind(wx.EVT_BUTTON, self.OnRestoreDefaultsClick, self.restoreDefaultsButton)
+       
+        managerSizer.Add(self.devLabel, (0, 0), flag=wx.LEFT, border=5)
+        managerSizer.Add(self.deviceManager, (0, 1))
+        managerSizer.Add(self.deviceBrowseButton, (0, 2), flag=wx.RIGHT | wx.LEFT, border=5)
+        managerSizer.Add(self.domLabel, (1, 0), flag=wx.LEFT, border=5)
+        managerSizer.Add(self.domainManager, (1, 1))
+        managerSizer.Add(self.domainBrowseButton, (1, 2), flag=wx.RIGHT | wx.LEFT, border=5)
+        managerSizer.Add(self.restoreDefaultsButton, (2, 1), flag=wx.LEFT, border=2)
+        managerSizer.Add(self.okButton, (2, 2), flag=wx.LEFT, border=5)
+        
+        
+        panel.SetSizerAndFit(managerSizer)
+        
+        self.Center()
+    
+    def OnDeviceBrowseClick(self, event):
+        dlg = wx.FileDialog(self, "Choose a Device Manager", '/sdr/dev/nodes', "", "*.dcd.xml", wx.OPEN)
+        temp = dlg.ShowModal()
+        if temp == wx.ID_OK:
+            self.devChanged = True
+            self.devFileName=dlg.GetFilename()
+            self.devDirName=dlg.GetDirectory()
+            self.deviceManager.SetValue(self.devFileName)
+            
+    def OnDomainBrowseClick(self, event):
+        dlg = wx.FileDialog(self, "Choose a Domain Manager", '/sdr/dom/domain', "", "*.dmd.xml", wx.OPEN)
+        temp = dlg.ShowModal()
+        if temp == wx.ID_OK:
+            self.domChanged = True
+            self.domFileName=dlg.GetFilename()
+            self.domDirName=dlg.GetDirectory()
+            self.domainManager.SetValue(self.domFileName)
+            
+    def OnOKClick(self, event):
+        self.setProperties()  
+        self.Close()
+        
+    def OnRestoreDefaultsClick(self, event):
+        self.devDirName = DEFAULT_DEVICE_MANAGER_DIR
+        self.devFileName = DEFAULT_DEVICE_MANAGER_FILE
+        self.domDirName = DEFAULT_DOMAIN_MANAGER_DIR
+        self.domFileName = DEFAULT_DOMAIN_MANAGER_FILE 
+        self.deviceManager.SetValue(self.devFileName)
+        self.domainManager.SetValue(self.domFileName)  
+        self.devChanged = True
+        self.domChanged = True
+        self.setProperties()
+        
+    def setProperties(self):
+        if self.devChanged:
+            devMan = self.devDirName + '/' + self.devFileName
+            if devMan.startswith('/sdr/'):
+                devMan = devMan[5:]
+            self.controller.setOSSIEProperty('ossie', 'default.device.manager', devMan)
+        if self.domChanged:
+            domMan = self.domDirName + '/' + self.domFileName
+            if domMan.startswith('/sdr/'):
+                domMan = domMan[5:]
+            