Mercurial > hg > ltpda
comparison m-toolbox/m/gui/ltpdv/callbacks/ltpdv_server_getLatest.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_getLatest(varargin) | |
2 | |
3 % Handles | |
4 myh = varargin{1}; | |
5 mainfig = varargin{end}; | |
6 | |
7 % Get server details | |
8 [dtype, server, port, rds, cal, stat] = ltpdv_server_get_server(mainfig); | |
9 | |
10 switch dtype | |
11 case 'frame data' | |
12 latest = m2fserv(server, port, 'MIN'); | |
13 case 'raw data' | |
14 latest = m2dserv(server); | |
15 case 'h(t) frames' | |
16 latest = m2fserv(server, port, 'HMIN'); | |
17 case 'hour trends' | |
18 latest = m2fserv(server, port, 'HOUR'); | |
19 case 'day trends' | |
20 latest = m2fserv(server, port, 'DAY'); | |
21 otherwise | |
22 error('### Unknown data type'); | |
23 end | |
24 | |
25 % Set start and stop times | |
26 sh = findobj(mainfig, 'Tag', 'LTPDVserverStartEdit'); | |
27 set(sh, 'String', GPS2UTC(latest)); | |
28 sh = findobj(mainfig, 'Tag', 'LTPDVserverStopEdit'); | |
29 set(sh, 'String', GPS2UTC(latest)); | |
30 ltpdv_server_set_duration(mainfig, latest, latest) |