Converts any type of data you specify into an array of bytes.
You can also use this node to convert the byte order, or endian format, of the data in the flattened data array.
The data you want to convert. You can wire any data type to this input.
This input accepts arrays and clusters of Booleans, floating-point numbers, and strings. This input can also accept an array of clusters, or a cluster of arrays, of those data types. However, anything does not support refnums.
A Boolean that specifies whether this node includes information about data size at the beginning of data bytes.
prepend array or string size only controls the top-level data size information. Arrays and strings in hierarchical data types such as clusters always include size information.
True | Includes size information. |
False | Does not include size information. |
Default: True
The endian format of the data in the resulting output. Byte order, or endian form, indicates whether integers are represented in memory from most-significant byte to least-significant byte or vice versa. When reading a binary file, you must interpret the data in the same byte order in which the data was written.
Name | Description |
---|---|
big-endian, network order |
The most-significant byte occupies the lowest memory address. Use this endian format when reading data written on a different platform. |
native, host-order |
Uses the byte-ordering format of the host computer. This endian format increases read and write speed. |
little-endian |
The least-significant byte occupies the lowest memory address. |
Default: big-endian, network order
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.
Default: No error
A flattened byte array that this node generates.
If prepend array or string size is True, data bytes contains header information describing its size.
Error information.
The node produces this output 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.
If you want to flatten variant data, you may or may not want to flatten all of the attributes for that variant. If you want to flatten variant data and all of the variant contents, including attributes, use this node. However, if you want to only flatten the variant and discard its attributes, use the Variant To Flattened Byte Array node.
Where This Node Can Run:
Desktop OS: Windows
FPGA: Not supported
Web Server: Not supported in VIs that run in a web application