comparison m-toolbox/m/gui/ltpdv/callbacks/ltpdv_server_channellist.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 function ltpdv_server_channellist(varargin)
2
3 % Handles
4 myh = varargin{1};
5 mainfig = varargin{end};
6
7 % Get selected channels
8 idx = get(myh, 'Value');
9 if length(idx) == 1
10
11 % get channel
12 strs = cellstr(get(myh, 'String'));
13 channel = strs{idx};
14
15 % Get one second of data
16 start = ltpdv_server_get_start_time(mainfig);
17 stop = ltpdv_server_get_stop_time(mainfig);
18 % Get server details
19 [dtype, server, port, rds, cal, stat] = ltpdv_server_get_server(mainfig);
20
21 switch dtype
22 case 'frame data'
23 pltype = 'FRAMES';
24 case 'h(t) frames'
25 pltype = 'HFRAMES';
26 case 'raw data'
27 pltype = 'RAW';
28 case 'hour trends'
29 pltype = 'HOUR';
30 case 'day trends'
31 pltype = 'DAY';
32 case 'chour trends'
33 pltype = 'CHOUR';
34 case 'cday trends'
35 pltype = 'CDAY';
36 end
37
38 if start < 0
39 % get latest
40 [start, chans] = ltpdv_server_get_latest_chans(mainfig);
41 end
42
43 % get AO
44 a = geo2ao(plist('Type', pltype, 'SERVER', server, 'port', port, 'channels', channel, ...
45 'starttime', start, 'nsecs', 1, 'STAT', stat));
46
47 else
48
49 end
50