![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: PORTS with multiplicity Topic Summary: Created On: 18-Aug-2005 07:59 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|||
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 |
|||
![]() |
|||
![]() |
|||
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 |
|||
![]() |
|||
![]() |
|||
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
|
|||
![]() |
|||
![]() |
|||
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
------------------------- Simon Morrish simon.morrish@eu.panasonic.com http://panasonic.co.uk Panasonic ideas for life |
|||
![]() |
Telelogic Rhapsody
» Rhapsody Category » Rhapsody
»
PORTS with multiplicity
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.