- Source:
Extends
- EventEmitter
Members
member
(readonly) remoteNodeName :string
Get the remote node name being watched.
Type:
- string
- Source:
member
(readonly) watchedParameters :Array.<string>
Get the list of watched parameter names.
Type:
- Array.<string>
- Source:
Methods
function
addParameter(name)
Add a parameter name to the watch list.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | Parameter name to watch |
- Source:
Throws:
-
If name is not a stringType TypeError
-
If the watcher has been destroyedType Error
function
destroy()
Destroy the watcher and clean up resources.
Unsubscribes from parameter events and destroys the parameter client.
- Source:
function
(async) getCurrentValues(optionsopt) → {Promise.<Array.<Parameter>>}
Get current values of all watched parameters.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
Options for the parameter client
Properties
|
- Source:
Throws:
If the watcher has been destroyed
Type
Error
Returns:
Array of Parameter objects
Type
Promise.<Array.<Parameter>>
function
isDestroyed() → {boolean}
Check if the watcher has been destroyed.
- Source:
Returns:
True if destroyed
Type
boolean
function
removeParameter(name) → {boolean}
Remove a parameter name from the watch list.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | Parameter name to stop watching |
- Source:
Throws:
If the watcher has been destroyed
Type
Error
Returns:
True if the parameter was in the watch list
Type
boolean
function
(async) start(timeoutopt) → {Promise.<boolean>}
Start watching for parameter changes.
Waits for the remote node's parameter services and subscribes to parameter events.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
timeout |
number |
<optional> |
5000 | Timeout in milliseconds to wait for services |
- Source:
Throws:
If the watcher has been destroyed
Type
Error
Returns:
Resolves to true when watching has started
Type
Promise.<boolean>