Methods
get_configuration(package_idopt) → {object|null}
Gets the configuration instance associated with a package.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
package_id |
string |
<optional> |
the id of the package, use the node's package id if not provided |
Returns:
the configuration instance or null if no configuration is defined for the package
- Type
- object | null
get_connection_count(port_name:, port_direction:)
Gets the number of connections to/from this port
Parameters:
| Name | Type | Description |
|---|---|---|
port_name: |
string | the name of the port to count connections to/from |
port_direction: |
string | specify whether the port is "input" or "output" |
(async) get_data(key) → {Promise.<(ArrayBuffer|null)>}
Retrieve data associated with a key or null if no data is associated with that key
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string | the key value |
Returns:
- Type
- Promise.<(ArrayBuffer|null)>
get_node_id() → {string}
Get the unique ID of this node
Returns:
the node id
- Type
- string
(async) get_properties() → {Object}
Get the set of properties associated with this node
Returns:
the value of the properties
- Type
- Object
request_open_client(client_name:, session_id:)
Called to request that a client of this node be opened
Parameters:
| Name | Type | Description |
|---|---|---|
client_name: |
string | the type of client to open |
session_id: |
string | undefined | the session in which the client should be opened (if undefined, open in all sessions) |
(async) request_run()
Request that this node is re-run. Typically called after a change to the node that would alter the output values
if there was no change to the inputs.
resolve_resource(resource_path)
Resolve a relative resource path based on the location of the package schema
Parameters:
| Name | Type | Description |
|---|---|---|
resource_path |
(async) set_data(key, data) → {Promise.<void>}
Store data associated with a key
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string | the key value |
data |
ArrayBuffer | null | the data value (pass null to delete data associated with the key) |
Returns:
- Type
- Promise.<void>
(async) set_properties(properties)
Set the properties associated with this node
Parameters:
| Name | Type | Description |
|---|---|---|
properties |
Object | the properties to set, must be an Object that is JSON serialisable |
set_running_state(new_state)
Take manual control of the running state
Parameters:
| Name | Type | Description |
|---|---|---|
new_state |
string | one of "pending", "running", "completed", "failed" |
set_status(status_msg, level,)
Sets a status message for this node
Parameters:
| Name | Type | Description |
|---|---|---|
status_msg |
string | the status message, or empty string to clear the status |
level, |
string | one of "info", "warning", "error" |