The API.RWS namespace is an extension to the Omnicore SDK.
- Source
Classes
Namespaces
Methods
checkIfHeldMastership(type) → {Promise.<boolean>}
Checks if held the mastership.
| Name | Type | Description |
|---|---|---|
type | string | The mastership type, which can be 'edit' or 'motion'. |
- Source
- Type:
- Promise.<boolean>
// check if holding edit mastership
await API.RWS.checkIfHeldMastership()(async) executeWithMastership(args, func, type) → {Promise.<any>}
Executes the function with holding the specified mastership.
| Name | Type | Description |
|---|---|---|
args | any | The arguments for function calling. |
func | function | The function to be called. |
type | MastershipType | The mastership type, which can be 'edit' or 'motion'. |
- Source
- Type:
- Promise.<any>
getMastershipState(type) → {Promise.<object>}
| Name | Type | Description |
|---|---|---|
type | string | The mastership type, which can be 'edit' or 'motion'. |
- Source
- Type:
- Promise.<object>
releaseMastership(type) → {Promise.<any>}
| Name | Type | Description |
|---|---|---|
type | MastershipType | The mastership type, which can be 'edit' or 'motion'. |
- Source
- Type:
- Promise.<any>
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.
| Name | Type | Description |
|---|---|---|
type | * | 'edit' | 'motion', only needed by RW7 system |
- Source
- Type:
- Promise.<any>
requestMastership(type) → {Promise.<any>}
Requests edit/motion mastership.
| Name | Type | Description |
|---|---|---|
type | MastershipType | The mastership type, which can be 'edit' or 'motion'. |
- Source
- Type:
- Promise.<any>
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.
| Name | Type | Description |
|---|---|---|
type | string | 'edit' | 'motion', only needed by RW7 system |
autoRegisterControlStation | boolean | Whether to automatically register as a remote control station if not registered when requesting write access. Only applicable for RW8 system. |
- Source
- Type:
- Promise.<any>
Type Definitions
MastershipType
- 'edit' |
'motion'
- Source