C Function block data symbol
Define C Function block symbols and their properties.
Symbol object through one of the following methods.
Name — Symbol name in source code
Symbol name in source code, specified as a character vector.
PortNumber — Port number
Port number, specified as a scalar integer. For input and output symbols,
PortNumber indicates the port index on the block. For parameter
PortNumber indicates the order that the symbol appears in
the block parameter mask.
Size — Size dimensions of the symbol
'1' (default) | character vector
Size of the symbol data specified as a character vector containing a scalar integer.
The C Function block supports only scalars and vectors. Matrices and
higher-dimension arrays are not supported. You can use a size expression to define the
size of an output. Use
-1 to inherit size.
Type — Data type of symbol
'double' (default) | character vector
Data type of the symbol, specified as a character vector that evaluates to a numeric
data type, or as a
mySymbol.DataType = 'int32'
Scope — Scope of the symbol
'Input' (default) |
Scope of the symbol, specified as one of the following values.
Input— Input symbol to the C Function block.
Output— Output symbol to the C Function block.
Parameter— Define a symbol as parameter. The parameter name is defined by the
Labelproperty of the symbol.
Persistent— Define a symbol as persistent data.
You can define a void pointer using the
Persistentscope in the C Function block. A void pointer is a pointer that can store any type of data that you create or allocate.
Constant— Define a symbol as constant using value-size or numeric expressions.
Label — Symbol label
Symbol label, specified as a character vector. For symbols with their scope set to
Output, this label appears as the port
name on the block. For symbols with their scope set to
this label is the label that appears on the block parameter mask. If the scope is
Constant, the label is the constant expression. You cannot define a