%% File : RLS.tlc
%% Created: Sun Mar 21 17:05:00 2010
%%
%% Description: 
%%   Real-Time Workshop wrapper functions interface generated for 
%%   S-function "RLS.c".
%%
%%         File generated by S-function Builder Block
%%
%%   For more information on using the Target Language with the 
%%   Real-Time Workshop, see the Target Language Compiler manual
%%   (under Real-Time Workshop) in the "Inlining S-Functions"
%%   chapter under the section and subsection:
%%     "Writing Block Target Files to Inline S-Functions",
%%        "Function-Based or Wrappered Code".
%%
%implements  RLS "C"
%% Function: BlockTypeSetup ===================================================
%%
%% Purpose:
%%      Set up external references for wrapper functions in the 
%%      generated code.
%%
%function BlockTypeSetup(block, system) Output
  %openfile externs
    
  extern void RLS_Outputs_wrapper(const real_T *u,
                          const real_T *y,
                          real_T *theta,
                          real_T *e  , 
                          const real_T  *Tvz, const int_T  p_width0, 
                          const real_T  *lambda, const int_T  p_width1, 
                          const int32_T  *rad,  const int_T p_width2);
  %closefile externs
  %<LibCacheExtern(externs)>
  %%
%endfunction


%% Function: Start =============================================================
%%
%function Start(block, system) Output
   /* %<Type> Block: %<Name> */
   
  %assign pu0 = LibBlockInputSignalAddr(0, "", "", 0)
  %assign pu1 = LibBlockInputSignalAddr(1, "", "", 0) 
  %assign py0 = LibBlockOutputSignalAddr(0, "", "", 0)
  %assign py1 = LibBlockOutputSignalAddr(1, "", "", 0)
    
  %assign nelements1 = LibBlockParameterSize(P1)
  %assign param_width1 = nelements1[0] * nelements1[1]  
  %if (param_width1) > 1  
   %assign pp1 = LibBlockMatrixParameterBaseAddr(P1)
  %else  
   %assign pp1 = LibBlockParameterAddr(P1, "", "", 0)
  %endif 
  %assign nelements2 = LibBlockParameterSize(P2)
  %assign param_width2 = nelements2[0] * nelements2[1]  
  %if (param_width2) > 1  
   %assign pp2 = LibBlockMatrixParameterBaseAddr(P2)
  %else  
   %assign pp2 = LibBlockParameterAddr(P2, "", "", 0)
  %endif 
  %assign nelements3 = LibBlockParameterSize(P3)
  %assign param_width3 = nelements3[0] * nelements3[1]  
  %if (param_width3) > 1  
   %assign pp3 = LibBlockMatrixParameterBaseAddr(P3)
  %else  
   %assign pp3 = LibBlockParameterAddr(P3, "", "", 0)
  %endif

%endfunction

%% Function: Outputs ==========================================================
%%
%% Purpose:
%%      Code generation rules for mdlOutputs function.
%%
%function Outputs(block, system) Output
  %%
  %assign pu0 = LibBlockInputSignalAddr(0, "", "", 0)
  %assign pu1 = LibBlockInputSignalAddr(1, "", "", 0)
  %assign py0 = LibBlockOutputSignalAddr(0, "", "", 0)
  %assign py1 = LibBlockOutputSignalAddr(1, "", "", 0)
  %assign nelements1 = LibBlockParameterSize(P1)
  %assign param_width1 = nelements1[0] * nelements1[1]
  %if (param_width1) > 1
     %assign pp1 = LibBlockMatrixParameterBaseAddr(P1)
   %else
     %assign pp1 = LibBlockParameterAddr(P1, "", "", 0)
   %endif
  %assign nelements2 = LibBlockParameterSize(P2)
  %assign param_width2 = nelements2[0] * nelements2[1]
  %if (param_width2) > 1
     %assign pp2 = LibBlockMatrixParameterBaseAddr(P2)
   %else
     %assign pp2 = LibBlockParameterAddr(P2, "", "", 0)
   %endif
  %assign nelements3 = LibBlockParameterSize(P3)
  %assign param_width3 = nelements3[0] * nelements3[1]
  %if (param_width3) > 1
     %assign pp3 = LibBlockMatrixParameterBaseAddr(P3)
   %else
     %assign pp3 = LibBlockParameterAddr(P3, "", "", 0)
   %endif
  %assign py_width = LibBlockOutputSignalWidth(0)
  %assign pu_width = LibBlockInputSignalWidth(0)
  RLS_Outputs_wrapper(%<pu0>, %<pu1>, %<py0>, %<py1>,  %<pp1>, %<param_width1>,  %<pp2>, %<param_width2>, %<pp3>, %<param_width3>);

  %%
%endfunction


%% [EOF] RLS.tlc





