It is currently Thu Feb 09, 2012 12:58 am

All times are UTC



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 [ 4 posts ] 
Author Message
 Post subject: Using a reactive class from an external program
PostPosted: Wed Oct 07, 2009 6:23 pm 

Joined: Wed Oct 07, 2009 5:12 pm
Posts: 3
hello

my application consists of a mfc gui and some logic modeled in rhapsody as a reactive class.
the rhapsody model is compiled as static lib (.lib) and the mfc app links it.
i followed the provided rhapsody examples for making the gui and logic communicate using events.

my problem is that when the dialog generates events i witness serious delays in tasks that are performed
as a result of those events. but when i don't use events and instead call directly a method in the mentioned reactive class
there is no delay at all.
is the solution using triggered operations? if i use them instead of events the delay problems are solved but other problems arise,
for example disregarding completely a timeout ( tm(250) ) i have set in the statechart.

changing the concurrency of the reactive class from sequential to active didn't help either.

any special settings I should set, or guidelines to follow to make this work?

thanks


Offline
 Profile  
 
 Post subject: Re: Using a reactive class from an external program
PostPosted: Thu Oct 08, 2009 8:04 pm 

Joined: Thu Aug 30, 2007 4:31 pm
Posts: 152
Location: Germany
which VS Version are you using ?


Offline
 Profile  
 
 Post subject: Re: Using a reactive class from an external program
PostPosted: Fri Oct 09, 2009 7:10 am 

Joined: Wed Oct 07, 2009 5:12 pm
Posts: 3
Mickey wrote:
which VS Version are you using ?


2005


Offline
 Profile  
 
 Post subject: Re: Using a reactive class from an external program
PostPosted: Wed Oct 14, 2009 12:58 pm 

Joined: Wed Oct 31, 2007 3:09 pm
Posts: 58
Location: Milkyway, classic 9-planet solar system
coder wrote:
my problem is that when the dialog generates events i witness serious delays in tasks that are performed
as a result of those events. but when i don't use events and instead call directly a method in the mentioned reactive class
there is no delay at all.

What dimensions of delays are you talking about?
Is it milliseconds, several 10 milliseconds, several 100 milliseconds or is it in the area of seconds?
What is the overall system load?
How many threads are involved and what are their priorities?

coder wrote:
is the solution using triggered operations? if i use them instead of events the delay problems are solved but other problems arise,
for example disregarding completely a timeout ( tm(250) ) i have set in the statechart.

Triggered operations may be one possible solution, but are not neccessarily the only one.

If you want to use Triggered operations and Timeouts in parallel, then you have to set the property CG:Operation:Concurrency to guarded for all triggered operations in order to protect them against each other.

If you do not set this, then the Statechart code might be called from two threads in parallel - your Gui context for triggered operations on one hand and the OXF main thread for asynchronous timeout events on the other hand.
A second call will always be disregarded while the statemachine code is actively called from a different thread (if not guarded).
Overloading OMReactive::handleNotConsumed(...) may be used to identify such situations at runtime.

coder wrote:
changing the concurrency of the reactive class from sequential to active didn't help either.

Did you assign an appropriate priority to that active class via properties in CG:Class:ActiveThreadPriority?
The behavior of that active/reactive class has be started properly using 'pObject->startBehavior()', I guess?

Hope those suggestions can help you to track this down.

Regards,
Luke.



_________________
May the force be with you ...
Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 4 posts ] 

All times are UTC


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