Re: [Omnetpp-l] Display on INET: bubble and getDisplay ???

99 views
Skip to first unread message

Andrew Hardy

unread,
Dec 6, 2012, 11:41:32 AM12/6/12
to omn...@googlegroups.com
I think bubble needs to be called on a visible module

If are in a method in a submodule and you just call bubble() I think you
will not see anything in the top level animation

For example From a submodule of a visible module you will have to call
something like

this->getparent()->bubble();

This is the general idea not precise code.

Search in the api documentation for getparent or similar.

Likewise getdisaplystring() must be called on the relevant object.

Post your code and it may be easier then to see what may be going wrong


On 06/12/2012 16:35, sassir wrote:
> Hello everyone,
>
> I am working on Inet and i would like to dispay some informations during communications between hosts.
> I looked at the tic toc tutorial and aloha tutorial, i found these functions bubble(const char*) and getDisplayString().setTagArg("t",0,const char*);
>
> I integrated these functions in my code but nothing happens, my informations do not display.
>
> Does anyone know how to do because i do not have any idea ?
>
> Thank you in advance.
>
> Best regards,
>
> --
> --
> Sent from the OMNeT++ mailing list. To configure your membership,
> visit http://groups.google.com/group/omnetpp
>
>
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.2793 / Virus Database: 2634/5939 - Release Date: 12/05/12
>
>
>


________________________________
Important Notice: the information in this email and any attachments is for the sole use of the intended recipient(s). If you are not an intended recipient, or a person responsible for delivering it to an intended recipient, you should delete it from your system immediately without disclosing its contents elsewhere and advise the sender by returning the email or by telephoning a number contained in the body of the email. No responsibility is accepted for loss or damage arising from viruses or changes made to this message after it was sent. The views contained in this email are those of the author and not necessarily those of Liverpool John Moores University.

sassir

unread,
Dec 6, 2012, 2:59:15 PM12/6/12
to omn...@googlegroups.com, a.h...@2009.ljmu.ac.uk
Ok, thank you for information I will try it.

sassir

unread,
Dec 7, 2012, 4:21:48 AM12/7/12
to omn...@googlegroups.com, a.h...@2009.ljmu.ac.uk
Hello,

I tried your suggestion and i looked at the api documentation but nothing. I can't manage to use getParent(), I always have an error.

About my code, i am using the inet example Lan80211. I would to put my code to display some informtion at the level of the physical layer (go to inet->src->linklayer>radio>AbtractRadio.cc) in the function void AbstractRadio::sendDown(AirFrame *airframe)        

here is the code i want to write but doesn't work:

bubble("Station Sending");
if (ev.isGUI())
        {
            getDisplayString().setTagArg("i",1,"yellow");
            getDisplayString().setTagArg("t",0,"TRANSMIT");
        }
sendToChannel(airframe)

i am at your disposal. Thank you in advance.

Best regards,

sassir

unread,
Dec 7, 2012, 7:18:13 AM12/7/12
to omn...@googlegroups.com, a.h...@2009.ljmu.ac.uk
So I found the solution thans to Andrew !!
I need to use:

 this->getParentModule()->getParentModule()->bubble("My text");

(same thing for getDisplayString().setTagArg("t",0,"TRANSMIT"); )

Best ragards,
Reply all
Reply to author
Forward
0 new messages