![]() |
EasyLink
EasyLink is a C++ software development kit for developing blocks for SIMULINK (S-functions)
|
#include <BaseFunction.h>
Inherited by Function, and Function.
Static Public Member Functions | |
static void | setInputPortsCount (int portsCount) |
static void | setInputPort (int port, int nRows, int nCols, mxClassID type=mxDOUBLE_CLASS, mxComplexity complexFlag=mxREAL) |
static void | initializeInputPortSizes () |
static void | setOutputPortsCount (int portsCount) |
static void | setOutputPort (int port, int nRows, int nCols, mxClassID type=mxDOUBLE_CLASS, mxComplexity complexFlag=mxREAL) |
static void | initializeOutputPortSizes () |
static void | outputs () |
static double | getInputDouble (int port) |
template<typename _Scalar > | |
static _Scalar | getInputScalar (int port) |
template<typename _Scalar > | |
static Array< _Scalar > | getInputArray (int port) |
static std::string | getInputString (int port) |
static void * | getInputData (int port) |
static int | getInputWidth (int port) |
static int | getInputNRows (int port) |
static int | getInputNCols (int port) |
static void | setOutputDouble (int port, double value) |
template<typename _Scalar > | |
static void | setOutputScalar (int port, _Scalar value) |
template<typename _Scalar > | |
static Array< _Scalar > | getOutputArray (int port) |
static void * | getOutputData (int port) |
static int | getOutputWidth (int port) |
static int | getOutputNRows (int port) |
static int | getOutputNCols (int port) |
BaseFunction is the basis class for designing new C++ MEX functions.
Use the file mex_array_product.cpp as a template to write a new function.
Definition at line 21 of file BaseFunction.h.
|
inlinestatic |
Returns an array mapping an input port (right-side argument).
Definition at line 143 of file BaseFunction.h.
|
inlinestatic |
Returns a pointer to the first element of the input port data (right-side argument).
Definition at line 164 of file BaseFunction.h.
|
inlinestatic |
Returns the double scalar value of an input port (right-side argument).
Definition at line 123 of file BaseFunction.h.
|
inlinestatic |
Returns the number of cols of an input port (right-side argument).
Definition at line 192 of file BaseFunction.h.
|
inlinestatic |
Returns the number of rows of an input port (right-side argument).
Definition at line 185 of file BaseFunction.h.
|
inlinestatic |
Returns the scalar value of an input port (right-side argument).
Definition at line 133 of file BaseFunction.h.
|
inlinestatic |
Returns the string value of an input port (right-side argument).
Definition at line 152 of file BaseFunction.h.
|
inlinestatic |
Returns the number of elements of an input port (right-side argument).
If the input port is a 1-D array with w elements, this function returns w.
If the input port is an M-by-N array, this function returns m*n.
Definition at line 178 of file BaseFunction.h.
|
inlinestatic |
Returns an array mapping an output port (left-side argument).
Definition at line 221 of file BaseFunction.h.
|
inlinestatic |
Returns a pointer to the first element of the output port data (left-side argument).
Definition at line 231 of file BaseFunction.h.
|
inlinestatic |
Returns the number of cols of an output port (left-side argument).
Definition at line 259 of file BaseFunction.h.
|
inlinestatic |
Returns the number of rows of an output port (left-side argument).
Definition at line 252 of file BaseFunction.h.
|
inlinestatic |
Returns the number of elements of an output port (left-side argument).
If the output port is a 1-D array with w elements, this function returns w.
If the output port is an M-by-N array, this function returns m*n.
Definition at line 245 of file BaseFunction.h.
|
inlinestatic |
This is the first static method that is called within the MEX-Function.
This method must: 1) specify the number of input ports (right-side arguments) 2) specify the dimensions and the type of each intput port
This method must be overridded in your custom function.
Definition at line 72 of file BaseFunction.h.
|
inlinestatic |
This is the second static method that is called within the MEX-Function.
This method must: 1) specify the number of output ports (left-side arguments) 2) specify the dimensions and the type of each output port
This method must be overridded in your custom function.
Definition at line 106 of file BaseFunction.h.
|
inlinestatic |
This is the third static method that is called within the MEX-Function.
The method have to compute the function's outputs for given inputs and to store the results using getOutput or using writeOutput.
This method must be overridded in your custom function.
Definition at line 117 of file BaseFunction.h.
|
inlinestatic |
This method allows to set the dimensions and the type of an input port (right-side argument).
Use -1 to specify dynamically dimensioned intput arrays.
Definition at line 44 of file BaseFunction.h.
|
inlinestatic |
This method allows to set the number of input ports (right-side
arguments).
Definition at line 33 of file BaseFunction.h.
|
inlinestatic |
Writes a double value to an output port (left-side argument).
Definition at line 199 of file BaseFunction.h.
|
inlinestatic |
This method allows to set the dimensions and the type of an output port (left-side argument).
Definition at line 88 of file BaseFunction.h.
|
inlinestatic |
This method allows to set the number of output ports (left-side arguments).
Definition at line 79 of file BaseFunction.h.
|
inlinestatic |
Writes a scalar value to an output port (left-side argument).
Definition at line 210 of file BaseFunction.h.