API. RWS

The API.RWS namespace is an extension to the Omnicore SDK.

Classes

TaskChangeMonitor

Namespaces

CFG
CONTROLLER
MOTIONSYSTEM
RAPID
SIGNAL
UAS
USER

Methods

checkIfHeldMastership(type) → {Promise.<boolean>}

Checks if held the mastership.

Parameters:
NameTypeDescription
typestring

The mastership type, which can be 'edit' or 'motion'.

Returns:
Type: 
Promise.<boolean>
Example
// check if holding edit mastership
await API.RWS.checkIfHeldMastership()

(async) executeWithMastership(args, func, type) → {Promise.<any>}

Executes the function with holding the specified mastership.

Parameters:
NameTypeDescription
argsany

The arguments for function calling.

funcfunction

The function to be called.

typeMastershipType

The mastership type, which can be 'edit' or 'motion'.

Returns:
Type: 
Promise.<any>

getMastershipState(type) → {Promise.<object>}

Parameters:
NameTypeDescription
typestring

The mastership type, which can be 'edit' or 'motion'.

Returns:
Type: 
Promise.<object>

releaseMastership(type) → {Promise.<any>}

Parameters:
NameTypeDefaultDescription
typeMastershipTypeedit

The mastership type, which can be 'edit' or 'motion'.

Returns:
Type: 
Promise.<any>
Example
API.RWS.releaseMastership('edit')

requestMastership(type) → {Promise.<any>}

Parameters:
NameTypeDefaultDescription
typeMastershipTypeedit

The mastership type, which can be 'edit' or 'motion'.

Returns:
Type: 
Promise.<any>
Example
API.RWS.requestMastership('edit')

Type Definitions

MastershipType

Type:
  • 'edit' | 'motion'