## ----------------------------------------- # | bytestream_console.tcl # | proc bytestream_console { bs } { global sysc catch { jaclloadjava } set fs [ $sysc getVirtualFilesystem ] set root [ $fs getRoot] set cxnsRoot [ $root getChildByName connections ] set bsClass [ java::call Class forName com.altera.systemconsole.core.services.IByteStreamService ] set bsList [ $fs findDescendantsByType $cxnsRoot $bsClass ] set bsItr [ $bsList iterator ] puts "Attempting to launch a bytestream console for path $bs" while {[ $bsItr hasNext ] == 1 } { set bsNodeObject [ $bsItr next ] set bsNode [ java::cast com.altera.systemconsole.core.ISystemNode $bsNodeObject ] set bsNodeName [ $bsNode getName ] if { [ string match *MFG*ID*INST* $bsNodeName ] == 1 } { set start [ string first \[ $bsNodeName ] set end [ string first \] $bsNodeName ] incr start +1 incr end -1 set bsNodeName [ string range $bsNodeName $start $end ] } if { [ string match *$bsNodeName* $bs ] == 1 } { java::call com.altera.systemconsole.internal.plugin.gui.ByteStreamConsole createFrame $bsNode return } } puts "ERROR Bytestream service specified was not found" }