Mercurial > hg > ltpda
view m-toolbox/m/gui/ltpdv/callbacks/ltpdv_server_get_data.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line source
function a = ltpdv_server_get_data(mainfig) % Get times times = ltpdv_server_get_times(mainfig); % Get server details [dtype, server, port, rds, cal, stat] = ltpdv_server_get_server(mainfig); spl = plist('Type', dtype, 'SERVER', server, 'port', port); % Get selected channels chans = ltpdv_server_get_channels(mainfig); % Loop over times and channels a = []; for k=1:length(times) ts = times(k); start = char(ts.startT); nsecs = ts.endT-ts.startT+1; % Loop over channels for j=1:length(chans) chan = chans{j}; disp(sprintf('=== Getting %s | %s [%ds]', chan, start, nsecs)); na = ao(spl, plist('channels', chan, 'starttime', start, 'nsecs', nsecs)); a = [a na]; end % End chans loop end % End time loop