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

TOPIC: question about map and connect

question about map and connect 29 Jun 2004 07:47 #6723

Hi,
I am new to TTCN.I have a question about connect/map.
That is:
there are 3 components, in the component1 could do the conection as : connect(component2:port1,component3:port1)? or map(component2:port1,component3:port1)?
please help me!
Best regards.
Mr. Pan Yuanming
The administrator has disabled public write access.

question about map and connect 29 Jun 2004 08:17 #6724

MessageI have known the difference between map and connect.my question is:
if all components are internal component,
In component1 could do : connect(component2:port1,component3:port1)?this connect is on the component1.
BR,
Pan

Original Message
From: Guevel, Jean-Marc
To: Pan Yuanming
Sent: Tuesday, June 29, 2004 4:10 PM
Subject: RE: question about map and connect


Hi,

What you need to know map shall be used to establish a connection with an external device, and connect shall be used to establish connection between internal component of your tester.
In your example the correct syntax should be connect(component2:port1,component3:port1).
BR,
Jean-Marc

Original Message
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 Pan Yuanming
Sent: mardi 29 juin 2004 09:48
To: This email address is being protected from spambots. You need JavaScript enabled to view it.
Subject: question about map and connect


Hi,
I am new to TTCN.I have a question about connect/map.
That is:
there are 3 components, in the component1 could do the conection as : connect(component2:port1,component3:port1)? or map(component2:port1,component3:port1)?
please help me!
Best regards.
Mr. Pan Yuanming
The administrator has disabled public write access.

question about map and connect 29 Jun 2004 08:20 #6725

ext Pan Yuanming wrote:

> Hi,
> I am new to TTCN.I have a question about connect/map.
> That is:
> there are 3 components, in the component1 could do the conection as :
> connect(component2:port1,component3:port1)? or
> map(component2:port1,component3:port1)?


Yes, it is possible to use map/connect from 'outside' of the components.
For example, in your MTC you may create two PTCs and connect their ports
before starting them:

type port CoordinationPort message {
inout CoordinationMsg
};

type component PTC {
port CoordinationPort P_coord
};

testcase tc() ... {
var PTC ptc1 := PTC.create;
var PTC ptc2 := PTC.create;

connect(ptc1:P_coord, ptc2:P_coord);
...
}

Best regards

Stephan Tobies

--
Stephan Tobies Sr. Research Engineer, Nokia Research Center
~ Mobile Networks Lab, Protocol Engineering Group
E-Mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
Work Phone: +49-234-9842262
Mobile: +49-163-9842405
Fax: +49-234-9843491
Address: NRC Bochum, Meesmannstr. 103, 44807 Bochum, Germany
The administrator has disabled public write access.

question about map and connect 29 Jun 2004 08:28 #6726

Thanks for the answer.
But in the example,the MTC could be replaced by PTC?
and the map is the same?
Best Regards,
Pan



Original Message
From: "Stephan Tobies" <This email address is being protected from spambots. You need JavaScript enabled to view it.>
To: <This email address is being protected from spambots. You need JavaScript enabled to view it.>
Sent: Tuesday, June 29, 2004 4:20 PM
Subject: Re: question about map and connect


> ext Pan Yuanming wrote:
>
> > Hi,
> > I am new to TTCN.I have a question about connect/map.
> > That is:
> > there are 3 components, in the component1 could do the conection as :
> > connect(component2:port1,component3:port1)? or
> > map(component2:port1,component3:port1)?
>
>
> Yes, it is possible to use map/connect from 'outside' of the components.
> For example, in your MTC you may create two PTCs and connect their ports
> before starting them:
>
> type port CoordinationPort message {
> inout CoordinationMsg
> };
>
> type component PTC {
> port CoordinationPort P_coord
> };
>
> testcase tc() ... {
> var PTC ptc1 := PTC.create;
> var PTC ptc2 := PTC.create;
>
> connect(ptc1:P_coord, ptc2:P_coord);
> ...
> }
>
> Best regards
>
> Stephan Tobies
>
> --
> Stephan Tobies Sr. Research Engineer, Nokia Research Center
> ~ Mobile Networks Lab, Protocol Engineering Group
> E-Mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
> Work Phone: +49-234-9842262
> Mobile: +49-163-9842405
> Fax: +49-234-9843491
> Address: NRC Bochum, Meesmannstr. 103, 44807 Bochum, Germany
The administrator has disabled public write access.

question about map and connect 29 Jun 2004 08:37 #6727

Dear Pan,

Pan Yuanming wrote:

> Hi,
> I am new to TTCN.I have a question about connect/map.
> That is:
> there are 3 components, in the component1 could do the conection as
> : connect(component2:port1,component3:port1)? or
> map(component2:port1,component3:port1)?

well, basically it depends what the components are for. If component1
has *created* the components component2 and component3 then the connect
statement would be the right choice, as maps can only be done with one
component being the test system interface.

The test system interface is typically referenced with the keyword
system and will be created automatically when a test case is started.

Best regards,

Theo Vassiliou<



> please help me!
> Best regards.
>
> Mr. Pan Yuanming
>
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin