public class LSL
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LSL.ArgumentException
Exception class that indicates that an invalid argument has been passed.
|
class |
LSL.ChannelFormat
Data format of a channel (each transmitted sample holds an array of channels).
|
static class |
LSL.ContinuousResolver
A convenience class that resolves streams continuously in the background throughout
its lifetime and which can be queried at any time for the set of streams that are currently
visible on the network.
|
static class |
LSL.InternalException
Exception class that indicates that an internal error has occurred inside liblsl.
|
static class |
LSL.LostException
Exception class that indicates that a stream inlet's source has been irrecoverably lost.
|
static class |
LSL.StreamInfo
The stream_info object stores the declaration of a data stream.
|
static class |
LSL.StreamInlet
A stream inlet.
|
static class |
LSL.StreamOutlet
A stream outlet.
|
static class |
LSL.TimeoutException
Exception class that indicates that a timeout has expired for an operation.
|
static class |
LSL.XMLElement
A lightweight XML element tree; models the .desc() field of stream_info.
|
Modifier and Type | Field and Description |
---|---|
static double |
DEDUCED_TIMESTAMP
Constant to indicate that a sample has the next successive time stamp.
|
static double |
FOREVER
A very large time duration (> 1 year) for timeout values.
|
static double |
IRREGULAR_RATE
Constant to indicate that a stream has variable sampling rate.
|
Constructor and Description |
---|
LSL() |
Modifier and Type | Method and Description |
---|---|
static int |
library_version()
Version of the liblsl library.
|
static double |
local_clock()
Obtain a local system time stamp in seconds.
|
static int |
protocol_version()
Protocol version.
|
static LSL.StreamInfo[] |
resolve_stream(java.lang.String pred) |
static LSL.StreamInfo[] |
resolve_stream(java.lang.String pred,
int minimum) |
static LSL.StreamInfo[] |
resolve_stream(java.lang.String pred,
int minimum,
double timeout)
Resolve all streams that match a given predicate.
|
static LSL.StreamInfo[] |
resolve_stream(java.lang.String prop,
java.lang.String value) |
static LSL.StreamInfo[] |
resolve_stream(java.lang.String prop,
java.lang.String value,
int minimum) |
static LSL.StreamInfo[] |
resolve_stream(java.lang.String prop,
java.lang.String value,
int minimum,
double timeout)
Resolve all streams with a specific value for a given property.
|
static LSL.StreamInfo[] |
resolve_streams() |
static LSL.StreamInfo[] |
resolve_streams(double wait_time)
Resolve all streams on the network.
|
public static final double IRREGULAR_RATE
public static final double DEDUCED_TIMESTAMP
public static final double FOREVER
public static int protocol_version()
public static int library_version()
public static double local_clock()
public static LSL.StreamInfo[] resolve_streams(double wait_time)
wait_time
- The waiting time for the operation, in seconds, to search for streams.
Warning: If this is too short (less than 0.5s) only a subset (or none) of the
outlets that are present on the network may be returned.public static LSL.StreamInfo[] resolve_streams()
public static LSL.StreamInfo[] resolve_stream(java.lang.String prop, java.lang.String value, int minimum, double timeout)
prop
- The stream_info property that should have a specific value (e.g., "name", "type", "source_id", or "desc/manufaturer").value
- The String value that the property should have (e.g., "EEG" as the type property).minimum
- Optionally return at least this number of streams.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.public static LSL.StreamInfo[] resolve_stream(java.lang.String prop, java.lang.String value, int minimum)
public static LSL.StreamInfo[] resolve_stream(java.lang.String prop, java.lang.String value)
public static LSL.StreamInfo[] resolve_stream(java.lang.String pred, int minimum, double timeout)
pred
- The predicate String, e.g. "name='BioSemi'" or "type='EEG' and starts-with(name,'BioSemi') and count(info/desc/channel)=32"minimum
- Return at least this number of streams.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.public static LSL.StreamInfo[] resolve_stream(java.lang.String pred, int minimum)
public static LSL.StreamInfo[] resolve_stream(java.lang.String pred)