MATLAB Production Server C Client
R2021b
component: mds_c_client, module directory: deployment_server/client/c/mps, copyright: MathWorks
|
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | matlabStackFrame |
Entry in the MATLAB runtime stack. More... | |
struct | mpsClientRuntime |
MATLAB Production Server client API container. More... | |
struct | mpsErrorInfo |
Error thrown when a MATLAB function is invoked by the MATLAB Production Server client context. More... | |
struct | mpsErrorInfoGeneric |
Details about an error not caused by non-200 HTTP errors or MATLAB execution errors. More... | |
struct | mpsErrorInfoHTTP |
Details about a non-200 HTTP response. More... | |
struct | mpsErrorInfoMATLAB |
Details about a MATLAB execution error. More... | |
Macros | |
#define | MPS_CLIENT_1_0 0x00010000 |
Copyright (C) 2015 The MathWorks, Inc. More... | |
#define | MPS_CLIENT_1_1 0x00010001 |
#define | MPS_DLL_EXPORT_SYM |
#define | MPS_DLL_IMPORT_SYM |
#define | MPS_MAX_VER MPS_CLIENT_1_1 |
#define | MPSCLIENT_PUBLISHED_API MPS_DLL_EXPORT_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 UINT16_T | CHAR16_T |
typedef struct matlabStackFrame | matlabStackFrame |
Entry in the MATLAB runtime stack. More... | |
typedef struct mpsArray | mpsArray |
Fundamental type underlying MATLAB data. More... | |
typedef CHAR16_T | mpsChar |
typedef enum mpsClassID | mpsClassID |
Flag identifying class of array. 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 struct mpsClientRuntime | mpsClientRuntime |
MATLAB Production Server client API container. More... | |
typedef enum mpsComplexity | mpsComplexity |
Flag specifying whether array has imaginary components. More... | |
typedef struct mpsErrorInfo | mpsErrorInfo |
Error thrown when a MATLAB function is invoked by the MATLAB Production Server client context. More... | |
typedef struct mpsErrorInfoGeneric | mpsErrorInfoGeneric |
Details about an error not caused by non-200 HTTP errors or MATLAB execution errors. More... | |
typedef struct mpsErrorInfoHTTP | mpsErrorInfoHTTP |
Details about a non-200 HTTP response. More... | |
typedef struct mpsErrorInfoMATLAB | mpsErrorInfoMATLAB |
Details about a MATLAB execution error. More... | |
typedef enum mpsErrorInfoType | mpsErrorInfoType |
Types of errors that can be thrown when MATLAB function invocation fails. More... | |
typedef uint64 | mpsIndex |
Type that represents index values, such as indices into arrays. More... | |
typedef bool | mpsLogical |
Type for logical array. More... | |
typedef uint64 | mpsSize |
Type that represents size values, such as array dimensions. More... | |
typedef enum mpsStatus | mpsStatus |
Error status codes for all methods which are part of the MATLAB Production Server client API. More... | |
typedef uint64_t | uint64 |
Enumerations | |
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... | |
enum | mpsComplexity { mpsREAL, mpsCOMPLEX } |
Flag specifying whether array has imaginary components. More... | |
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... | |
Functions | |
int | mpsAddField (mpsArray *mlArr, const char *fieldname) |
Add a field to an array of struct. More... | |
char * | mpsArrayToString (const mpsArray *mlArr) |
Copy the character data of a string array into a C-style string. More... | |
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... | |
mpsArray * | mpsCreateCellArray (mpsSize ndim, const mpsSize *dims) |
Create a N-dimensional cell array. More... | |
mpsArray * | mpsCreateCellMatrix (mpsSize m, mpsSize n) |
Create a two-dimensional cell array. More... | |
mpsArray * | mpsCreateCharArray (mpsSize ndim, const mpsSize *dims) |
Create a N-dimensional string array. More... | |
mpsArray * | mpsCreateCharMatrixFromStrings (mpsSize rows, const char **str) |
Create a two-dimensional string array. More... | |
mpsArray * | mpsCreateDoubleMatrix (mpsSize m, mpsSize n, mpsComplexity complexFlag) |
Create a two-dimensional double-precision floating-point array. More... | |
mpsArray * | mpsCreateDoubleScalar (double value) |
Create a scalar double-precision floating-point array. More... | |
mpsArray * | mpsCreateLogicalArray (mpsSize ndim, const mpsSize *dims) |
Create a N-dimensional logical array. More... | |
mpsArray * | mpsCreateLogicalMatrix (mpsSize m, mpsSize n) |
Create a two-dimensional logical array. More... | |
mpsArray * | mpsCreateLogicalScalar (mpsLogical value) |
Create a scalar logical array. More... | |
mpsArray * | mpsCreateNumericArray (mpsSize ndim, const mpsSize *dims, mpsClassID classid, mpsComplexity complexFlag) |
Create a two-dimensional numeric array. More... | |
mpsArray * | mpsCreateNumericMatrix (mpsSize m, mpsSize n, mpsClassID classid, mpsComplexity complexFlag) |
Create a two-dimensional numeric array. More... | |
mpsArray * | mpsCreateSparse (mpsSize m, mpsSize n, mpsSize nzmax, mpsComplexity complexFlag) |
Create a two-dimensional sparse array. More... | |
mpsArray * | mpsCreateSparseLogicalMatrix (mpsSize m, mpsSize n, mpsSize nzmax) |
Create a two-dimensional sparse array. More... | |
mpsArray * | mpsCreateString (const char *str) |
Create a string array. More... | |
mpsArray * | mpsCreateStructArray (mpsSize ndim, const mpsSize *dims, int nfields, const char **fieldnames) |
Create a N-dimensional struct array. More... | |
mpsArray * | mpsCreateStructMatrix (mpsSize m, mpsSize n, int nfields, const char **fieldnames) |
Create a two-dimensional struct array. More... | |
void | mpsDestroyArray (mpsArray *mlArr) |
Deallocate the memory occupied by an array. More... | |
mpsArray * | mpsDuplicateArray (const mpsArray *mlArr) |
Make a deep copy of input mpsArray . More... | |
void | mpsFree (void *data) |
Deallocate heap space using the MATLAB memory management facility. More... | |
mpsArray * | mpsGetCell (const mpsArray *mlArr, mpsIndex index) |
Access the contents of a cell array at a specified index. More... | |
mpsChar * | mpsGetChars (const mpsArray *mlArr) |
Access the data in a character array. More... | |
mpsClassID | mpsGetClassID (const mpsArray *mlArr) |
Determine the class of an array. More... | |
const char * | mpsGetClassName (const mpsArray *mlArr) |
Determine the class of an array. More... | |
void * | mpsGetData (const mpsArray *mlArr) |
Access the real numeric data in an array. More... | |
const mpsSize * | mpsGetDimensions (const mpsArray *mlArr) |
Determine how many elements are in each dimension of an array. More... | |
size_t | mpsGetElementSize (const mpsArray *mlArr) |
Determine the number of bytes in each data element of an array. More... | |
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... | |
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... | |
const char * | mpsGetFieldNameByNumber (const mpsArray *mlArr, int fieldnumber) |
Determine the name of a field in an array of struct given the field number. More... | |
int | mpsGetFieldNumber (const mpsArray *mlArr, const char *fieldname) |
Determine the number of a field in an array of struct given the field name. More... | |
void * | mpsGetImagData (const mpsArray *mlArr) |
Access the imaginary data in an array. More... | |
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... | |
mpsIndex * | mpsGetIr (const mpsArray *mlArr) |
Determine the starting address of the ir array in a sparse array. More... | |
mpsIndex * | mpsGetJc (const mpsArray *mlArr) |
Determine the starting address of the jc array in a sparse array. More... | |
mpsLogical * | mpsGetLogicals (const mpsArray *mlArr) |
Access the first logical element in an array. More... | |
size_t | mpsGetM (const mpsArray *mlArr) |
Determine the first dimension of an array. More... | |
size_t | mpsGetN (const mpsArray *mlArr) |
Determine the number of columns in an array. More... | |
mpsSize | mpsGetNumberOfDimensions (const mpsArray *mlArr) |
Determine the number of dimensions in an array. More... | |
size_t | mpsGetNumberOfElements (const mpsArray *mlArr) |
Determine how many elements are in the array. More... | |
int | mpsGetNumberOfFields (const mpsArray *mlArr) |
Determine the number of fields in an array of struct. More... | |
mpsSize | mpsGetNzmax (const mpsArray *mlArr) |
Determine the number of non-zero elements in a sparse array. More... | |
double * | mpsGetPi (const mpsArray *mlArr) |
Access the imaginary data in an array of doubles. More... | |
double * | mpsGetPr (const mpsArray *mlArr) |
Access the real data in an array of doubles. More... | |
double | mpsGetScalar (const mpsArray *mlArr) |
Determine the value of the first real element of an array. More... | |
int | mpsGetString (const mpsArray *mlArr, char *str, mpsSize len) |
Copy the character data of a string array into a C-style string. More... | |
mpsClientRuntime * | mpsInitialize (void) |
Set up the programming environment for MATLAB Production Server client based on version 1.0. More... | |
mpsClientRuntime * | mpsInitializeEx (int version) |
Set up the programming environment for MATLAB Production Server client based on the version number provided by the user. More... | |
bool | mpsIsCell (const mpsArray *mlArr) |
Determine whether input is cell array. More... | |
bool | mpsIsChar (const mpsArray *mlArr) |
Determine whether mpsArray represents a string array. More... | |
bool | mpsIsClass (const mpsArray *mlArr, const char *classname) |
Determine whether array is member of specified class. More... | |
bool | mpsIsComplex (const mpsArray *mlArr) |
Determine whether mpsArray contains an imaginary part. More... | |
bool | mpsIsDouble (const mpsArray *mlArr) |
Determine whether mpsArray represents data as double-precision, floating-point numbers. More... | |
bool | mpsIsEmpty (const mpsArray *mlArr) |
Determine whether array is empty. More... | |
bool | mpsIsInt16 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as signed 16-bit integers. More... | |
bool | mpsIsInt32 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as signed 32-bit integers. More... | |
bool | mpsIsInt64 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as signed 64-bit integers. More... | |
bool | mpsIsInt8 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as signed 8-bit integers. More... | |
bool | mpsIsLogical (const mpsArray *mlArr) |
Determine whether mpsArray represents data as mpsLogical . More... | |
bool | mpsIsLogicalScalar (const mpsArray *mlArr) |
Determine whether MATLAB treats the scalar data in the mpsArray as logical or numerical. More... | |
bool | mpsIsLogicalScalarTrue (const mpsArray *mlArr) |
Determine whether scalar array is true. More... | |
bool | mpsIsNumeric (const mpsArray *mlArr) |
Determine whether mpsArray contains numeric data. More... | |
bool | mpsIsSingle (const mpsArray *mlArr) |
Determine whether mpsArray represents data as single-precision, floating-point numbers. More... | |
bool | mpsIsSparse (const mpsArray *mlArr) |
Determine whether array is sparse. More... | |
bool | mpsIsStruct (const mpsArray *mlArr) |
Determine whether input is structure array. More... | |
bool | mpsIsUint16 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as unsigned 16-bit integers. More... | |
bool | mpsIsUint32 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as unsigned 32-bit integers. More... | |
bool | mpsIsUint64 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as unsigned 64-bit integers. More... | |
bool | mpsIsUint8 (const mpsArray *mlArr) |
Determine whether mpsArray represents data as unsigned 8-bit integers. More... | |
void | mpsRemoveField (mpsArray *mlArr, int fieldnumber) |
Delete a field from an array of struct. More... | |
void | mpsSetCell (mpsArray *mlArr, mpsIndex index, mpsArray *value) |
Set the contents of a cell array at a specified index. More... | |
int | mpsSetDimensions (mpsArray *mlArr, const mpsSize *dims, mpsSize ndim) |
Modify number of dimensions and size of each dimension of an array. More... | |
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... | |
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... | |
void | mpsSetM (mpsArray *mlArr, mpsSize m) |
Set the first dimension of an array. More... | |
void | mpsSetN (mpsArray *mlArr, mpsSize n) |
Set the number of columns in an array. More... | |
void | mpsSetNzmax (mpsArray *mlArr, mpsSize nzmax) |
Set the maximum number of non-zero elements in a sparse array. More... | |
void | mpsTerminate (void) |
Perform global clean up of resources consumed by MATLAB Production Server client environment. More... | |
#define MPS_CLIENT_1_0 0x00010000 |
#define MPS_MAX_VER MPS_CLIENT_1_1 |
#define MPSCLIENT_PUBLISHED_API MPS_DLL_EXPORT_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 |
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. 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. 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. |
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. |
Create a two-dimensional cell array.
m | Number of rows. |
n | Number of columns. |
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. |
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. |
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 . |
mpsArray* mpsCreateDoubleScalar | ( | double | value | ) |
Create a scalar double-precision floating-point array.
value | Value to which you want to initialize the array. |
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. |
Create a two-dimensional logical array.
m | Number of rows. |
n | Number of columns. |
mpsArray* mpsCreateLogicalScalar | ( | mpsLogical | value | ) |
Create a scalar logical array.
value | Logical value to which you want to initialize the array. |
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 . |
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 . |
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 . |
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 . |
mpsArray* mpsCreateString | ( | const char * | str | ) |
Create a string array.
str | String that is to serve as the initial data. |
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. |
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. |
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 |
Make a deep copy of input mpsArray
.
mlArr | Pointer to an mpsArray to be duplicated |
mpsArray
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. |
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. |
Access the data in a character array.
mlArr | Pointer to an mpsArray . |
mpsClassID mpsGetClassID | ( | const mpsArray * | mlArr | ) |
Determine the class of an array.
mlArr | Pointer to an mpsArray . |
const char* mpsGetClassName | ( | const mpsArray * | mlArr | ) |
Determine the class of an array.
mlArr | Pointer to an mpsArray . |
void* mpsGetData | ( | const mpsArray * | mlArr | ) |
Access the real numeric data in an array.
mlArr | Pointer to an mpsArray . |
Determine how many elements are in each dimension of an array.
mlArr | Pointer to an mpsArray |
NULL
terminated. size_t mpsGetElementSize | ( | const mpsArray * | mlArr | ) |
Determine the number of bytes in each data element of an array.
mlArr | Pointer to an mpsArray |
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
. 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. 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. |
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. |
void* mpsGetImagData | ( | const mpsArray * | mlArr | ) |
Access the imaginary data in an array.
mlArr | Pointer to an mpsArray . |
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.
Determine the starting address of the ir
array in a sparse array.
mlArr | Pointer to a sparse mpsArray . |
ir
array. Determine the starting address of the jc
array in a sparse array.
mlArr | Pointer to a sparse mpsArray . |
jc
array. mpsLogical* mpsGetLogicals | ( | const mpsArray * | mlArr | ) |
Access the first logical element in an array.
mlArr | Pointer to an mpsArray . |
size_t mpsGetM | ( | const mpsArray * | mlArr | ) |
Determine the first dimension of an array.
mlArr | Pointer to an mpsArray . |
size_t mpsGetN | ( | const mpsArray * | mlArr | ) |
Determine the number of columns in an array.
mlArr | Pointer to an mpsArray . |
Determine the number of dimensions in an array.
mlArr | Pointer to an mpsArray |
size_t mpsGetNumberOfElements | ( | const mpsArray * | mlArr | ) |
Determine how many elements are in the array.
mlArr | Pointer to an mpsArray |
int mpsGetNumberOfFields | ( | const mpsArray * | mlArr | ) |
Determine the number of fields in an array of struct.
mlArr | Pointer to an mpsArray of struct. |
Determine the number of non-zero elements in a sparse array.
mlArr | Pointer to a sparse mpsArray . |
double* mpsGetPi | ( | const mpsArray * | mlArr | ) |
Access the imaginary data in an array of doubles.
mlArr | Pointer to an mpsArray of doubles. |
double* mpsGetPr | ( | const mpsArray * | mlArr | ) |
Access the real data in an array of doubles.
mlArr | Pointer to an mpsArray of doubles. |
double mpsGetScalar | ( | const mpsArray * | mlArr | ) |
Determine the value of the first real element of an array.
mlArr | Pointer to an mpsArray . |
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. 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.
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.
bool mpsIsCell | ( | const mpsArray * | mlArr | ) |
Determine whether input is cell array.
mlArr | Pointer to an mpsArray |
mxCELL_CLASS
, and false otherwise. bool mpsIsChar | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents a string array.
mlArr | Pointer to an mpsArray |
mpsCHAR_CLASS
, and false otherwise. 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. bool mpsIsComplex | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
contains an imaginary part.
mlArr | Pointer to an mpsArray |
bool mpsIsDouble | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as double-precision, floating-point numbers.
mlArr | Pointer to an mpsArray |
bool mpsIsEmpty | ( | const mpsArray * | mlArr | ) |
Determine whether array is empty.
mlArr | Pointer to an mpsArray |
bool mpsIsInt16 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as signed 16-bit integers.
mlArr | Pointer to an mpsArray |
bool mpsIsInt32 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as signed 32-bit integers.
mlArr | Pointer to an mpsArray |
bool mpsIsInt64 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as signed 64-bit integers.
mlArr | Pointer to an mpsArray |
bool mpsIsInt8 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as signed 8-bit integers.
mlArr | Pointer to an mpsArray |
bool mpsIsLogical | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as mpsLogical
.
mlArr | Pointer to an mpsArray |
mpsLogical
, and false otherwise. 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. bool mpsIsLogicalScalarTrue | ( | const mpsArray * | mlArr | ) |
Determine whether scalar array is true.
mlArr | Pointer to an mpsArray |
bool mpsIsNumeric | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
contains numeric data.
mlArr | Pointer to an mpsArray |
bool mpsIsSingle | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as single-precision, floating-point numbers.
mlArr | Pointer to an mpsArray |
bool mpsIsSparse | ( | const mpsArray * | mlArr | ) |
Determine whether array is sparse.
mlArr | Pointer to an mpsArray |
bool mpsIsStruct | ( | const mpsArray * | mlArr | ) |
Determine whether input is structure array.
mlArr | Pointer to an mpsArray |
mpsStruct
, and false otherwise. bool mpsIsUint16 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as unsigned 16-bit integers.
mlArr | Pointer to an mpsArray |
bool mpsIsUint32 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as unsigned 32-bit integers.
mlArr | Pointer to an mpsArray |
bool mpsIsUint64 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as unsigned 64-bit integers.
mlArr | Pointer to an mpsArray |
bool mpsIsUint8 | ( | const mpsArray * | mlArr | ) |
Determine whether mpsArray
represents data as unsigned 8-bit integers.
mlArr | Pointer to an mpsArray |
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. |
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. |
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. 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 . |
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. |
Set the first dimension of an array.
mlArr | Pointer to an mpsArray . |
m | First dimension of the array. |
Set the number of columns in an array.
mlArr | Pointer to an mpsArray . |
n | Number of columns in the array. |
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 . |
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.