Data-Structure Type Operations

Work with the type, deliberately.

Review the data-structure type-operation blocks. Keep exact type requirements and port definitions available when integrating a component.

DS Type Operations Block Models


Junction

File: general_blocks/Miscellaneous/Junction.sim

Description

The model will pass any input to all outputs. It supports any number of input or output ports. Example: one-to-many, many-to-one, or many-to-many.

Ports

Input Ports

  • in1      Data Type: Any
  • ...
  • in_M      Data Type: Any

Output Ports

  • out1     Data Type: Any
  • ...
  • out_N     Data Type: Any

Parameters

  • none

Sink

Sink

File: general_blocks/Miscellaneous/Sink.sim

Description

The model discards the data structure placed on the input port in.

Ports

Input Ports

  • in1      Data Type: Any
  • ...
  • in_M      Data Type: Any

Output Ports

  • none

Parameters

  • none

CopyDS

File: general_blocks/.sim

Description

The model makes a distinct copy of data tokens. Can be used when copy by reference cannot. Automatically detects whether the two output ports are actually connected to anything, and does not make a copy if either outout is unconnected. If both outputs are unconnected, the received data structure is consumed.

Ports

Input Ports

  • in     Data Type: Complex

Output Ports

  • out1 Data Type: Complex

  • out2 Data Type: Complex


Tequals

File: general_blocks/DS_Type_Operations/TypeOf.sim

Description

The model compares TYPE data structures for equality.
If the values of the two inputs are equal, a logical true (nonzero) is

placed on the out port.

Ports

Input Ports

  • in1     Data Type: TYPE
  • in2     Data Type:TYPE

Output Ports

  • out     Data Type: INTEGER

Parameters

  • none

TypeConst

File: general_blocks/DS_Type_Operations/TypeConst.sim

Description

Type constant generator. The model generates a TYPE value specified

by the Data_Type parameter each time the input trigger is enabled.

Ports

Input Ports

  • trigger     Data Type: TRIGGER

Output Ports

  • out          Data Type: TYPE

Parameters

  • Data_Type         Data Type: TYPE

TypeCompatible

TypeComp

File: general_blocks/DS_Type_Operations/TypeCompatible.sim

Description

Logical test for compatibility of data structure TYPEs. The model checks to
see if the TYPE value coming in the compatible input is compatible with the
TYPE value which is placed on the Ref input. The result of the compatibility
check is placed on the out port a logical true (nonzero) if compatible, a zero
if not.

Ports

Input Ports

  • Ref                Data Type: TYPE
  • compatible     Data Type: TYPE

Output Ports

  • out
    Data Type:INTEGER

Parameters

  • none

TypeOf

File: general_blocks/DS_Type_Operations/Tequals.sim

Description

Determines the TYPE of any data structure. The model places
the value representing the TYPE of the in data structure on the
type output and also passes the in data structure unmodified to
the out signal port.

Ports

Input Ports

  • in      Data Type: TRIGGER

Output Ports

  • out     Data Type: TRIGGER
  • type    Data Type: TYPE

Parameters

  • none

This page is an editorial rewrite of source documentation. Historical status, availability, and platform notes are not independently verified for a current release. Technical examples are reference material, not a live simulator.