BrainBit for developers Subscribe for updates Visit website

SpectrumDoubleChannel

 

#include “cspectrum_channel.h

 

Signal spectrum data channel. Heir to the base class of DoubleChannel. channels. The spectrum is calculated based on the data source specified in the channel constructor.

Description

create_SpectrumDoubleChannel

Function. Creating a signal spectrum data channel.

Creates a signal spectrum data channel.

Options:

double_channel

Description: data channel

Data type: DoubleChannel*

info

Description: channel information

Data type: ChannelInfo

Return value:

Description: Signal spectrum data channel

Data type: SpectrumDoubleChannel*.

SpectrumDoubleChannel_read_data

Function. Channel data request.

Method that returns the requested amount of data.

Options:

channel

Description: data channel pointer

Data type: SpectrumDoubleChannel*

offset

Description: Offset from the start of data

Data type: size_t

length

Description: The required number of signal samples. If there is not enough data in the channel, then they will be filled with zeros.

Data type: size_t

out_buffer

Description: data array ​double​, size of length.​

Data type: double *

buffer_size

Description: desired buffer size.​

Data type: size_t

samples_read

Description: size of data read.​

Data type: size_t *

window_type

Description: the type of window function used ​

Data type: size_t *

Return value:

Description: An indication of an error. More details sdk_error

Data type: int.

SpectrumDoubleChannel_get_hz_per_spectrum_sample

Function. Spectrum calculation step request.

Method that returns the spectrum calculation step

Options:

channel

Description: data channel pointer

Data type: SpectrumDoubleChannel*

out_step

Description: spectrum calculation step

Data type: double*

Return value:

Description: An indication of an error. More details sdk_error

Data type: int.

SpectrumDoubleChannel_get_spectrum_length

Function. Window size query.

Method that returns window size for spectrum calculation

Options:

channel

Description: data channel pointer

Data type: SpectrumDoubleChannel*

out_spectrum_length

Description: window size

Data type: size_t*

Return value:

Description: An indication of an error. More details sdk_error

Data type: int.