how to set apptype to cbrsender in Veins

40 views
Skip to first unread message

Chakky

unread,
May 19, 2023, 12:04:02 AM5/19/23
to OMNeT++ Users
Dear All,

I am trying to change from Veins default apptype to CbrSender and CbrReceiver as follows;

***********************************************
#Traffic between node (node[0] --> node[1])
# Transmitter
*.node[*].numApps = 1
*.node[0].app[*].typename = "CbrSender"
*.node[0].app[*].PacketSize = 100 #Tor Packet size = 100 Bytes
*.node[0].app[*].sampling_time = 1s #0.01s #Tor Packet Interval = 1s
*.node[0].app[*].localPort = 3088+ancestorIndex(0)
*.node[0].app[*].startTime = 4s #niform(0s,0.02s)
*.node[0].app[*].destAddress = "node[1]"
*.node[0].app[*].destPort = 1000
# Receiver
*.node[1].app[*].typename = "CbrReceiver"
*.node[1].app[*].localPort = 1000
*.node[*].app[*].interface = "wlan0"

************************************


When I run the code, it cannot find CBR module as in the following error

Submodule app: No module type named 'CbrSender' found that implements module interface inet.applications.contract.IApp (not in the loaded NED files?) -- in module (inet::NodeBase) myScenario.node[0] (id=41), at t=1.1s, event #12



Please kindly suggest how to add the cbr module in.


Thank you

CK

Alfonso Ariza Quintana

unread,
May 19, 2023, 3:52:53 AM5/19/23
to omn...@googlegroups.com
I suppose that have created CbrSender and CbrReceiver because none of them are part of veins or inet-framework. In any case, for CBR you can use UdpBasicApp or UdpBasicBurst and for the receiver, you can use UdpSink.

De: omn...@googlegroups.com <omn...@googlegroups.com> en nombre de Chakky <nog...@gmail.com>
Enviado: viernes, 19 de mayo de 2023 6:04
Para: OMNeT++ Users <omn...@googlegroups.com>
Asunto: [Omnetpp-l] how to set apptype to cbrsender in Veins
 
--
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/e1709be8-7ab8-44e2-9cfd-7da5b6ae792an%40googlegroups.com.

Chakky

unread,
May 25, 2023, 2:34:35 AM5/25/23
to OMNeT++ Users
Thank you for your suggestion.

According to your suggestion, I am trying to modify [Config D2DMulticast] in /simu5G/simulations/NR/cars/omnetpp.ini by changing the AppType from AlertSender and AlertReciver to UdpBasicApp and UdpSink.
It looks fine except that the destAddress  parameter of UdpBasicApp is unrecognized by the program (Entry potentially does not match any parameter).
I have attached a part of the code below. 
 
Could you please give me some further suggestion how to deal with this issue? 
Many thanks in advance.
CK

#####################Modified Code#################################
[Config Multicast-UDP-D2D]

**.amcMode = "D2D"
*.car[*].cellularNic.d2dInitialMode = true

### Select CQI for D2D transmissions ###
# One-to-Many communications work with fixed CQI values only.
# Set the parameter **.usePreconfiguredTxParams and select the desired CQI using the parameter **.d2dCqi
**.enableD2DCqiReporting = false #true
**.usePreconfiguredTxParams = true #false
**.d2dCqi = 7 #${cqi=7}

### Traffic configuration ###
*.car[*].numApps = 1

# transmitter
*.car[0].app[*].typename = "UdpBasicApp"#"AlertSender"#"CbrSender"#"UdpBasicApp"
*.car[0].app[*].localPort = 3088+ancestorIndex(0)
*.car[0].app[*].startTime = 4s#uniform(0s,0.02s)
*.car[0].app[*].destAddress = "224.0.0.1"          # IP address of the multicast group
*.car[0].app[*].destPort = 1000
*.car[0].app[*].messageLength = 100B
*.car[0].app[*].sendInterval = 1s
# receivers
*.car[*].app[*].typename = "UdpSink"#"AlertReceiver"#"CbrReceiver"#"UdpSink"
*.car[*].app[*].localPort = 1000

#*.car[*].ipv4.configurator.typename = "HostAutoConfigurator"
*.car[*].ipv4.configurator.mcastGroups = "224.0.0.1"

# PhysicalEnvironment
#*.physicalEnvironment.config = xmldoc("obstacles.xml")
*.radioMedium.obstacleLoss.typename = "IdealObstacleLoss"

# Misc
**.vector-recording = true
**.scalar-recording = true
########################################################

Alfonso Ariza Quintana

unread,
May 25, 2023, 7:46:58 AM5/25/23
to omn...@googlegroups.com
Is it an error or a warning in the editor?
If it is a warning is due to that the editor doesn't know the format of the UdpBasicApp because the type is loaded dynamically using typename.

If you want to use multicast, you will need to configure additional parameters like multicastInterface and joinLocalMulticastGroups

Enviado: jueves, 25 de mayo de 2023 8:34
Para: OMNeT++ Users <omn...@googlegroups.com>
Asunto: Re: [Omnetpp-l] how to set apptype to cbrsender in Veins
 

Chakky

unread,
May 26, 2023, 12:28:24 AM5/26/23
to OMNeT++ Users
Dear Alfons,

There is no error in the editor (just a warning) and I can run the simulation to the end. However, no car can receive any packets from car[0]. I have tried to change to a uni-cast communication between car[0] and car[1], it still did not work.
In figure1, you can see a warning sign on line 108 which show the warning "Entry potentially does not match any parameter". I think I need to solve this warning to be able to specify the destination of the communication, but I don't know how because I used the default UDPBasicApp as shown in figure 2, which already contains "destination" parameter. Please kindly give me further suggestion.

Screenshot from 2023-05-26 06-20-09.png
Fig1

Screenshot from 2023-05-26 06-15-06.png
Fig2

Alfonso Ariza Quintana

unread,
May 29, 2023, 5:50:18 AM5/29/23
to omn...@googlegroups.com
if is waning in the ini editor, don't worry. When you set the module dynamically using typename, the ini editor cannot determine the parameters of the module.

Enviado: viernes, 26 de mayo de 2023 6:28
Reply all
Reply to author
Forward
0 new messages