Callbacks
Detailed Description
TecellaAmp provides several callback mechanisms for error reporting and acquisition notifications.
Define Documentation
Typedef Documentation
A callback to recieve notifications of when newly acquired samples are available. Please note that this callback runs in a dedicated acquisition callback thread and it is the user's responsibility to synchronize/lock any communication and memory access from this callback. We recommend using the blocking tecella_acquire_read_i() functions without callbacks if possible.
- Parameters:
-
| h | The handle of the amplifier the notification applies to. |
| channel | The channel that new samples are available for. |
| samples_available | The number of new samples available since the last time the callback was called for this channel. |
- See also:
- tecella_acquire_set_callback()
A callback to receive all errors emitted by the API. Very useful for debugging and catching all errors if you accidentally forget to check a return code.
- Parameters:
-
| h | The handle of the amplifier associated with the error. |
| e | The error code. |
| msg | The error message associated with the error code. |
- See also:
- tecella_error_set_callback()
A callback to recieve notifications of when a stimulus has started. Please note that this callback runs in a dedicated acquisition callback thread and it is the user's responsibility to synchronize/lock any communication and memory access from this callback. We recommend using the blocking tecella_acquire_read_i() functions without callbacks if possible.
- Parameters:
-
| h | The handle of the amplifier the notification applies to. |
| stimulus_index | The stimulus that started playing. |
| timestamp | The sample at which the stimulus started playing, where 0 is the timestamp of the first sample received after calling tecella_acquire_start(). |
- See also:
- tecella_stimulus_set_callback()