On this page

# Pipeline

Pipeline

This is the model that allows interactions with the pipelines deployed on the network nodes. Please see the network documentation for a detailed description of the Pipelines.

A Pipeline is defined by a config object and a set of plugins running on the pipeline. Use the `make` method for creating new `Pipeline`s to ensure the proper validation of all the assets needed for correct instantiation.

## Constructor

### (private) new Pipeline(initiator, node, name, dct, client)

The Pipeline model constructor.

Parameters:

Name | Type | Description
--- | --- | ---
`initiator` | string |
`node` | string |
`name` | string |
`dct` | DataCaptureThread |
`client` | ZxAIClient |

Source
  - models/pipeline.js, line 16

## Classes

Pipeline

## Members

### (private) client :ZxAIClient

The reference to the NaeuralEdgeProtocol Network Client.

Type:

- ZxAIClient

Source
  - models/pipeline.js, line 69

### (private) dct :DataCaptureThread|null

The Data Capture Thread used for feeding data to the pipeline.

Type:

- DataCaptureThread | null

Source
  - models/pipeline.js, line 53

### (readonly) id :string

The pipeline name.

Type:

- string

Source
  - models/pipeline.js, line 30

### (readonly) initiator :string

The id of the process that changed the pipeline last.

Type:

- string

Source
  - models/pipeline.js, line 61

### instances :Array.<PluginInstance>

List of plugin instances running on this pipeline.

Type:

- Array.<PluginInstance>

Source
  - models/pipeline.js, line 37

### isDirty :boolean

Flag for signalling uncommitted changes to this model.

Type:

- boolean

Source
  - models/pipeline.js, line 22

### (readonly) node :string

The NaeuralEdgeProtocol Edge Node on which this pipeline is running.

Type:

- string

Source
  - models/pipeline.js, line 45

### (private) watches :Object

A dictionary of paths involved in publishing messages.

Type:

- Object

Source
  - models/pipeline.js, line 77

## Methods

### (private) _getRawPipelineCommandPayload(command) → {ZxAICommand}

Returns the Edge Node command wrapping the Pipeline command.

Parameters:

Name | Type | Description
--- | --- | ---
`command` | Object |

Source
  - models/pipeline.js, line 287

Returns:

Type:
  ZxAICommand

### addInstanceWatch(path) → {Pipeline}

Adds an `EE_MESSAGE_PATH` to watch for in the following network request.

Parameters:

Name | Type | Description
--- | --- | ---
`path` | Array.<string> |

Source
  - models/pipeline.js, line 230

Returns:

Type:
  Pipeline

### getClient() → {ZxAIClient}

Returns the NaeuralEdgeProtocol Network Client reference.

Source
  - models/pipeline.js, line 190

Returns:

Type:
  ZxAIClient

### getDataCaptureThread() → {DataCaptureThread|null}

Returns the configured Data Capture Thread Model that feeds data into this pipeline.

Source
  - models/pipeline.js, line 199

Returns:

Type:
  DataCaptureThread | null

### getId() → {string}

Returns the pipeline name/id.

Source
  - models/pipeline.js, line 154

Returns:

Type:
  string

### getInitiator() → {string}

Returns the id of the process that changed the pipeline last.

Source
  - models/pipeline.js, line 163

Returns:

Type:
  string

### getInstanceWatches() → {Array.<Array.<string>>}

Returns all configured `EE_MESSAGE_PATH`s to be watched in the following network request.

Source
  - models/pipeline.js, line 241

Returns:

Type:
  Array.<Array.<string>>

### getMetadata() → {*}

Returns the metadata set on this pipeline.

Source
  - models/pipeline.js, line 208

Returns:

Type:
  *

### getNode() → {string}

Returns the name of the NaeuralEdgeProtocol Network Node this pipeline runs on.

Source
  - models/pipeline.js, line 172

Returns:

Type:
  string

### getType() → {string}

Returns the type of the datasource feeding data into this pipeline.

Source
  - models/pipeline.js, line 181

Returns:

Type:
  string

### removeAllInstanceWatches() → {Pipeline}

Removes all previously configured `EE_MESSAGE_PATHS` from the list to be watched in the following network request.

Source
  - models/pipeline.js, line 264

Returns:

Type:
  Pipeline

### removeInstanceWatch(path) → {Pipeline}

Removes a previously configured `EE_MESSAGE_PATH` from the list to be watched in the following network request.

Parameters:

Name | Type | Description
--- | --- | ---
`path` | Array.<string> |

Source
  - models/pipeline.js, line 251

Returns:

Type:
  Pipeline

### sendCommand(command) → {Promise.<*>}

Sends the provided `command` to the pipeline running on the NaeuralEdgeProtocol Node.

Parameters:

Name | Type | Description
--- | --- | ---
`command` | Object |

Source
  - models/pipeline.js, line 276

Returns:

Type:
  Promise.<*>

### updateMetadata(metadata) → {Pipeline}

Updates metadata set on this pipeline.

Parameters:

Name | Type | Description
--- | --- | ---
`metadata` | Object |

Source
  - models/pipeline.js, line 218

Returns:

Type:
  Pipeline

### (static) make(client, node, config, schemas, dirty) → {Pipeline}

Static factory for constructing Pipeline models.

Parameters:

Name | Type | Default | Description
--- | --- | --- | ---
`client` | ZxAIClient |  |
`node` | string |  |
`config` | Object |  |
`schemas` | SchemasRepository |  |
`dirty` | boolean | false |

Source
  - models/pipeline.js, line 107

Returns:

Type:
  Pipeline

Type anything to view search result