jmathlib.core.functions
Class SFunction

java.lang.Object
  extended by jmathlib.core.interpreter.RootObject
      extended by jmathlib.core.functions.Function
          extended by jmathlib.core.functions.ExternalFunction
              extended by jmathlib.core.functions.SFunction
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, ErrorCodes, TokenConstants

public class SFunction
extends ExternalFunction

This is the main class for S-Functions The main difference compared to MATLAB's S-Functions is that there is no external SimStructure needed. All data is kept within this class

See Also:
Serialized Form

Field Summary
 int SFunctionLevel
           
 java.lang.String SFunctionName
           
 
Fields inherited from class jmathlib.core.functions.ExternalFunction
IMAG, REAL
 
Fields inherited from class jmathlib.core.functions.Function
lastModified, name, pathAndFileName
 
Fields inherited from interface jmathlib.core.constants.ErrorCodes
ERR_BRACKET_OPEN, ERR_BRACKET_ORDER, ERR_FUNCTION_NOT_FOUND, ERR_FUNCTION_NOT_IMPLEMENTED, ERR_INSUFFICIENT_PARAMETERS, ERR_INVALID_PARAMETER, ERR_LVALUE_REQUIRED, ERR_MATRIX_SINGULAR, ERR_NOT_SQUARE_MATRIX, ERR_OPNOTSUPPORTED, ERR_TOO_MANY_PARAMETERS, ERR_USER_ERROR, ERR_VARIABLE_NOTDEFINED, OK, OK_FUNCTION_PROCESS
 
Fields inherited from interface jmathlib.core.constants.TokenConstants
ADDSUB_PRIORITY, AND_PRIORITY, ANDAND_PRIORITY, ASSIGN_PRIORITY, BRACKET_PRIORITY, COMPARE_PRIORITY, CONCAT, MATRIX, MULDIV_PRIORITY, OR_PRIORITY, OROR_PRIORITY, PARAMETER, POWER_PRIORITY, RELATION_PRIORITY, SINGLE, ttDelimiter, ttNotSet, ttOperand, ttOperator
 
Constructor Summary
SFunction()
           
 
Method Summary
 OperandToken evaluate(Token[] operands, GlobalValues globals)
          Executes the function
 void mdlCheckParameters()
           
 void mdlDerivatives()
           
 void mdlGetTimeOfNextVarHit()
           
 void mdlInitializeConditions()
           
 void mdlInitializeSampleTimes()
           
 void mdlInitializeSizes()
           
 void mdlOutputs()
           
 void mdlProcessParameters()
           
 void mdlSetDefaultPortComplexSignals()
           
 void mdlSetDefaultPortDataTypes()
           
 void mdlSetDefaultPortDimensionInfo()
           
 void mdlSetInputPortComplexSignal()
           
 void mdlSetInputPortDataType()
           
 void mdlSetInputPortDimensionInfo()
           
 void mdlSetInputPortFrameData()
           
 void mdlSetInputPortSampleTime()
           
 void mdlSetInputPortWidth()
           
 void mdlSetOutputPortComplexSignal()
           
 void mdlSetOutputPortDataType()
           
 void mdlSetOutputPortDimensionInfo()
           
 void mdlSetOutputPortSampleTime()
           
 void mdlSetOutputPortWidth()
           
 void mdlSetWorkWidths()
           
 void mdlStart()
           
 void mdlTerminate()
           
 void mdlUpdate()
           
 void mdlZeroCrossings()
           
 void ssSetInputPortDirectFeedThrough(int x, int y)
           
 void ssSetInputPortRequiredContiguous(int x, boolean b)
           
 void ssSetInputPortWidth(int x, int y)
           
 void ssSetNumContStates(int number)
           
 void ssSetNumDiscStates(int number)
           
 void ssSetNumInputPorts(int x)
           
 void ssSetNumIWork(int x)
           
 void ssSetNumModes(int x)
           
 void ssSetNumNonsampledZCs(int x)
           
 void ssSetNumOutputPorts(int x)
           
 void ssSetNumPWork(int x)
           
 void ssSetNumRWork(int x)
           
 void ssSetNumSampleTimes(int x)
           
 void ssSetOptions(int options)
           
 void ssSetOutputPortWidth(int x, int y)
           
 
Methods inherited from class jmathlib.core.functions.ExternalFunction
getParamCount
 
Methods inherited from class jmathlib.core.functions.Function
debugLine, equals, getLastModified, getName, getNArgIn, getNArgOut, getNoOfLeftHandArguments, getPathAndFileName, setLastModified, setName, setNoOfLeftHandArguments, setPathAndFileName, throwMathLibException
 
Methods inherited from class jmathlib.core.interpreter.RootObject
clone, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SFunctionName

public java.lang.String SFunctionName

SFunctionLevel

public int SFunctionLevel
Constructor Detail

SFunction

public SFunction()
Method Detail

evaluate

public OperandToken evaluate(Token[] operands,
                             GlobalValues globals)
Description copied from class: Function
Executes the function

Specified by:
evaluate in class Function
Parameters:
operands - - an array of the functions paramaters
globals - TODO
Returns:
the result as an OperandToken

mdlCheckParameters

public void mdlCheckParameters()

mdlProcessParameters

public void mdlProcessParameters()

mdlInitializeSizes

public void mdlInitializeSizes()

mdlSetInputPortFrameData

public void mdlSetInputPortFrameData()

mdlSetInputPortWidth

public void mdlSetInputPortWidth()

mdlSetOutputPortWidth

public void mdlSetOutputPortWidth()

mdlSetInputPortDimensionInfo

public void mdlSetInputPortDimensionInfo()

mdlSetOutputPortDimensionInfo

public void mdlSetOutputPortDimensionInfo()

mdlSetDefaultPortDimensionInfo

public void mdlSetDefaultPortDimensionInfo()

mdlSetInputPortSampleTime

public void mdlSetInputPortSampleTime()

mdlSetOutputPortSampleTime

public void mdlSetOutputPortSampleTime()

mdlInitializeSampleTimes

public void mdlInitializeSampleTimes()

mdlSetInputPortDataType

public void mdlSetInputPortDataType()

mdlSetOutputPortDataType

public void mdlSetOutputPortDataType()

mdlSetDefaultPortDataTypes

public void mdlSetDefaultPortDataTypes()

mdlSetInputPortComplexSignal

public void mdlSetInputPortComplexSignal()

mdlSetOutputPortComplexSignal

public void mdlSetOutputPortComplexSignal()

mdlSetDefaultPortComplexSignals

public void mdlSetDefaultPortComplexSignals()

mdlSetWorkWidths

public void mdlSetWorkWidths()

mdlInitializeConditions

public void mdlInitializeConditions()

mdlStart

public void mdlStart()

mdlGetTimeOfNextVarHit

public void mdlGetTimeOfNextVarHit()

mdlZeroCrossings

public void mdlZeroCrossings()

mdlOutputs

public void mdlOutputs()

mdlUpdate

public void mdlUpdate()

mdlDerivatives

public void mdlDerivatives()

mdlTerminate

public void mdlTerminate()

ssSetNumContStates

public void ssSetNumContStates(int number)

ssSetNumDiscStates

public void ssSetNumDiscStates(int number)

ssSetNumInputPorts

public void ssSetNumInputPorts(int x)

ssSetInputPortWidth

public void ssSetInputPortWidth(int x,
                                int y)

ssSetInputPortRequiredContiguous

public void ssSetInputPortRequiredContiguous(int x,
                                             boolean b)

ssSetInputPortDirectFeedThrough

public void ssSetInputPortDirectFeedThrough(int x,
                                            int y)

ssSetNumOutputPorts

public void ssSetNumOutputPorts(int x)

ssSetOutputPortWidth

public void ssSetOutputPortWidth(int x,
                                 int y)

ssSetNumSampleTimes

public void ssSetNumSampleTimes(int x)

ssSetNumRWork

public void ssSetNumRWork(int x)

ssSetNumIWork

public void ssSetNumIWork(int x)

ssSetNumPWork

public void ssSetNumPWork(int x)

ssSetNumModes

public void ssSetNumModes(int x)

ssSetNumNonsampledZCs

public void ssSetNumNonsampledZCs(int x)

ssSetOptions

public void ssSetOptions(int options)

FOOTER

BOTTOM