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

TOPIC: Port definition

Port definition 12 May 2008 15:11 #7300

  • Iv
  • Iv's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
Hello,

I have been reading the Core Languaje, specifically the point related to the
port definition.
Ports have three attributes, which determine the direction of the elements
defined. However I do not find any restriction related to elements being
defined in more than one list. For Example:

type port MyPort {
in A, B
out A
}

¿Is it correct? ¿Should A be declared in the list of elements inout? ¿Does A
behaves as an inout element? ¿What is the direction of A?

type port MyPort2 {
in A
inout A
}

¿What is the direction of A? I suppose inout.

Although it seems quite simple (am I correct?) to imagine that an element
defined in both, the in and out list element will act as if it was defined
in the inout list, and any element defined in the inout list is
bidirectional, even if it is also defined in another list, however I do not
find any documentation related to this topic. If there is any restriction,
could anyone tell me?

Best regards.





cid:part1.00080408.01090205@mtp.es



Iván Navarro Azurmendi



cid:part2.03090808.07000509@mtp.es



Pº de la Castellana, 182 - 10ª planta

28046 - Madrid

Tel.: +34 913531564

Fax: +34 913596179

<www.mtp.es> www.mtp.es
The administrator has disabled public write access.

Port definition 12 May 2008 15:53 #7301

Hi Ivan,

ports have an "in" and an "out" direction. "inout" is just shorthand for "in" and "out". Hence, you have in the "in" direction everything which is defined in "in" and "inout" and in "out" direction everything that is defined in "out" and "inout" direction. "everything" is in the meaning of a set, i.e. if you define an element several times to belong to the "in" or "out" direction this is not harmful, it is just superfluous.

Cheers, Ina


________________________________

From: active_ttcn3 : mts stf133 ttcn version 3 - active members only [This email address is being protected from spambots. You need JavaScript enabled to view it.] On Behalf Of Iván Navarro Azurmendi
Sent: Monday, May 12, 2008 5:12 PM
To: This email address is being protected from spambots. You need JavaScript enabled to view it.
Subject: Port definition


Hello,

I have been reading the Core Languaje, specifically the point related to the port definition.
Ports have three attributes, which determine the direction of the elements defined. However I do not find any restriction related to elements being defined in more than one list. For Example:

type port MyPort {
in A, B
out A
}

¿Is it correct? ¿Should A be declared in the list of elements inout? ¿Does A behaves as an inout element? ¿What is the direction of A?

type port MyPort2 {
in A
inout A
}

¿What is the direction of A? I suppose inout.

Although it seems quite simple (am I correct?) to imagine that an element defined in both, the in and out list element will act as if it was defined in the inout list, and any element defined in the inout list is bidirectional, even if it is also defined in another list, however I do not find any documentation related to this topic. If there is any restriction, could anyone tell me?

Best regards.









Iván Navarro Azurmendi







Pº de la Castellana, 182 - 10ª planta

28046 - Madrid

Tel.: +34 913531564

Fax: +34 913596179

www.mtp.es <www.mtp.es>
The administrator has disabled public write access.

Port definition 12 May 2008 15:53 #7302

Hi Ivan,

ports have an "in" and an "out" direction. "inout" is just shorthand for "in" and "out". Hence, you have in the "in" direction everything which is defined in "in" and "inout" and in "out" direction everything that is defined in "out" and "inout" direction. "everything" is in the meaning of a set, i.e. if you define an element several times to belong to the "in" or "out" direction this is not harmful, it is just superfluous.

Cheers, Ina


________________________________

From: active_ttcn3 : mts stf133 ttcn version 3 - active members only [This email address is being protected from spambots. You need JavaScript enabled to view it.] On Behalf Of Iván Navarro Azurmendi
Sent: Monday, May 12, 2008 5:12 PM
To: This email address is being protected from spambots. You need JavaScript enabled to view it.
Subject: Port definition


Hello,

I have been reading the Core Languaje, specifically the point related to the port definition.
Ports have three attributes, which determine the direction of the elements defined. However I do not find any restriction related to elements being defined in more than one list. For Example:

type port MyPort {
in A, B
out A
}

¿Is it correct? ¿Should A be declared in the list of elements inout? ¿Does A behaves as an inout element? ¿What is the direction of A?

type port MyPort2 {
in A
inout A
}

¿What is the direction of A? I suppose inout.

Although it seems quite simple (am I correct?) to imagine that an element defined in both, the in and out list element will act as if it was defined in the inout list, and any element defined in the inout list is bidirectional, even if it is also defined in another list, however I do not find any documentation related to this topic. If there is any restriction, could anyone tell me?

Best regards.









Iván Navarro Azurmendi







Pº de la Castellana, 182 - 10ª planta

28046 - Madrid

Tel.: +34 913531564

Fax: +34 913596179

www.mtp.es <www.mtp.es>
The administrator has disabled public write access.

Port definition 12 May 2008 16:01 #7303

Dear Ivan,

In my opinion, such conditions should be warned or reported as an error
by the compiler. Including A in either lists, (in & out, in & inout or
out & inout) could be right, but the likelihood of being a test writer's
mistake. Anyway, it would be clearest to write "inout A" instead of "in
A, out B" (and then having to remember the rules).

Best regards,
David

Iván Navarro Azurmendi escribió:
> Hello,
>
> I have been reading the Core Languaje, *specifically* the point related to the port definition.
> Ports have three attributes, which determine the direction of the elements define*d*. However I do not find any restriction related to elements being defined in more than one list. For Example:
>
> type port MyPort {
> in A, B
> out A
> }
>
> ¿Is it correct? ¿Should A be declared in the list of elements inout? ¿Does A behaves as an inout element? ¿What is the direction of A?
>
> type port MyPort2 {
> in A
> inout A
> }
>
> ¿What is the direction of A? I suppose inout.
>
> Although it seems quite simple (am I correct?) to imagine that an element define*d* in both, the in and out list element will act as if it was define*d* in the inout list, and any element define*d* in the inout list is bidirectional, even if it is also define*d* in another list, however I do not find any documentation related to this topic. If there is any restriction, could anyone tell me?
>
> Best regards.
>
>
>
>
>
> cid:part1.00080408.01090205@mtp.es
>
>
>
> *Iván Navarro Azurmendi*
>
>
>
> cid:part2.03090808.07000509@mtp.es
>
>
>
> Pº de la Castellana, 182 - 10ª planta
>
> 28046 - Madrid
>
> Tel.: +34 913531564
>
> Fax: +34 913596179
>
> *www.mtp.es* <www.mtp.es>
>
>
>
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin