File: C:\MATLAB6p5\work\atomicdemo_ert_rtw/atomicdemo.c

    1   /*
    2    * Real-Time Workshop code generation for Simulink model "atomicdemo.mdl".
    3    *
    4    * Model Version                        : 1.46
    5    * Real-Time Workshop file version      : 5.0 $Date: 2002/05/30 19:21:33 $
    6    * Real-Time Workshop file generated on : Wed Mar 24 14:33:27 2004
    7    * TLC version                          : 5.0 (Jun 18 2002)
    8    * C source code generated on           : Wed Mar 24 14:33:27 2004
    9    */
   10   
   11   #include "atomicdemo.h"
   12   #include "atomicdemo_private.h"
   13   
   14   /* Block signals (auto storage) */
   15   BlockIO rtB;
   16   
   17   /* Block states (auto storage) */
   18   D_Work rtDWork;
   19   
   20   /* External inputs (root inport signals with auto storage) */
   21   ExternalInputs rtU;
   22   
   23   /* External output (root outports fed by signals with auto storage) */
   24   ExternalOutputs rtY;
   25   
   26   /* Real-time model */
   27   RT_MODEL rtM_;
   28   RT_MODEL *rtM = &rtM_;
   29   
   30   /* Model step function */
   31   void atomicdemo_step(void)
   32   {
   33   
   34     /* SubSystem: '<Root>/system1' incorporates:
   35      *   Inport: '<Root>/In1'
   36      */
   37     myfun(rtU.In1, &rtB.system1, &rtDWork.system1);
   38   
   39     /* Outport: '<Root>/Out1' */
   40     rtY.Out1 = rtB.system1.Delay;
   41   
   42     /* SubSystem: '<Root>/system2' incorporates:
   43      *   Inport: '<Root>/In2'
   44      */
   45     myfun(rtU.In2, &rtB.system2, &rtDWork.system2);
   46   
   47     /* Outport: '<Root>/Out2' */
   48     rtY.Out2 = rtB.system2.Delay;
   49   
   50     /* (no update code required) */
   51   }
   52   
   53   /* Model initialize function */
   54   void atomicdemo_initialize(boolean_T firstTime)
   55   {
   56     if (firstTime) {
   57       /* registration code */
   58       rtmSetErrorStatus(rtM, (const char_T *)0);
   59     }
   60   }
   61