template2.tcl 1.2 KB
Newer Older
Maxime Perrotin's avatar
Maxime Perrotin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
package provide template2 0.1 

lappend auto_path .
namespace eval template2 {
    
    # Graphical name of the operation
    proc getLabel {} {
        return "My template2"
    }
    
    # Name of the application this script can be used with
    # shall be either InterfaceView or DeploymentView
    proc getApplication {} {
        return "DeploymentView--"
    }
    
    # Names of  the object this script can be used on
    proc getApplyTo {} {
        return [list "Function" "ProcessorBoard" "Bus" "Device" "Driver" ]
    }
    
    # List of way to manage output in the Framework
    # Could be an empty list or one or both of 'dialogBox' and 'statusBar'
    proc getOutputManagement {} {
25
        return [list statusBar dialogBoxOnError]
Maxime Perrotin's avatar
Maxime Perrotin committed
26 27 28 29 30 31 32 33 34 35 36
    }
    
    proc template2 { args } {
        set params [lindex $args 0]
        set aadlFilePath [Parameter::getParameter $params aadlFilePath]
        set aadlId [Parameter::getParameter $params id]
        return [template2_internal $aadlFilePath $aadlId]
    }
    
    # synchronous call
    proc template2_internal { aadlFilePath aadlId } {        
37
        set msg [list "File path: $aadlFilePath \nAADL function id: $aadlId" ]
Maxime Perrotin's avatar
Maxime Perrotin committed
38 39 40 41
        return [list 0 $msg]
    } 
    
}