Home > m > gui > ltpdv > callbacks > ltpdv_server_channellist.m

ltpdv_server_channellist

PURPOSE ^

Handles

SYNOPSIS ^

function ltpdv_server_channellist(varargin)

DESCRIPTION ^

 Handles

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function ltpdv_server_channellist(varargin)
0002 
0003 % Handles
0004 myh     = varargin{1};
0005 mainfig = varargin{end};
0006 
0007 % Get selected channels
0008 idx = get(myh, 'Value');
0009 if length(idx) == 1
0010 
0011    % get channel
0012    strs = cellstr(get(myh, 'String'));
0013    channel = strs{idx};
0014 
0015    % Get one second of data
0016    start = ltpdv_server_get_start_time(mainfig);
0017    stop = ltpdv_server_get_stop_time(mainfig);
0018    % Get server details
0019    [dtype, server, port, rds, cal, stat] = ltpdv_server_get_server(mainfig);
0020 
0021    switch dtype
0022       case 'frame data'
0023          pltype = 'FRAMES';
0024       case 'h(t) frames'
0025          pltype = 'HFRAMES';
0026       case 'raw data'
0027          pltype = 'RAW';
0028       case 'hour trends'
0029          pltype = 'HOUR';
0030       case 'day trends'
0031          pltype = 'DAY';
0032       case 'chour trends'
0033          pltype = 'CHOUR';
0034       case 'cday trends'
0035          pltype = 'CDAY';
0036    end
0037    
0038    if start < 0
0039       % get latest
0040       [start, chans] = ltpdv_server_get_latest_chans(mainfig);
0041    end
0042 
0043    % get AO
0044    a = geo2ao(plist('Type', pltype, 'SERVER', server, 'port', port, 'channels', channel, ...
0045                 'starttime', start, 'nsecs', 1, 'STAT', stat));
0046 
0047 else
0048 
0049 end
0050

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003