Class: ParameterClient

ParameterClient(node, remoteNodeName, optionsopt)

- Class representing a Parameter Client for accessing parameters on remote nodes

Members

remoteNodeName

Get the remote node name this client is connected to.
Source:

Methods

(async) describeParameters(names, optionsopt) → {Promise.<Array.<object>>}

Describe parameters on the remote node.
Parameters:
Name Type Attributes Description
names Array.<string> Array of parameter names to describe.
options object <optional>
Options for the service call.
Properties
Name Type Attributes Description
timeout number <optional>
Timeout in milliseconds for this specific call.
signal AbortSignal <optional>
AbortSignal to cancel the request.
Source:
Throws:
If the service call fails.
Type
Error
Returns:
- Promise that resolves with an array of parameter descriptors.
Type
Promise.<Array.<object>>

destroy() → {undefined}

Destroy the parameter client and clean up all service clients.
Source:
Returns:
Type
undefined

(async) getParameter(name, optionsopt) → {Promise.<Parameter>}

Get a single parameter from the remote node.
Parameters:
Name Type Attributes Description
name string The name of the parameter to retrieve.
options object <optional>
Options for the service call.
Properties
Name Type Attributes Description
timeout number <optional>
Timeout in milliseconds for this specific call.
signal AbortSignal <optional>
AbortSignal to cancel the request.
Source:
Throws:
If the parameter is not found or service call fails.
Type
Error
Returns:
- Promise that resolves with the Parameter object.
Type
Promise.<Parameter>

(async) getParameterTypes(names, optionsopt) → {Promise.<Array.<number>>}

Get the types of parameters on the remote node.
Parameters:
Name Type Attributes Description
names Array.<string> Array of parameter names.
options object <optional>
Options for the service call.
Properties
Name Type Attributes Description
timeout number <optional>
Timeout in milliseconds for this specific call.
signal AbortSignal <optional>
AbortSignal to cancel the request.
Source:
Throws:
If the service call fails.
Type
Error
Returns:
- Promise that resolves with an array of parameter types.
Type
Promise.<Array.<number>>

(async) getParameters(names, optionsopt) → {Promise.<Array.<Parameter>>}

Get multiple parameters from the remote node.
Parameters:
Name Type Attributes Description
names Array.<string> Array of parameter names to retrieve.
options object <optional>
Options for the service call.
Properties
Name Type Attributes Description
timeout number <optional>
Timeout in milliseconds for this specific call.
signal AbortSignal <optional>
AbortSignal to cancel the request.
Source:
Throws:
If the service call fails.
Type
Error
Returns:
- Promise that resolves with an array of Parameter objects.
Type
Promise.<Array.<Parameter>>

isDestroyed() → {boolean}

Check if the parameter client has been destroyed.
Source:
Returns:
- True if destroyed, false otherwise.
Type
boolean

(async) listParameters(optionsopt) → {Promise.<{names: Array.<string>, prefixes: Array.<string>}>}

List all parameters available on the remote node.
Parameters:
Name Type Attributes Description
options object <optional>
Options for listing parameters.
Properties
Name Type Attributes Default Description
prefixes Array.<string> <optional>
Optional array of parameter name prefixes to filter by.
depth number <optional>
0 Depth of parameter namespace to list (0 = unlimited).
timeout number <optional>
Timeout in milliseconds for this specific call.
signal AbortSignal <optional>
AbortSignal to cancel the request.
Source:
Throws:
If the service call fails.
Type
Error
Returns:
- Promise that resolves with parameter names and prefixes.
Type
Promise.<{names: Array.<string>, prefixes: Array.<string>}>

(async) setParameter(name, value, optionsopt) → {Promise.<object>}

Set a single parameter on the remote node.
Parameters:
Name Type Attributes Description
name string The name of the parameter to set.
value * The value to set. Type is automatically inferred.
options object <optional>
Options for the service call.
Properties
Name Type Attributes Description
timeout number <optional>
Timeout in milliseconds for this specific call.
signal AbortSignal <optional>
AbortSignal to cancel the request.
Source:
Throws:
If the service call fails.
Type
Error
Returns:
- Promise that resolves with the result {successful: boolean, reason: string}.
Type
Promise.<object>

(async) setParameters(parameters, optionsopt) → {Promise.<Array.<{name: string, successful: boolean, reason: string}>>}

Set multiple parameters on the remote node.
Parameters:
Name Type Attributes Description
parameters Array.<{name: string, value: *}> Array of parameter objects with name and value.
options object <optional>
Options for the service call.
Properties
Name Type Attributes Description
timeout number <optional>
Timeout in milliseconds for this specific call.
signal AbortSignal <optional>
AbortSignal to cancel the request.
Source:
Throws:
If the service call fails.
Type
Error
Returns:
- Promise that resolves with an array of results.
Type
Promise.<Array.<{name: string, successful: boolean, reason: string}>>

(async) waitForService(timeoutopt) → {Promise.<boolean>}

Wait for the parameter services to be available on the remote node.
Parameters:
Name Type Attributes Description
timeout number <optional>
Optional timeout in milliseconds.
Source:
Returns:
- Promise that resolves to true if services are available.
Type
Promise.<boolean>