Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: PORTS with multiplicity
Topic Summary:
Created On: 18-Aug-2005 07:59
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 18-Aug-2005 07:59
User is offline View Users Profile Print this message


Kishore kumar

Posts: 5
Joined: 11-May-2005

My problem:
I got 2 source ports sending request to single destination port.The destination port should determine the port it recieved request from, to send the response back to the same port.

Is it possible with current ports multiplicity?

It would be nice if anyone can post examples for broadcast,multicast,unicast design using ports.

Regards,
Kishore
Report this to a Moderator Report this to a Moderator
 31-Aug-2005 16:56
User is offline View Users Profile Print this message


Simon Morrish

Posts: 127
Joined: 17-May-2005

Hi Kishore

Attached is an example project (Rhapsody 6.0) which demonstrates sending a response out the port through which the request was received.

1. Load the model.
2. GMR.
3. Open animated sequence diagram.
4. Animation GO.
5. View sequence diagram.
6. Study the State Chart of the Server object to see how its done.

regards,
Simon




-------------------------
Simon Morrish
simon.morrish@eu.panasonic.com
http://panasonic.co.uk
Panasonic ideas for life
Report this to a Moderator Report this to a Moderator
 14-Mar-2006 17:03
User is offline View Users Profile Print this message


Elie Najm

Posts: 1
Joined: 17-Jun-2004

Hi,

I saw the solution on this thread for ports with multiplicity.
It is quite elegant and works well for client server configurations.

I have a rather different problem. I would like to use
ports with multiplicity * (or 1..10) in order to connect
peer entities. There are many examples: routers that exchange routing messages, wifi stations that share a medium, etc. I would like, for example, to be able
to model the class router and then to model a
topology of router instances, each instance router being connected (using a uml link) to its neighbours,
and where the number of neighbours vary for each instance. Does anyone have an idea about how to proceed?
I would be grateful. Thanks in advance.

Elie

Singleton1.zip
Singleton1.zip  (7 KB)

Report this to a Moderator Report this to a Moderator
 17-Mar-2006 13:02
User is offline View Users Profile Print this message


Simon Morrish

Posts: 127
Joined: 17-May-2005

Hi Elie

Thankyou for your positive comments about the PortsMultiplicity example. I'm glad it was useful.

It is quite simple to extend it to a peer situation as you describe; basically, every object needs to be both a client and a server, and we need to deal with port multiplicity *.

Attached is an example project (Rhapsody 6.0) which demonstrates this. As before, you need to:

[list=1]
[*]Load the model.
[*]GMR.
[*]Open animated sequence diagram.
[*]Animation GO.
[*]View sequence diagram.
[*]Study the State Chart of the Router object to see how its done.
[/list]

Points to note:

[list]
[*]There is now a single Router class with * sending ports and * receiving ports.
[*]The PortsRouterStructure diagram shows the Router objects and the links between them.
[*]However, Rhapsody does not (correctly) generate code to link ports with multiplicity *, so I've had to manually create the links by overriding the generation of PortsRouter_initRelations.
[/list]

Please let me know how you get along.

best regards,
Simon

PortsRouter.zip
PortsRouter.zip  (23 KB)



-------------------------
Simon Morrish
simon.morrish@eu.panasonic.com
http://panasonic.co.uk
Panasonic ideas for life
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.