Available Member Functions of CSys in U Function

 

Time Functions

Member function

Input data

Output data

double GetSimTime()

void

Double value

     Defines the current simulation time.

double GetStartTime()

Void

Double value

     Defines the start time of simulation.

double GetEndTime()

void

Double value

     Defines the end time of simulation.

void SetSampleTime(const double dvalue);

 

Double value

Sample time

void

 

double GetSampleTime();

 

void

Double value

     Defines the sample time.

bool IsSampleHit();

 

Void

Bool value

     If the hit is occurred as the sample time, it is true.

     If the hit is not occurred as the sample time, it is false.

bool IsSimulationConvergence();

 

Void

Bool value

     If the simulation loop is called after the convergence, it is true.

     If the simulation loop is called during the convergence, it is false.

 

Input Port Functions

Member function

Input data

Output data

void SetNumInputPort(int )

Integer value

     Defines the number of input port.

void

void SetInputPortSize(int , int );

Integer value

     Defines the port to set the data size.

void

Integer value

     Defines the size of data of specified port.

int GetNumInputPort();

void

Integer value

     Defines the number of Input port.

int GetInputPortSize(int);

Integer value

     Inputs the port number.

Integer value

     Defines the size of input data.

double* GetInputPortData(int);

Integer

     Inputs the port number.

Double pointer

     Inputs the data.

 

Output Port Functions

Member Function

Input data

Output data

Void SetNumOutputPort (int )

Integer value

     Defines the number of output port.

void

void SetOutputPortSize (int , int );

Integer value

     Defines the port to set the size of data.

void

Integer value

     Defines the data size of specified port.

int GetNumOutputPort ();

void

Integer value

     Defines the number of output port.

int GetOutputPortSize (int);

Integer value

     Outputs the port number.

Integer value

     Defines the size of output data.

double* GetOutputPortData (int);

Integer

     Outputs the port number.

Double pointer

     Outputs the data.

 

Parameter Functions

Member function

Input data

Output data

void SetParameter

(const int, const double);

Integer value

     Defines the parameter order.

Void

Double value

     Defines the parameter Value.

double GetParameter(const int );

Integer value

     Defines the parameter order.

Double value

     Defines the value of parameter.

void SetPassword(char *)

String pointer

     Defines the string for password.

void

double GetDoubleFromChVariable(char *name)

String pointer

     Defines the name of ToChvariable block.

void

 

Parameter Functions

Member Function

Input Data

Output Data

void SetJacobianMethod(const int);

Integer value

     Defines the Jacobain method (1.FDM, 2.Analytical)

void

void SetJacobian(const double *);

Double pointer

     Defines the array of Jacobian value.

void

 

Differential Equation Functions

Member Function

Input Data

Output Data

void SetNumDiffStates

(const int);

Integer value

     Defines the number of differential equation.

void

void SetDiffStates

(const double*);

Double pointer

     Defines the array of differential states value.

void

int GetNumDiffStates();

 

void

Integer value

     Defines the number of differential equation

double* GetDiffStates(void);

void

Double pointer

     Defines the array Differential states value.

double* GetDotDiffStates(void);

void

Double pointer

     Derivatives the array of differential states value.

 

Work Array Functions

Member function

Input Data

Output Data

void SetNumRWork(const int);

Integer value

     Defines the size of creating double array.

void

void SetNumIWork(const int);

Integer value

     Defines the size of creating integer array.

void

double *GetRWorkPtr(void);

 

void

Double pointer

     Defines the array of RWork.

int    *GetIWorkPtr(void);

void

Integer pointer

     Defines the array of IWork.

 

Message functions

Member Function

Input Data

Output Data

void WriteToMessageFile

(char *string);

 

String pointer

     Defines the string to output the message file.

void

void SetErrorStatus

(char *string);

String pointer

     Defines the error string to output the message file.

     If the function is called, the simulation is quitted.

void