Дефайны и функции блока S-Function.
More...
|
| static void | mdlUpdate (SimStruct *S) |
| | Update S-Function at every step of simulation.
|
| |
| static void | mdlOutputs (SimStruct *S) |
| | Writting outputs of S-Function.
|
| |
| static void | mdlInitializeSizes (SimStruct *S) |
| |
| static void | mdlStart (SimStruct *S) |
| | Initialize S-Function at start of simulation.
|
| |
| static void | mdlInitializeSampleTimes (SimStruct *S) |
| | Initialize Sample Time of Simulation.
|
| |
| static void | mdlTerminate (SimStruct *S) |
| | Terminate S-Function at the end of simulation.
|
| |
Дефайны и функции блока S-Function.
Здесь собраны функции, с которыми непосредственно работает S-Function
- Note
- Описание функций по большей части сгенерировано MATLAB'ом, поэтому на английском
◆ S_FUNCTION_NAME
| #define S_FUNCTION_NAME MCU |
Definition at line 22 of file MCU.c.
◆ S_FUNCTION_LEVEL
| #define S_FUNCTION_LEVEL 2 |
Definition at line 23 of file MCU.c.
◆ MDL_UPDATE
◆ MDL_CHECK_PARAMETERS
| #define MDL_CHECK_PARAMETERS /* Change to #undef to remove function */ |
Definition at line 60 of file MCU.c.
◆ MDL_START
| #define MDL_START /* Change to #undef to remove function */ |
◆ mdlUpdate()
| static void mdlUpdate |
( |
SimStruct * | S | ) |
|
|
static |
Update S-Function at every step of simulation.
- Parameters
-
| S | - pointer to S-Function (library struct from "simstruc.h") |
Abstract: This function is called once for every major integration time step. Discrete states are typically updated here, but this function is useful for performing any tasks that should only take place once per integration step.
Definition at line 37 of file MCU.c.
◆ mdlOutputs()
| static void mdlOutputs |
( |
SimStruct * | S | ) |
|
|
static |
Writting outputs of S-Function.
- Parameters
-
| S | - pointer to S-Function (library struct from "simstruc.h") |
Abstract: In this function, you compute the outputs of your S-function block. Generally outputs are placed in the output vector(s), ssGetOutputPortSignal.
Definition at line 55 of file MCU.c.
◆ mdlInitializeSizes()
| static void mdlInitializeSizes |
( |
SimStruct * | S | ) |
|
|
static |
Definition at line 95 of file MCU.c.
◆ mdlStart()
| static void mdlStart |
( |
SimStruct * | S | ) |
|
|
static |
Initialize S-Function at start of simulation.
- Parameters
-
| S | - pointer to S-Function (library struct from "simstruc.h") |
Abstract: This function is called once at start of model execution. If you have states that should be initialized once, this is the place to do it.
Definition at line 153 of file MCU.c.
◆ mdlInitializeSampleTimes()
| static void mdlInitializeSampleTimes |
( |
SimStruct * | S | ) |
|
|
static |
Initialize Sample Time of Simulation.
- Parameters
-
| S | - pointer to S-Function (library struct from "simstruc.h") |
Abstract: This function is used to specify the sample time(s) for your S-function. You must register the same number of sample times as specified in ssSetNumSampleTimes.
Definition at line 167 of file MCU.c.
◆ mdlTerminate()
| static void mdlTerminate |
( |
SimStruct * | S | ) |
|
|
static |
Terminate S-Function at the end of simulation.
- Parameters
-
| S | - pointer to S-Function (library struct from "simstruc.h") |
Abstract: In this function, you should perform any actions that are necessary at the termination of a simulation. For example, if memory was allocated in mdlStart, this is the place to free it.
Definition at line 185 of file MCU.c.