Table Of Contents

Create Network Stream Writer Endpoint (G Dataflow)

Last Modified: January 12, 2018

Creates the writer endpoint of a network stream.

connector_pane_image
datatype_icon

timeout in ms

Time, in milliseconds, that this endpoint waits to connect to the other endpoint.

Default: -1 — The endpoint waits indefinitely.

datatype_icon

writer buffer size

Size of the writer buffer in number of elements. The minimum size is one element.

datatype_icon

writer name

Name of the endpoint.

Organizing Multiple Endpoints

You can organize multiple endpoints by adding segments to this name to ensure that you connect each writer endpoint to its corresponding reader endpoint. To do this, place a slash between each segment of the name that you specify in your inputs with the organization scheme of your choice.

For example, RT Target/Temperature/Writer and Desktop/Temperature/Reader describe the target the endpoint resides on, the type of data the endpoint streams, and whether the endpoint reads or writes data, allowing you to show which endpoints correspond to one another.

Error with Reused Endpoint Names

If you specify a name that already belongs to another endpoint on the same computer, the first endpoint runs and is created, but the second endpoint returns an error that you can see in error out.

Endpoints that Run Multiple Applications

If this endpoint resides on a computer that runs multiple applications using network streams, you must assign an endpoint URL to this endpoint instead of a name. This node returns an error in error out. Use the following syntax to prompt a connection between the endpoints and avoid this error: //host_name:context_name/endpoint_name.

datatype_icon

reader url

The URL of the reader endpoint you want to connect to.

Creating a Network Stream

You must designate a reader for your writer endpoint to create a network stream. You can create this network stream in the following ways:

  • Wire the reader url input of this node.
  • Use the Create Network Stream Reader Endpoint node and wire the writer url input.

If you do not wire the reader url of the Create Network Stream Writer Endpoint node or the writer url of the Create Network Stream Reader Endpoint node, your endpoints will not create a network stream and your nodes will timeout.

datatype_icon

data type

Data type of the element or elements you want to write to the network stream. This data type must match the data type input of the Create Network Stream Reader Endpoint node.

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

element allocation mode

Allocates buffer memory when the endpoint is created. Specifying an allocation mode only affects the transfer of non-scalar data types.

Name Value Description
allocate as needed 0 Allocates memory to generate a pointer or handle for each data element when you create a network stream.
pre-allocate 1 Allocates initial buffer memory based on the data type input and writer buffer size or reader buffer size inputs.

Selecting an Allocation Mode

  • Use allocate as needed if your application transfers non-scalar data and you cannot determine the maximum size of each data element before run-time.
  • Use pre-allocate if your application transfers non-scalar data and you can determine the maximum size of each data element at edit-time. If a larger element is added to the buffer during run-time, additional memory is allocated dynamically.

Default: allocate as needed

datatype_icon

writer endpoint

The reference to the writer endpoint.

datatype_icon

error out

The node produces this output according to standard error behavior.

This node can return the following error codes.

-314004 You could not create the endpoint within the timeout period.
-314101 An endpoint with the same name already exists.
-314215 You cannot read or write a number of elements that is larger than the size of the endpoint buffer.
spd-note-note
Note  

This is not a comprehensive list of errors this node can return.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics