Writing S-Functions    
ssSetRunTimeParamInfo

Specify the attributes of a run-time parameter.

Syntax

Arguments

S
   SimStruct representing an S-Function block.

param
   Index of a run-time parameter.

Description

Use this function in mdlSetWorkWidths or mdlProcessParameters to specify information about a run-time parameter. Use an ssParamRec structure to pass the parameter attributes to the function.

ssParamRec Structure

The simstruc.h macro defines this structure as follows:

The record contains the following fields.

name

Name of the parameter. This must point to persistent memory. Do not set to a local variable (static char name[32] or strings name are okay).

nDimensions

Array giving the size of each dimension of the parameter.

dataTypeId

Data type of the parameter. For built-in data types, see BuiltInDTypeId in simstruc_types.h.

complexSignal

Specifies whether this parameter has complex numbers (true) or real numbers (false) as values.

data

Pointer to the value of this run-time parameter. If the parameter is a vector or matrix or a complex number, this field points to an array of values representing the parameter elements. Complex Simulink signals are stored interleaved. Likewise complex run-time parameters must be stored interleaved. Note that mxArrays stores the real and complex parts of complex matrices as two separate contiguous pieces of data instead of interleaving the real and complex parts.

dataAttributes

The data attributes pointer is a persistent storage location where the S-function can store additional information describing the data and then recover this information later (potentially in a different function).

nDlgParamIndices

Number of dialog parameters used to compute this run-time parameter.

dlgParamIndices

Indices of dialog parameters used to compute this run-time parameter.

transformed

Specifies the relationship between this run-time parameter and the dialog parameters specified by dlgParamIndices. This field can have any of the following values defined by TransformFlag in simstruc.h.

Specifies whether to write the values of this parameter out to the model.rtw file as a matrix (true) or as a vector (false).

Languages

C

See Also

mdlSetWorkWidths, mdlProcessParameters, ssGetNumRunTimeParams, ssGetRunTimeParamInfo


  ssSetRWorkValue ssSetSampleTime