API. RWS

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

Classes

TaskChangeMonitor

Namespaces

CFG
CONTROLLER
CONTROLSTATION
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:
NameTypeDescription
typeMastershipType

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

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

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

Explicitly release mastership if the system is RW7 and release write access if the system is RW8. If the system is RW7, it can work for both Auto mode and Manual mode.

Parameters:
NameTypeDescription
type*

'edit' | 'motion', only needed by RW7 system

Returns:
Type: 
Promise.<any>

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

Requests edit/motion mastership.

Parameters:
NameTypeDescription
typeMastershipType

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

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

requestMastershipExplicitly(type, autoRegisterControlStation) → {Promise.<any>}

Explicitly request mastership if the system is RW7 and request write access if the system is RW8. If the system is RW7, it can work for both Auto mode and Manual mode.

Parameters:
NameTypeDescription
typestring

'edit' | 'motion', only needed by RW7 system

autoRegisterControlStationboolean

Whether to automatically register as a remote control station if not registered when requesting write access. Only applicable for RW8 system.

Returns:
Type: 
Promise.<any>

Type Definitions

MastershipType

Type:
  • 'edit' | 'motion'