Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacLayer received a packet with unknown priority #2

Open
fjhzhixi opened this issue Nov 16, 2023 · 1 comment
Open

MacLayer received a packet with unknown priority #2

fjhzhixi opened this issue Nov 16, 2023 · 1 comment

Comments

@fjhzhixi
Copy link

thanks for your work! when I run your code to co-simulate with carla, I meet a error as

MacLayer received a packet with unknown priority -- in module (veins::Mac1609_4) CarlaExampleScenario.node[0].nic.mac1609_4 (id=12), at t=2s, event #14

and I check the userPriority in debug mode and I get a illegal priority 244, do you have any idea to fix it? Thanks

@pritom5
Copy link

pritom5 commented Sep 19, 2024

Hello, thank you for your comment.
An initialize() function call is missing to the base class from the ExampleCarlaApplication.
Very soon a patch for this issue will be introduced.
In the meantime, you can edit your "ExampleCarlaApplication.cc" with the following :

void ExampleCarlaApplication::initialize(int stage)
{
    DemoBaseApplLayer::initialize(stage);
    if (stage == 0) {
        txMessage = new cMessage();
        txMessage->setKind(1337);
        std::cout << getFullPath() << ": Initializing " << par("appName").stringValue() << std::endl;
    }
    else {
        scheduleAt(simTime() + intuniform(1, 10), txMessage);
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants