[−][src]Function lsl_sys::lsl_resolve_bypred
pub unsafe extern "C" fn lsl_resolve_bypred(
buffer: *mut lsl_streaminfo,
buffer_elements: u32,
pred: *const c_char,
minimum: i32,
timeout: f64
) -> i32
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)
@param[out] 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).