Full Library / Defining_Flow / Basic Processing / Insert
Block Name: Insert
Code File Location: VisualSim/actor/lib/DS_Insert_Port
This block inserts the values arriving on the two field ports into fields of a data structure arriving on the input port. The resulting data structure is placed on the output port. The input ports (a, b) are matched to the two parameter fields (a, b). The format for each parameter field is "Field_Name Type". The block checks the field name and type with the corresponding field in the incoming Data Structure. This block can also be used to insert individual bits into a binary word, where the (0, n) corresponds to the bit positions starting from 0. For example, one could insert the second byte with "fld int (8, 15)" of a four byte word in bit format. This capability is available for data with types-integer, binary or binary string.
Refer Select_Insert Demo Model.
Parameter |
Explanation |
Type |
Example |
Field_Description_A |
This places the value arriving on the port_a into the field specified in this Field_Description_A. The format for this field is "Name, Type". The special case of inserting individual bits into a token requires the format: "MyField type (0,n)", where n is an integer. MyField must be either integer, binary string, or binary format. |
String |
Fld_Name_A Fld_Type_or_None |
Field_Description_B |
This places the value arriving on the port_b into the field specified in this Field_Description_B. The format for this field is 'Name, Type'. The special case of inserting individual bits into a token requires the format: "MyField type (0,n)", where n is an integer. MyField must be either integer, binary string, or binary format. |
String |
Fld_Name_B Fld_Type_or_None |
Port |
Explanation |
Type |
input |
It is used to accept the incoming Data Structure. |
String |
field_a |
The field_a input port. Value to be inserted into a field or a part of a field. |
String |
field_b |
The field_b input port. Value to be inserted into a field or a part of a field. |
String |
output |
DS input port. Used to accept the incoming Data Structure. |
String |
Created with the Personal Edition of HelpNDoc: Free Qt Help documentation generator