It is currently Mon Feb 06, 2012 3:20 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 [ 8 posts ] 
Author Message
 Post subject: RiC Interfaces
PostPosted: Wed Apr 23, 2008 6:28 am 

Joined: Tue Apr 22, 2008 5:20 am
Posts: 3
Hello,

I'm working on a project where I'd like to use the RiC Interfaces. The interface has a statechart, thus it also have to handle events. Therefore the function <interface>_gen is generated and its function pointer is insert to the table <interface>_reactiveVtbl. So far, all seems to be ok. But now I want to use that interface in a different Rhapsody project, where it is included by reference. The problem I have now, that Rhapsody doesn't create the function <interface>_gen but insert still its name to the table <interface>_reactiveVtbl, thus the generated code not even can't be compiled, much less it would run capable.
The problem always seems to be, if a package where an interface is inside, is included by reference to a project. I also compaired the properties, but they are identical in both cases. Does anybody have an idea on this matter, or should I have to contact the Telelogic support?

I'm using RiC 7.1.1.2

Sven


Offline
 Profile  
 
 Post subject:
PostPosted: Wed Apr 23, 2008 5:34 pm 
User avatar

Joined: Thu Sep 13, 2007 7:34 pm
Posts: 397
Location: London
The concept of an interface is that it's just a set of abstract operations. The idea of an interface having a statechart is not one I would expect. Reusability refers to the user of the interface rather than the realization. Each realization simply provides a variant.

Would it help to bubble-up the pure interface?


Offline
 Profile  
 
 Post subject:
PostPosted: Wed Apr 23, 2008 9:06 pm 

Joined: Tue Apr 22, 2008 5:20 am
Posts: 3
Farquhar wrote:
The concept of an interface is that it's just a set of abstract operations. The idea of an interface having a statechart is not one I would expect. Reusability refers to the user of the interface rather than the realization. Each realization simply provides a variant.


Hello Farquhar,

I think you are right and this is also my understanding and thinking of this concept. But why do you think an interface shouldn't be reactive? If you want to have the interface handle events, e.g., using the RiCGEN_I macro to send events via an interface, the interface must have an (empty) statechart, or do I think in a wrong way?

BTW, the <interface>_gen function, which is used to handle events via the interface only forward its call to the corrsponding funtion of an class/object which realizes this interface and which is known by the interface via its virtual table. Thus its in fact the same, as it is realized for the abstract methods of an interface.

Sven


Offline
 Profile  
 
 Post subject:
PostPosted: Wed Apr 23, 2008 9:22 pm 
User avatar

Joined: Thu Sep 13, 2007 7:34 pm
Posts: 397
Location: London
The first thing I have to say is that I'm a RiC++ user but I do have experience of RiC (although I wonder why people don't use C++).

Nevertheless...

I think you should be able to specify an interface with receptions but without having an 'empty' statechart. I assume you mean that you create the statechart but just don't bother adding any states?


Offline
 Profile  
 
 Post subject:
PostPosted: Thu Apr 24, 2008 6:05 am 

Joined: Tue Apr 22, 2008 5:20 am
Posts: 3
Farquhar wrote:
I think you should be able to specify an interface with receptions but without having an 'empty' statechart.


You are right, it doesn't need to add a statechart to the interface. Adding an event reception has the same effect in terms of code generation and this has to be done anyway to be able sending events via the interface.

Neverthtless, my problem is still the same: In case the used interface is inside a referenced package, the _gen function will not be generated....


Offline
 Profile  
 
 Post subject:
PostPosted: Thu Apr 24, 2008 9:34 am 
User avatar

Joined: Thu Sep 13, 2007 7:34 pm
Posts: 397
Location: London
Sorry, I can't really help any further as I don't have access to RiC. There are lots of tricks that you can do in Rhapsody and these are needed more in RiC than RiC++.

Hopefully there are others on the forum that are in a better position to help you.

Why C rather than C++? You don't have to answer but I'm always interested as to why people still restrict themselves to C.


Last edited by Farquad on Sat May 03, 2008 4:03 pm, edited 1 time in total.

Offline
 Profile  
 
 Post subject:
PostPosted: Fri May 02, 2008 11:04 pm 

Joined: Thu Aug 30, 2007 4:31 pm
Posts: 152
Location: Germany
have you also the events defined in your Interface Package ?

Nevertheless ... sounds interesting what you're doing ... can you put your model into the samples section in this forum ... for further analysis and discussions.


Offline
 Profile  
 
 Post subject:
PostPosted: Tue Jun 03, 2008 2:02 pm 

Joined: Wed Mar 19, 2008 4:37 pm
Posts: 1
Hi,
we had the same problem with the _gen function of interfaces and found that it helps to take away the readonly flag on the package where the interface is defined. It has been acknowledged as a bug by rhapsody support (reference 109551).

Regards

Detlev


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 8 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