Documentation

Data Type

Configure data type for S-Function blocks

S-Function Callback Methods

mdlInitializeSizes Specify the number of inputs, outputs, states, parameters, and other characteristics of the C MEX S-function

SimStruct Functions

ssRegisterDataType Register a custom data type
ssRegisterTypeFromNamedObject Register a custom data type from a Simulink.AliasType, Simulink.NumericType, or Simulink.Bus object.
ssSetDataTypeSize Set the size of a custom data type
ssSetDataTypeZero Set the zero representation of a data type
ssSetInputPortDataType Set the data type of an input port
ssSetOutputPortDataType Set the data type of an output port
ssGetDataTypeId Get the ID of a data type
ssGetDataTypeIdAliasedThruTo Get the base data type associated with a data type alias
ssGetDataTypeName Get the name of a data type
ssGetDataTypeSize Get the size of a custom data type
ssGetDataTypeZero Get the zero representation of a data type
ssGetInputPortDataType Get the data type of an input port
ssGetNumDataTypes Get number of data types registered for this simulation, including built-in types
ssGetOutputPortDataType Get the data type of an output port
ssGetOutputPortSignal Get the vector of signal elements emitted by an output port
ssGetSFcnParamDataType Get the data type of a parameter for an S-Function block

Examples and How To

Custom Data Types

How to create custom data types for the values of a block's signals and parameters.

Concepts

S-Function Callback Methods

Description of S-function callback methods

S-Function SimStruct Functions

Overview of SimStruct macros and functions.

Was this topic helpful?