'Additional fio comment' function

The following script can be part of /online_dir/TkIrc.pl. The function returns a string. In practice the string may be constructed from some values that are created at run-time.

sub Spectra::fio_comments
{
    my ($status, $ret, $line); 
    $line = " "; 
    foreach my $adr( qw( 10 11 12))
    {
        gpib_write( $adr, "U0X"); 
        $status = gpib_read( $adr, 30); 
        $ret = substr( $status, 24, 3);
        $line .= " K_$adr $ret"; 
    }
    return $line;
}

A SCAN GQE can have up to 10 lines of comment. However, it is possible to write some unofficial comment lines into the fio file. These lines have to be preceeded by an exclamation mark (!).

Here is a second example. It demonstrates how Tango attributes are read:

sub Spectra::fio_comments
{
    my $line = " "; 
    if( search_device( "mca10"))
    {
	$line .= "MCA10 live " . 
	    Spectra::tng_attrDoubleRd( "MCA10", "livetime") . 
	    " real " . 
	    Spectra::tng_attrDoubleRd( "MCA10", "realtime"); 
    }
    if( search_device( "mca11"))
    {
	$line .= ", MCA11 live " . 
	    Spectra::tng_attrDoubleRd( "MCA11", "livetime") . 
	    " real " . 
	    Spectra::tng_attrDoubleRd( "MCA11", "realtime"); 
    }
    return $line;
}