Change packet color

622 views
Skip to first unread message

platzhirsch

unread,
Aug 26, 2010, 2:36:22 AM8/26/10
to omnetpp
Hello everyone,

is it possible to change the color of a packet dynamically? I've seen
different packet colors inside of a client, when the different layer
are communicating to each other.

I would like to change the packet of the color based on certain
conditions dynamically. Is that even possible and if not, what would
be the alternative?

Best regards Konrad

HAEFLINGER, PATRICK (PATRICK)

unread,
Aug 26, 2010, 2:49:58 AM8/26/10
to omn...@googlegroups.com
Hi Konrad,

If you speak about the bullet color of the message in the GUI then yes you can change this color dynamically. The bullet color is related to the "kind" field of the message (with modulo 8)
0 = RED
1 = GREEN
2 = BLUE
3 = WHITE
4 = YELLOW
5 = CYAN
6 = MAGENTA
7 = BLACK

You can change it by msg->setKind(your-value);

Patrick

-----Message d'origine-----
De : omn...@googlegroups.com [mailto:omn...@googlegroups.com] De la part de platzhirsch
Envoyé : jeudi 26 août 2010 08:36
À : omnetpp
Objet : [Omnetpp-l] Change packet color

Hello everyone,

Best regards Konrad

--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To post to this group, send email to omn...@googlegroups.com.
To unsubscribe from this group, send email to omnetpp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/omnetpp?hl=en.

platzhirsch

unread,
Aug 26, 2010, 2:56:37 AM8/26/10
to omnetpp
Thans alot, this saved me a lot of time reversed engineering :)

HAEFLINGER, PATRICK (PATRICK)

unread,
Aug 26, 2010, 3:03:17 AM8/26/10
to omn...@googlegroups.com
It is not matter of "reverse engineering" but just a matter of reading ...
See chapter 7.1.7 page 175 of the OMNeT 4.1 user manual

Regards

Patrick

-----Message d'origine-----
De : omn...@googlegroups.com [mailto:omn...@googlegroups.com] De la part de platzhirsch

Envoyé : jeudi 26 août 2010 08:57
À : omnetpp
Objet : [Omnetpp-l] Re: Change packet color

Thans alot, this saved me a lot of time reversed engineering :)

--

platzhirsch

unread,
Aug 26, 2010, 2:27:12 PM8/26/10
to omnetpp
I totally forget this is a matter of OmNeT++ and not INET. However I
am changing the displayString, because manpulating the msgKind messses
the protocols.

On Aug 26, 9:03 am, "HAEFLINGER, PATRICK (PATRICK)"

Rimjhim Bhagat

unread,
Mar 26, 2016, 4:48:37 PM3/26/16
to OMNeT++ Users


Thanks PATRICK

Danila Yagovitov

unread,
Sep 15, 2021, 12:46:42 PM9/15/21
to OMNeT++ Users
Hello colleagues!
I'm trying to change packet color in Qtenv for standard UDP-App-example on the "/inet/examples/inet/udpapp" way. The simulation process is on the screen, I want to change "(Packet)provider[1]-0" arrow to green color, for example.
My INET version is 4.2.5, OMNet++ version is 5.6.2. Which file should I edit for my purpose?

суббота, 26 марта 2016 г. в 23:48:37 UTC+3, rimjh...@gmail.com:


Thanks PATRICK

Снимок экрана 2021-09-15 в 19.44.38.png
Reply all
Reply to author
Forward
0 new messages