Along with the standard data types, you can define your own data types. You can create structures, enumeration types, and references as data type units (DUTs) in a DUT editor.
For a description of the particular standard and the user-defined data types, refer to the description of the data types.
To add a DUT object to an existing application, select the application node in the
, click the green plus button, and select . Or right-click the respective node and execute the command . To create an application-independent DUT object, select the node in the . In the dialog box, enter a for the new data type unit, and choose the desired type , , , or .To DUT objects of type command.
you can add text list support. For further information, refer to the description of theIn case of type
, you can use the principle of inheritance, thus supporting object-oriented programming. Optionally, you can specify that the DUT extends another DUT which is already defined within the project. Therefore, the definitions of the extended DUT will be automatically valid within the current one. For this purpose, activate the option and enter the name of the other DUT.Click
to confirm the settings. The editor view for the new DUT opens and you can start editing.Syntax
TYPE <identifier> : <DUT components declaration>END_TYPE
The DUT component declaration depends on the type of DUT, for example, a structure, or an enumeration.
The following example contains 2 DUTS, defining structures struct1
and struct2
; struct2
extends struct1
, which means that you can use struct2.a
in your implementation to access variable a
.
TYPE struct1 :
STRUCT
a:INT;
b:BOOL;
END_STRUCT
END_TYPE
TYPE struct2 EXTENDS struct1 :
STRUCT
c:DWORD;
d:STRING;
END_STRUCT
END_TYPE