/*
 * SSINK   A SIMULINK sink block for sinking unconnected outputs
 * DSP Blockset S-Function to connect to unused outputs.
 *	This SIMULINK S-function provides a sink or plug to put unused
 *	outputs; it is used in the Real and Imag blocks in the DSP Blockset.
 *
 *           Syntax:  [sys, x0] = ssink(t,x,u,flag)
 *
 *  Marc Ullman
 *
 *  Copyright 1995-2000 The MathWorks, Inc.
 *  $Revision: 1.10 $ $Date: 2000/05/05 20:16:16 $
 */

#define S_FUNCTION_NAME ssink

#include "dsp_sim.h"

static void mdlInitializeSizes(SimStruct *S)
{
#ifdef MATLAB_MEX_FILE
    mexWarnMsgTxt("Obsolete blocks calling the CMEX S-Function 'ssink' have\n"
                  "been detected.  If you wish to upgrade this model, replace\n"
                  "all occurrences of this S-Function block with the new\n"
                  "'Terminator' block found in the Simulink block library.\n"
                  "If you wish to disable this warning message, type\n"
                  "'warning off' at the MATLAB command line.\n\n");
#endif
    ssSetNumContStates(    S, 0);
    ssSetNumDiscStates(    S, 0);
    ssSetNumInputs(        S, DYNAMICALLY_SIZED);
    ssSetNumOutputs(       S, 0);
    ssSetDirectFeedThrough(S, 1);
    ssSetNumInputArgs(     S, 0);
    ssSetNumSampleTimes(   S, 1);
    ssSetNumRWork(         S, 0);
    ssSetNumIWork(         S, 0);
    ssSetNumPWork(         S, 0);
    ssSetOptions(          S, SS_OPTION_EXCEPTION_FREE_CODE);
}    


static void mdlInitializeSampleTimes(SimStruct *S)
{
    ssSetSampleTimeEvent(S, 0, INHERITED_SAMPLE_TIME);
    ssSetOffsetTimeEvent(S, 0, 0.0);
}


static void mdlInitializeConditions(real_T *x0, SimStruct *S)
{
}


static void mdlOutputs(real_T *y, const real_T *x, const real_T *u, 
                       SimStruct *S, int_T tid)
{
}


static void mdlUpdate(real_T *x, const real_T *u, SimStruct *S, int_T tid)
{
}


static void mdlDerivatives(real_T *dx, const real_T *x, const real_T *u, 
                           SimStruct *S, int_T tid)
{
}


static void mdlTerminate(SimStruct *S)
{
}

#include "dsp_trailer.c"
 
/* [EOF]: ssink.c */
