#include <Hxi_SimStruct.h>
Public Methods | |
| SimStruct () | |
| Constructor sets default values. | |
| int_T | setSFcnParamsCount (int_T num) |
| Set number of externally provided parameters. | |
| int_T | getSFcnParamsCount () |
| Get number of externally provided parameters. | |
| int_T | setNumSFcnParams (int_T np) |
| Set number of parameters used by S-function. | |
| int_T | getNumSFcnParams () |
| Get number of parameters used by S-function. | |
| const mxArray * | setSFcnParam (int_T idx, const mxArray *val) |
| Set mxArray pointing to a parameter. | |
| const mxArray * | getSFcnParam (int_T idx) |
| Get mxArray pointing to a parameter. | |
| int_T | setNumContStates (int_T nc) |
| Set number of continuous states. | |
| int_T | getNumContStates () |
| Get number of continuous states. | |
| real_T * | getContStates () |
| Get continuous states. | |
| real_T * | getdX () |
| Get derivatives of continuous states. | |
| int_T | setNumDiscStates (int_T nd) |
| Set number of discrete states. | |
| int_T | getNumDiscStates () |
| Get number of discrete states. | |
| real_T * | getDiscStates () |
| Get pointer to discrete states. | |
| int_T | setNumInputPorts (int_T nports) |
| Set number of input ports. | |
| int_T | getNumInputPorts () |
| Get number of input ports. | |
| int_T | setInputPortWidth (int_T port, int_T nu) |
| Set number of inputs of a port. | |
| int_T | getInputPortWidth (int_T port) |
| Get number of inputs of a port. | |
| real_T * | getInputPortRealSignal (int_T port) |
| Get pointer to inputs of a port. | |
| InputRealPtrsType | getInputPortRealSignalPtrs (int_T port) |
| Get pointer to pointers to inputs of a port. | |
| int_T | setInputPortDirectFeedThrough (int_T port, int_T dft) |
| Specify if input port is used in mdlOutputs or mdlGetTimeOfNextVarHit. | |
| int_T | getInputPortDirectFeedThrough (int_T port) |
| Get specification for direct feed through. | |
| int_T | setInputPortRequiredContiguous (int_T port) |
| Specify that input port vector should be layed out contiguous in memory. | |
| int_T | getInputPortRequiredContiguous (int_T port) |
| Get specification about contiguous memory layout. | |
| int_T | setNumOutputPorts (int_T nports) |
| Set number of output ports. | |
| int_T | getNumOutputPorts () |
| Get number of output ports. | |
| int_T | setOutputPortWidth (int_T port, int_T ny) |
| Set number of outputs of a port. | |
| int_T | getOutputPortWidth (int_T port) |
| Get number of outputs of a port. | |
| real_T * | getOutputPortRealSignal (int_T port) |
| Get pointer to outputs of a port. | |
| int_T | setNumDWork (int_T num) |
| Set number of data vectors. | |
| int_T | getNumDWork () |
| Get number of data work vectors. | |
| int_T | setDWorkWidth (int_T idx, int_T num) |
| Set number of elements of a data work vector. | |
| int_T | getDWorkWidth (int_T idx) |
| Get number of elements of a data work vector. | |
| int_T | setDWorkUsedAsDState (int_T idx, int_T usage) |
| Specify that a data work vector is used for discrete states. | |
| int_T | getDWorkUsedAsDState (int_T idx) |
| Determine whether a data work vector is used for discrete states. | |
| real_T * | getDWork (int_T idx) |
| Get pointer to a data work vector. | |
| int_T | setNumSampleTimes (int_T nst) |
| Set number of sample times. | |
| int_T | getNumSampleTimes () |
| Get number of sample times. | |
| real_T | setSampleTime (int_T st_index, real_T period) |
| Set sample time period for given st_index. | |
| real_T | getSampleTime (int_T st_index) |
| Get sample time period for given st_index. | |
| real_T | setOffsetTime (int_T st_index, real_T offset) |
| Set offset time for given st_index. | |
| real_T | getOffsetTime (int_T st_index) |
| Get offset time for given st_index. | |
| int_T | setNumRWork (int_T nrw) |
| Set size of real work array. | |
| int_T | getNumRWork () |
| Get size of real work array. | |
| real_T * | getRWork () |
| Get pointer to first element of real work vector. | |
| int_T | setNumIWork (int_T niw) |
| Set size of int work vector. | |
| int_T | getNumIWork () |
| Get size of int work vector. | |
| int_T * | getIWork () |
| Get pointer to first element of int work vector. | |
| int_T | setNumPWork (int_T npw) |
| Set size of pointer work vector. | |
| int_T | getNumPWork () |
| Get size of pointer work vector. | |
| void ** | getPWork () |
| Get pointer to first element of pointer work vector. | |
| int_T | setNumModes (int_T nm) |
| Set size of modes vector. | |
| int_T | getNumModes () |
| Get size of modes vector. | |
| int_T * | getModeVector () |
| Get pointer to first element of modes vector. | |
| void * | setUserData (void *ptr) |
| Set pointer to user data. | |
| void * | getUserData () |
| Get pointer to user data. | |
| int_T | setNumNonsampledZCs (int_T nzcs) |
| Set number of states for which zero crossings may occur. | |
| int_T | getNumNonsampledZCs (int_T nzcs) |
| Get number of states for which zero crossings may occur. | |
| uint_T | setOptions (uint_T opts) |
| Set option flags. | |
| uint_T | getOptions () |
| Get option flags. | |
| real_T | setT (real_T t) |
| Set current simulation time. | |
| real_T | getT () |
| Get current simulation time. | |
| const char_T * | setModelName (const char_T *name) |
| Set relative model name. | |
| const char_T * | getModelName () const |
| Get relative model name. | |
| const char_T * | setPath (const char_T *path) |
| Set absolute model name. | |
| const char_T * | getPath () const |
| Get absolute model name. | |
| int_T | setVersion (int_T version) |
| Set model version. | |
| int_T | getVersion () const |
| Get model version. | |
| const char_T * | setErrorStatus (const char_T *msg) |
| Set error message. | |
| const char_T * | getErrorStatus () const |
| Get error message. | |
Protected Attributes | |
| real_T | _dummy |
| Argument passed to resize of vectors. | |
| real_T | _t |
| current simulation time | |
| int_T | _p_sfun_size |
| number of parameters expected in S-function | |
| vector< int_T > | _dwork_usage |
| usage of each data work vector | |
| vector< const mxArray * > | _p |
| parameters provided by calling program | |
| vector< real_T > | _xc |
| continuous states | |
| vector< real_T > | _dxc |
| derivatives of continuous states | |
| vector< real_T > | _xd |
| discrete states | |
| vector< vector< real_T > > | _u |
| inputs | |
| vector< vector< real_T * > > | _uPtrs |
| pointers to inputs | |
| vector< int_T > | _u_dft |
| mark if input port is accessed in mdlOutputs | |
| vector< vector< real_T > > | _y |
| outputs | |
| vector< vector< real_T > > | _dwork |
| data work vectors | |
| vector< real_T > | _st_period |
| sample time period | |
| vector< real_T > | _st_offset |
| sample time offset | |
| vector< real_T > | _rwork |
| real work array | |
| vector< int_T > | _iwork |
| int work array | |
| vector< void * > | _pwork |
| pointer work array | |
| vector< int_T > | _modes |
| modes array | |
| void * | _userData |
| pointer to user data | |
| uint_T | _options |
| option flags | |
| const char_T * | _model_name |
| relative name of this model | |
| const char_T * | _path |
| absolute name of this model | |
| int_T | _version |
| version of this model | |
| const char_T * | _error_msg |
| used to report errors from S-function | |
|
|
Get specification about contiguous memory layout. Note: here this is always fulfilled. |
|
|
Get number of states for which zero crossings may occur. Note: state events are not supported by Hqp. |
|
|
Specify that input port vector should be layed out contiguous in memory. Note: here this is always fulfilled. |
|
|
Set number of states for which zero crossings may occur. Note: state events are not supported by Hqp. |
|
|
Argument passed to resize of vectors. This is done to avoid memory management problems with ADOL-C 1.8.7. |
.