Combine signal/state structures - Whether to combine global block signal and state data into one structure - MATLAB (original) (raw)

Main Content

Whether to combine global block signal and state data into one structure

Model Configuration Pane: Code Generation / Interface

Description

The Combine signal/state structures parameter specifies whether the code generator combines global block signal and state data into one data structure.

Settings

Off (default) | On

On

Enables generation of global block signal data (block I/O) and global state data (DWork vectors) into one data structure.

Off

Disables generation of global block signal and state data into one data structure. The code generator produces separate data structures for global block signals and global states.

Examples

expand all

  1. For a model that generates the following code:
    /* Block signals (auto storage) /
    typedef struct {
    struct {
    uint_T LogicalOperator:1;
    uint_T UnitDelay1:1;
    } bitsForTID0;
    } BlockIO;
    /
    Block states (auto storage) */
    typedef struct {
    struct {
    uint_T UnitDelay_DSTATE:1
    uint_T UnitDelay1_DSTATE:1
    } bitsForTID0;
    } D_Work;
  2. If you select Combine signal/state structures, the generated code now looks like this:
    /* Block signals and states (auto storage)
    for system */
    typedef struct {
    struct {
    uint_T LogicalOperator:1;
    uint_T UnitDelay1:1;
    uint_T UnitDelay_DSTATE:1;
    uint_T UnitDelay1_DSTATE:1;
    } bitsForTID0;
    } D_Work;

Tips

The benefits to selecting this parameter are:

Application Setting
Debugging No impact
Traceability No impact
Efficiency On
Safety precaution No impact

Programmatic Use

Parameter: CombineSignalStateStructs
Type: character vector
Value: 'on' | 'off'
Default: off

Version History

Introduced in R2011a