Overview
Control signal operations module
Discussion
The module computes control operations (e.g. control signals from CAN) which are simple arithmetic operations using two input values. The module is controlled via the .packedConf array. The array size is numOps x 3 and there is a single row devoted to each operation:
...
This module supports only control data where block size is 1.
Type Definition
Code Block |
---|
typedef struct _ModuleControlOp { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 numOps; // Number of operations to be computed INT32 numOpsPackedSize; // Size in 4 bytes packed for internal use INT32 updateActive; // Specifies whether the configuration is updating (=1) or fixed (=0). INT32* config; // Controls the operations. One row per op. INT32* packedConf; // Operations configuration with each row packed into a word. FLOAT32* lastValue; // Previous sample value on all input channels INT32* firstBlock; // Array of flags set on first block of each channel before lastValue is valid INT32* triggerPulse; // Array of flags set on in operation 16 to trigger pulse output INT32* prevTriggerState; // Array of flags set on in operation 16 to trigger pulse output INT32* outPulseCnt; // Array of pulse high period count in samples for operation 16 INT32* triggerPulse2; // Array of flags set on in operation 15 to trigger pulse output } ModuleControlOpClass; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
numOps | int | const | 0 | 1 | Unrestricted | |
numOpsPackedSize | int | const | 0 | 1 | Unrestricted | |
updateActive | int | parameter | 1 | 1 | 0:1 | |
config | int* | derived | 0 | [1 x 3] | Unrestricted | |
packedConf | int* | parameter | 0 | [1 x 1] | -2147483648:2147483647 | |
lastValue | float* | state | 1 | [1 x 1] | Unrestricted | |
firstBlock | int* | state | 1 | [1 x 1] | Unrestricted | |
triggerPulse | int* | state | 1 | [1 x 1] | Unrestricted | |
prevTriggerState | int* | state | 1 | [1 x 1] | Unrestricted | |
outPulseCnt | int* | state | 1 | [1 x 1] | Unrestricted | |
triggerPulse2 | int* | state | 1 | [1 x 1] | Unrestricted |
Pins
Input Pins
Name: in
Description: Input signal
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: Output signal
Data type: float
MATLAB Usage
File Name: control_op_module.m
...