Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Unexpected behavior of port.halt?
Unexpected behavior of port.halt? [message #1834171] Wed, 04 November 2020 10:12 Go to next message
Anton Vikstrom is currently offline Anton VikstromFriend
Messages: 1
Registered: November 2020
Junior Member
From TTCN-3 standards:

Quote:

22.5.4 The Halt port operation
The halt operation is comparable to the stop operation, but allows entries being already in the queue to be processed with receiving operations

[...]

Examples
myPort.halt;
// No sending allowed on myPort from this moment on; 
//    processing    of    messages    in    the    queue    still    possible.

myPort.receive (mw_myTemplate1);
 // If a message was already in the queue before the halt                                         
//  operation    and    it    matches    mw_myTemplate1,    it    is    processed;                                            //  otherwise    the    receive    operation    blocks


I interpreted this to mean that I could halt my port, then receive what has already arrived on the port and been enqueued. No more messages would be enqueued on the port if they arrive.

However, when inside an alt statement, if a message arrives on the test port after halting it, I get a dynamic test case error saying "Port <name> is not started by a message has arrived on it".

Is this optimal behavior and what was intended by the standard? It seems to me that this makes port.halt way less useful, since it risks raising an error if used after halting?
Re: Unexpected behavior of port.halt? [message #1834224 is a reply to message #1834171] Thu, 05 November 2020 10:01 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Anton,

Thank you ,
you have probably hit an error in Titan;

I have opened a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=568552

It should be fixed soon.

Best regards
Elemer
Re: Unexpected behavior of port.halt? [message #1834273 is a reply to message #1834224] Fri, 06 November 2020 10:41 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Anton,

the fix has been committed; if you wish to test it, and don't want to wait until release,
please clone the latest source from https://github.com/eclipse/titan.core
and build a new Titan according to instructions in README.linux

Best regards
Elemer
Previous Topic:DNS Example from book
Next Topic:OpenApi 3 support
Goto Forum:
  


Current Time: Sat Oct 05 09:51:26 GMT 2024

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

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

Back to the top