Data-Structure Access

Reach the information inside the structure.

Explore blocks for accessing data structures. Follow field definitions and interface requirements to connect the right values.

Data Structure Access Block Models


Create_DS

Create DS

File: general_blocks/Data_Structure_Access/Create_DS.sim
Description
The model to generate the specified data structure and place it on the out port.
Ports

Input Ports

  • trigger  Data Type: TRIGGER

Output Ports

  • out     Data Type: ANY

Parameters

  • Data_Type

Coerce_DS

Coerce DS

File: general_blocks/Data_Structure_Access/Coerce_DS.sim
Description
The model coerces a composite data structure to a different type.
Ports

Input Ports

  • in     Data Type: ANY COMPOSITE

Output Ports

  • out    Data Type: ANY

Parameters

  • Data_Type

Declare_DS

Declare DS

File: general_blocks/Data_Structure_Access/Declare_DS.sim
Description
The model declares the type of the in data structure. If the in data
structure is compatible with the declared type (Data_Type parameter),
it is passed out the out port. If it is not , an error message is written to
the simulation error file and the in data structure is not passed to out.

Ports

Input Ports

  • in     Data Type: ANY

Output Ports

  • out Data Type: ANY

Parameters

  • Data_Type

InsertField

InsertFd

File: general_blocks/Data_Structure_Access/InsertField.sim

Description
The model sets a field of a Composite Data Structure. The model sets a selected field of the in data structure and then places the modified data structure on the out port.
Ports

Input Ports

  • in         Data Type: ANY
  • field     Data Type: ANY

Output Ports

  • out Data Type: ANY

Parameters

  • Field_Name

InsertFieldParam

InsertFdParam

File: general_blocks/Data_Structure_Access/InsertFieldParam.sim

Description
The model sets a field of a Composite Data Structure using a Parameter. The model sets a selected field of the in data structure using a Parameter, then places the modified data structure on the out port.
Ports

Input Ports

  • in         Data Type: ANY

Output Ports

  • out Data Type: ANY

Parameters

  • Field_Name
  • Parameter

InsertMutipleFieldParams

InsertMultipleFieldParams

File: general_blocks/InsertMultipleFieldParams.sim
Description
The model selects fields of a Composite Data Structure using Field_Name_n and sets its value to TNow. Up to ten (specified by the NumberOfFields parameter)fields may be filled with TNow (Field_Name_1 through Field_Name_10). After all fields have been filled, the modified data structures placed on the out port.
Ports

Input Ports

  • in     Data Type: ANY

Output Ports

  • out Data Type: ANY

Parameters

  • NumberOfFields = N Data Type: INTEGER (1 <= n <= 10)
  • Field_Name_n
  • Value_n

InsertMultipleTNow

File: general_blocks/InsertMultipleTNow.sim
Description
The model selects fields of a Composite Data Structure
using Field_Name_n and sets its value to TNow. Up to ten
(specified by the NumberOfFields parameter)fields may
be filled with TNow (Field_Name_1 through Field_Name_10).
After all fields have been filled, the modified data structures
placed on the out port.
Ports

Input Ports

  • in     Data Type: ANY

Output Ports

  • out Data Type: ANY

Parameters

  • NumberOfFields = N Data Type: INTEGER (1 <= n <= 10)
  • Field_Name_n

MakeRealDS

MakeRDS

File: general_blocks/Data_Structure_Access/MakeRealDS.sim
Description
The model creates specified Data Structure, and packs real input inreal into the specified field.
Data structure type (Data_Type) and field (field) are specified as parameters.
Ports

Input Ports

  • inreal     Data Type: REAL

Output Ports

  • outDS Data Type: ANY COMPLEX DATA STRUCTURE

Parameters

  • Data_Type
  • Field

SelectField

SellectFd

File: general_blocks/Data_Structure_Access/SelectField.sim
Description
The model selects a field of a Composite Data Structure. The model places a copy of a field of the in Data Structure on the field output and also passes the in data structure unmodified to the DS signal port.
Ports

Input Ports

  • in        Data Type: ANY

Output Ports

  • DS Data Type: ANY
  • field Data Type: ANY

Parameters

  • Field_Name

TypeSwitch

TypeSwi

File: general_blocks/Data_Structure_Access/TypeSwitch.sim
Description
The model passes an input data structure to one of the two outputs depending
on the type of the data structure relative to the type it is being checked against.
The parameter Data_Type determines what data structure the model will check for.
If the type of a data structure which enters the model is equal to Data_Type , then the
data structure will be enabled on the compatible output. If the Data Structure is not
compatible then it will be enabled on the not output. 

Ports

Input Ports

  • in     Data Type: TRIGGER

Output Ports

  • compatible     Data Type: ANY
  • not
    Data Type: TRIGGER

Parameters

  • Data_Type

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.