OcaWorker

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

The class is a subclass of OcaRoot().

This class defines the properties

Name

JavaScript Type

AES70 Type

Enabled

boolean

OcaBoolean

Ports

OcaPort[]

OcaList<OcaPort>

Label

string

OcaString

Owner

number

OcaONo

Latency

number

OcaTimeInterval

Furthermore, it inherits the properties ClassID, ClassVersion, ObjectNumber, Lockable, Role, Enabled, Ports, Label, Owner and Latency.

class OcaWorker(objectNumber, device)

Abstract base class for classes that represent the device’s application and support functions.

OcaWorker.OnEnabledChanged

type: PropertyEvent.<boolean>

This event is emitted when the property Enabled changes in the remote object. The property Enabled is described in the AES70 standard as follows. Read/write property that indicates whether the worker object is enabled in the device. If an object is disabled it cannot be used by the application. Note that the behavior of a disabled object depends on the object itself (e.g. a disabled chime generator is silent, a disabled equalizer is flat, etc.).

OcaWorker.OnLabelChanged

type: PropertyEvent.<string>

This event is emitted when the property Label changes in the remote object. The property Label is described in the AES70 standard as follows. Specific label of the worker. Can be used to provide human readable information about the worker. The label can be get and set over the network.

OcaWorker.OnLatencyChanged

type: PropertyEvent.<number>

This event is emitted when the property Latency changes in the remote object. The property Latency is described in the AES70 standard as follows. Processing latency of this object. Optional. Readonly or readwrite, depending on implementation.

OcaWorker.OnOwnerChanged

type: PropertyEvent.<number>

This event is emitted when the property Owner changes in the remote object. The property Owner is described in the AES70 standard as follows. Object number of block that contains this worker.

OcaWorker.OnPortsChanged

type: PropertyEvent.<Array.<OcaPort>>

This event is emitted when the property Ports changes in the remote object. The property Ports is described in the AES70 standard as follows. The list of (input and output) OCA ports the worker object has. Note that a worker object can have no ports (in which case the list is empty).

OcaWorker.AddPort(Label, Mode)

Adds an input or output port.. The return value indicates whether the port was successfully added.

Arguments
Returns

Promise.<OcaPortID> – A promise which resolves to a single value of type OcaPortID().

OcaWorker.DeletePort(ID)

Deletes an input or output port.. The return value indicates whether the port was successfully deleted.

Arguments
Returns

Promise.<void>

OcaWorker.GetEnabled()

Gets the value of the Enabled property. The return value indicates whether the property was successfully retrieved.

Returns

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

OcaWorker.GetLabel()

Gets the value of the Label property. The return value indicates whether the property was successfully retrieved.

Returns

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

OcaWorker.GetLatency()

Gets the value of the Latency property. The return value indicates whether the property was successfully retrieved.

Returns

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

OcaWorker.GetOwner()

Gets the value of the Owner property. The return value indicates whether the property was successfully retrieved.

Returns

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

OcaWorker.GetPath()

Returns path from the given object down to root. The return value indicates whether the operation succeeded. Added in version 2. The return values of this method are

  • NamePath of type string[]

  • ONoPath of type number[]

Returns

Promise.<Arguments.<Array.<string>, Array.<number>>>

OcaWorker.GetPortName(PortID)

Gets the name of the designated port. The return value indicates whether the name was successfully retrieved.

Arguments
Returns

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

OcaWorker.GetPorts()

Gets the list of ports owned by the Worker object. The return value indicates whether the list was successfully retrieved.

Returns

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

OcaWorker.SetEnabled(enabled)

Sets the value of the Enabled property. The return value indicates whether the property was successfully set.

Arguments
  • enabled (boolean) –

Returns

Promise.<void>

OcaWorker.SetLabel(label)

Sets the value of the Label property. The return value indicates whether the property was successfully set.

Arguments
  • label (string) –

Returns

Promise.<void>

OcaWorker.SetLatency(latency)

Sets the value of the Latency property. The return value indicates whether the property was successfully set.

Arguments
  • latency (number) –

Returns

Promise.<void>

OcaWorker.SetPortName(PortID, Name)

Sets the name of the designated port. The return value indicates whether the name was successfully set.

Arguments
Returns

Promise.<void>