Changeset 3688

Show
Ignore:
Timestamp:
05/07/07 11:54:35 (6 years ago)
Author:
DrewCormier
Message:

added DAS file generation. added comments explaining what is going on

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • experimental/compform/trunk/compform/compform.py

    r3222 r3688  
    2323 
    2424    def create_complist(self, component): 
     25        '''Creates a component list out of the single component for the application_gen function in WaveDev.''' 
    2526        active_wave = WaveformClass.Waveform() 
    2627         
     
    4041    '''parse the input arguments, and make function calls to create the waveform''' 
    4142  
     43    #check to make sure all the command line arguments are present 
    4244    if len(sys.argv) == 1 or len(sys.argv) == 2 or len(sys.argv) > 4: 
    4345        print "i'm going to want a component, an install dir and an optional waveform name" 
    4446        sys.exit()       
    4547 
    46     comp_in = sys.argv[1] 
    47     genPath = sys.argv[2] 
     48    comp_in = sys.argv[1]   #name of the component that will be used 
     49    genPath = sys.argv[2]   #where the generated XML will go 
    4850 
     51    #if the user did not specify a waveform name, create one 
    4952    if len(sys.argv) == 3: 
    5053        waveName = comp_in + "_waveform" 
    5154        print "waveform name is " + waveName 
    52  
     55    #if the user did set a waveform name, read it from the command line 
    5356    elif len(sys.argv) == 4: 
    5457        waveName = sys.argv[3]  
    5558        print "waveform name is " + waveName 
    5659 
    57  
    5860    my_compform = compform() 
    5961 
    6062    component = my_compform.get_the_resource(comp_in) 
    61  
    6263    complist = my_compform.create_complist(component) 
    6364 
    64     #need to make the directories 
     65    #make the directory to put the XML    
    6566    if os.path.exists(genPath+waveName) == False:    
    66         os.mkdir(genPath+waveName) 
     67        os.mkdir(genPath+'/'+waveName) 
     68         
    6769 
    68     app_gen.genxml(complist, genPath, waveName) 
    69      
     70    app_gen.genxml(complist, genPath, waveName)   #generate the SAD file 
     71    app_gen.genDAS(complist, genPath, waveName)   #generate the DAS file     
    7072 
    7173 
     
    7577 
    7678    print "non-commandline module call is not yet supported" 
    77      
     79    sys.exit() 
    7880     
    7981