Changeset 4496
- Timestamp:
- 07/20/07 14:40:47 (6 years ago)
- Files:
-
- 1 modified
-
experimental/ALF/trunk/alf/ALF.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
experimental/ALF/trunk/alf/ALF.py
r4495 r4496 379 379 nsRoot = self.nsBox.AddRoot("ns_root") 380 380 381 if self.domMgr == None or self.rootContext == None:382 return383 384 dom_obj = self.rootContext.resolve([CosNaming.NameComponent("DomainName1","")])385 dom_context = dom_obj._narrow(CosNaming.NamingContext)386 if dom_context is None:387 return388 389 381 appSeq = self.domMgr._get_applications() 390 382 391 392 # for framework <= r2983393 '''394 members = dom_context.list(1000)395 for m in members[0]:396 wav_name = str(m.binding_name[0].id)397 wav_obj = dom_context.resolve([CosNaming.NameComponent(wav_name,"")])398 wav_context = wav_obj._narrow(CosNaming.NamingContext)399 if wav_context is None:400 continue401 402 contextApp = None403 foundApp = False404 405 # cycle through all the installed applications406 for app in appSeq:407 # get all of the available component instances in the application408 compNameCon = app._get_componentNamingContexts()409 410 # attempt to match the installed waveforms to one of the411 # available waveform names412 for compElementType in compNameCon:413 if wav_name in compElementType.elementId:414 waveformApp = app415 foundApp = True416 #print compElementType.componentId + " " + compElementType.elementId417 break418 419 if not foundApp:420 print "Could not find associated application for: " + wav_name421 continue422 423 t1 = self.nsBox.AppendItem(nsRoot,wav_name)424 self.nsBox.SetPyData(t1,waveformApp)425 426 # Set item bold if it is the active waveform427 if self.active_wave is not None:428 if self.active_wave.naming_context == wav_name:429 self.nsBox.SetItemBold(t1, True)430 '''431 432 # for framework > r2983433 wave_count = 0434 383 for app in appSeq: 435 384 wav_name = app._get_name() 436 # TODO: set up counter for the waveform name or get the counter437 # from the framework438 385 t1 = self.nsBox.AppendItem(nsRoot,wav_name) 439 386 self.nsBox.SetPyData(t1,app) … … 551 498 self.domMgr.installApplication(name_SAD) 552 499 500 # applicationFactories will have been set up from the 501 # installApplication() call 553 502 _applicationFactories = self.domMgr._get_applicationFactories() 554 503 … … 556 505 # cycle through the applicationFactories 557 506 # find out which one matches my application name 507 # name of application factory 558 508 for app_num in range(len(_applicationFactories)): 559 509 if _applicationFactories[app_num]._get_name()==app_name: … … 567 517 sys.exit(-1) 568 518 569 # create an application with the application factory that matches my 519 # create an application with the application factory that matches my 570 520 # application name 571 521 try: 572 522 app = _applicationFactories[app_factory_num].create( 573 'tmp_wave_name',_appFacProps,_devSeq)523 app_name,_appFacProps,_devSeq) 574 524 except: 575 525 print "Unable to create application - make sure that all appropriate nodes are installed"