%description: check NED user-defined math functions (Define_NED_Math_Function() macro) in channels %file: test.ned channel Chan extends ned.DatarateChannel { parameters: ber = testfunc0(); delay = testfunc3(10, 20, 30); datarate = testfunc4(10, 20, 30); } simple Simple { } network Test { submodules: m : Simple; } %file: test.cc #include using namespace omnetpp; namespace @TESTNAME@ { double testfunc0() {return 0;} double testfunc1(double a) {return a;} double testfunc2(double a, double b) {return a+b;} double testfunc3(double a, double b, double c) {return a+b+c;} double testfunc4(double a, double b, double c, double d) {return a+b+c+d;} Define_NED_Math_Function(testfunc0,0); Define_NED_Math_Function(testfunc1,1); Define_NED_Math_Function(testfunc2,2); Define_NED_Math_Function(testfunc3,3); Define_NED_Math_Function(testfunc4,4); class Simple : public cSimpleModule { public: Simple() : cSimpleModule(16384) { } virtual void activity() override; }; Define_Module(Simple); void Simple::activity() { //FIXME: should check channel or something like that... } }; //namespace