![]() |
User Manual, Developers Guide and API Documentation |
![]() |
newFunctionalUnit = Node( 'NewFunctionalUnit', self.newFunctionalUnit)
crc, newFunctionalUnit, lowerSAR,
crc.connect(newFunctionalUnit) newFunctionalUnit.connect(lowerSAR) lowerSAR.connect(padding)
Here the CRC-FU is connected with your newly created functionalUnit, which after that is connected to the lowerSAR-FU Also this lines schould exist:
# # NewFunctionalUnit # newFunctionalUnit = wns.ldk.NewFunctionalUnit.NewFunctionalUnit()
The implementation of fun::FUN can be found in $TESTBED/wns/libwns--main--1.0/src/ldk/funFUN.cpp. Where one can find out how fun::FUN works, what kind of methods it has and so on.
For your help you can use $TESTBED/wns/libwns--main--1.0/src/ldk/NewFunctionalUnit/NewFunctionalUnit.cpp as a template to create your FunctionalUnit. After that you can create your *.cpp and *.hpp files and also the tests for them. You should include them in the namespace wns::ldk because in this way it can be used by any module.
As a template for the tests you can use $TESTBED/wns/libwns--main--1.0/src/ldk/NewFunctionalUnit/tests/NewFunctionalUnitTest.cpp. But there are some important things to be added like in NewFunctionalUnitTest::testUplink(), where you should add these line :
newFU->activateCommand(compound->getCommandPool());
For compiling first use the command ./playground.py --install=dbg This has to be written in order to create the so called sandbox. Then with Scons you can compile faster. In the file $TESTBED/wns/libwns--main--1.0/config/libfiles.py all the files that need to be compiled have to be checked in.
Everything that you need for the tests is in $TESTBED/tests/unitTests. For a final you have to made $TESTBED/wns/libwns--main--1.0/pyconfigParser/wns/NewFunctionalUnit.py which all in all contains the following important lines:
__plugin__ = "wns.ldk.NewFunctionalUnit" name = "NewFunctionalUnit"
Enjoy!!
1.5.5