lsl_resolve_bypred function
Resolve all streams that match a given predicate.
Advanced query that allows to impose more conditions on the retrieved streams;
the given string is an XPath 1.0 predicate
for the <info>
node (omitting the surrounding []'s)
@paramout
buffer A user-allocated buffer to hold the resolve results.
@attention It is the user's responsibility to either destroy the resulting streaminfo objects or
to pass them back to the LSL during during creation of an inlet.
@attention The stream_info's returned by the resolver are only short versions that do not include
the lsl_get_desc() field (which can be arbitrarily big). To obtain the full stream information
you need to call lsl_get_info() on the inlet after you have created one.
@param buffer_elements The user-provided buffer length.
@param pred The predicate string, e.g.
name='BioSemi'
or type='EEG' and starts-with(name,'BioSemi') and count(info/desc/channel)=32
@param minimum Return at least this number of streams.
@param timeout Optionally a timeout of the operation, in seconds (default: no timeout).
If the timeout expires, less than the desired number of streams (possibly none)
will be returned.
@return The number of results written into the buffer (never more than the provided # of slots)
or a negative number if an error has occurred (values corresponding to lsl_error_code_t).
Implementation
@ffi.Native<NativeLsl_resolve_bypred>()
external int lsl_resolve_bypred(
ffi.Pointer<lsl_streaminfo> buffer,
int buffer_elements,
ffi.Pointer<ffi.Char> pred,
int minimum,
double timeout,
);