OcaMatrix

A online version of the AES70 specification of this class can be found at http://docs.deuso.de.

The class is a subclass of OcaWorker().

This class defines the properties

Name

JavaScript Type

AES70 Type

X

number

OcaMatrixCoordinate

Y

number

OcaMatrixCoordinate

xSize

number

OcaMatrixCoordinate

ySize

number

OcaMatrixCoordinate

Members

number[][]

OcaList2D<OcaONo>

Proxy

number

OcaONo

PortsPerRow

number

OcaUint8

PortsPerColumn

number

OcaUint8

Furthermore, it inherits the properties ClassID, ClassVersion, ObjectNumber, Lockable, Role, Enabled, Ports, Label, Owner, Latency, X, Y, xSize, ySize, Members, Proxy, PortsPerRow and PortsPerColumn.

class OcaMatrix(objectNumber, device)

A matrix is a rectangular array of identical objects (” members “) that is coordinate addressable and has sets of common input and output ports. The matrix host does not instantiate these objects, but instead mediates the coordinate addressing, implements the common input and output ports, and provdes certain other aggregate functions. Matrix members may be workers (including blocks), or agents. All members of a matrix must be of the same class. No object may belong to more than one matrix at a time. No object may appear more than once in a given matrix. The complete model of an OCA matrix consists of: 1. One instance of OcaMatrix. 2. (N x M) members , where each member is an instance of a worker or agent class. For any given matrix, this class must be the same for all members, and is referred to as the member class. Members are sometimes referred to as cells of the matrix. 3. One additional instance of the member class, called the matrix proxy. Thus, the OcaMatrix instance is a container for the two-dimensional collection of its members. Once a matrix is set up, the controller may get and set member properties by the following procedures: Get To get a property value of member (x1, y1): 1. Controller calls OcaMatrix.SetXY(x1, y1) . This action: - locks the OcaMatrix instance, and - posts x1 and y1 as coordinates of the object whose property value is to be retrieved. 2. Controller calls the matrix proxy’s Get method for the property value desired. This action causes the OcaMatrix instance to: - decode the posted x1 and y1 values into a member ONo. - call the given Get method for the object identified by the decoded ONo. - aggregate the OcaResult from each Get call into a consolidated OcaResult . - unlock the OcaMatrix instance. - return the consolidated OcaResult to the controller. Set To set a property value of member (x1, y1), or of row (0, y1) or column (x1, 0) or whole matrix (0,0) 1. Controller calls OcaMatrix.SetXY(x1, y1) . This action: - locks the OcaMatrix instance, and - posts x1 and y1 as coordinates of the object whose property value is to be changed. 2. Controller calls the matrix proxy’s Set method for the target property. This action causes the OcaMatrix instance to: - decode the posted x1 and y1 values into a list of target member ONos, as follows: If x1 :raw:html:`&gt;` 0 and y1 :raw:html:`&gt;` 0, the list will be the single ONo of the addressed cell. If x1 = 0 and y1 :raw:html:`&gt;` 0, the list will be the list of ONos of the cells in row y1 . If x1 :raw:html:`&gt;` 0 and y1 = 0, the list will be the list of ONos of the cells in column x1. If x1 = 0 and y1 = 0, the list will be the list of ONos of all cells of the matrix. - call the given Set method for each target member in the ONo list. - aggregate the OcaResult from each Set call into a consolidated OcaResult . - unlock the OcaMatrix instance.

OcaMatrix.OnMembersChanged

type: PropertyEvent.<Array.<Array.<number>>>

This event is emitted when the property Members changes in the remote object. The property Members is described in the AES70 standard as follows. 2D array of member object numbers.

OcaMatrix.OnPortsPerColumnChanged

type: PropertyEvent.<number>

This event is emitted when the property PortsPerColumn changes in the remote object. The property PortsPerColumn is described in the AES70 standard as follows. Number of output ports per column - e.g. for a stereo matrix, the value would be 2.

OcaMatrix.OnPortsPerRowChanged

type: PropertyEvent.<number>

This event is emitted when the property PortsPerRow changes in the remote object. The property PortsPerRow is described in the AES70 standard as follows. Number of input ports per row- e.g. for a stereo matrix, the value would be 2.

OcaMatrix.OnProxyChanged

type: PropertyEvent.<number>

This event is emitted when the property Proxy changes in the remote object. The property Proxy is described in the AES70 standard as follows. Object number of the matrix proxy.

OcaMatrix.OnXChanged

type: PropertyEvent.<number>

This event is emitted when the property X changes in the remote object. The property X is described in the AES70 standard as follows. Active column index. The active column is the column to which matrix proxy method calls will be reflected. Value is zero-relative, i.e. the first column is number zero. A value of 65535 means all columns in the matrix.

OcaMatrix.OnYChanged

type: PropertyEvent.<number>

This event is emitted when the property Y changes in the remote object. The property Y is described in the AES70 standard as follows. Active row index. The active row is the row to which matrix proxy changes will be reflected. Value is zero-relative, i.e. the first row is number zero. A value of 65535 means all rows in the matrix.

OcaMatrix.OnxSizeChanged

type: PropertyEvent.<number>

This event is emitted when the property xSize changes in the remote object. The property xSize is described in the AES70 standard as follows. Number of columns in the matrix. Readonly in some cases.

OcaMatrix.OnySizeChanged

type: PropertyEvent.<number>

This event is emitted when the property ySize changes in the remote object. The property ySize is described in the AES70 standard as follows. Number of rows in the matrix. Readonly in some cases.

OcaMatrix.GetCurrentXY()

Gets coordinates of the currently active area (cell, row, column, or whole matrix). The returned status indicates whether the operation was successful. The return values of this method are

  • x of type number

  • y of type number

Returns

Promise.<Arguments.<number, number>>

OcaMatrix.GetMember(x, y)

Retrieves the object number of the member at position (x,y). If no member is defined at this position, returns an object number value of Zero.

Arguments
  • x (number) –

  • y (number) –

Returns

Promise.<number> – A promise which resolves to a single value of type number.

OcaMatrix.GetMembers()

Retrieves the 2D array of member object numbers. Cells for which no member has been defined will return Zero as the object number.

Returns

Promise.<Array.<Array.<number>>> – A promise which resolves to a single value of type number[][].

OcaMatrix.GetPortsPerColumn()

Gets the number of ports per output channel. These are output ports.

Returns

Promise.<number> – A promise which resolves to a single value of type number.

OcaMatrix.GetPortsPerRow()

Gets the number of ports per row. These are input ports.

Returns

Promise.<number> – A promise which resolves to a single value of type number.

OcaMatrix.GetProxy()

Gets the object number of the matrix proxy.

Returns

Promise.<number> – A promise which resolves to a single value of type number.

OcaMatrix.GetSize()

Gets the matrix size. The returned status indicates whether the operation was successful. The return values of this method are

  • xSize of type number

  • ySize of type number

  • minXSize of type number

  • maxXSize of type number

  • minYSize of type number

  • maxYSize of type number

Returns

Promise.<Arguments.<number, number, number, number, number, number>>

OcaMatrix.SetCurrentXY(x, y)

Sets the currently active area (cell, row, column, or whole matrix). The returned status indicates whether the operation was successful.

Arguments
  • x (number) –

  • y (number) –

Returns

Promise.<void>

OcaMatrix.SetCurrentXYLock(x, y)

Sets the currently active area (cell, row, column, or whole matrix) and locks it. Fails if the referenced members cannot all be locked. The returned status indicates whether the operation was successful.

Arguments
  • x (number) –

  • y (number) –

Returns

Promise.<void>

OcaMatrix.SetMember(x, y, memberONo)

Installs a particular object as a member at position (x,y). If another object was at this position, it is removed.

Arguments
  • x (number) –

  • y (number) –

  • memberONo (number) –

Returns

Promise.<void>

OcaMatrix.SetMembers(members)

Sets the entire 2D array of member object numbers. Row and column size of the members parameter must be equal to the current size of the matrix.

Arguments
  • members (Array.<Array.<number>>) –

Returns

Promise.<void>

OcaMatrix.SetPortsPerColumn(Ports)

Sets the number of ports per column. These must be output ports.

Arguments
  • Ports (number) –

Returns

Promise.<void>

OcaMatrix.SetPortsPerRow(Ports)

Sets the number of ports per row. These must be input ports.

Arguments
  • Ports (number) –

Returns

Promise.<void>

OcaMatrix.SetProxy(ONo)

Sets the object number of the matrix proxy.

Arguments
  • ONo (number) –

Returns

Promise.<void>

OcaMatrix.SetSize(xSize, ySize)

Sets the matrix size. The returned status indicates whether the operation was successful. This method will not be available for fixed-size matrices.

Arguments
  • xSize (number) –

  • ySize (number) –

Returns

Promise.<void>

OcaMatrix.UnlockCurrent()

Unlocks the currently active area of the matrix. Fails if all the members of the currently active area cannot be unlocked. Failure is _not_ triggered if one or more members of the currently active area are already unlocked at the time Unlock() is called. The returned status indicates whether the operation was successful.

Returns

Promise.<void>