omnet++

How to create a randomly connected graph in OMNeT++?

不问归期 提交于 2021-01-27 20:02:20
问题 I am trying to create a graph with randomly connected nodes. Nodes should be connected randomly and if a node is already connected to another node, it shouldn't be connected to the same node again using different inout port. In the docs there is this example to create a random graph: module RandomGraph { parameters: int count; double connectedness; // 0.0<x<1.0 submodules: node[count]: Node { gates: in[count]; out[count]; } connections allowunconnected: for i=0..count-1, for j=0..count-1 {

OMNeT++: Error in module during network setup: Class not found

断了今生、忘了曾经 提交于 2021-01-24 08:49:25
问题 I created my first OMNeT++/veins project, but can’t start the simulation. Can you help me? I would like to change my question - is there a simple way to create a project, similar to RSUExampleScenario of veins, not under veins/examples/myfolder, but in a separate project and workspace? And what steps must I do for it? I wanted to create a project similar to RSUExampleScenario from veins, but with other scenario and using other OMNeT++ modules. As I created my project under veins/examples

OMNeT++: Error in module during network setup: Class not found

a 夏天 提交于 2021-01-24 08:47:05
问题 I created my first OMNeT++/veins project, but can’t start the simulation. Can you help me? I would like to change my question - is there a simple way to create a project, similar to RSUExampleScenario of veins, not under veins/examples/myfolder, but in a separate project and workspace? And what steps must I do for it? I wanted to create a project similar to RSUExampleScenario from veins, but with other scenario and using other OMNeT++ modules. As I created my project under veins/examples

Packets created in UdpBasicApp are not forwarded past the transport (IPv4) layer

依然范特西╮ 提交于 2021-01-07 06:31:32
问题 I've managed to create a number of routing nodes as described in this tutorial: https://inet.omnetpp.org/docs/tutorials/wireless/doc/step3.html They work as expected (forward packets in between nodes) but there's a problem in that these packets don't make it past the transport layer. Looking at Packet.h (inet): // // Implements the IPv4 protocol. The protocol header is represented // by the ~Ipv4Header message class. // // <b>Interfacing with higher layer protocols</b> // // To send a packet

UnitDiskRadioMedium no power consumption settings? (omnetpp)

断了今生、忘了曾经 提交于 2021-01-07 06:31:14
问题 Looking at: OMNET++: How to obtain wireless signal power? and https://github.com/inet-framework/inet/blob/master/examples/wireless/scaling/omnetpp.ini there seem to be no power consumption related settings to packets that are sent in a UnitDiskRadio. Is there a way of setting packet power consumption in a unit disk radio medium, or, conversely, communication range in ApskScalarRadioMedium? 回答1: UnitDiskRadio is a simplified version of a radio, where you are not interested in the transmission,

How to register a new class (new application) in Omnet++

主宰稳场 提交于 2021-01-05 10:46:03
问题 I have the code below, but when I run the simulation I got this error : Class "myApp" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(). #ifndef MYAPP_H_ #define MYAPP_H_ #include "inet/applications/udpapp/UdpBasicApp.h" #include <omnetpp.h> using namespace omnetpp; using namespace inet; class myApp : public UdpBasicApp { }; Define_Module(myApp); #endif /* MYAPP_H_ */ package saas; import inet.applications.udpapp.UdpBasicApp; simple myApp

Unicast Communication in Veins

喜夏-厌秋 提交于 2020-12-30 03:01:51
问题 Does Veins support 802.11p unicast communication? I checked the source code of the class "Mac1609_4" in Veins framework. Referring to the following snippet of the code: WaveShortMessage* wsm = dynamic_cast<WaveShortMessage*>(macPkt-> decapsulate()); long dest = macPkt->getDestAddr(); DBG_MAC << "Received frame name= " << macPkt->getName() << ", myState=" << " src=" << macPkt->getSrcAddr() << " dst=" << macPkt->getDestAddr() << " myAddr=" << myMacAddress << std::endl; if (macPkt->getDestAddr()

How can a standard container be added as a field to an OMNet++ message?

℡╲_俬逩灬. 提交于 2020-12-15 03:43:33
问题 I'm trying to create a simple message definition that contains a field implemented using std::vector . Per the OMNet++ 5.5 manual ch. 6 sec. 8.1, this is seemingly straightforward. However, I'm using OMNet++ 6.0pre6: I can't figure out what the correct way of doing this is, as the manual is out of date 1 , and the changes are very superficially referred to in the nedxml changelog. The message definition can be boiled down to the exact example in the manual, but in this case it is a message