|
It is currently Wed Feb 08, 2012 4:49 pm
|
View unanswered posts | View active topics
| Welcome |
|
Welcome to RHAPSODY4YOU
You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, respond to polls, upload and download content, and access many other special features. Registration is fast, simple, and absolutely free, so please, register to join our community today. |
 |
|
 |
|
| Author |
Message |
|
ilovemodels
|
Post subject: Behavioral Ports to relay events not specified by contract Posted: Mon Sep 14, 2009 6:38 pm |
Joined: Mon Sep 14, 2009 6:34 pm Posts: 3
|
|
Hello,
I have a question about using a behavioral port to relay events that are not specified by the contract interface.
For example, in the Ping Pong example in the Rhapsody documentation. There is a Ping and a Pong object. Within the Pong object, there is a PongMachine part. I would like the Pong object to consume an event rather than relaying it to the Pong Machine part. I had tried to specify a interface contract between the ping and pong ports to consume the event. What I had hoped to accomplish by doing this is: any events not specified in the interface are relayed to the Pong Machine part. However this is not the case. To enable viewing of multiple levels of abstraction this would be immensely useful and cleaner to have. I have been trying to find a way around this and the only two solutions I can come up with are: 1. Create Pong statechart to generate a new event when triggered in PongMachine. 2. Create 2 ports for each Ping and Pong to show which is a behavioral port and which is relay port.
However, given the scope of my model and number of interactions, these two methods will become very very messy and cumbersome. The amount of rework time and possibility of error will increase dramatically. What are some of the better ways to approach this?
Additionally, if I were to have, within Pong object, a PongMachine1 and PongMachine2, what is the best way for the Ping Object to send two different messages out(i.e. evPing1 to PongMachine1; evPing2 to PongMachine2)? Again I understand could use other methods 1 or 2, as stated above, but is there any cleaner way to do this?
Thanks
|
|
|
|
 |
|
Christian Loibl
|
Post subject: Re: Behavioral Ports to relay events not specified by contract Posted: Thu Sep 17, 2009 12:43 pm |
Joined: Wed Aug 05, 2009 2:46 pm Posts: 5
|
|
If you add the project it might help to get a responde.
Regards Christian
|
|
|
|
 |
|
ilovemodels
|
Post subject: Re: Behavioral Ports to relay events not specified by contract Posted: Thu Sep 17, 2009 6:10 pm |
Joined: Mon Sep 14, 2009 6:34 pm Posts: 3
|
|
I have attached my project. Thanks for the help!
| Attachments: |
File comment: How do I get BothPing msg to be consumed by both Pong and PongMachine using only one port?
PingPong.zip [1.17 MiB]
Downloaded 39 times
|
|
|
|
|
 |
|
|
 |
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|