(8.D.2.4) TriggeredSink
Overview
Copies the data at the input pin and stores it in an internal buffer. When triggered, buffer is frozen.
Discussion
The triggered sink module copies the data at the input pin to an internal buffer. The copy operation occurs only when a trigger event is asserted. A trigger event occurs when a value is non-zero either on one of the control pin samples or from the manual_trigger parameter. A control pin can accept an array of integer values. If any value is non-zero data capture is triggered, the buffer becomes filled and the reset parameter becomes zero. In order for data capture to continue (on the next trigger event) the reset parameter must be reset to one. This module is used to capture the value of a wire and make it available to the control code, or to a host processor.
The module supports floating-point values and handles both real and complex data.
Type Definition
typedef struct _ModuleTriggeredSink
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 reset; // Data will remain latched until reset set to 1.
INT32 ctrl_index; // Index of first non-zero element of the ctrl signal. Any non-zero element will trigger a data acquisition.
INT32 manual_trigger; // Trigger data acquisition from Matlab
FLOAT32* value; // Captured values.
} ModuleTriggeredSinkClass;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
reset | int | state | 0 | 1 | Unrestricted | Â |
ctrl_index | int | state | 0 | 0 | Unrestricted | Â |
manual_trigger | int | state | 0 | 0 | Unrestricted | Â |
value | float* | state | 0 | [32 x 1] | Unrestricted | Â |
Pins
Input Pins
Name: Ctrl
Description: Control signal
Data type: int
Channel range: Unrestricted
Block size range: Unrestricted
Sample rate range: Unrestricted
Complex support: Real
Â
Name: in
Description: audio input
Data type: float
Channel range: Unrestricted
Block size range: Unrestricted
Sample rate range: Unrestricted
Complex support: Real and Complex
MATLAB Usage
File Name: triggered_sink_module.m
M = triggered_sink_module(NAME)
Creates a triggered sink (data capture) module for use with the Audio Weaver
environment. The module captures a block of input data and stores it into
an internal buffer.
Arguments:
NAME - name of the module.
Â