It is currently Thu Feb 09, 2012 1:01 am



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.





 Page 1 of 1 [ 2 posts ] 

Is this a useful sample model?
Yes, it is.  67%  67%  [ 4 ]
Might be, but I don't need it.  17%  17%  [ 1 ]
I don't understand the Use Case.  17%  17%  [ 1 ]
No, it isn't.  0%  0%  [ 0 ]
Total votes : 6

Author Message
 Post subject: Event MultiCast / Event BroadCast for Rhapsody in C++
PostPosted: Fri Dec 21, 2007 8:06 pm 

Joined: Wed Oct 31, 2007 3:09 pm
Posts: 58
Location: Milkyway, classic 9-planet solar system
I have developed a small example, showing how events could be sent synchronously or asynchronously to multiple or all reactive receivers inside of an application.

An additional package (to be added to an existing model) contains two classes - a Publisher Singleton and as Subscriber Baseclass - and a stereotype in order to make any reactive class a subscriber to that service.

See the uploaded zipped model for Rhapsody v7.1 (and above?)

Luke.


Attachments:
File comment: Example for Event Multi- and Broadcast with Rhapsody in C++
Should work for v7.1 and above...

RiCpp_EventMultiBroadcast.zip [35.56 KiB]
Downloaded 91 times

_________________
May the force be with you ...
Offline
 Profile  
 
 Post subject:
PostPosted: Tue Jan 15, 2008 9:32 am 

Joined: Tue Jan 15, 2008 9:02 am
Posts: 10
Hi Luke,

thanks for your example. I've just found this forum and think this example migth be usefule for me. However, since I'm using Rhapsody v7.0 I could not yet open it. What's more, I would need a solution for RiC (not RiC++).

So without having seen the actual model, I would have following question: does this class just broadcast the specified events to all subscribers simultanously? And can therefore all receivers handle the events?

Because what I would be looking for is a mechanism to broadcast events to multiple receivers...but only exactly one receiver is allowed to handle it (according to some specified priority).

As an example: a Keyboard class distributes its events (e.g. keyDown, keyUp) to a class MainMenu and a second class SMSEditor - if the higher priority class (here SMSEditor) cannot handle the event, only then the lower priority one (MainMenu) shall try to handle it.

But from the description of your example I think this is out of scope of your solution!? If so, do you have an idea on how to implement such a mechanism in RiC?

by mike


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


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

Search for:


suspicion-preferred