Changing transmission power from inside C++ code

It can be done using the following code lines:

Tcl &tcl = Tcl::instance();
tcl.evalf("[[%s set node_] set netif_(0)] set Pt_ %f",name(),_POTENCE_);

Where _POTENCE_ is the potence you need in Watts.