- Source:
Extends
- EventEmitter
Members
(readonly) remoteNodeName :string
Get the remote node name being watched.
Type:
- string
- Source:
(readonly) watchedParameters :Array.<string>
Get the list of watched parameter names.
Type:
- Array.<string>
- Source:
Methods
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 string
- Type
- TypeError
-
-
-
If the watcher has been destroyed
- Type
- Error
-
destroy()
Destroy the watcher and clean up resources.
Unsubscribes from parameter events and destroys the parameter client.
- Source:
(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>>
isDestroyed() → {boolean}
Check if the watcher has been destroyed.
- Source:
Returns:
True if destroyed
- Type
- boolean
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
(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>