comparison m-toolbox/m/gui/ltpdv/callbacks/ltpdv_server_get_latest_chans.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 [latest, chans] = ltpdv_server_get_latest_chans(mainfig)
2
3 % Get server details
4 [dtype, server, port, rds, cal, stat] = ltpdv_server_get_server(mainfig);
5
6 switch dtype
7 case 'frame data'
8
9 latest = m2fserv(server, port, 'MIN');
10 chans = m2fserv(server, port, latest, 'MIN');
11
12 case 'raw data'
13
14 latest = m2dserv(server);
15 chans = m2dserv(server, latest);
16
17 case 'h(t) frames'
18
19 latest = m2fserv(server, port, 'HMIN');
20 chans = m2fserv(server, port, latest, 'HMIN', cal, rds);
21
22 case 'hour trends'
23
24 latest = m2fserv(server, port, 'HOUR');
25 chans = m2fserv(server, port, latest, 'HOUR');
26
27 case 'day trends'
28
29 latest = m2fserv(server, port, 'DAY');
30 chans = m2fserv(server, port, latest, 'DAY');
31
32 otherwise
33 error('### Unknown data type');
34 end