[gme-users] Fw: problem in reaching model from the GME API

Mehmet ADAK adak at aselsan.com.tr
Thu Feb 8 16:48:41 CST 2007


Thanks Zoltan.

problem is solved.

----- Original Message ----- 
From: "Zoltan Molnar" <zolmol at isis.vanderbilt.edu>
To: "gme-users" <gme-users at list.isis.vanderbilt.edu>
Sent: Monday, February 05, 2007 5:56 PM
Subject: RE: [gme-users] Fw: problem in reaching model from the GME API


Ok, I see what you mean: you have an object MSCLoopRef and you would
like to get the connected elements to it (from the 2nd chart).
The situation is that only 1 element MSCInstanceAxis is connected to
MSCLoopRef itself, that's why you get only that.
All the other connections where MSCLoopRef is involved are from the PORT
object sitting inside MSCLoop model (the target of MSCLoopRef).
So you 
1.either inquire about the connected elements (or connections) of the
PORT object, or
2.ask chart2 model about its contained connection kinds using:
BON::ModelImpl::getChildConnections() and sort out those which are drawn
from the ReferencePort object.

You can get to the src and dst of a connection by using the 

BON::ConnectionEnd ce1, ce2;
ce1 = myconn->getSrc();
ce2 = myconn->getDst();

calls, and you can figure out the actually connected objects from ce1,
ce2 by examining them using the following logic:

void handle( ConnectionEnd& p_connectionend)
{
BON::FCO connend_fco( p_connectionend);
if( connend_fco)
{
// the connected object is an fco ! 
}
else
{
BON::ReferencePort connend_refport( p_connectionend);
if( connend_refport)
{
// it's a referenceport: see ReferencePortImpl
for details
BON::FCO fco = connend_refport->getFCO();
BON::ReferencePortContainer rpc =
connend_refport->getContainer();
BON::Reference ref = rpc->getReference();
}
else ASSERT(0); // it can't happen
}
}

Br, Zoli


> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu 
> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf 
> Of Mehmet ADAK
> Sent: Friday, February 02, 2007 6:47 PM
> To: gme-users
> Subject: FW: [gme-users] Fw: problem in reaching model from 
> the GME API
> 
> 
> 
> in the second chart
> 
> MSCLoopRef is a reference of the first chart model named MSCLoop.
> 
> I am not reached to MSCLoopRef's connected models 
> (MSCMessageInput) in the second chart programmarically. I 
> implemented an interpreter. I use GME 6.5.8
> 
> 
> 
> 
> 
> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu on behalf of 
> Mehmet ADAK
> Sent: Thu 2/1/2007 8:53 AM
> To: gme-users at list.isis.vanderbilt.edu
> Subject: [gme-users] Fw:  problem in reaching model from the GME API
>  
> 
>   Hi,
> 
>   There are two diagram. In the first one (chart1.jpg), there 
> are models and  a
>   atom in the first model. The atom is defined as a port. And 
> this port atom
>   is connected to the other two models (MSCMessageOutput models)
> 
>   In the second one (chart2), there is a reference of the 
> first model of the
>   first diagram and other models. The port atom automatically 
> appears when  the
>   first model of the first diagram is dragged and dropped on it.
>   Then the port of the referenced model is now connected to 
> the other two
>   models (MSCMessageInput)
> 
>   Problem is:
> 
>   In the second diagram, MSCMessageInput models are not 
> reached from the port
>   of the reference model by the GME API. Only it is reached 
> to the first  model
>   in the first diagram. But its connected model (with port 
> atom) can not be
>   reached. Briefly, MSCMessageInput models are not reached 
> from the  reference.
> 
>   How I reach to them?
> 
>   Thanks
> 
>   Mehmet Adak
> 
> 
> 
> ######################################################################
> Dikkat:
> 
> Bu elektronik posta mesaji kisisel ve ozeldir. Eger size 
> gonderilmediyse lutfen gondericiyi bilgilendirip mesaji siliniz. 
> Firmamiza gelen ve giden mesajlar virus taramasindan gecirilmekte, 
> guvenlik nedeni ile kontrol edilerek saklanmaktadir. Mesajdaki 
> gorusler ve bakis acisi gondericiye ait olup Aselsan A.S. resmi 
> gorusu olmak zorunda degildir.
> 
> ######################################################################
> Attention: 
> 
> This e-mail message is privileged and confidential. If you are 
> not the intended recipient please delete the message and notify 
> the sender. E-mails to and from the company are monitored for 
> operational reasons and in accordance with lawful business practices. 
> Any views or opinions presented are solely those of the author and 
> do not necessarily represent the views of the company.
> 
> ######################################################################
> 
> 
> ######################################################################
> Dikkat:
> 
> Bu elektronik posta mesaji kisisel ve ozeldir. Eger size 
> gonderilmediyse lutfen gondericiyi bilgilendirip mesaji siliniz. 
> Firmamiza gelen ve giden mesajlar virus taramasindan gecirilmekte, 
> guvenlik nedeni ile kontrol edilerek saklanmaktadir. Mesajdaki 
> gorusler ve bakis acisi gondericiye ait olup Aselsan A.S. resmi 
> gorusu olmak zorunda degildir.
> 
> ######################################################################
> Attention: 
> 
> This e-mail message is privileged and confidential. If you are 
> not the intended recipient please delete the message and notify 
> the sender. E-mails to and from the company are monitored for 
> operational reasons and in accordance with lawful business practices. 
> Any views or opinions presented are solely those of the author and 
> do not necessarily represent the views of the company.
> 
> ######################################################################
> 
_______________________________________________
gme-users mailing list
gme-users at list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users

######################################################################
Dikkat:

Bu elektronik posta mesaji kisisel ve ozeldir. Eger size 
gonderilmediyse lutfen gondericiyi bilgilendirip mesaji siliniz. 
Firmamiza gelen ve giden mesajlar virus taramasindan gecirilmekte, 
guvenlik nedeni ile kontrol edilerek saklanmaktadir. Mesajdaki 
gorusler ve bakis acisi gondericiye ait olup Aselsan A.S. resmi 
gorusu olmak zorunda degildir.

######################################################################
Attention: 

This e-mail message is privileged and confidential. If you are 
not the intended recipient please delete the message and notify 
the sender. E-mails to and from the company are monitored for 
operational reasons and in accordance with lawful business practices. 
Any views or opinions presented are solely those of the author and 
do not necessarily represent the views of the company.

######################################################################


More information about the gme-users mailing list