I don't see NIC in Network simulation in VEINS project

51 views
Skip to first unread message

Sra Sontisirikit

unread,
May 2, 2012, 6:57:02 AM5/2/12
to omn...@googlegroups.com
Dear VEINS project member

I use your project as a reference to implement my network simulation.
I try to find where your project register NIC to the BaseConnectionManager

In TraCIScenarioManager.

initialize 
   cc = FindModule<BaseConnectionManager*>::findGlobalModule();
    if (cc == NULL) error("Could not find BaseConnectionManager module");

During add new module

I do not see you add new nic to the new tracimobility

but during delete module

i see you delete nic for cc (BaseConnectionManager)

 void TraCIScenarioManager::deleteModule(std::string nodeId) {
    cModule* mod = getManagedModule(nodeId);
    if (!mod) error("no vehicle with Id \"%s\" found", nodeId.c_str());

    cc->unregisterNic(mod->getSubmodule("nic"));

    hosts.erase(nodeId);
    mod->callFinish();
    mod->deleteModule();
}


Please help me, I need to register nic to my mobility node for simulate the network connection.
 

Christoph Sommer

unread,
May 2, 2012, 12:56:21 PM5/2/12
to omn...@googlegroups.com
Sra Sontisirikit wrote:
> During add new module
> I do not see you add new nic to the new [module]

The compound modules that get added (most commonly, of type `Car') are
implied to contain a module `nic' that models a network interface card.

OMNeT++ takes care of automatically instantiating the submodules of a
compound module when it is instantiated.

As a Car includes a nic, whenever the sample simulation creates a Car,
it will also create the car's NIC.

Best,

Christoph

--
Dr.-Ing. Christoph Sommer
Institute of Computer Science
University of Innsbruck, Austria
Phone: +43 512 507-96835 / Fax: -9888
http://ccs.uibk.ac.at/~sommer/

Sra Sontisirikit

unread,
May 3, 2012, 12:32:41 AM5/3/12
to omn...@googlegroups.com
Dear Christoph 

Thank you for quick reply.
Your answer make me clear what I am missing in my project.

Best Regard,
Sra Sontisirikit
AIT MS Computer science
NII Internship: Research Student
Reply all
Reply to author
Forward
0 new messages