-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathlsl_resolve_all.m
31 lines (28 loc) · 1.3 KB
/
lsl_resolve_all.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function streaminfos = lsl_resolve_all(lib,timeout)
% [Streaminfos] = lsl_resolve_all(LibHandle,Timeout)
% Resolve all streams on the network.
%
% This function returns all currently available streams from any outlet on the network.
% The network is usually the subnet specified at the local router, but may also include
% a multicast group of machines (given that the network supports it), or list of hostnames.
% These details may optionally be customized by the experimenter in a configuration file
% (see Network Connectivity in the LSL wiki).
% This is the default mechanism used by the browsing programs and the recording program.
%
% In:
% LibHandle : handle to the API library, as obtained via lsl_loadlib();
%
% Timeout : The timeout for the operation, in seconds.
%
% Out
% Streaminfos : A cell array of stream info objects (excluding their desc field), any of which can
% subsequently be used to open an inlet. The full info can be retrieved from the
% inlet.
if ~exist('timeout','var') || isempty(timeout)
timeout = 3.0; end
% first do a raw resolve
tmpresults = lsl_resolve_all_(lib,timeout);
% create an lsl_streaminfo instance for each result
streaminfos = cell(1,length(tmpresults));
for r=1:length(tmpresults)
streaminfos{r} = lsl_streaminfo(lib,tmpresults(r)); end