Changeset 7709
- Timestamp:
- 05/31/08 19:22:37 (5 years ago)
- Location:
- ossiedev/branches/jsnyder/ComponentProject
- Files:
-
- 1 added
- 3 modified
-
PythonSrc/MainFrameGlue.py (modified) (10 diffs)
-
WaveDev/wavedev/XML_gen/application_gen.py (modified) (2 diffs)
-
WaveDev/wavedev/XML_gen/component_gen.py (modified) (1 diff)
-
WaveDev/wavedev/cfg.py (added)
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/branches/jsnyder/ComponentProject/PythonSrc/MainFrameGlue.py
r7705 r7709 38 38 import string 39 39 import ComponentClass as CC 40 40 import cfg 41 41 42 42 class MainFrameTreeNode: … … 67 67 self.stdIdlPath = "/usr/local/include/standardinterfaces/" 68 68 self.customIdlPath = "/usr/local/include/custominterfaces/" 69 self.Available_Ints = [] 69 70 70 71 … … 161 162 162 163 163 def setOssieInstallPath(self, path): 164 self.installPath = self.pathWithSlash(path) 164 def pathWithoutSlash(self, path): 165 length = len(path) 166 if length > 0 and path[length - 1] == '/': 167 path = path[0:length - 1] 168 return path 165 169 166 170 … … 181 185 def setOssieInstallPath(self, path): 182 186 self.installPath = self.pathWithSlash(path) 187 cfg.overrideCfgValue('installpath', self.pathWithoutSlash(path)) 183 188 184 189 … … 187 192 188 193 189 def setIncludePath(self, newOssieIncludePath): 190 self.ossieIncludePath = newOssieIncludePath 191 192 193 def setStandardIdlPath(self, newStdIdlPath): 194 self.stdIdlPath = newStdIdlPath 195 196 197 def setCstmIdlPath(self, newCustomIdlPath): 198 self.customIdlPath = newCustomIdlPath 194 def setIncludePath(self, path): 195 self.ossieIncludePath = path 196 cfg.setCfgValueIfNecessary('ossieincludepath', 197 self.pathWithoutSlash(path)) 198 199 200 def setStandardIdlPath(self, path): 201 self.stdIdlPath = path 202 cfg.setCfgValueIfNecessary('stdidlpath', self.pathWithoutSlash(path)) 203 204 205 def setCstmIdlPath(self, path): 206 self.customIdlPath = path 199 207 200 208 … … 326 334 327 335 def importStandardIDL(self): 328 print "0"329 336 '''Imports IDL from cf, standardinterfaces, and custominterfaces''' 337 338 # If we've computed this value before, just reuse it 339 if len(self.Available_Ints) > 0: 340 return MainFrameTreeNode('Interfaces', self.Available_Ints) 341 330 342 #temporarily change self.parent to self so this works 331 343 #normally this function looks at the MainFrame - but not in standalone 332 print "1"333 self.Available_Ints = []334 344 self.parent = self 335 345 changedParent = True … … 343 353 tmpstr += self.ossieIncludePath 344 354 errorMsg(self,tmpstr) 345 print 2 355 346 356 # for each file in the standardinterfaces directory, import all available 347 357 # interfaces (skip standardIdl files) … … 354 364 # as a result of customInterfaces not being found 355 365 custom_idl_list = [] 356 print 3 366 357 367 if len(standard_idl_list) <= 0: 358 368 tmpstr = "Can't find any files in: " + self.stdIdlPath … … 378 388 if t not in self.Available_Ints: 379 389 self.Available_Ints.append(t) 380 print 4 390 381 391 # import custom interfaces 382 392 for custom_idl_file in custom_idl_list: … … 398 408 self.timing_port = CC.Port('send_timing_report', self.timing_interface, "Uses", "data") 399 409 # print "CF.py: " + t.name + " " + str(len(t.operations)) 400 print 5401 410 if changedParent == True: 402 411 self.parent = None 403 412 print self.Available_Ints 404 return MainFrameTreeNode( "Interfaces", self.Available_Ints)413 return MainFrameTreeNode('Interfaces', self.Available_Ints) 405 414 406 415 -
ossiedev/branches/jsnyder/ComponentProject/WaveDev/wavedev/XML_gen/application_gen.py
r7681 r7709 30 30 31 31 32 try:33 doc_cfg = xml.dom.minidom.parse('../wavedev.cfg')34 except: #if not being called from wavedev, try looking for the file35 doc_cfg = xml.dom.minidom.parse('/sdr/tools/WaveDev/wavedev.cfg')36 37 38 version = str(doc_cfg.getElementsByTagName("version")[0].firstChild.data)39 40 #vtext = open('../version.txt')41 #version = unicode(vtext.readline())42 #version = version.strip('\n')43 commentLine = u'<!--Created with OSSIE WaveDev ' + version \44 + u'-->\n<!--Powered by Python-->\n'45 46 47 32 xmlpath = u'/xml/' 48 33 ####################################################################### … … 198 183 devFlag = False 199 184 200 print "Processing connection : "201 print " component name : " + cname202 print " local comp type : " + n.type203 print " local port type : " + i.localPort.type204 print " local port name : " + unicode(i.localPort.name)205 print " remote comp type: " + i.remoteComp.type206 print " remote port type: " + i.remotePort.type207 print " remote port name: " + unicode(i.remotePort.name)185 # print "Processing connection : " 186 # print " component name : " + cname 187 # print " local comp type : " + n.type 188 # print " local port type : " + i.localPort.type 189 # print " local port name : " + unicode(i.localPort.name) 190 # print " remote comp type: " + i.remoteComp.type 191 # print " remote port type: " + i.remotePort.type 192 # print " remote port name: " + unicode(i.remotePort.name) 208 193 209 194 if i.localPort.type == 'Uses': -
ossiedev/branches/jsnyder/ComponentProject/WaveDev/wavedev/XML_gen/component_gen.py
r7681 r7709 26 26 from WaveDev.wavedev.uuidgen import uuidgen 27 27 28 #import xmlBeautify29 30 31 try:32 doc_cfg = xml.dom.minidom.parse('../wavedev.cfg')33 except: #if not being called from wavedev, try looking for wavedev34 doc_cfg = xml.dom.minidom.parse('/sdr/tools/WaveDev/wavedev.cfg')35 36 version = str(doc_cfg.getElementsByTagName("version")[0].firstChild.data)37 38 #vtext = open('../version.txt')39 #version = unicode(vtext.readline())40 #version = version.strip('\n')41 commentLine = u'<!--Created with OSSIE WaveDev ' + version \42 + u'-->\n<!--Powered by Python-->\n'43 28 44 29 xmlpath = u'xml/'