National Instruments AutoCode NI MATRIX User Manual

Page 124

Advertising
background image

Chapter 5

Generated Code Architecture

AutoCode Reference

5-16

ni.com

mixed data-typed variables reflecting each procedure output signal and
type.

The states of the procedure are provided by the argument S, a pointer to
a structure named

_

procedure name_s

. This structure contains the

double-buffered private states used in the procedure, a flag to toggle the
private states from one buffer to another, and the states structures of all
procedures nested in the procedure. The private states are provided by the
element

procedure name_ps

, a two-element array of a structure named

_

procedure name_ps

. The private states structure is composed of mixed

(usually

RT_FLOAT

) data-typed variables reflecting each state needed in the

procedure. The flag to toggle private states is a variable of type

RT_INTEGER

named

_

procedure name_x

whose value is toggled

between 0 and 1 by the subsystem invoking the procedure.

The informational data of the procedure is provided by the argument I,
a pointer to a structure named

_

procedure name_info

. This structure

contains:

Status and control flags stored in an array named

iinfo

.

Time-related information stored in an array named

rinfo

.

Block parameter data used by block algorithms in the procedure stored
in arrays named

IP

or

RP

.

Xmath and Variable block variables used in the procedure stored as
pointers to global variables and named after the Xmath variables or
Variable block variables.

In addition, information data of the form described for procedures nested
in the procedure is provided in the

_

procedure name_i

structure as

a pointer to a structure named

_

nested_procedure name_info

.

Table 5-1 and Table 5-2 summarize the elements in structure

_

procedure name_info

. These elements, which are used by the

procedure, need to be set by the function invoking the procedure.

Advertising