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

📄 lmconfig.tcl

📁 vxworks下MV5500的BSP支持包。是支持tornad221下的版本。
💻 TCL
📖 第 1 页 / 共 2 页
字号:
## RETURNS: N/A## ERRORS: N/A#proc licDetailsDlgInit {} {    global infoStr    controlValuesSet licDetailsDlg.hostLicenseInfo $infoStr    controlFocusSet licDetailsDlg.ok}############################################################################### onLmDetails - callback for details button## This procedure will display server information for the selected server## SYNOPSIS# .tS# onLmDetails# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc onLmDetails {} {    global lmVals setupVals ctrlVals    set len [llength $lmVals(lmHostSelected)]    if {$len == 0} {        return    }    # compile the information to be displayed from the lmHostRecs    compileHostDetails    # display a dialog with the details of hosts selected    set controls   [list \        [list label -name msg1 \                    -title [strTableGet LMCONFIG_DETAILS_LABEL_1] \                    -x 10 -y 10 -w 200 -h 20] \        [list text -name hostLicenseInfo \                    -multiline -vscroll -readonly \                    -x 10 -y 40 -w 200 -h 60] \        [list button -name ok \                    -title "&OK" -default \                    -callback {windowClose licDetailsDlg} \                    -x 85 -y 110 -w 50 -h 14] \       ]    dialogCreate \        -name licDetailsDlg \        -title [strTableGet LMCONFIG_DETAILS_TITLE] \        -init licDetailsDlgInit \        -parent $ctrlVals(parentDialog) \        -helpfile $setupVals(setupHelp) \        -width 220 -height 130 \        -controls $controls}############################################################################### compileHostDetails - get host details to be displayed for selected hosts## This procedure will place the selected servers to the selected colunm## SYNOPSIS# .tS# compileHostDetails# .tE## PARAMETERS: N/A## RETURNS: A string containing the information to be displayed#   Host: xxx#           Licensed Product: prodname featureId#           Number of Licenses: xx#   ...## ERRORS: N/A#proc compileHostDetails {} {    global lmVals lmHostRecs lmHostRecsLen    global infoStr lmHostFeaturesNum    set hostInfo ""    for {set ix 0} {$ix < [llength $lmVals(lmHostSelected)]} {incr ix} {        set hostName [lindex $lmVals(lmHostSelected) $ix]        for {set i 0} {$i < $lmHostRecsLen} {incr i} {            if {$hostName == [lmLicHostInfoGet hostName $i]} {                break            }        }        set port [lmLicHostInfoGet hostPort $ix]        if {$port == 0} {set port "default=27000"}        append hostInfo [format "%s  %s\r\n" "Host: $hostName" \                "Port: $port"]        append hostInfo [format "    %s\r\n" "Licensed Product(s)"]        for {set pix 0} {$pix < [lindex $lmHostFeaturesNum $i]} {incr pix} {            if {[lmLicProdInfoGet licFLAllocated $hostName $pix] != 0} {                append hostInfo [format "\t%s: " \                    [lmLicProdInfoGet prodName $hostName $pix]]                append hostInfo [format " %s license(s)\r\n" \                    [lmLicProdInfoGet licFLAllocated $hostName $pix]]                }           }        append hostInfo [format "\r\n"]    }    set infoStr $hostInfo}############################################################################### onLmAddServers - callback for the "-->" button to add servers to selected## This procedure will place the selected servers to the selected colunm## SYNOPSIS# .tS# onLmAddServers# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc onLmAddServers {} {    global lmVals    for {set ix 0} {$ix < [llength $lmVals(lmHostSelected)]} {incr ix} {        set index [lsearch $lmVals(lmAvailHosts) [lindex $lmVals(lmHostSelected) $ix]]        if {[lsearch $lmVals(lmHostOrder) \                [lindex $lmVals(lmHostSelected) $ix]] == -1} {            set lmVals(lmAvailHosts) [lreplace $lmVals(lmAvailHosts) $index $index]            lappend lmVals(lmHostOrder) [lindex $lmVals(lmHostSelected) $ix]            controlEnable wizardDialog.lmRemoveServers 1            if {[llength $lmVals(lmHostOrder)] > 1} {                controlEnable wizardDialog.lmUp 1                controlEnable wizardDialog.lmDown 1            }        }    }    controlValuesSet wizardDialog.lmSelServers $lmVals(lmHostOrder)    controlValuesSet wizardDialog.lmAvailServers $lmVals(lmAvailHosts)    if {[llength $lmVals(lmAvailHosts)] == 0} {        controlEnable wizardDialog.lmAddServers 0        set lmVals(lmAvailHosts) {}    }    set lmVals(lmHostSelected) {}    controlEnable wizardDialog.lmDetailsButton 0        # enable the next button        controlEnable wizardDialog.nextButt 1}############################################################################### onLmRemoveServers - callback to remove the selected server from the selected#                     to the available list.## This procedure will place the selected server(s) to the available server list.## SYNOPSIS# .tS# onLmRemoveServers# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc onLmRemoveServers {} {    global lmVals    for {set ix 0} {$ix < [llength $lmVals(lmHostSelected)]} {incr ix} {        set index [lsearch $lmVals(lmHostOrder) [lindex $lmVals(lmHostSelected) $ix]]        if {[lsearch $lmVals(lmAvailHosts) \                [lindex $lmVals(lmHostSelected) $ix]] == -1} {            set lmVals(lmHostOrder) [lreplace $lmVals(lmHostOrder) $index $index]            lappend lmVals(lmAvailHosts) [lindex $lmVals(lmHostSelected) $ix]            controlEnable wizardDialog.lmAddServers 1            if {[llength $lmVals(lmHostOrder)] < 2} {                controlEnable wizardDialog.lmUp 0                controlEnable wizardDialog.lmDown 0            }        }    }    controlValuesSet wizardDialog.lmSelServers $lmVals(lmHostOrder)    controlValuesSet wizardDialog.lmAvailServers $lmVals(lmAvailHosts)    if {[llength $lmVals(lmHostOrder)] == 0} {        controlEnable wizardDialog.lmRemoveServers 0        controlEnable wizardDialog.lmUp 0        controlEnable wizardDialog.lmDown 0        set lmVals(lmHostOrder) {}                                # disable the next button                controlEnable wizardDialog.nextButt 0    }    set lmVals(lmHostSelected) {}    controlEnable wizardDialog.lmDetailsButton 0}############################################################################### onLmUp - callback to handle Up button## This procedure will move the selected server to the next higher position# in the selected servers list box.## SYNOPSIS# .tS# onLmUp# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc onLmUp {} {    global lmVals    if {[llength $lmVals(lmHostSelected)] == 0 || \        [llength $lmVals(lmHostOrder)] == 1} {        return    }    # create an indexed list of hosts    for {set ix 0} {$ix < [llength $lmVals(lmHostOrder)]} {incr ix} {        set indexedHosts($ix) [lindex $lmVals(lmHostOrder) $ix]    }    set ix 0    while {$ix < [llength lmVals(lmHostOrder)]} {      for {set ixs 0} {$ixs < [llength $lmVals(lmHostSelected)]} {incr ixs} {        foreach {key value} [array get indexedHosts] {            if {$value == [lindex $lmVals(lmHostSelected) $ixs]} {                # found a match, delete it from lmHostOrder and reinsert higher                set lmVals(lmHostOrder) [lreplace $lmVals(lmHostOrder) $key $key]                set lmVals(lmHostOrder) [linsert $lmVals(lmHostOrder) \                    [expr $key - 1] $value]            }          }          incr ix        }    }    controlValuesSet wizardDialog.lmSelServers ""    for {set ix 0} {$ix < [llength $lmVals(lmHostOrder)]} {incr ix} {        controlValuesSet wizardDialog.lmSelServers -append [lindex $lmVals(lmHostOrder) $ix]    }    controlEnable wizardDialog.lmDetailsButton 0    set lmVals(lmHostSelected) {}    }############################################################################### onLmDown - callback to handle the Down button## This procedure will move the selected server down one position in the # selected servers list box.## SYNOPSIS# .tS# onLmDown# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc onLmDown {} {    global lmVals    if {[llength $lmVals(lmHostSelected)] == 0 || \        [llength $lmVals(lmHostOrder)] == 1} {        return    }    if {[llength $lmVals(lmHostOrder)] != 0} {        controlEnable wizardDialog.lmDown 1    }    # create an indexed list of hosts    for {set ix 0} {$ix < [llength $lmVals(lmHostOrder)]} {incr ix} {        set indexedHosts($ix) [lindex $lmVals(lmHostOrder) $ix]    }    set ix 0    while {$ix < [llength lmVals(lmHostOrder)]} {      for {set ixs 0} {$ixs < [llength $lmVals(lmHostSelected)]} {incr ixs} {        foreach {key value} [array get indexedHosts] {            if {$value == [lindex $lmVals(lmHostSelected) $ixs]} {                # found a match, insert it higher                set lmVals(lmHostOrder) [linsert $lmVals(lmHostOrder) \                    [expr $key + 2] $value]                set lmVals(lmHostOrder) [lreplace $lmVals(lmHostOrder) $key $key]            }          }          incr ix        }    }    controlValuesSet wizardDialog.lmSelServers ""    for {set ix 0} {$ix < [llength $lmVals(lmHostOrder)]} {incr ix} {        controlValuesSet wizardDialog.lmSelServers -append [lindex $lmVals(lmHostOrder) $ix]    }    controlEnable wizardDialog.lmDetailsButton 0    set lmVals(lmHostSelected) {}    }############################################################################### pageProcess(lmConfig) - process inputs from lmConfig page## This procedure will process inputs from lmConfig page## SYNOPSIS# .tS# pageProcess(lmConfig)# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc pageProcess(lmConfig) {} {    global setupVals    global ctrlVals    # At this point, lmVals(lmHostOrder) contains the list of servers in the    # order that the user wants licenses be served    set retVal 1    return $retVal}####################################################################### Dialog Text Messages######################################################################set strTable(LMCONFIG_TITLE) "User License Management Configuration"set strTable(LMCONFIG_MSG_1) \    "Select from the list of available license server(s)\    on your network below.  Use the Up and Down buttons to change\    the order in which license servers are searched."set strTable(LMCONFIG_MSG_1_TEXT) \    "Select from the list of available license server(s)\    on your network below." set strTable(LMCONFIG_MSG_2) "Details will provide license information\    for the highlighted host."set strTable(LMCONFIG_HOST_PING_ERR_1) \        "Setup cannot establish a connection with host: "set strTable(LMCONFIG_HOST_PING_ERR_2) \        "Please check that network routine tables, or network masks\        are setup correctly for your host."set strTable(LMCONFIG_AVAIL_SERVERS_LABEL) "Available Server(s):"set strTable(LMCONFIG_SEL_SERVERS_LABEL) "Selected Server(s):"set strTable(LMCONFIG_DETAILS_TITLE) "Selected Hosts License Information"set strTable(LMCONFIG_DETAILS_LABEL_1) \        "Setup has detected the following license configurations for\        the following host(s):"set strTable(LMCONFIG_SERVER_ACCEPT_MSG) \    "Press <Return> to accept the setting.  To change the setting,\n\     enter a list of server numbers in the order which license\n\     servers are to be accessed separated by spaces."#set strTable(LMCONFIG_NO_CONFIG) \#   "Setup has determined that [getProdInfo name] License Management has not #been\ configured for your site.  Please exit this program and contact\#    your system administrator to configure license management\#    with the Setup program, or back up to the \"License Management Options\"\#    page and configure Node Locked Licensing for this host."set strTable(LMCONFIG_NO_CONFIG) \   "Setup has determined that [getProdInfo name] License Management has\    not been configured for your site. Please exit this program and contact\    your system administrator to setup a license server on your\    site, then run Setup -L to continue your License Management\    configuration.\n\n\If you prefer a Node Locked license, go back to the\    \"License Management Options\" page and configure Node Locked\    Licensing for this host."set strTable(LMCONFIG_NO_CONFIG_ELM) \   "License Management is incomplete. Setup has detected that there are\    no license servers configured for this product. Please request that\    your system administrator set up at least one license server for\    [getProdInfo name].  Re-run Setup with the option /L to configure\    license management for your server.  Setup will now exit."    set strTable(LMCONFIG_NO_CONFIG_WARNING) \   " Setup has determined that [getProdInfo name] License Management has not been\n\   configured for your site.  Please exit this program and contact\n\   your system administrator to configure license management\n\   with the Setup program, or back up to the \"License Management Options\"\n\   page and configure Node Locked Licensing for this host.\n\n"set strTable(LMCONFIG_NO_CONFIG_ACCEPT_MSG) \   "Press <-> to backup, or type <exit> to quit Setup."

⌨️ 快捷键说明

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