[−][src]Crate lsl_sys
Structs
lsl_continuous_resolver_ | |
lsl_inlet_struct_ | |
lsl_outlet_struct_ | |
lsl_streaminfo_struct_ | |
lsl_xml_ptr_struct_ |
Constants
lsl_channel_format_t_cft_double64 | For universal numeric data as long as permitted by network & disk budget. The largest representable integer is 53-bit. |
lsl_channel_format_t_cft_float32 | For up to 24-bit precision measurements in the appropriate physical unit (e.g., microvolts). Integers from -16777216 to 16777216 are represented accurately. |
lsl_channel_format_t_cft_int8 | For binary signals or other coded data. Not recommended for encoding string data. |
lsl_channel_format_t_cft_int16 | For very high rate signals (40Khz+) or consumer-grade audio. For professional audio float is recommended. |
lsl_channel_format_t_cft_int32 | For high-rate digitized formats that require 32-bit precision. Depends critically on meta-data to represent meaningful units. Useful for application event codes or other coded data. |
lsl_channel_format_t_cft_int64 | For now only for future compatibility. Support for this type is not yet exposed in all languages. Also, some builds of liblsl will not be able to send or receive data of this type. |
lsl_channel_format_t_cft_string | For variable-length ASCII strings or data blobs, such as video frames, complex event descriptions, etc. |
lsl_channel_format_t_cft_undefined | ! Can not be transmitted. |
lsl_error_code_t_lsl_argument_error | ! An argument was incorrectly specified (e.g., wrong format or wrong length). |
lsl_error_code_t_lsl_internal_error | ! Some other internal error has happened. |
lsl_error_code_t_lsl_lost_error | ! The stream has been lost. |
lsl_error_code_t_lsl_no_error | ! No error occurred |
lsl_error_code_t_lsl_timeout_error | ! The operation failed due to a timeout. |
lsl_processing_options_t_proc_ALL | ! The combination of all possible post-processing options. |
lsl_processing_options_t_proc_clocksync | Perform automatic clock synchronization; equivalent to manually adding the time_correction() value to the received time stamps. |
lsl_processing_options_t_proc_dejitter | Remove jitter from time stamps. |
lsl_processing_options_t_proc_monotonize | Force the time-stamps to be monotonically ascending. |
lsl_processing_options_t_proc_none | No automatic post-processing; return the ground-truth time stamps for manual post-processing. This is the default behavior of the inlet. |
lsl_processing_options_t_proc_threadsafe | Post-processing is thread-safe (same inlet can be read from by multiple threads); uses somewhat more CPU. |
Functions
lsl_append_child⚠ | Append a child element with the specified name. |
lsl_append_child_value⚠ | Append a child node with a given name, which has a (nameless) plain-text child with the given text value. |
lsl_append_copy⚠ | Append a copy of the specified element as a child. |
lsl_child⚠ | Get a child with a specified name. |
lsl_child_value⚠ | Get child value (value of the first child that is text). |
lsl_child_value_n⚠ | Get child value of a child with a specified name. |
lsl_close_stream⚠ | Drop the current data stream. |
lsl_copy_streaminfo⚠ | Copy an existing streaminfo object (rarely used). |
lsl_create_continuous_resolver⚠ | Construct a new #lsl_continuous_resolver that resolves all streams on the network. |
lsl_create_continuous_resolver_bypred⚠ | Construct a new lsl_continuous_resolver that resolves all streams that match a given XPath 1.0 predicate. |
lsl_create_continuous_resolver_byprop⚠ | Construct a new lsl_continuous_resolver that resolves all streams with a specific value for a given property. |
lsl_create_inlet⚠ | Construct a new stream inlet from a resolved stream info. @param info A resolved stream info object (as coming from one of the resolver functions). @note The inlet makes a copy of the info object at its construction. @note The stream_inlet may also be constructed with a fully-specified stream_info, if the desired channel format and count is already known up-front, but this is strongly discouraged and should only ever be done if there is no time to resolve the stream up-front (e.g., due to limitations in the client program). @param max_buflen Optionally the maximum amount of data to buffer (in seconds if there is a nominal sampling rate, otherwise x100 in samples). |
lsl_create_outlet⚠ | Establish a new stream outlet. This makes the stream discoverable. @param info The stream information to use for creating this stream. Stays constant over the lifetime of the outlet. @note the outlet makes a copy of the streaminfo object upon construction (so the old info should still be destroyed.) @param chunk_size Optionally the desired chunk granularity (in samples) for transmission. If specified as 0, each push operation yields one chunk. Stream recipients can have this setting bypassed. @param max_buffered Optionally the maximum amount of data to buffer (in seconds if there is a nominal sampling rate, otherwise x100 in samples). A good default is 360, which corresponds to 6 minutes of data. Note that, for high-bandwidth data you will almost certainly want to use a lower value here to avoid running out of RAM. @return A newly created lsl_outlet handle or NULL in the event that an error occurred. |
lsl_create_streaminfo⚠ | Construct a new streaminfo object. |
lsl_destroy_continuous_resolver⚠ | Destructor for the continuous resolver. |
lsl_destroy_inlet⚠ | Destructor. The inlet will automatically disconnect if destroyed. |
lsl_destroy_outlet⚠ | Destroy an outlet. The outlet will no longer be discoverable after destruction and all connected inlets will stop delivering data. |
lsl_destroy_streaminfo⚠ | Destroy a previously created streaminfo object. |
lsl_destroy_string⚠ | Deallocate a string that has been transferred to the application. |
lsl_empty⚠ | Whether this node is empty. |
lsl_first_child⚠ | Get the first child of the element. |
lsl_get_channel_bytes⚠ | Number of bytes occupied by a channel (0 for string-typed channels). |
lsl_get_channel_count⚠ | Number of channels of the stream. A stream has at least one channels; the channel count stays constant for all samples. |
lsl_get_channel_format⚠ | Channel format of the stream. All channels in a stream have the same format. However, a device might offer multiple time-synched streams each with its own format. |
lsl_get_created_at⚠ | Creation time stamp of the stream. |
lsl_get_desc⚠ | Extended description of the stream. |
lsl_get_fullinfo⚠ | Retrieve the complete information of the given stream, including the extended description. Can be invoked at any time of the stream's lifetime. @param in The lsl_inlet object to act on. @param timeout Timeout of the operation. Use LSL_FOREVER to effectively disable it. @param[out] ec Error code: if nonzero, can be either lsl_timeout_error (if the timeout has expired) or #lsl_lost_error (if the stream source has been lost). @return A copy of the full streaminfo of the inlet or NULL in the event that an error happened. @note It is the user's responsibility to destroy it when it is no longer needed. |
lsl_get_hostname⚠ | Hostname of the providing machine (once bound to an outlet). Modification is not permitted. |
lsl_get_info⚠ | Retrieve a handle to the stream info provided by this outlet. This is what was used to create the stream (and also has the Additional Network Information fields assigned). @return A copy of the streaminfo of the outlet or NULL in the event that an error occurred. @note It is the user's responsibility to destroy it when it is no longer needed. @sa lsl_destroy_string() |
lsl_get_name⚠ | Name of the stream. |
lsl_get_nominal_srate⚠ | Sampling rate of the stream, according to the source (in Hz). |
lsl_get_sample_bytes⚠ | Number of bytes occupied by a sample (0 for string-typed channels). |
lsl_get_session_id⚠ | Session ID for the given stream. |
lsl_get_source_id⚠ | Unique identifier of the stream's source, if available. |
lsl_get_type⚠ | Content type of the stream. |
lsl_get_uid⚠ | Unique ID of the stream outlet (once assigned). |
lsl_get_version⚠ | Protocol version used to deliver the stream. |
lsl_get_xml⚠ | Retrieve the entire streaminfo in XML format. |
lsl_have_consumers⚠ | Check whether consumers are currently registered. While it does not hurt, there is technically no reason to push samples if there is no consumer. |
lsl_is_text⚠ | Whether this is a text body (instead of an XML element). True both for plain char data and CData. |
lsl_last_child⚠ | Get the last child of the element. |
lsl_library_info⚠ | Get a string containing library information. |
lsl_library_version⚠ | Version of the liblsl library. |
lsl_local_clock⚠ | Obtain a local system time stamp in seconds. |
lsl_name⚠ | Name of the element. |
lsl_next_sibling⚠ | Get the next sibling in the children list of the parent node. |
lsl_next_sibling_n⚠ | Get the next sibling with the specified name. |
lsl_open_stream⚠ | Subscribe to the data stream. |
lsl_parent⚠ | Get the parent node. |
lsl_prepend_child⚠ | Prepend a child element with the specified name. |
lsl_prepend_child_value⚠ | Prepend a child node with a given name, which has a (nameless) plain-text child with the given text value. |
lsl_prepend_copy⚠ | Prepend a child element with the specified name. |
lsl_previous_sibling⚠ | Get the previous sibling in the children list of the parent node. |
lsl_previous_sibling_n⚠ | Get the previous sibling with the specified name. |
lsl_protocol_version⚠ | Protocol version. |
lsl_pull_chunk_buf⚠ | Pull a chunk of data from the inlet and read it into an array of binary strings. |
lsl_pull_chunk_c⚠ | |
lsl_pull_chunk_d⚠ | |
lsl_pull_chunk_f⚠ | Pull a chunk of data from the inlet and read it into a buffer. |
lsl_pull_chunk_i⚠ | |
lsl_pull_chunk_l⚠ | |
lsl_pull_chunk_s⚠ | |
lsl_pull_chunk_str⚠ | |
lsl_pull_sample_buf⚠ | @copydoc lsl_pull_sample_f These strings may contains 0's, therefore the lengths are read into the buffer_lengths array. @param buffer_lengths A pointer to an array that holds the resulting lengths for each returned binary string. |
lsl_pull_sample_c⚠ | |
lsl_pull_sample_d⚠ | |
lsl_pull_sample_f⚠ | Pull a sample from the inlet and read it into a pointer to values.
Handles type checking & conversion.
@param in The #lsl_inlet object to act on.
@param[out] buffer A pointer to hold the resulting values.
@param buffer_elements The number of samples allocated in the buffer.
@attention It is the responsibility of the user to allocate enough memory.
@param timeout The timeout for this operation, if any.
Use #LSL_FOREVER to effectively disable it. It is also permitted to use 0.0 here;
in this case a sample is only returned if one is currently buffered.
@param[out] ec Error code: can be either no error or #lsl_lost_error
(if the stream source has been lost). |
lsl_pull_sample_i⚠ | |
lsl_pull_sample_l⚠ | |
lsl_pull_sample_s⚠ | |
lsl_pull_sample_str⚠ | |
lsl_pull_sample_v⚠ | Pull a sample from the inlet and read it into a custom struct or buffer. |
lsl_push_chunk_buf⚠ | @copybrief lsl_push_chunk_ftp
@sa lsl_push_chunk_ftp
@param out The lsl_outlet object through which to push the data.
@param data An array of channel values holding the data to push.
@param lengths Pointer the number of elements to push for each value (string lengths) so that
|
lsl_push_chunk_buft⚠ | @copydoc lsl_push_chunk_buf @sa lsl_push_chunk_ftp @sa lsl_push_chunk_buf @param timestamp Optionally the capture time of the most recent sample, in agreement with lsl_local_clock(); if omitted, the current time is used. The time stamps of other samples are automatically derived based on the sampling rate of the stream. |
lsl_push_chunk_buftn⚠ | @copydoc lsl_push_chunk_buf @sa lsl_push_chunk_ftp @sa lsl_push_chunk_buf @param timestamps Buffer holding one time stamp for each sample in the data buffer. |
lsl_push_chunk_buftnp⚠ | @copydoc lsl_push_chunk_buftn @sa lsl_push_chunk_ftp @sa lsl_push_chunk_buf @param pushthrough Whether to push the chunk through to the receivers instead of buffering it with subsequent samples. Note that the chunk_size, if specified at outlet construction, takes precedence over the pushthrough flag. |
lsl_push_chunk_buftp⚠ | @copydoc lsl_push_chunk_buft @sa lsl_push_chunk_ftp @sa lsl_push_chunk_buf @param pushthrough Whether to push the chunk through to the receivers instead of buffering it with subsequent samples. Note that the chunk_size, if specified at outlet construction, takes precedence over the pushthrough flag. |
lsl_push_chunk_c⚠ | |
lsl_push_chunk_ct⚠ | |
lsl_push_chunk_ctn⚠ | |
lsl_push_chunk_ctnp⚠ | |
lsl_push_chunk_ctp⚠ | |
lsl_push_chunk_d⚠ | |
lsl_push_chunk_dt⚠ | |
lsl_push_chunk_dtn⚠ | |
lsl_push_chunk_dtnp⚠ | |
lsl_push_chunk_dtp⚠ | |
lsl_push_chunk_f⚠ | Push a chunk of multiplexed samples into the outlet. One timestamp per sample is provided. |
lsl_push_chunk_ft⚠ | @copydoc lsl_push_chunk_f @param timestamp Optionally the capture time of the most recent sample, in agreement with lsl_local_clock(); if omitted, the current time is used. The time stamps of other samples are automatically derived based on the sampling rate of the stream. @{ |
lsl_push_chunk_ftn⚠ | @} ** @copydoc lsl_push_chunk_f |
lsl_push_chunk_ftnp⚠ | @copydoc lsl_push_chunk_ftn @param pushthrough Whether to push the chunk through to the receivers instead of buffering it with subsequent samples. Note that the chunk_size, if specified at outlet construction, takes precedence over the pushthrough flag. @{ |
lsl_push_chunk_ftp⚠ | @copydoc lsl_push_chunk_ft @param pushthrough Whether to push the chunk through to the receivers instead of buffering it with subsequent samples. Note that the chunk_size, if specified at outlet construction, takes precedence over the pushthrough flag. @{ |
lsl_push_chunk_i⚠ | |
lsl_push_chunk_it⚠ | |
lsl_push_chunk_itn⚠ | |
lsl_push_chunk_itnp⚠ | |
lsl_push_chunk_itp⚠ | |
lsl_push_chunk_l⚠ | |
lsl_push_chunk_lt⚠ | |
lsl_push_chunk_ltn⚠ | |
lsl_push_chunk_ltnp⚠ | |
lsl_push_chunk_ltp⚠ | |
lsl_push_chunk_s⚠ | |
lsl_push_chunk_st⚠ | |
lsl_push_chunk_stn⚠ | |
lsl_push_chunk_stnp⚠ | |
lsl_push_chunk_stp⚠ | |
lsl_push_chunk_str⚠ | |
lsl_push_chunk_strt⚠ | |
lsl_push_chunk_strtn⚠ | |
lsl_push_chunk_strtnp⚠ | |
lsl_push_chunk_strtp⚠ | |
lsl_push_sample_buf⚠ | @copybrief lsl_push_sample_ftp @see lsl_push_sample_ftp @param out The lsl_outlet object through which to push the data. @param data A pointer to values to push. The number of values pointed to must be no less than the number of channels in the sample. @param lengths A pointer the number of elements to push for each channel (string lengths). |
lsl_push_sample_buft⚠ | @copydoc lsl_push_sample_buf @param timestamp @see lsl_push_sample_ftp |
lsl_push_sample_buftp⚠ | @copydoc lsl_push_sample_buft @param pushthrough @see lsl_push_sample_ftp |
lsl_push_sample_c⚠ | |
lsl_push_sample_ct⚠ | |
lsl_push_sample_ctp⚠ | |
lsl_push_sample_d⚠ | |
lsl_push_sample_dt⚠ | |
lsl_push_sample_dtp⚠ | |
lsl_push_sample_f⚠ | Push a pointer to some values as a sample into the outlet. Handles type checking & conversion. @param out The lsl_outlet object through which to push the data. @param data A pointer to values to push. The number of values pointed to must be no less than the number of channels in the sample. #lsl_local_clock(); if omitted, the current time is used. @return Error code of the operation or lsl_no_error if successful (usually attributed to the wrong data type). @{ |
lsl_push_sample_ft⚠ | @} ** @copydoc lsl_push_sample_f |
lsl_push_sample_ftp⚠ | @} ** @copydoc lsl_push_sample_ft |
lsl_push_sample_i⚠ | |
lsl_push_sample_it⚠ | |
lsl_push_sample_itp⚠ | |
lsl_push_sample_l⚠ | |
lsl_push_sample_lt⚠ | |
lsl_push_sample_ltp⚠ | |
lsl_push_sample_s⚠ | |
lsl_push_sample_st⚠ | |
lsl_push_sample_stp⚠ | |
lsl_push_sample_str⚠ | |
lsl_push_sample_strt⚠ | |
lsl_push_sample_strtp⚠ | |
lsl_push_sample_v⚠ | |
lsl_push_sample_vt⚠ | |
lsl_push_sample_vtp⚠ | |
lsl_remove_child⚠ | Remove a specified child element. |
lsl_remove_child_n⚠ | Remove a child element with the specified name. |
lsl_resolve_all⚠ | Resolve all streams on the network. |
lsl_resolve_bypred⚠ | Resolve all streams that match a given predicate. |
lsl_resolve_byprop⚠ | Resolve all streams with a given value for a property. |
lsl_resolver_results⚠ | Obtain the set of currently present streams on the network (i.e. resolve result). |
lsl_samples_available⚠ | Query whether samples are currently available for immediate pickup. |
lsl_set_child_value⚠ | Set the text value of the (nameless) plain-text child of a named child node. |
lsl_set_name⚠ | Set the element's name. @return 0 if the node is empty (or if out of memory). |
lsl_set_postprocessing⚠ | Set post-processing flags to use. |
lsl_set_value⚠ | Set the element's value. @return 0 if the node is empty (or if out of memory). |
lsl_smoothing_halftime⚠ | Override the half-time (forget factor) of the time-stamp smoothing. |
lsl_stream_info_matches_query⚠ | Tries to match the stream info XML element @p info against an XPath query. |
lsl_streaminfo_from_xml⚠ | Create a streaminfo object from an XML representation |
lsl_time_correction⚠ | @brief Retrieve an estimated time correction offset for the given stream. |
lsl_time_correction_ex⚠ | @copydoc lsl_time_correction() @param remote_time The current time of the remote computer that was used to generate this time_correction. If desired, the client can fit time_correction vs remote_time to improve the real-time time_correction further. @param uncertainty The maximum uncertainty of the given time correction. |
lsl_value⚠ | Value of the element. |
lsl_wait_for_consumers⚠ | Wait until some consumer shows up (without wasting resources). @return True if the wait was successful, false if the timeout expired. |
lsl_was_clock_reset⚠ | Query whether the clock was potentially reset since the last call to lsl_was_clock_reset(). |
Type Definitions
__int16_t | |
__int32_t | |
__uint32_t | |
lsl_channel_format_t | ! Data format of a channel (each transmitted sample holds an array of channels). |
lsl_continuous_resolver | Handle to a convenience object 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. |
lsl_error_code_t | Possible error codes. |
lsl_inlet | A stream inlet handle. Inlets are used to receive streaming data (and meta-data) from the lab network. |
lsl_outlet | A stream outlet handle. Outlets are used to make streaming data (and the meta-data) available on the lab network. |
lsl_processing_options_t | ! Post-processing options for stream inlets. |
lsl_streaminfo | Handle to a stream info object. Stores the declaration of a data stream. Represents the following information: |
lsl_xml_ptr | A lightweight XML element tree handle; models the description of a streaminfo object. XML elements behave like advanced pointers into memory that is owned by some respective streaminfo. Has a name and can have multiple named children or have text content as value; attributes are omitted. @note The interface is modeled after a subset of pugixml's node type and is compatible with it. Type-casts between pugi::xml_node_struct* and #lsl_xml_ptr are permitted (in both directions) since the types are binary compatible. @sa pugixml documentation. |