BrainBit for developers Subscribe for updates Visit website

MeditationAnalyzer

 

#include “c_eeg_channels.h

 

Meditation state data feed. The analysis of the state is carried out on the basis of the EEG index channel - ​EegIndexChannel.​ Meditation data includes two indicators: level, level progress. The level can take values from 0 to 3 inclusive. Level progress takes values from 0 to 1.

Description

create_MeditationAnalyzer

Function. Channel creation.

Creates a meditation state data feed.

Options:

index_channel

Description: EEG signal indices data channel.

Data type: EegIndexChannel*

Return value:

Description: meditation channel

Data type: MeditationAnalyzer*

MeditationAnalyzer_delete

Function. Deleting the Meditation State Data Channel.

Options:

analyzer

Description: Instance of the meditation state data class

Data type: MeditationAnalyzer*

MeditationAnalyzer_level

Function. Meditation Level Request.

Allows you to get the level of meditation. Integer value from 0 to 3 inclusive.
Options:

analyzer

Description: meditation state channel

Data type: MeditationAnalyzer*

out_level

Description: meditation level

Data type: int *

Return value:

Description: An indication of an error. More details sdk_error

Data type: int.

MeditationAnalyzer_level_progress

Function. Requesting the progress of the current meditation level.

Allows you to get the progress of the current level of meditation. Floating point number from 0 to 1.
Options:

analyzer

Description: meditation state channel

Data type: MeditationAnalyzer*

out_level_progress

Description: progress meditation level

Data type: double *

Return value:

Description: An indication of an error. More details sdk_error

Data type: int.

MeditationAnalyzer_set_level_changed_callback

Function. Changing the level of meditation.

Subscribes to the meditation state channel level change event.

Options:

analyzer

Description: meditation state channel

Data type: MeditationAnalyzer*

(MeditationAnalyzer *, int, void *)

Description: pointer to the method for handling the meditation level change event

Data type: void(*callback)

handle

Description: meditation level change event listener

Data type: MeditationLevelListener*

user_data

Description: any data structures will be passed to the event listener 

Data type: void *

Return value: 

Description: An indication of an error. More details sdk_error

Data type: int.

MeditationAnalyzer_set_level_progress_changed_callback

Function. Changing the progress of the current meditation level.

Subscribes to the event of changing the progress of the current level of the meditation state channel.

Options:

analyzer

Description: meditation state channel

Data type: MeditationAnalyzer*

(MeditationAnalyzer *, double, void *)

Description: pointer to the method for handling the event of changing the progress of the current meditation level

Data type: void(*callback)

handle

Description: listener for progress change events of the current meditation level

Data type: MeditationLevelProgressListener *

user_data

Description: any data structures will be passed to the event listener 

Data type: void *

Return value: 

Description: An indication of an error. More details sdk_error

Data type: int.

free_MeditationLevelListener

Function. Removing the listener changing the level of meditation.

Removes the listener changing the level of meditation.
Options:

handle

Description: listener changing the level of meditation

Data type: MeditationLevelListener

free_MeditationLevelProgressListener

Function. Removing the listener for changing the progress of the current meditation level.

Removes the listener for changing the progress of the current meditation level.
Options:

handle

Description: listener to change the progress of the current level of meditation

Data type: MeditationLevelProgressListener