hello

9 views
Skip to first unread message

Sheherazade SOUM

unread,
May 10, 2020, 8:30:46 AM5/10/20
to OMNeT++ Users
this->energy = (int) par("energy"); . i don not understand this can you help me.please enrgy it is double wwhy write that

Alfonso Ariza Quintana

unread,
May 10, 2020, 6:21:31 PM5/10/20
to omn...@googlegroups.com
If the parameter is defined in the ned like double and the parater in the code is integer you can force this
this->energy = (int) par("energy").doubleValue();
if the paramter in the code is double and in the ned is integer you can
this->energy = par("energy").intValue();

and, you can change the types in the ned or c++ code

De: omn...@googlegroups.com <omn...@googlegroups.com> en nombre de Sheherazade SOUM <shehera...@gmail.com>
Enviado: domingo, 10 de mayo de 2020 14:30
Para: OMNeT++ Users <omn...@googlegroups.com>
Asunto: [Omnetpp-l] hello
 
this->energy = (int) par("energy"); . i don not understand this can you help me.please enrgy it is double wwhy write that

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/omnetpp/dbb44285-0239-4f6e-a431-cd5447b91e19%40googlegroups.com.

Sheherazade SOUM

unread,
May 11, 2020, 2:18:13 PM5/11/20
to omn...@googlegroups.com
Hello sir , can you write me commende  for send message  . And commend for pin up message and i can view its distination.

Le dim. 10 mai 2020 à 11:42 PM, Sheherazade SOUM <shehera...@gmail.com> a écrit :
Thank you very mutch

Sheherazade SOUM

unread,
May 11, 2020, 2:18:14 PM5/11/20
to omn...@googlegroups.com
Thank you very mutch

Le dim. 10 mai 2020 à 11:21 PM, Alfonso Ariza Quintana <aari...@hotmail.com> a écrit :

Alfonso Ariza Quintana

unread,
May 12, 2020, 1:07:29 PM5/12/20
to omn...@googlegroups.com
Sorry but I don't understand your question, but you can find several examples that use the ping, you can see how is configured in the ini file

Enviado: lunes, 11 de mayo de 2020 1:10
Para: omn...@googlegroups.com <omn...@googlegroups.com>
Asunto: Re: [Omnetpp-l] hello
 
Reply all
Reply to author
Forward
0 new messages