TTCN-3 Data Types
Data types, their declarations and their usage form the core of any programming language and are often the starting point of programming language manuals and tutorials. In this tutorial, we have chosen a different approach and introduced most features of the Testing and Test Control Notation Version 3 (TTCN-3) with only a minimal set of data types. The reason for this approach is that the range of data types in TTCN-3 is much larger than that usually found in typical programming languages. In this case, a complete coverage of data types would have been too distracting in the early stages of this book, when the aim was to enable the writing of TTCN-3 code as soon as possible. Now that the overview of the language has been given, it is time to present TTCN-3's data types in more depth.
The modelling in TTCN-3 of the application data or protocol data units (PDUs) for the testing domain is a crucial step in test system design. The most important point here is to get the right level of abstraction. TTCN-3 provides the possibility of creating a close correspondence between the data types of the system under test (SUT) and its representation in the test system. Finding the right mapping is not an easy task, but once a suitable representation has been found, many things in the test system will fall into place easily.
TTCN-3 features a large number of data types, many of which you will recognise from other programming languages (boolean, integer, float, (universal) ...