Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » TTCN3_Compiler problem
TTCN3_Compiler problem [message #1785229] Wed, 11 April 2018 08:56 Go to next message
Mengxuan Zhao is currently offline Mengxuan ZhaoFriend
Messages: 1
Registered: April 2018
Junior Member
We have an issue with the ttcn3_compiler command line.
The test aims to send a small message to a simple UDP or TCP server and checks the returned message.
The issue is at the point of sending the message. It seems that the tester's port and the SUT's port is not at all mapped.
The following is the module that declares the UDP port and TCP port
module Types {

	type enumerated ECommandType {

	type record Message {
		ECommandType msgType,
		charstring msgContent optional

	type port UDPPort message {
		out	Message;
		in 	charstring;

	type port TCPPort message {
		out	Message;
		in 	charstring;

	type component Tester {
		port UDPPort pUDPPort;
		port TCPPort pTCPPort;
		timer t := 5.0;	

The compilation command we used is
ttcn3_compiler -t *.ttcn
We checked the generated .cc and .hh files by ttcn3_compiler. For both TCPport and UDPport, there is one .cc and one .hh generated. They are almost empty. That's why the correct message out and remote IP address are not assigned to the tester, so the test gets timeout.
That is more curious, is that we successfully compiled the test once several months ago with the same ttcn code. The compiled .cc and .hh files are completely different.
You can find the problematic .cc and .hh files in the attached file (; UDPPort.hh), as well as the successful compiled files (; UPDPort.suc.hh).
Does anyone have an idea what could be the problem?
Many thanks,
  • Attachment: UDPPort.hh
    (Size: 1.09KB, Downloaded 47 times)
  • Attachment:
    (Size: 1.19KB, Downloaded 42 times)
  • Attachment:
    (Size: 3.75KB, Downloaded 45 times)
  • Attachment: UDPPort.suc.hh
    (Size: 1.49KB, Downloaded 43 times)
Re: TTCN3_Compiler problem [message #1785327 is a reply to message #1785229] Thu, 12 April 2018 14:14 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1060
Registered: January 2015
Senior Member
Hi Mengxuan,

I think there's a misunderstanding here regarding the generation of test ports:

Titan can only generate a more or less empty frame, called skeleton, which then has to be added substance manually; these skeletons are not fully functional test ports.

Generating test port skeletons (and not test ports) is being done with the compiler option -t:

	-t:		generate Test Port skeleton 

Obviously adding own code has been done with your , UDPPort.suc.hh pair, but not with the other pair, which is the one directly generated by Titan.

So you should find out where you have the modified test port from and use that one if that matches your intentions; else, you have to add your own code to the generated skeletons (see Titan's documentation for details).

For clarity please check the test ports published in source in

(see links towards the bottom of the page). If you wish you can generate the skeletons
from the TTCN-3 code and compare them with the code of the fully functional test ports to see the difference.

Best regards

Previous Topic:Executing ETSI Diameter Rx test cases
Next Topic:SIPmsg and SIP_parser
Goto Forum:

Current Time: Sat Jul 04 23:12:58 GMT 2020

Powered by FUDForum. Page generated in 0.07415 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top