Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

Overview

Copies the data at the input pin and stores it in an internal buffer.

Discussion

The sink module copies the data at the input pin to an internal buffer, value. The copy operation occurs at each block process and thus the data continuously updates. This module is used to store 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. The inspector window shows the data using a plot. In the inspector window, there are two edit boxes for maximum(Ymax) and minimum(Ymin) limits for plotting amplitude. If the user gives Ymax less than Ymin then the range [Ymax Ymin] will be automatically set by MATLAB.

Type Definition

Code Block
typedef struct _ModuleSink
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 enable;                                 // To enable or disable the plotting.
    FLOAT32* value;                               // Captured values.
    FLOAT32* yRange;                              // Y-axis range.
} ModuleSinkClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

enable

int

parameter

1

0

Unrestricted

value

float*

state

0

[32 x 1]

Unrestricted

yRange

float*

parameter

1

[1 x 2]

Unrestricted

Pins

Input Pins

Name: in

Description: audio input

...

Complex support: Real and Complex

MATLAB Usage

File Name: sink_module.m

Code Block
 M=sink_module(NAME)
 Creates a sink (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.

...