0

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.

Julian Heinovski
  • 1,822
  • 3
  • 16
  • 27
DIXONJWDD
  • 1,276
  • 10
  • 20

1 Answers1

0

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.

Community
  • 1
  • 1
user4786271
  • 1,555
  • 13
  • 18
  • Hi, thanks for your answer. I am not sure this would work for transmission power as the connections are generated before the simulation runs. The connection manager and MAC layer seem to handle the transmission power together though, so whilst I could change the txPower when setting setDownControlInfo in the MAC layer, this would result in txPower being higher than pMax. – DIXONJWDD May 12 '15 at 11:36
  • hmm, in general the approach suggested by @floxyz should work, but there might be some implicit dependencies which are not familiar to me since I don't know very well the module you are looking. Consider reading this section of the manual, there might be something useful: http://omnetpp.org/doc/omnetpp/manual/usman.html#sec157 – user4786271 May 12 '15 at 12:38
  • I linked a potentially useful answer by @ChristophSommer – user4786271 May 12 '15 at 15:38