|
Re: How to create a custom CommFB? [message #1841279 is a reply to message #1841275] |
Mon, 10 May 2021 20:38 |
|
Hi,
I think the raw layer is already a good example. What you need to do is to create your own external module. There you would place your layer .h and .cpp file. You could start with a copy of raw layer. Then you need to register your com layer to the 4diac FORTE build system. Again you can have a look in the CMakeList.txt file in the comm infra directory and look how it is done for the raw layer.
On configureation, or to be more exact when your comm fb gets the init+ event it will parse the string given at its ID input. Based on the values given 4diac FORTE will look in a dedicated automatically generated comlayers factory if a layer is registered for the given name and if yes an instance is created and attached to your comfb. i hope this answers your 1. questions.
regarding your 2. question: each comm fb has its own stack of commlayers. this allows to also store some internal state inside of the layer. This is for example needed when you have fragemented packets.
I hope this helps to proceede.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02523 seconds