![]() |
![]() |
![]() |
![]() |
![]() |
What Is Generated?
Figure 231 shows how ANSI-C code is generated from a TTCN test suite. The generated code alone is not executable as it needs the test support functions module (see Figure 232).
In the case of the code generated from the compiler we also need a set of static functions which handle TTCN basics and other internal events. Even if these functions are vital for the successful compilation and execution of the generated code, the user should not have to worry about this part. These functions are gathered in a small set of static files which are compiled by the generated makefile and linked with the rest of the code.
The Code Files
The generated makefile is the file containing a definition of how the code should be compiled and linked. This will not be needed if you are compiling the generated code in a separate development environment.
The adaptor.h and adaptor.c files are the files that contain the adaptation code. If code is generated for the first time, these files will be generated by the compiler with empty function templates for the user to implement. On the other hand, if these files are present in the target directory the user does not have to worry about getting them overwritten.
The *_gen.{c,h} files contains the generated code from the TTCN test suite.
The asn1ende.h file contains the encode and decode functions for the ASN.1 Types. See chapter 58, ASN.1 Encoding and De-coding in the SDL Suite, in the User´s Manual. (Only if ASN.1 support has been selected)
The Adaptation
We are now ready to deal in greater detail with the adaptation phase which is the final phase to create an executable test suite. The adaptation process is described in "Adaptation of Generated Code" on page 1491 in chapter 36, Adaptation of Generated Code.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |