cmd下执行tclsh tc_auto.tcl
报错原码
PS E:\liqiang\epon_script_fullmask\es3> tclsh tc_auto.tcl
Error Occured while loading the Spirent Automation Internal Utility Library (couldn't load library "C:/Program Files (x86)/Spirent Communications/Spirent TestCenter 4.73/Spirent TestCenter Application/sTcl.dll": Bad exe format. Possibly a 32/64-bit mismatch.).
invalid command name "stc_int::salGet"
while executing
"stc_int::salGet $handle $args "
(procedure "stc::get" line 2)
invoked from within
"stc::get automationoptions -suppressTclErrors"
(procedure "wrap_proc" line 11)
invoked from within
"wrap_proc ::stc::perform { commandName args } {
set result [ stc_int::salPerform $commandName $args ]
if { [llength $result] == 1 } { join $re..."
(file "C:\Program Files (x86)\Spirent Communications\Spirent TestCenter 4.73\Spirent TestCenter Application\SpirentTestCenter.tcl" line 136)
invoked from within
"source {C:\Program Files (x86)\Spirent Communications\Spirent TestCenter 4.73\Spirent TestCenter Application\SpirentTestCenter.tcl}"
(file "tc_auto.tcl" line 10)
PS E:\liqiang\epon_script_fullmask\es3>
tcl脚本部分源码
#!/bin/sh
# aTemplate.tcl \
exec tclsh "$0" ${1+"$@"}
#-----------------------------------------------------
#
#
#-----------------------------------------------------
#引用STC API ,SpirentTestCenter.tcl的路径
source {C:\Program Files (x86)\Spirent Communications\Spirent TestCenter 4.73\Spirent TestCenter Application\SpirentTestCenter.tcl}
#开启日志,-logTo :日志保存路径 ,使用stdout为标准输出; -loglevel : 可选 DEBUG、 INFO 、WARN 和 ERROR 四种;
stc::config automationoptions -logTo "aTemplateLog.txt" -logLevel DEBUG
#配置机框Ip 槽位 端口号