Writing S-Functions    
ssWriteRTWParameters

Write tunable parameter information to model.rtw file.

Syntax

Arguments
S
   SimStruct representing an S-function block.

nParams
   Number of tunable parameters

paramType
   Type of parameter (see Parameter Type-Specific Arguments)

paramName
   Name of parameter

stringInfo
   General information about the parameter, such as how it was derived

...
   Remaining arguments depend on parameter type (see Parameter Type-Specific Arguments).

Description

Use this function in mdlRTW to write tunable parameter information to this S-function's model.rtw file. This function returns TRUE if successful.

Parameter Type-Specific Arguments

This section lists the parameter-specific arguments required by each parameter type.

Specifying Data Type Info

The data type of value argument passed to the ssWriteRTW macros is obtained using

where dTypeId can be any one of the enum values in BuitlInDTypeID (SS_DOUBLE, SS_SINGLE, SS_INT8, SS_UINT8, SS_INT16, SS_UINT16, SS_INT32, SS_UINT32, SS_BOOLEAN) defined in simstuc_types.h. The isComplex argument is either 0 or 1.

For example, DTINFO(SS_INT32,0) is a noncomplex 32-bit signed integer.

If isComplex==1, it is assumed that the array of values has the real and imaginary parts arranged in an interleaved manner (i.e., Simulink format). If you prefer to pass the real and imaginary parts as two separate arrays, you should use the macros ssWriteRTWMxVectParam or ssWriteRTWMx2dMatParam.

Example

See simulink/src/sfun_multiport.c for an example that uses this function.

Languages

C

See Also
mdlRTW


 ssWriteRTWMx2dMatParam ssWriteRTWParamSettings