Ethernet

Writes data to a session as an array of Ethernet frames. The session must use an Ethernet interface and a mode of Frame Output Stream.

1378

Inputs/Outputs

datatype_icon

session in

The session to write.

This session is selected from the LabVIEW project or returned from XNET Create Session. The session mode must be Frame Output Stream.
datatype_icon

data

Provides an array of LabVIEW clusters.

Each array element corresponds to a frame value to transmit. The elements of each cluster are specific to the Ethernet protocol.

The data you write is queued up for transmit on the network. Using the default queue configuration for this mode, you can safely write 64 frames if you have a sufficiently long timeout. To write more data, refer to the XNET Session Number of Values Unused property to determine the actual amount of queue space available for write.

datatype_icon

local timestamp

A timestamp using XNET local time. The timestamp uses the LabVIEW absolute timestamp type.

The timestamp point in the Ethernet frame occurs at the beginning of the first symbol following the start of frame delimiter.

local timestamp is not used for XNET Write (Frame Ethernet). Refer to XNET Read (Frame Ethernet).

datatype_icon

network timestamp

A timestamp using network time (clock of the network's time synchronization protocol, such as IEEE Std 802.1AS). The timestamp uses the LabVIEW absolute timestamp type.

The timestamp point in the Ethernet frame occurs at the beginning of the first symbol following the start of frame delimiter.

network timestamp is not used for XNET Write (Frame Ethernet). Refer to XNET Read (Frame Ethernet).

datatype_icon

frame data

An array of bytes that provides the data of the Ethernet frame.

Using the terminology from IEEE Std 802.3, the frame data begins with the first byte of the destination MAC address, and ends with the last byte of the mac_service_data_unit (MSDU).

In order to obtain the payload data that is contained in the frame, your code must decode the layered headers in frame data. For example, for an IPv4 UDP packet, you decode the Ethernet header, including the EtherType, to determine that the remaining data is an IPv4 packet; then you decode the IPv4 header, including the Protocol, to determine that the remaining data is a UDP packet; and then you decode the UDP header and its payload data.

The Source MAC Address Auto property specifies automatic handling of the source MAC address in frame data (i.e., offset 6 through 11). If Source Address MAC Auto is true (default), XNET automatically replaces the source MAC address bytes with its own MAC Address. If Source Address MAC Auto is false, XNET does not alter the source MAC address, so that you can specify this address in frame data.

The maximum length of this array is provided in the Payload Length Maximum property.

datatype_icon

fcs

The IEEE Std 802.3 Frame Check Sequence (FCS) that was received with the frame.

fcs is not used for XNET Write (Frame Ethernet). Refer to XNET Read (Frame Ethernet).

datatype_icon

type

The type of Ethernet frame (decimal value in parentheses).

Ethernet Data (0) Ethernet frame received or transmitted.
datatype_icon

network synced?

Contains the value of the Synced property at the time that both timestamps are acquired, to specify whether the network timestamp is synchronized to the network (true) or not (false).

network synced? is not used for XNET Write (Frame Ethernet). Refer to XNET Read (Frame Ethernet).

datatype_icon

receive?

A Boolean value that indicates whether the frame occurred due to receive (true) or not (false).

receive? is not used for XNET Write (Frame Ethernet). Refer to XNET Read (Frame Ethernet).

datatype_icon

transmit?

A Boolean value that indicates whether the frame occurred due to transmit (true) or not (false).

transmit? is not used for XNET Write (Frame Ethernet). Refer to XNET Read (Frame Ethernet).

datatype_icon

error?

A Boolean that indicates whether an error occurred during the reception/transmission of the frame (false = good frame, true = bad frame).

error? is not used for XNET Write (Frame Ethernet). Refer to XNET Read (Frame Ethernet).

datatype_icon

timeout

The time to wait for the Ethernet frame data to be queued up for transmit.

The timeout is a LabVIEW relative time, represented as 64-bit floating-point in units of seconds.

If timeout is positive, XNET Write (Frame Ethernet) waits up to that timeout for space to become available in queues. If the space is not available prior to the timeout, an error is returned.

If timeout is negative, XNET Write (Frame Ethernet) waits indefinitely for space to become available in queues.

If timeout is zero, XNET Write (Frame Ethernet) does not wait and immediately returns with a timeout error if all data cannot be queued. Regardless of the timeout used, if a timeout error occurs, none of the data is queued, so you can attempt to call the XNET Write (Frame Ethernet) VI again at a later time with the same data.

This input is optional. The default value is 10.0 (10 seconds).

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

Default value: No error

datatype_icon

session out

An output that is the same as session in, provided for use with subsequent nodes.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Description

The data represents an array of Ethernet frames. Each Ethernet frame uses a LabVIEW cluster with Ethernet-specific elements.