/* * File: Subsystem.c * * Code generated for Simulink model 'Subsystem'. * * Model version : 1.7 * Simulink Coder version : 8.0 (R2011a) 09-Mar-2011 * TLC version : 8.0 (Feb 3 2011) * C/C++ source code generated on : Sat Mar 24 22:25:20 2012 * * Target selection: ert.tlc * Embedded hardware selection: 32-bit Generic * Code generation objectives: Unspecified * Validation result: Not run */ #include "Subsystem.h" #include "Subsystem_private.h" /* External inputs (root inport signals with auto storage) */ ExternalInputs_Subsystem Subsystem_U; /* External outputs (root outports fed by signals with auto storage) */ ExternalOutputs_Subsystem Subsystem_Y; /* Real-time model */ RT_MODEL_Subsystem Subsystem_M_; RT_MODEL_Subsystem *const Subsystem_M = &Subsystem_M_; /* Model step function */ void Subsystem_step(void) { /* Outport: '/Out1' incorporates: * Constant: '/Constant' * Gain: '/Gain' * Inport: '/In1' * Sum: '/Sum' */ Subsystem_Y.Out1 = 2.0 * Subsystem_U.In1 + 1.0; } /* Model initialize function */ void Subsystem_initialize(void) { /* Registration code */ /* initialize error status */ rtmSetErrorStatus(Subsystem_M, (NULL)); /* external inputs */ Subsystem_U.In1 = 0.0; /* external outputs */ Subsystem_Y.Out1 = 0.0; } /* Model terminate function */ void Subsystem_terminate(void) { /* (no terminate code required) */ } /* * File trailer for generated code. * * [EOF] */