Overview
Compares the value at the input pin against a stored value
Discussion
This module implements a general purpose logical compare module against stored integer value that is capable of realizing many different logic operations. The behavior of the logic compare is controlled by the compareType parameter. compareType is an integer in the range from 0 to 5 inclusive. The following listdiscusses the various compare oprations types and which variables are active in each case. compareType = 0, performs logic equal operation.
...
For example, when compareType == 2, the output pin equals the Boolean value (input < constValue)
Type Definition
Code Block |
---|
typedef struct _ModuleLogicCompareConstInt32 { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 compareType; // Selects the type of comparison that is implemented by the module: Equal=0 NotEqual=1 lessThan=2 LessOrEqual=3 greaterThan=4 GreaterOrEqual=5 INT32 constValue; // Selects value against to compare against. In linear integer units. } ModuleLogicCompareConstInt32Class; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
compareType | int | parameter | 0 | 0 | 0:5 | |
constValue | int | parameter | 0 | 0 | Unrestricted |
Pins
Input Pins
Name: in
Description: audio input
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: audio output
Data type: int
MATLAB Usage
File Name: logic_compare_const_int_module.m
...