How do I control Transmission Power based on certain parameters? Do I need to use Mixim? If so, is there any tutorials on it? OR Is the only appropriate place to do it is in the mac1609-4 file in the TXPOWER parameter? If that's the place to do it, then how can I get vehicle position to do it? For example I want the transmission power to be 10 at point X and Y on the road.
Thanks in advance.
An application can set the transmission power for every message sent via the 1609.4 MAC layer by attaching a PhyControlMessage object (as a control message); see here for an example. Alternatively, you can alter the default transmit power via the
Mac1609_4::setTxPower
method; see here for an example.An application that inherits from
BaseWaveApplLayer
can read the current position via itsBaseWaveApplLayer::curPosition
attribute.