⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 liccfg.tcl

📁 vxworks下MV5500的BSP支持包。是支持tornad221下的版本。
💻 TCL
📖 第 1 页 / 共 5 页
字号:
# rmPageList() - helper function to remove autoInst or nodeLock page list, #                depends on setupVals(lmInstType)## This procedure will remove the autoInst or nodeLocke page list## SYNOPSIS# .tS# rmPageList# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc rmPageList {} {        global setupVals        if {$setupVals(lmInstType) == "nodeLocked"} {                pageListRemove dbQuery                pageListRemove lmOptions                pageListRemove nodeLock        } elseif {$setupVals(lmInstType) == "floating"} {                pageListRemove autoInst        }}############################################################################### licenseConfirmInit() - Display License Summary information## This procedure will display license summary## SYNOPSIS# .tS# licenseConfirmInit(isFloatLic)# .tE## PARAMETERS: isFloatLic - 1 if floating license, else 0## RETURNS:  1 if ok or 0 if cancel## ERRORS: N/A#proc licConfirmDlgInit {} {    global lmVals ctrlVals lmHostFeaturesNum    set hostIndex [lsearch $lmVals(lmHosts) $lmVals(lmHostName)]    if {$hostIndex == -1} {        set numberOfFeatures 0    } else {        set numberOfFeatures [lindex $lmHostFeaturesNum $hostIndex]    }    # Fill in the informational text box for the users    if {$lmVals(lmLicMode) == "floating"} {        for {set ix 0} {$ix < [llength $lmVals(lmFeaturesTotal)]} {incr ix} {            set feature [lindex $lmVals(lmFeaturesTotal) $ix]            set featureName [lindex $feature 0]            set fHostAllocated 0            for {set ixf 0} {$ixf < $numberOfFeatures} {incr ixf} {                # only if the feature is previously allocated on this host                # (name match), retrieve allocated value                if { $featureName == [lmLicProdInfoGet prodName $lmVals(lmHostName) $ixf] } {                    set fHostAllocated \                        [lmLicProdInfoGet licFLAllocated $lmVals(lmHostName) $ixf]                }            }            set line1 [format "%s\r\n" \                        [lindex $lmVals(lmLicensedProductNames) $ix]]            set line2 [format "%s\r\n" \                        [expr [lindex $lmVals(lmFeaturesRequested) $ix] + $fHostAllocated]]            append output1 $line1            append output2 $line2        }        controlTextSet licConfirmDlg.floatSummary1 $output1        controlTextSet licConfirmDlg.floatSummary2 $output2    } else { # node locked        # for Reload, display all feature names retrieved from database        if {$lmVals(reload)} {            for {set ix 0} {$ix < [llength $lmVals(lmFeaturesTotal)]} {incr ix} {                set feature [lindex $lmVals(lmFeaturesTotal) $ix]                set featureName [lindex $feature 0]                set fHostAllocated 0                for {set ixf 0} {$ixf < $numberOfFeatures} {incr ixf} {                    # only if the feature is previously allocated on this host                    # (name match), display that feature name                     if { $featureName == [lmLicProdInfoGet prodName $lmVals(lmHostName) $ixf] } {                        set fHostAllocated \                            [lmLicProdInfoGet licNLAllocated $lmVals(lmHostName) $ixf]                    }                }                if { $fHostAllocated != 0 } {                    set line [format "%s\r\n" [lindex $lmVals(lmLicensedProductNames) $ix]]                    append output $line                }            }        } else { # otherwise, display features selected            for {set ix 0} {$ix < [llength $lmVals(lmLicensedProductNames)]} {incr ix} {                if {[lindex $lmVals(lmFeaturesRequested) $ix] == 1} {                    set line [format "%s\r\n" [lindex $lmVals(lmLicensedProductNames) $ix]]                    append output $line                }            }        }        controlTextSet licConfirmDlg.nodelockSummary $output    }}############################################################################### licenseConfirm() - Display License Summary## This procedure will display license summary## SYNOPSIS# .tS# licenseConfirm()# .tE## PARAMETERS: N/A## RETURNS:  1 if ok or 0 if cancel## ERRORS: N/A#proc licenseConfirm {} {    global ctrlVals setupVals lmVals lmHostFeaturesNum    set ctrlVals(dlgRetVal) 0    if { $setupVals(lmInstType) == "floating" } {        set isFloatLic 1    } else {        set isFloatLic 0    }    set hostIndex [lsearch $lmVals(lmHosts) $lmVals(lmHostName)]    if { [isGUImode] } {         # Automation: skip display summary and populate autoSetupLog        if { $ctrlVals(useInputScript) } {            set ctrlVals(dlgRetVal) 1            if {$lmVals(reload)} {                autoSetupLog "Reload Existing License File Summary Page: skipped"                autoSetupLog "[strTableGet LICCFG_DLGRLD_1]"            } elseif {$lmVals(lmLicMode) == "floating"} {                autoSetupLog "Floating License Configuration Summary Page: skipped"                autoSetupLog "[strTableGet LICCFG_DLGMSG_1]"            } else {                autoSetupLog "NodeLocked License Configuration Summary Page: skipped"                autoSetupLog "[strTableGet LICCFG_NODELOCK_DLGMSG_1]"            }             # display values            set hostIndex [lsearch $lmVals(lmHosts) $lmVals(lmHostName)]            if {$hostIndex == -1} {                set numberOfFeatures 0            } else {                set numberOfFeatures [lindex $lmHostFeaturesNum $hostIndex]            }            for {set ix 0} {$ix < [llength $lmVals(lmFeaturesTotal)]} {incr ix} {                set feature [lindex $lmVals(lmFeaturesTotal) $ix]                set featureName [lindex $feature 0]                set fHostAllocated 0                for {set ixf 0} {$ixf < $numberOfFeatures} {incr ixf} {                    # only if the feature is previously allocated on                    # this host (name match), retrieve allocated value                    if { $featureName == [lmLicProdInfoGet prodName $lmVals(lmHostName) $ixf] } {                        set fHostAllocated \                            [lmLicProdInfoGet licAllocated $lmVals(lmHostName) $ixf]                    }                }                if {$lmVals(reload)} {                    autoSetupLog "\t$featureName: $fHostAllocated license(s) \                                  after this transaction"                } elseif {$lmVals(lmLicMode) == "floating"} {                    autoSetupLog "\t$featureName: \                                  [expr [lindex $lmVals(lmFeaturesRequested) $ix] + \                                  $fHostAllocated] license(s) after this transaction"                } else { # Node Locked                    autoSetupLog "\t$featureName"                }            }        } else { # create Summary page             if {$lmVals(reload)} {                set dlgTitle "Summary: Reload Existing License File"                set dlgControls [list \                        [list label -title [strTableGet LICCFG_DLGRLD_1] \                                   -x 10 -y 10 -w 200 -h 25]]            } elseif {$isFloatLic} {                      set dlgText ""                               if {$setupVals(ELMUser) == 1} {                    set dlgTitle "Summary"                    set dlgText [strTableGet LICCFG_DLGMSG_ELM_1]                } else {                    set dlgTitle "Summary: Floating License"                    set dlgText [strTableGet LICCFG_DLGMSG_1]                }                set dlgControls [list \                        [list label -title $dlgText \                                    -x 10 -y 10 -w 200 -h 25]]            } else {                set dlgTitle "Summary: Node Locked License"                set dlgControls [list \                        [list label -title [strTableGet LICCFG_NODELOCK_DLGMSG_1] \                                    -x 10 -y 10 -w 200 -h 25]]            }                if {$isFloatLic} {                lappend dlgControls \                        [list button -name okbutt -title "OK" \                                     -x 50 -y 135 -w 50 -h 15 \                                     -callback {onLicConfirmDlg 1} ] \                        [list button -name cancelButt -title "Cancel" \                                     -x 120 -y 135 -w 50 -h 15 \                                     -callback {onLicConfirmDlg 0} ] \                        [list label -name sumCol1 \                                    -title [strTableGet LICCFG_SUMMSG_1] \                                    -x 10 -y 40 -w 60 -h 12] \                        [list label -name sumCol2 \                                    -title [strTableGet LICCFG_SUMMSG_2] \                                    -x 100 -y 37 -w 69 -h 23] \                        [list frame -name frm2 -gray \                                    -x 10 -y 57 -w 190 -h 1] \                        [list label -name floatSummary1 -title "" -left \                                    -x 10 -y 63 -w 90 -h 60] \                        [list label -name floatSummary2 -title "" -right \                                    -x 105 -y 63 -w 25 -h 60] \                        [list frame -name frm2 -gray \                                    -x 10 -y 129 -w 190 -h 1]            } else {                                lappend dlgControls \                        [list button -name okbutt -title "OK" \                                                             -x 50 -y 135 -w 50 -h 15 \                                                 -callback {onLicConfirmDlg 1} ] \                        [list button -name cancelButt -title "Cancel" \                                             -x 120 -y 135 -w 50 -h 15 \                                                 -callback {onLicConfirmDlg 0} ] \                        [list label -name nodelockSummary -title "" -left  \                                    -x 25 -y 45 -w 190 -h 62]              }             # create the dialog box             dialogCreate \                    -name licConfirmDlg \                    -init licConfirmDlgInit \                    -parent $ctrlVals(mainWindow) \                    -title $dlgTitle\                    -width 220 -height 160 \                    -controls $dlgControls         }    } else { # text mode        # find the maximum width of the product names        set nameWidth [string length "Licensed Product"]        foreach name $lmVals(lmLicensedProductNames) {            if { [string length $name] > $nameWidth } {                set nameWidth [string length $name]            }        }        # print summary page text        if {$lmVals(reload)} {            printPageTitle "[strTableGet LICCFG_TITLE_RELOAD]: Summary"            puts "[strTableGet LICCFG_DLGRLD_1]\n"            puts [format "%-*s     %s" $nameWidth "Licensed Product" "Total licenses after"]            puts [format "%-*s     %s\r\n" $nameWidth "" "  this transaction "]        } elseif {$isFloatLic} {                printPageTitle "[strTableGet LICCFG_TITLE_FLOATING]: Summary"            puts "[strTableGet LICCFG_DLGMSG_1]\n\n"            puts [format "%-*s     %s" $nameWidth "Licensed Product" "Total licenses after"]            puts [format "%-*s     %s\r\n" $nameWidth "" "  this transaction "]        } else { # NODELOCK            printPageTitle "[strTableGet LICCFG_TITLE_NODELOCKED]: Summary"            puts "[strTableGet LICCFG_NODELOCK_DLGMSG_1]\n"         }        # display values        set hostIndex [lsearch $lmVals(lmHosts) $lmVals(lmHostName)]        if {$hostIndex == -1} {            set numberOfFeatures 0        } else {            set numberOfFeatures [lindex $lmHostFeaturesNum $hostIndex]        }        for {set ix 0} {$ix < [llength $lmVals(lmFeaturesTotal)]} {incr ix} {            set feature [lindex $lmVals(lmFeaturesTotal) $ix]            set featureName [lindex $feature 0]            set fHostAllocated 0            for {set ixf 0} {$ixf < $numberOfFeatures} {incr ixf} {                # only if the feature is previously allocated on this host                # (name match), retrieve allocated value                if { $featureName == [lmLicProdInfoGet prodName $lmVals(lmHostName) $ixf] } {                    set fHostAllocated \                        [lmLicProdInfoGet licAllocated $lmVals(lmHostName) $ixf]                }            }            if {$lmVals(reload)} {                puts [format "%-*s             %4s" $nameWidth $featureName $fHostAllocated]            } elseif {$isFloatLic} {                     puts [format "%-*s             %4s" $nameWidth $featureName\                      [expr [lindex $lmVals(lmFeaturesRequested) $ix] + $f

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -