Sandeepa Kariyawasam
Sandeepa Kariyawasam

Reputation: 577

Error while converting a VeinsInetCar to an RSU

I tried to use the VeinsInetCar module as an rsu by changing the mobility to stationary mobility

# VeinsInetMobility
*.node[*].mobility.typename = "VeinsInetMobility"
*.wifirsu.mobility.typename = "StationaryMobility"

I used the VeinsInetSampleApplication for the vehicles and changed it for the rsu a little bit. Created a new VeinsInetApplicationBase and removed the traci and mobility parts.

void VeinsInetApplicationBase::handleStartOperation(LifecycleOperation* operation)
{
    mobility = veins::VeinsInetMobilityAccess().get(getParentModule());
    traci = mobility->getCommandInterface();
    traciVehicle = mobility->getVehicleCommandInterface();

    L3AddressResolver().tryResolve("224.0.0.1", destAddress);
    ASSERT(!destAddress.isUnspecified());

Then removed traci related variables and replaced it with dummy variables in veinsInetSampleApplication for the RSU. Now when i try to run the simulation it causes this error.

check_and_cast(): Cannot cast (inet::physicallayer::Ieee80211ScalarTransmission*) to type 'const inet::physicallayer::DimensionalTransmission *' -- in module (inet::physicallayer::Ieee80211Radio) Scenario.node[0].wlan[0].radio 

This runtime error causes in the middle of the simulation. What cause this error ?

Upvotes: 0

Views: 82

Answers (1)

Christoph Sommer
Christoph Sommer

Reputation: 6943

My guess would be that you configured one set of parameters for nodes named node[*] and another set of parameters for nodes named wifirsu. Potentially your .ini file lists mostly parameters for nodes named node[*] and keeps many parameters at their default values for nodes named wifirsu. This might cause your simulation to use a "scalar" radio for one type of nodes and a "dimensional" radio for others, which would lead to the error message you showed.

Upvotes: 1

Related Questions