Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Hxi::SimStruct Class Reference

#include <Hxi_SimStruct.h>

List of all members.


Detailed Description

Native SimStruct for Hqp.


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 mxArraysetSFcnParam (int_T idx, const mxArray *val)
 Set mxArray pointing to a parameter.

const mxArraygetSFcnParam (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_TgetContStates ()
 Get continuous states.

real_TgetdX ()
 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_TgetDiscStates ()
 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_TgetInputPortRealSignal (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_TgetOutputPortRealSignal (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_TgetDWork (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_TgetRWork ()
 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_TgetIWork ()
 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_TgetModeVector ()
 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_TsetModelName (const char_T *name)
 Set relative model name.

const char_TgetModelName () const
 Get relative model name.

const char_TsetPath (const char_T *path)
 Set absolute model name.

const char_TgetPath () const
 Get absolute model name.

int_T setVersion (int_T version)
 Set model version.

int_T getVersion () const
 Get model version.

const char_TsetErrorStatus (const char_T *msg)
 Set error message.

const char_TgetErrorStatus () 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


Member Function Documentation

int_T Hxi::SimStruct::getInputPortRequiredContiguous int_T    port [inline]
 

Get specification about contiguous memory layout.

Note: here this is always fulfilled.

int_T Hxi::SimStruct::getNumNonsampledZCs int_T    nzcs [inline]
 

Get number of states for which zero crossings may occur.

Note: state events are not supported by Hqp.

int_T Hxi::SimStruct::setInputPortRequiredContiguous int_T    port [inline]
 

Specify that input port vector should be layed out contiguous in memory.

Note: here this is always fulfilled.

int_T Hxi::SimStruct::setNumNonsampledZCs int_T    nzcs [inline]
 

Set number of states for which zero crossings may occur.

Note: state events are not supported by Hqp.


Member Data Documentation

real_T Hxi::SimStruct::_dummy [protected]
 

Argument passed to resize of vectors.

This is done to avoid memory management problems with ADOL-C 1.8.7.


The documentation for this class was generated from the following file:
HQP is hosted at SourceForge. Documentation generated on Wed Oct 6 07:41:20 2004 using doxygen.