Record scalar and vector

1,176 views
Skip to first unread message

Norberto Barroca

unread,
Jun 1, 2009, 6:46:17 AM6/1/09
to omne...@omnetpp.org

Hi, omnetpp list.

 

I have this in my omnetpp.ini file.

 

# This file is shared by all simulations.

# Lines beginning with `#' are comments

 

[General]

# nothing here

 

[Config Smac1_Network]

network = Smac1_Network

record-eventlog = true

**.vector-recording = true

**.scalar-recording = true

 

 

However I don´t have any record vectors or scalars why?

cem akpolat

unread,
Jun 1, 2009, 6:59:40 AM6/1/09
to omn...@googlegroups.com
Hi,
Did you look at the class that you use?
For example, .In my simulation (examples/handover), I had to record receivePower parameter, for
this I  added new cOutVector(this is the class of Vector) in the AbstractRadio.h file.
When I added, I ran again my simulation  and I started to record data by my new COutVector.
This is also valuable  Scalar.

I recomend you first of all, determine the .cc and .h files that  your simulation use,
and add your new cOutVector or Scalar.

Then , you run again your simulation.

Cem



2009/6/1 Norberto Barroca <norberto...@hotmail.com>



--
CEM AKPOLAT

Norberto Barroca

unread,
Jun 1, 2009, 7:22:55 AM6/1/09
to omn...@googlegroups.com

Tanks for the help

 

 

--------------------

Regards, 
Atenciosamente,
 
Norberto Barroca

tuoqi

unread,
Jun 1, 2009, 8:17:28 PM6/1/09
to omnetpp
hi,I have met with the same problem:I can get the vector files in some
networks(chord,chordsemisimple,etc),but chordLarge does not generate
any vetor files and doesn't record anything in the scalar files.They
use the same classes,the only difference is in the omnetpp.ini
configuration.How can I solve this problem? thanks!

On 6月1日, 下午6时59分, cem akpolat <akpolat...@gmail.com> wrote:
> Hi,
> Did you look at the class that you use?
> For example, .In my simulation (examples/handover), I had to record
> receivePower parameter, for
> this I  added new cOutVector(this is the class of Vector) in the
> AbstractRadio.h file.
> When I added, I ran again my simulation  and I started to record data by my
> new COutVector.
> This is also valuable  Scalar.
>
> I recomend you first of all, determine the .cc and .h files that  your
> simulation use,
> and add your new cOutVector or Scalar.
>
> Then , you run again your simulation.
>
> Cem
>
> 2009/6/1 Norberto Barroca <norberto.barr...@hotmail.com>

cem akpolat

unread,
Jun 2, 2009, 5:40:02 AM6/2/09
to omn...@googlegroups.com
Hi,
In omnetpp.ini file, you can just make the configuration, you can't create any vector or scalar,
you can just enable those.
As mentioned in the my first e-mail, you should create new cOutVector or Scalar(I can't remember the class name)
in the concerned class of your simulation. You will add in the .h file your
cOutVector vector;
and you will invoke it in the concerned class.for example classe name is car;
public classe car {


void initialization()
..
handleMessage(...)
..
any method that you want to collect the data()
{
  vector.record();
...
}

My advice you, when you invoke your cOutvector or  Scalar, you should determine the  method which you use,
else you may collect the data unnecessary, and your simulation grahpe will be false naturally.


2009/6/2 tuoqi <huangzh...@gmail.com>



--
Cem Akpolat

黄知临

unread,
Jun 2, 2009, 5:43:29 AM6/2/09
to omn...@googlegroups.com
thank you for your help!

2009/6/2 cem akpolat <akpol...@gmail.com>



--
Best Regards
Huang Zhilin

Wireless Signal Processing & Network Lab(WSPN),
Beijing University of Posts and Telecommunications (BUPT)
Phone:+86 (0)10 62285947
email:huangzh...@gmail.com

Reply all
Reply to author
Forward
0 new messages