Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

InstantSet: Updates target module array - immediately calls the target module's set function during the Array Set process

The argument executionOrder determines when the array set will actually execute in relation to the module it is controlling:

Undefined = Let the build process decide

Before = Set the parameter before the target module executes

After = Set the parameter after the target module executes

This can be confirmed by generating a .AWS file and looking at the order which the modules are added to the layout, which set the execution order.

Type Definition

Code Block
typedef struct _ModuleArrayset
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 setBehavior;                            // Controls the behavior of the module
    void * modPtr;                                // Points to the module to set
    void * varPtr;                                // Points to the variable to set within the module instance structure
} ModuleArraysetClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

setBehavior

int

parameter

0

2

Unrestricted

modPtr

void *

parameter

1

Unrestricted

varPtr

void *

parameter

1

Unrestricted

Pins

Input Pins

Name: control

...

File Name: arrayset_module.m

Code Block
 M = arrayset_module(NAME, MODVAR, CONTROLPIN)
 Array set module. This module can reach into the instance structure
 of other modules and set array data structures.
 This module reads the data coming in from the input wire and reaches into instance structure of the 
 target module to copy the data. The Array data structure of the target module is pointed to by the argument "MOD.VAR".
 An optional control pin is also supported that controls the setting of the MOD.VAR array when the value control pin data doesn't equal 0.
 If the control pin is not used, then the data is written to the target array on every execution. 
 The Array Set module also supports 3 different options to set the values at the target (NoSet, DeferredSet, InstantSet).
 Arguments:
 NAME       - Name of the module.
 VARNAME    - Specifies the module and variable name using the form:
               'MOD.VAR' where MOD is the module name and VAR is the 
               variable name.  You can also specify internal subsystems using
               'SUBSYS.MOD.VAR'.
 CONTROLPIN - Boolean to add control input pin or not
 EXECUTIONORDER - Determines when the ParamSet module executes relative
                  to the module it is controlling.  Allowable values are:
                  'undefined' - the default.  The execution order is set
                                by the routing algorithm and can occur before
                                or after the module it is controlling.
                  'before' - forces ParamSet to execute before the module it
                             is controlling.
                  'after' - forces ParamSet to execute after the module it
                            is controlling.
                   When using 'before' and 'after' you could get a build error
                   indicating that no more modules can execute or there is a 
                   circular dependency.