Implementing adaptive power control in OMNeT++ (MIXIM)

282 Views Asked by At

I have a form of wireless sensor network designed using the MIXIM framework in OMNeT++.

I've built on the Host802154 module, using a slightly modified IEEE802154 standard and a custom protocol.

I want to be able to programmatically adapt the power output of the transmitter in any one node during simulation, leaving all other nodes at their original power, thus giving any single node a larger broadcast radius. This should only happen during certain circumstances, so it would not be useful to have to preset the power as higher from the outset.

  1. Is this possible within OMNeT++? and
  2. If so, how, and does anyone have any examples of it working?

As adaptive power control isn't unheard of, I am hoping that there is something I can do to implement it.

Many thanks.

1

There are 1 best solutions below

3
On

I think this answer here given by @floxyz to the following question: How to change configuration of network during simulation in OMNeT++? should solve your problem.

The basic idea is to use someKind within the handleMessage() which can be used to check a specific condition

handleMessage(cMessage *msg){
  if(msg->getKind() == yourKind){  // replace yourKind with the one you are using for these messages
    transmission_rate = new_value;
}

Otherwise the answer by @ChristophSommer would fit better your case. The comment on that answer is useful as well.