#!/bin/tclsh source session.tcl puts "Content-Type: text/xml; charset=iso-8859-1" puts "" puts -nonewline "" if {[info exists sid] && [check_session $sid]} { set ise_id 0 set show_internal 0 set show_remote 0 catch { set input $env(QUERY_STRING) set pairs [split $input &] foreach pair $pairs { if {0 != [regexp "^ise_id=(.*)$" $pair dummy val]} { set ise_id $val continue } if {0 != [regexp "^show_internal=(.*)$" $pair dummy val]} { set show_internal $val continue } if {0 != [regexp "^show_remote=(.*)$" $pair dummy val]} { set show_remote $val continue } } } set comm "var ise_id=$ise_id;\n" append comm "var show_internal=$show_internal;\n" append comm "var show_remote=$show_remote;\n" if { $ise_id != 0 } then { append comm { object obj = dom.GetObject(ise_id); if(obj.TypeName() == "HSSDP") { object oDP = obj; string dp = oDP.Name().StrValueByIndex(".", 2); Write(""); } } } else { append comm { string sDevId; string sChnId; string sDPId; foreach (sDevId, root.Devices().EnumUsedIDs()) { object oDevice = dom.GetObject(sDevId); integer iDevInterfaceId = oDevice.Interface(); object oDeviceInterface = dom.GetObject(iDevInterfaceId) boolean isRemote = ( ("HMW-RCV-50" == oDevice.HssType()) || ("HM-RCV-50" == oDevice.HssType()) || ("HmIP-RCV-50" == oDevice.HssType()) ); if( ( oDeviceInterface ) && ( oDevice.ReadyConfig() ) && ( ( isRemote == false ) || ( show_remote == 1 ) ) ) { Write(""); ! device tag schliessen foreach(sChnId, oDevice.Channels()) { object oChannel = dom.GetObject(sChnId); if ( (! oChannel.Internal()) || oChannel.Internal() ) { Write(""); foreach(sDPId, oChannel.DPs().EnumUsedIDs()) { object oDP = dom.GetObject(sDPId); if(oDP) { string dp = oDP.Name().StrValueByIndex(".", 2); if( (dp != "ON_TIME") && (dp != "INHIBIT") && (dp != "CMD_RETS") && (dp != "CMD_RETL") && (dp != "CMD_SETS") && (dp != "CMD_SETL") ) { Write(""); } } } Write(""); } } Write(""); } } } array set res [rega_script $comm] if { $res(STDOUT) != "" } { puts -nonewline $res(STDOUT) } } } else { puts -nonewline {} } puts ""