MATLAB Production Server C Client
R2016a
|
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | mpsErrorInfoHTTP |
Details about a non-200 HTTP response. More... | |
struct | matlabStackFrame |
Entry in the MATLAB runtime stack. More... | |
struct | mpsErrorInfoMATLAB |
Details about a MATLAB execution error. More... | |
struct | mpsErrorInfoGeneric |
Details about an error not caused by non-200 HTTP errors or MATLAB execution errors. More... | |
struct | mpsErrorInfo |
Error thrown when a MATLAB function is invoked by the MATLAB Production Server client context. More... | |
struct | mpsClientRuntime |
MATLAB Production Server client API container. More... | |
Macros | |
#define | MPS_CLIENT_1_0 0x00010000 |
Copyright (C) 2015 The MathWorks, Inc. More... | |
#define | MPS_CLIENT_1_1 0x00010001 |
#define | MPS_MAX_VER MPS_CLIENT_1_1 |
#define | MPS_DLL_EXPORT_SYM |
#define | MPS_DLL_IMPORT_SYM |
#define | MPSCLIENT_PUBLISHED_API MPS_DLL_IMPORT_SYM |
#define | MPSCLIENT_PUBLISHED_API_EXTERN_C extern "C" MPSCLIENT_PUBLISHED_API |
#define | TMW_BITS_PER_INT -1 |
#define | TMW_BITS_PER_LONG -1 |
#define | TMW_BITS_PER_SCHAR -1 |
#define | TMW_BITS_PER_SHRT -1 |
Typedefs | |
typedef uint64_t | uint64 |
typedef uint64 | mpsSize |
Type that represents size values, such as array dimensions. More... | |
typedef uint64 | mpsIndex |
Type that represents index values, such as indices into arrays. More... | |
typedef struct mpsArray | mpsArray |
Fundamental type underlying MATLAB data. More... | |
typedef struct mpsClientConfig | mpsClientConfig |
Structure containing information configuring the connection between the client and a server instance. More... | |
typedef struct mpsClientContext | mpsClientContext |
Establishes a connection between a client and a server. More... | |
typedef UINT16_T | CHAR16_T |
typedef CHAR16_T | mpsChar |
typedef bool | mpsLogical |
Type for logical array. More... | |
typedef enum mpsErrorInfoType | mpsErrorInfoType |
Types of errors that can be thrown when MATLAB function invocation fails. More... | |
typedef struct mpsErrorInfoHTTP | mpsErrorInfoHTTP |
Details about a non-200 HTTP response. More... | |
typedef struct matlabStackFrame | matlabStackFrame |
Entry in the MATLAB runtime stack. More... | |
typedef struct mpsErrorInfoMATLAB | mpsErrorInfoMATLAB |
Details about a MATLAB execution error. More... | |
typedef struct mpsErrorInfoGeneric | mpsErrorInfoGeneric |
Details about an error not caused by non-200 HTTP errors or MATLAB execution errors. More... | |
typedef struct mpsErrorInfo | mpsErrorInfo |
Error thrown when a MATLAB function is invoked by the MATLAB Production Server client context. More... | |
typedef enum mpsStatus | mpsStatus |
Error status codes for all methods which are part of the MATLAB Production Server client API. More... | |
typedef enum mpsComplexity | mpsComplexity |
Flag specifying whether array has imaginary components. More... | |
typedef enum mpsClassID | mpsClassID |
Flag identifying class of array. More... | |
typedef struct mpsClientRuntime | mpsClientRuntime |
MATLAB Production Server client API container. More... | |
Enumerations | |
enum | mpsErrorInfoType { MPS_HTTP_ERROR_INFO, MPS_MATLAB_ERROR_INFO, MPS_GENERIC_ERROR_INFO } |
Types of errors that can be thrown when MATLAB function invocation fails. More... | |
enum | mpsStatus { MPS_OK, MPS_FAILURE } |
Error status codes for all methods which are part of the MATLAB Production Server client API. More... | |
enum | mpsComplexity { mpsREAL, mpsCOMPLEX } |
Flag specifying whether array has imaginary components. More... | |
enum | mpsClassID { mpsUINT8_CLASS, mpsINT8_CLASS, mpsUINT16_CLASS, mpsINT16_CLASS, mpsUINT32_CLASS, mpsINT32_CLASS, mpsUINT64_CLASS, mpsINT64_CLASS, mpsSINGLE_CLASS, mpsDOUBLE_CLASS, mpsLOGICAL_CLASS, mpsCHAR_CLASS, mpsSTRUCT_CLASS, mpsCELL_CLASS } |
Flag identifying class of array. More... | |
Functions | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsClientRuntime * | mpsInitialize (void) |
Set up the programming environment for MATLAB Production Server client based on version 1.0. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsClientRuntime * | mpsInitializeEx (int version) |
Set up the programming environment for MATLAB Production Server client based on the version number provided by the user. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C void | mpsTerminate (void) |
Perform global clean up of resources consumed by MATLAB Production Server client environment. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C const char * | mpsGetInitializationErrorMessage (void) |
Returns the error message representing the failure in global initialization that sets up the programming environment for MATLAB Production Server client. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsDouble (const mpsArray *mlArr) |
Determine whether mpsArray represents data as double-precision, floating-point numbers. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsSingle (const mpsArray *mlArr) |
Determine whether mpsArray represents data as single-precision, floating-point numbers. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsComplex (const mpsArray *mlArr) |
Determine whether mpsArray contains an imaginary part. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsNumeric (const mpsArray *mlArr) |
Determine whether mpsArray contains numeric data. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsInt64 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as signed 64-bit integers. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsUint64 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as unsigned 64-bit integers. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsInt32 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as signed 32-bit integers. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsUint32 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as unsigned 32-bit integers. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsInt16 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as signed 16-bit integers. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsUint16 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as unsigned 16-bit integers. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsInt8 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as signed 8-bit integers. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsUint8 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as unsigned 8-bit integers. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsChar (const mpsArray *mlArr) |
Determine whether mpsArray represents a string array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsLogical (const mpsArray *mlArr) |
Determine whether mpsArray represents data as mpsLogical . More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsLogicalScalar (const mpsArray *mlArr) |
Determine whether MATLAB treats the scalar data in the mpsArray as logical or numerical. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsLogicalScalarTrue (const mpsArray *mlArr) |
Determine whether scalar array is true. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsStruct (const mpsArray *mlArr) |
Determine whether input is structure array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsCell (const mpsArray *mlArr) |
Determine whether input is cell array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsClass (const mpsArray *mlArr, const char *classname) |
Determine whether array is member of specified class. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsEmpty (const mpsArray *mlArr) |
Determine whether array is empty. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool | mpsIsSparse (const mpsArray *mlArr) |
Determine whether array is sparse. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateDoubleMatrix (mpsSize m, mpsSize n, mpsComplexity complexFlag) |
Create a two-dimensional double-precision floating-point array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateDoubleScalar (double value) |
Create a scalar double-precision floating-point array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateNumericMatrix (mpsSize m, mpsSize n, mpsClassID classid, mpsComplexity complexFlag) |
Create a two-dimensional numeric array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateNumericArray (mpsSize ndim, const mpsSize *dims, mpsClassID classid, mpsComplexity complexFlag) |
Create a two-dimensional numeric array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateString (const char *str) |
Create a string array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateCharMatrixFromStrings (mpsSize rows, const char **str) |
Create a two-dimensional string array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateCharArray (mpsSize ndim, const mpsSize *dims) |
Create a N-dimensional string array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateLogicalScalar (mpsLogical value) |
Create a scalar logical array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateLogicalMatrix (mpsSize m, mpsSize n) |
Create a two-dimensional logical array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateLogicalArray (mpsSize ndim, const mpsSize *dims) |
Create a N-dimensional logical array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateStructMatrix (mpsSize m, mpsSize n, int nfields, const char **fieldnames) |
Create a two-dimensional struct array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateStructArray (mpsSize ndim, const mpsSize *dims, int nfields, const char **fieldnames) |
Create a N-dimensional struct array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateCellMatrix (mpsSize m, mpsSize n) |
Create a two-dimensional cell array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateCellArray (mpsSize ndim, const mpsSize *dims) |
Create a N-dimensional cell array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateSparse (mpsSize m, mpsSize n, mpsSize nzmax, mpsComplexity complexFlag) |
Create a two-dimensional sparse array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsCreateSparseLogicalMatrix (mpsSize m, mpsSize n, mpsSize nzmax) |
Create a two-dimensional sparse array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C void | mpsDestroyArray (mpsArray *mlArr) |
Deallocate the memory occupied by an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsDuplicateArray (const mpsArray *mlArr) |
Make a deep copy of input mpsArray . More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C void | mpsFree (void *data) |
Deallocate heap space using the MATLAB memory management facility. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsSize | mpsGetNumberOfDimensions (const mpsArray *mlArr) |
Determine the number of dimensions in an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C size_t | mpsGetElementSize (const mpsArray *mlArr) |
Determine the number of bytes in each data element of an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C const mpsSize * | mpsGetDimensions (const mpsArray *mlArr) |
Determine how many elements are in each dimension of an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C int | mpsSetDimensions (mpsArray *mlArr, const mpsSize *dims, mpsSize ndim) |
Modify number of dimensions and size of each dimension of an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C size_t | mpsGetNumberOfElements (const mpsArray *mlArr) |
Determine how many elements are in the array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsIndex | mpsCalcSingleSubscript (const mpsArray *mlArr, mpsSize nsubs, mpsIndex *subs) |
Determine how many elements there are between the beginning of an array and a given element. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C size_t | mpsGetM (const mpsArray *mlArr) |
Determine the first dimension of an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C void | mpsSetM (mpsArray *mlArr, mpsSize m) |
Set the first dimension of an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C size_t | mpsGetN (const mpsArray *mlArr) |
Determine the number of columns in an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C void | mpsSetN (mpsArray *mlArr, mpsSize n) |
Set the number of columns in an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C double | mpsGetScalar (const mpsArray *mlArr) |
Determine the value of the first real element of an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C double * | mpsGetPr (const mpsArray *mlArr) |
Access the real data in an array of doubles. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C double * | mpsGetPi (const mpsArray *mlArr) |
Access the imaginary data in an array of doubles. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C void * | mpsGetData (const mpsArray *mlArr) |
Access the real numeric data in an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C void * | mpsGetImagData (const mpsArray *mlArr) |
Access the imaginary data in an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsChar * | mpsGetChars (const mpsArray *mlArr) |
Access the data in a character array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C int | mpsGetString (const mpsArray *mlArr, char *str, mpsSize len) |
Copy the character data of a string array into a C-style string. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C char * | mpsArrayToString (const mpsArray *mlArr) |
Copy the character data of a string array into a C-style string. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsClassID | mpsGetClassID (const mpsArray *mlArr) |
Determine the class of an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C const char * | mpsGetClassName (const mpsArray *mlArr) |
Determine the class of an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsLogical * | mpsGetLogicals (const mpsArray *mlArr) |
Access the first logical element in an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsGetField (const mpsArray *mlArr, mpsIndex index, const char *fieldname) |
Access the value held in the specified element of the specified field of an array of struct. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C void | mpsSetField (mpsArray *mlArr, mpsIndex index, const char *fieldname, mpsArray *pvalue) |
Set the value held in the specified element of the specified field of an array of struct. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C int | mpsGetNumberOfFields (const mpsArray *mlArr) |
Determine the number of fields in an array of struct. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C int | mpsGetFieldNumber (const mpsArray *mlArr, const char *fieldname) |
Determine the number of a field in an array of struct given the field name. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C const char * | mpsGetFieldNameByNumber (const mpsArray *mlArr, int fieldnumber) |
Determine the name of a field in an array of struct given the field number. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsGetFieldByNumber (const mpsArray *mlArr, mpsIndex index, int fieldnumber) |
Access the value held in the specified field number at the indexed element of an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C void | mpsSetFieldByNumber (mpsArray *mlArr, mpsIndex index, int fieldnumber, mpsArray *pvalue) |
Set the value held in the specified field number at the indexed element of an array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C int | mpsAddField (mpsArray *mlArr, const char *fieldname) |
Add a field to an array of struct. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C void | mpsRemoveField (mpsArray *mlArr, int fieldnumber) |
Delete a field from an array of struct. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray * | mpsGetCell (const mpsArray *mlArr, mpsIndex index) |
Access the contents of a cell array at a specified index. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C void | mpsSetCell (mpsArray *mlArr, mpsIndex index, mpsArray *value) |
Set the contents of a cell array at a specified index. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsSize | mpsGetNzmax (const mpsArray *mlArr) |
Determine the number of non-zero elements in a sparse array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C void | mpsSetNzmax (mpsArray *mlArr, mpsSize nzmax) |
Set the maximum number of non-zero elements in a sparse array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsIndex * | mpsGetIr (const mpsArray *mlArr) |
Determine the starting address of the ir array in a sparse array. More... | |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsIndex * | mpsGetJc (const mpsArray *mlArr) |
Determine the starting address of the jc array in a sparse array. More... | |
#define MPS_CLIENT_1_0 0x00010000 |
#define MPS_MAX_VER MPS_CLIENT_1_1 |
#define MPSCLIENT_PUBLISHED_API MPS_DLL_IMPORT_SYM |
#define MPSCLIENT_PUBLISHED_API_EXTERN_C extern "C" MPSCLIENT_PUBLISHED_API |
typedef struct matlabStackFrame matlabStackFrame |
Entry in the MATLAB runtime stack.
typedef enum mpsClassID mpsClassID |
Flag identifying class of array.
typedef struct mpsClientConfig mpsClientConfig |
Structure containing information configuring the connection between the client and a server instance.
mpsClientRuntime
typedef struct mpsClientContext mpsClientContext |
Establishes a connection between a client and a server.
An instance of mpsClientContext
should not be shared across multiple threads at the same time. In a multi-threaded environment, each thread should get its own instance of mpsClientContext
.
mpsClientRuntime
typedef struct mpsClientRuntime mpsClientRuntime |
MATLAB Production Server client API container.
mpsClientRuntime
provides functions needed to create the MATLAB Production Server client execution context, configure it, and use the execution context to execute MATLAB functions hosted by an MATLAB Production Server instance.
typedef enum mpsComplexity mpsComplexity |
Flag specifying whether array has imaginary components.
typedef struct mpsErrorInfo mpsErrorInfo |
Error thrown when a MATLAB function is invoked by the MATLAB Production Server client context.
typedef struct mpsErrorInfoGeneric mpsErrorInfoGeneric |
Details about an error not caused by non-200 HTTP errors or MATLAB execution errors.
typedef struct mpsErrorInfoHTTP mpsErrorInfoHTTP |
Details about a non-200 HTTP response.
typedef struct mpsErrorInfoMATLAB mpsErrorInfoMATLAB |
Details about a MATLAB execution error.
typedef enum mpsErrorInfoType mpsErrorInfoType |
Types of errors that can be thrown when MATLAB function invocation fails.
typedef bool mpsLogical |
Error status codes for all methods which are part of the MATLAB Production Server client API.
enum mpsClassID |
Flag identifying class of array.
enum mpsComplexity |
enum mpsErrorInfoType |
Types of errors that can be thrown when MATLAB function invocation fails.
enum mpsStatus |
MPSCLIENT_PUBLISHED_API_EXTERN_C int mpsAddField | ( | mpsArray * | mlArr, |
const char * | fieldname | ||
) |
Add a field to an array of struct.
mlArr | Pointer to an mpsArray of struct. |
fieldname | Name of the field to add. |
-1
if inputs are invalid or an out-of-memory condition occurs. MPSCLIENT_PUBLISHED_API_EXTERN_C char* mpsArrayToString | ( | const mpsArray * | mlArr | ) |
Copy the character data of a string array into a C-style string.
mlArr | Pointer to an mpsArray having the mpsCHAR_CLASS class. |
NULL
terminated string. MPSCLIENT_PUBLISHED_API_EXTERN_C mpsIndex mpsCalcSingleSubscript | ( | const mpsArray * | mlArr, |
mpsSize | nsubs, | ||
mpsIndex * | subs | ||
) |
Determine how many elements there are between the beginning of an array and a given element.
Arrays in MATLAB are stored column-major, so accessing the elements of an mpsArray
using standard C indexing will produce a transposed array. This function accepts row-major dimension subscripts and calculate the proper column-major index to the the desired value.
mlArr | Pointer to an mpsArray . |
nsubs | Number of elements in the subs array. |
subs | Array of integers. Each value in the array specifies that dimension's subscript. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateCellArray | ( | mpsSize | ndim, |
const mpsSize * | dims | ||
) |
Create a N-dimensional cell array.
ndim | Number of dimensions. If you specify a value that is less than 2, the number of dimensions is automatically set to 2. |
dims | Dimensions array. Each element in the dimensions array contains the size of the array in that dimension. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateCellMatrix | ( | mpsSize | m, |
mpsSize | n | ||
) |
Create a two-dimensional cell array.
m | Number of rows. |
n | Number of columns. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateCharArray | ( | mpsSize | ndim, |
const mpsSize * | dims | ||
) |
Create a N-dimensional string array.
ndim | Number of dimensions. If you specify a value that is less than 2, the number of dimensions is automatically set to 2. |
dims | Dimensions array. Each element in the dimensions array contains the size of the array in that dimension. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateCharMatrixFromStrings | ( | mpsSize | rows, |
const char ** | str | ||
) |
Create a two-dimensional string array.
rows | Number of rows in the created array. The value you specify is the number of strings in str . |
str | Array of strings containing at least rows strings. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateDoubleMatrix | ( | mpsSize | m, |
mpsSize | n, | ||
mpsComplexity | complexFlag | ||
) |
Create a two-dimensional double-precision floating-point array.
m | Number of rows. |
n | Number of columns. |
complexFlag | If the array is to contain imaginary data, set to mpsCOMPLEX . Otherwise, set to mpsREAL . |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateDoubleScalar | ( | double | value | ) |
Create a scalar double-precision floating-point array.
value | Value to which you want to initialize the array. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateLogicalArray | ( | mpsSize | ndim, |
const mpsSize * | dims | ||
) |
Create a N-dimensional logical array.
ndim | Number of dimensions. If you specify a value that is less than 2, the number of dimensions is automatically set to 2. |
dims | Dimensions array. Each element in the dimensions array contains the size of the array in that dimension. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateLogicalMatrix | ( | mpsSize | m, |
mpsSize | n | ||
) |
Create a two-dimensional logical array.
m | Number of rows. |
n | Number of columns. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateLogicalScalar | ( | mpsLogical | value | ) |
Create a scalar logical array.
value | Logical value to which you want to initialize the array. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateNumericArray | ( | mpsSize | ndim, |
const mpsSize * | dims, | ||
mpsClassID | classid, | ||
mpsComplexity | complexFlag | ||
) |
Create a two-dimensional numeric array.
ndim | Number of dimensions. If you specify a value that is less than 2, the number of dimensions is automatically set to 2. |
dims | Dimensions array. Each element in the dimensions array contains the size of the array in that dimension. |
classid | Identifier for the class of the array, which determines the way the numerical data is represented in memory. |
complexFlag | If the array is to contain imaginary data, set to mpsCOMPLEX . Otherwise, set to mpsREAL . |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateNumericMatrix | ( | mpsSize | m, |
mpsSize | n, | ||
mpsClassID | classid, | ||
mpsComplexity | complexFlag | ||
) |
Create a two-dimensional numeric array.
m | Number of rows. |
n | Number of columns. |
classid | Identifier for the class of the array, which determines the way the numerical data is represented in memory. |
complexFlag | If the array is to contain imaginary data, set to mpsCOMPLEX . Otherwise, set to mpsREAL . |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateSparse | ( | mpsSize | m, |
mpsSize | n, | ||
mpsSize | nzmax, | ||
mpsComplexity | complexFlag | ||
) |
Create a two-dimensional sparse array.
m | Number of rows. |
n | Number of columns. |
nzmax | Number of elements to allocate to hold the pr , ir , and, if complexFlag is mpsCOMPLEX ), pi arrays. Set the value to be greater than or equal to the number of non-zero elements you plan to put into the array, but make sure that nzmax is less than or equal to m*n . |
complexFlag | If the array is to contain imaginary data, set to mpsCOMPLEX . Otherwise, set to mpsREAL . |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateSparseLogicalMatrix | ( | mpsSize | m, |
mpsSize | n, | ||
mpsSize | nzmax | ||
) |
Create a two-dimensional sparse array.
m | Number of rows. |
n | Number of columns. |
nzmax | Number of elements to allocate to hold the data. Set the value to be greater than or equal to the number of non-zero elements you plan to put into the array, but make sure that nzmax is less than or equal to m*n . |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateString | ( | const char * | str | ) |
Create a string array.
str | String that is to serve as the initial data. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateStructArray | ( | mpsSize | ndim, |
const mpsSize * | dims, | ||
int | nfields, | ||
const char ** | fieldnames | ||
) |
Create a N-dimensional struct array.
ndim | Number of dimensions. If you specify a value that is less than 2, the number of dimensions is automatically set to 2. |
dims | Dimensions array. Each element in the dimensions array contains the size of the array in that dimension. |
nfields | Number of fields in each element. |
fieldnames | List of field names. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateStructMatrix | ( | mpsSize | m, |
mpsSize | n, | ||
int | nfields, | ||
const char ** | fieldnames | ||
) |
Create a two-dimensional struct array.
m | Number of rows. |
n | Number of columns. |
nfields | Number of fields in each element. |
fieldnames | List of field names. |
MPSCLIENT_PUBLISHED_API_EXTERN_C void mpsDestroyArray | ( | mpsArray * | mlArr | ) |
Deallocate the memory occupied by an array.
mpsDestroyArray
not only deallocates the memory occupied by the array's characteristics fields, but also deallocates all the array's associated data arrays, such as pr
and pi
for complex arrays, ir
and jc
for sparse arrays, fields of structure arrays, and cells of cell arrays. Do not call mpsDestroyArray
on an array you are returning it in a left side argument.
mlArr | Array to destroy |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsDuplicateArray | ( | const mpsArray * | mlArr | ) |
Make a deep copy of input mpsArray
.
mlArr | Pointer to an mpsArray to be duplicated |
mpsArray
MPSCLIENT_PUBLISHED_API_EXTERN_C void mpsFree | ( | void * | data | ) |
Deallocate heap space using the MATLAB memory management facility.
data | Pointer to the beginning of any memory parcel allocated by MATLAB. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsGetCell | ( | const mpsArray * | mlArr, |
mpsIndex | index | ||
) |
Access the contents of a cell array at a specified index.
mlArr | Pointer to an mpsArray cell array. |
index | Number of elements in the cell array between the first element and the desired one. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsChar* mpsGetChars | ( | const mpsArray * | mlArr | ) |
Access the data in a character array.
mlArr | Pointer to an mpsArray . |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsClassID mpsGetClassID | ( | const mpsArray * | mlArr | ) |
Determine the class of an array.
mlArr | Pointer to an mpsArray . |
MPSCLIENT_PUBLISHED_API_EXTERN_C const char* mpsGetClassName | ( | const mpsArray * | mlArr | ) |
Determine the class of an array.
mlArr | Pointer to an mpsArray . |
MPSCLIENT_PUBLISHED_API_EXTERN_C void* mpsGetData | ( | const mpsArray * | mlArr | ) |
Access the real numeric data in an array.
mlArr | Pointer to an mpsArray . |
MPSCLIENT_PUBLISHED_API_EXTERN_C const mpsSize* mpsGetDimensions | ( | const mpsArray * | mlArr | ) |
Determine how many elements are in each dimension of an array.
mlArr | Pointer to an mpsArray |
NULL
terminated. MPSCLIENT_PUBLISHED_API_EXTERN_C size_t mpsGetElementSize | ( | const mpsArray * | mlArr | ) |
Determine the number of bytes in each data element of an array.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsGetField | ( | const mpsArray * | mlArr, |
mpsIndex | index, | ||
const char * | fieldname | ||
) |
Access the value held in the specified element of the specified field of an array of struct.
mlArr | Pointer to an mpsArray of struct. |
index | Index of the desired element. |
fieldname | Name of the field whose value you want to extract. |
mpsArray
in the specified field at the specified fieldname
. MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsGetFieldByNumber | ( | const mpsArray * | mlArr, |
mpsIndex | index, | ||
int | fieldnumber | ||
) |
Access the value held in the specified field number at the indexed element of an array.
mlArr | Pointer to an mpsArray of struct. |
index | Index of the desired element. |
fieldnumber | Number of a field in the struct. |
mpsArray
in the specified field for the desired element. MPSCLIENT_PUBLISHED_API_EXTERN_C const char* mpsGetFieldNameByNumber | ( | const mpsArray * | mlArr, |
int | fieldnumber | ||
) |
Determine the name of a field in an array of struct given the field number.
mlArr | Pointer to an mpsArray of struct. |
fieldnumber | Number of a field in the struct. |
MPSCLIENT_PUBLISHED_API_EXTERN_C int mpsGetFieldNumber | ( | const mpsArray * | mlArr, |
const char * | fieldname | ||
) |
Determine the number of a field in an array of struct given the field name.
mlArr | Pointer to an mpsArray of struct. |
fieldname | Name of a field in the struct. |
MPSCLIENT_PUBLISHED_API_EXTERN_C void* mpsGetImagData | ( | const mpsArray * | mlArr | ) |
Access the imaginary data in an array.
mlArr | Pointer to an mpsArray . |
MPSCLIENT_PUBLISHED_API_EXTERN_C const char* mpsGetInitializationErrorMessage | ( | void | ) |
Returns the error message representing the failure in global initialization that sets up the programming environment for MATLAB Production Server client.
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsIndex* mpsGetIr | ( | const mpsArray * | mlArr | ) |
Determine the starting address of the ir
array in a sparse array.
mlArr | Pointer to a sparse mpsArray . |
ir
array. MPSCLIENT_PUBLISHED_API_EXTERN_C mpsIndex* mpsGetJc | ( | const mpsArray * | mlArr | ) |
Determine the starting address of the jc
array in a sparse array.
mlArr | Pointer to a sparse mpsArray . |
jc
array. MPSCLIENT_PUBLISHED_API_EXTERN_C mpsLogical* mpsGetLogicals | ( | const mpsArray * | mlArr | ) |
Access the first logical element in an array.
mlArr | Pointer to an mpsArray . |
MPSCLIENT_PUBLISHED_API_EXTERN_C size_t mpsGetM | ( | const mpsArray * | mlArr | ) |
Determine the first dimension of an array.
mlArr | Pointer to an mpsArray . |
MPSCLIENT_PUBLISHED_API_EXTERN_C size_t mpsGetN | ( | const mpsArray * | mlArr | ) |
Determine the number of columns in an array.
mlArr | Pointer to an mpsArray . |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsSize mpsGetNumberOfDimensions | ( | const mpsArray * | mlArr | ) |
Determine the number of dimensions in an array.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C size_t mpsGetNumberOfElements | ( | const mpsArray * | mlArr | ) |
Determine how many elements are in the array.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C int mpsGetNumberOfFields | ( | const mpsArray * | mlArr | ) |
Determine the number of fields in an array of struct.
mlArr | Pointer to an mpsArray of struct. |
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsSize mpsGetNzmax | ( | const mpsArray * | mlArr | ) |
Determine the number of non-zero elements in a sparse array.
mlArr | Pointer to a sparse mpsArray . |
MPSCLIENT_PUBLISHED_API_EXTERN_C double* mpsGetPi | ( | const mpsArray * | mlArr | ) |
Access the imaginary data in an array of doubles.
mlArr | Pointer to an mpsArray of doubles. |
MPSCLIENT_PUBLISHED_API_EXTERN_C double* mpsGetPr | ( | const mpsArray * | mlArr | ) |
Access the real data in an array of doubles.
mlArr | Pointer to an mpsArray of doubles. |
MPSCLIENT_PUBLISHED_API_EXTERN_C double mpsGetScalar | ( | const mpsArray * | mlArr | ) |
Determine the value of the first real element of an array.
mlArr | Pointer to an mpsArray . |
MPSCLIENT_PUBLISHED_API_EXTERN_C int mpsGetString | ( | const mpsArray * | mlArr, |
char * | str, | ||
mpsSize | len | ||
) |
Copy the character data of a string array into a C-style string.
mlArr | Pointer to an mpsArray having the mpsCHAR_CLASS class. |
str | Starting location for the string. mpsGetString writes the character data into str and then terminates the string with a NULL character. |
len | Size, in bytes, of destination buffer pointed to by str . |
0
on success or if strlen == 0
, and 1
on failure. MPSCLIENT_PUBLISHED_API_EXTERN_C mpsClientRuntime* mpsInitialize | ( | void | ) |
Set up the programming environment for MATLAB Production Server client based on version 1.0.
This global initialization should be done just once in the program. Invoking it multiple times will return the pointer to the same underlying API struct.
MPSCLIENT_PUBLISHED_API_EXTERN_C mpsClientRuntime* mpsInitializeEx | ( | int | version | ) |
Set up the programming environment for MATLAB Production Server client based on the version number provided by the user.
This function can only be used to access the versions above 1.0. To use version 1.0, please use mpsInitialize()
function. This global initialization should be done just once in the program. Invoking it multiple times will return the pointer to the same underlying API struct.
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsCell | ( | const mpsArray * | mlArr | ) |
Determine whether input is cell array.
mlArr | Pointer to an mpsArray |
mxCELL_CLASS
, and false otherwise. MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsChar | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents a string array.
mlArr | Pointer to an mpsArray |
mpsCHAR_CLASS
, and false otherwise. MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsClass | ( | const mpsArray * | mlArr, |
const char * | classname | ||
) |
Determine whether array is member of specified class.
mlArr | Pointer to an mpsArray | ||||||||||||||||||||||||||||||||
classname | Array category you are testing. You can specify any one of the following predefined constants:
|
In the table, <class_name>
represents the name of a specific MATLAB custom object. You can also specify one of your own class names.
classname
, and false otherwise. MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsComplex | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
contains an imaginary part.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsDouble | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as double-precision, floating-point numbers.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsEmpty | ( | const mpsArray * | mlArr | ) |
Determine whether array is empty.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsInt16 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as signed 16-bit integers.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsInt32 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as signed 32-bit integers.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsInt64 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as signed 64-bit integers.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsInt8 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as signed 8-bit integers.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsLogical | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as mpsLogical
.
mlArr | Pointer to an mpsArray |
mpsLogical
, and false otherwise. MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsLogicalScalar | ( | const mpsArray * | mlArr | ) |
Determine whether MATLAB treats the scalar data in the mpsArray
as logical or numerical.
mlArr | Pointer to an mpsArray |
mpsLogical
and has 1-by-1 dimensions, and false otherwise. MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsLogicalScalarTrue | ( | const mpsArray * | mlArr | ) |
Determine whether scalar array is true.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsNumeric | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
contains numeric data.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsSingle | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as single-precision, floating-point numbers.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsSparse | ( | const mpsArray * | mlArr | ) |
Determine whether array is sparse.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsStruct | ( | const mpsArray * | mlArr | ) |
Determine whether input is structure array.
mlArr | Pointer to an mpsArray |
mpsStruct
, and false otherwise. MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsUint16 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as unsigned 16-bit integers.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsUint32 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as unsigned 32-bit integers.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsUint64 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as unsigned 64-bit integers.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsUint8 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as unsigned 8-bit integers.
mlArr | Pointer to an mpsArray |
MPSCLIENT_PUBLISHED_API_EXTERN_C void mpsRemoveField | ( | mpsArray * | mlArr, |
int | fieldnumber | ||
) |
Delete a field from an array of struct.
mlArr | Pointer to an mpsArray of struct. |
fieldnumber | Number of the field to delete. |
MPSCLIENT_PUBLISHED_API_EXTERN_C void mpsSetCell | ( | mpsArray * | mlArr, |
mpsIndex | index, | ||
mpsArray * | value | ||
) |
Set the contents of a cell array at a specified index.
mlArr | Pointer to an mpsArray cell array. |
index | Number of elements in the cell array between the first element and the desired one. |
value | Pointer to new value for the cell. You can put an mpsArray of any type into a cell. You can even put another cell mpsArray into a cell. |
MPSCLIENT_PUBLISHED_API_EXTERN_C int mpsSetDimensions | ( | mpsArray * | mlArr, |
const mpsSize * | dims, | ||
mpsSize | ndim | ||
) |
Modify number of dimensions and size of each dimension of an array.
mlArr | Pointer to an mpsArray |
dims | Dimensions array. Each element in the dimensions array contains the size of the array in that dimension. |
ndim | Number of dimensions. |
0
on success, and 1
on failure. MPSCLIENT_PUBLISHED_API_EXTERN_C void mpsSetField | ( | mpsArray * | mlArr, |
mpsIndex | index, | ||
const char * | fieldname, | ||
mpsArray * | pvalue | ||
) |
Set the value held in the specified element of the specified field of an array of struct.
mlArr | Pointer to an mpsArray of struct. |
index | Index of the desired element. |
fieldname | Name of a field in the struct. The field must exist. |
pvalue | Pointer to an mpsArray containing the data you want to assign to fieldname . |
MPSCLIENT_PUBLISHED_API_EXTERN_C void mpsSetFieldByNumber | ( | mpsArray * | mlArr, |
mpsIndex | index, | ||
int | fieldnumber, | ||
mpsArray * | pvalue | ||
) |
Set the value held in the specified field number at the indexed element of an array.
mlArr | Pointer to an mpsArray of struct. |
index | Index of the desired element. |
fieldnumber | Number of a field in the struct. |
pvalue | Pointer to the mpsArray containing the data to set. |
MPSCLIENT_PUBLISHED_API_EXTERN_C void mpsSetM | ( | mpsArray * | mlArr, |
mpsSize | m | ||
) |
Set the first dimension of an array.
mlArr | Pointer to an mpsArray . |
m | First dimension of the array. |
MPSCLIENT_PUBLISHED_API_EXTERN_C void mpsSetN | ( | mpsArray * | mlArr, |
mpsSize | n | ||
) |
Set the number of columns in an array.
mlArr | Pointer to an mpsArray . |
n | Number of columns in the array. |
MPSCLIENT_PUBLISHED_API_EXTERN_C void mpsSetNzmax | ( | mpsArray * | mlArr, |
mpsSize | nzmax | ||
) |
Set the maximum number of non-zero elements in a sparse array.
mlArr | Pointer to a sparse mpsArray . |
nzmax | Number of elements allocated to hold the arrays pointed to by ir , pr , and pi . Set nzmax greater than or equal to the number of non-zero elements in the array, but set it to be less than or equal to the number of rows times the number of columns. If you specify a value of 0 , the value of nzmax is automatically set to 1 . |
MPSCLIENT_PUBLISHED_API_EXTERN_C void mpsTerminate | ( | void | ) |
Perform global clean up of resources consumed by MATLAB Production Server client environment.
This should be done just once in the application. Invoking it multiple times will have no effect.