Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: about port check operation

about port check operation 24 Feb 2003 03:25 #6399

Hello everyone,

In TTCN-3, what result the check operation generate? Is it a boolean value?
If I want to use the result of this operation as a branching condition, how should
I do?

What I need is like this:
"if the port is empty, do_A
else do_B
"

---
Best Regards,

Zhongjie Li

********************************************************************
* Zhongjie Li *
* Ph.D candidate, Department of Computer Science & Technology *
* Tsinghua University, Beijing, 100084, P.R.China *
* Tel: +86+10-62788109 Fax: +86+10-62788109 *
* Email: This email address is being protected from spambots. You need JavaScript enabled to view it. *
********************************************************************
The administrator has disabled public write access.

about port check operation 24 Feb 2003 08:10 #6402

Hi,

check is _not_ a boolean operation - instead it is just a modification of the normal blocking receive statement, which causes the received element to stay on the queue. You can still use it to accomplish what you want, e.g., like this:

alt {
[] check(Port.receive) {
do_B
}
[else] {
do_A
}
{

This should accomplish what you want.

BR

Stephan Tobies

>
Original Message
> From: ext Li Zhongjie [This email address is being protected from spambots. You need JavaScript enabled to view it.]
> Sent: 24. February 2003 04:25
> To: This email address is being protected from spambots. You need JavaScript enabled to view it.
> Subject: about port check operation
>
>
> Hello everyone,
>
> In TTCN-3, what result the check operation generate? Is it a
> boolean value?
> If I want to use the result of this operation as a branching
> condition, how should
> I do?
>
> What I need is like this:
> "if the port is empty, do_A
> else do_B
> "
>
> ---
> Best Regards,
>
> Zhongjie Li
>
> ********************************************************************
> * Zhongjie Li *
> * Ph.D candidate, Department of Computer Science & Technology *
> * Tsinghua University, Beijing, 100084, P.R.China *
> * Tel: +86+10-62788109 Fax: +86+10-62788109 *
> * Email: This email address is being protected from spambots. You need JavaScript enabled to view it. *
> ********************************************************************
>
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin