IO Data Sink

Record, output, or terminate input message

  • Library:
  • SoC Blockset / I/O Data Source and Sink

Description

The IO Data Sink block records, outputs, or terminates the received input message signal. The input of this block connects to the output of the TCP Write, UDP Write, or Register Write block. This block enables you to save the received input data to a file that you can play back using the IO Data Source block in the model. You can also terminate the signal or output the signals through an output port which can be fed as an input to IO Data Source block.

Ports

Input

expand all

This port receives the data vector from the msg port of the processor io blocks, which includes Register Read, Stream Read, UDP Read and TCP Read blocks.

Data Types: SoCData

Output

expand all

Output data, returned as a numeric vector. The block converts the received input message into a data signal.

Data Types: uint32 | double | single | int8 | uint8 | int16 | uint16 | int32 | int64 | uint64 | Boolean | fixedpoint

Output data length, returned as a nonnegative numeric scalar.

Data Types: double

Control signal that indicates whether the output data is valid. When this value is 1 (true), the value on the output data port is valid .

Data Types: Boolean

The block sets done to 1 when there is no more stream output data to return. The block sets done to 0 when the block has more stream data to return.

Dependencies

To enable this port, set the Device type parameter to Stream.

Data Types: Boolean

Parameters

expand all

Set the sink of output data from the block by selecting one of these values:

  • To file — Save output data to a file.

  • To output port — Output data and signals by using output ports on the block.

  • To terminator — Terminate the received input signal.

Select a device type to enable the corresponding input data port.

  • UDP — Enables the msg input port to receive UDP data as message from msg port of UDP Read block.

  • TCP — Enables the msg input port to receive TCP data as message from msg port of TCP Read block.

  • Register — Enables the msg input port to receive Register data as message from msg port of Register Read block.

  • Stream — Enables the msg input port to receive Stream data as message from msg port of Stream Read block.

Specify a discrete time interval, in seconds, at which the block outputs data. The default value -1 inherits the sample time from the solver used for simulating the model.

Specify the full path to where you want to save the file on the host PC. This block saves the output data as a TGZ file. You can import this file into the model by using the IO Data Source block.

Dependencies

To enable this parameter, set the Output sink parameter to To file.

Specify a name for the output data source in which to save the data in the dataset file.

Dependencies

To enable this parameter, set the Output sink parameter to To file.

Select the data type of the output data. Match this value with the data type of input data.

Extended Capabilities

Introduced in R2019a