📄 test.tcl
字号:
proc ShowPortInstProp {PortInst} { global fp puts $fp " <---- properties ----" puts $fp " npiName=[npi_get $PortInst -npiName]" puts $fp " npiFullName=[npi_get $PortInst -npiFullName]" puts $fp " npiType=[npi_get $PortInst -npiType]" puts $fp " npiFile=[npi_get $PortInst -npiFile]" puts $fp " npiLineNo=[npi_get $PortInst -npiLineNo]" puts $fp " npiPortIndex=[npi_get $PortInst -npiPortIndex]" puts $fp " npiDirection=[npi_get $PortInst -npiDirection]" puts $fp " npiSize=[npi_get $PortInst -npiSize]" puts $fp " npiIsConnByName=[npi_get $PortInst -npiIsConnByName]" puts $fp " npiIsExplicitName=[npi_get $PortInst -npiIsExplicitName]" puts $fp " npiIsVector=[npi_get $PortInst -npiIsVector]" puts $fp " npiIsScalar=[npi_get $PortInst -npiIsScalar]" puts $fp " >---- properties ----"}proc foreach_IterateHandle {iter_handle iter_type} { global fp puts $fp " <---$iter_type --->" set Object_Handle [npi_scan $iter_handle] while {$Object_Handle != "NULL"} { puts $fp " <---begin scan \$iter_handle--->" puts $fp " Type = [npi_get $Object_Handle -npiType]" puts $fp " Name = [npi_get $Object_Handle -npiName]" puts $fp " LineNo = [npi_get $Object_Handle -npiLineNo]" puts $fp " <---end of scan \$iter_handle--->" set Object_Handle [npi_scan $iter_handle] } puts $fp " <---end of $iter_type --->"}proc ShowHandleProp {Handle type} { global fp puts $fp " <---$type --->" if {$Handle != "NULL"} { puts $fp " Type = [npi_get $Handle -npiType]" puts $fp " Name = [npi_get $Handle -npiName]" puts $fp " LineNo = [npi_get $Handle -npiLineNo]" } puts $fp " <---end of $type --->"}proc ShowPortInstRelationship {PortInst} { global fp puts $fp " <---relationship --->" set Inst [npi_handle $PortInst -npiType npiInst] ShowHandleProp $Inst Inst set HighConn [npi_handle $PortInst -npiType npiHighConn] ShowHandleProp $HighConn HighConn set LowConn [npi_handle $PortInst -npiType npiLowConn] ShowHandleProp $LowConn LowConn set Port [npi_handle $PortInst -npiType npiPort] ShowHandleProp $Port Port puts $fp " <---end of relationship --->"}proc ShowPortInstPropAndRelationship {} { global g_PortInst global fp set PortInst $g_PortInst puts $fp "<---begin showing PortInst information--->" ShowPortInstProp $PortInst ShowPortInstRelationship $PortInst puts $fp "<---end of showing PortInst information--->"} set log_file [file join [file dirname [info script]] [file tail [info script]].out]set fp [open $log_file w]fconfigure $fp -buffering nonenpi_register_cb -npiModuleBased PortInst ShowPortInstPropAndRelationshipnpi_traverse_model -npiModuleBasedclose $fp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -