Overview

Operations are the mechanism through which Matlab Processes can request framework-functionality of this binding. Specifically, operations expose the SystemMLInterface, the Message Log, Utility classes, and Peer State.

Operations

Each operation returned in the operations cell array should itself be a 1xN cell array, with the first element being a constant indicating the operation, and remaining arguments being operation specific. The constant operation code can be any of the following.

Input/Output

OPERATION_ADD_PORT
Takes three arguments, the set name (can be the empty string for the default set), the SystemML class name and the structure of the new data object in a form suitable to be passed to EVENT_GENERIC_STRUCTURE_SET. Two additional arguments are optional: a name for the new port, and the sample rate of the new port. For example, {persist.constants.OPERATION_ADD_PORT, '', 'std/2009/data/numeric', 'DOUBLE/REAL/1', 'out'}. A new entry is created in input.oif (see OPERATION_SET_CONTENT).
OPERATION_SET_CONTENT
Takes two arguments, a port handle (find this in input.oif) and the numeric array to set the output state to. For example, {persist.constants.OPERATION_SET_CONTENT, input.oif.default.out, [1 0; 0 1]}.

Reporting

OPERATION_BOUT
Takes two additional arguments, a message and a DetailLevel. For example, {persist.constants.OPERATION_BOUT, 'Viva La Revolucion', persist.constants.D_INFO}.

Utility Objects and Functions

Notes
  • Why are objects exposed to the Matlab Process, when all it can call are functions?
    • Utility Objects may be stateful, so a Process may wish to maintain more than one, and it may be important which is called.
OPERATION_GET_UTILITY_OBJECT
Obtain a Utility Object. Takes three additional arguments, the SystemML Class, SystemML Release and a caller-specified identifier (string) that can be used to reference the Utility Object in a later call to OPERATION_GET_UTILITY_FUNCTION. The result of the call is the appearance of a new entry in the input.objects array named for the caller-specified identifier string. For example, {persist.constants.OPERATION_GET_UTILITY_OBJECT, 'std/2009/util/rng', 0, 'myRNG'}.
OPERATION_GET_UTILITY_FUNCTION
Obtain an interface to a function offered by a Utility Object obtained in a previous call to OPERATION_GET_UTILITY_OBJECT. Takes two additional arguments, the object identifier extracted from the input.objects array, and the name of the function you are requesting. The result of the call is the appearance of a new entry in the input.objects.<objectname> array named for the requested function. For example, {persist.constants.OPERATION_GET_UTILITY_FUNCTION, input.objects.myRNG.id, 'aff'}.
OPERATION_CALL_UTILITY_FUNCTION
Call a Utility Function obtained in a previous call to OPERATION_GET_UTILITY_FUNCTION. Takes two additional arguments, the identifier of the called function obtained from input.objects.<objectname>.<functionname>, and a cell vector of arguments for the function. For example, {persist.constants.OPERATION_CALL_UTILITY_FUNCTION, input.objects.myRNG.aff.id, {1, 2, 3}}.