|
Re: Adding a custom function block inside forte RTE (C Code) [message #1785322 is a reply to message #1785213] |
Thu, 12 April 2018 12:51 |
|
There are several options on how to do this. The main part is always that you would create your own module. There you can place your code and rig it up with our cmake calls to announce it at the build system. As a starting point you could have a look at the tutorials for creating your own function blocks and how to compile them into forte.
Regarding IOs there are three options:
1. Create you own service interface FBs (not preferred): Here you would model SIFBs in 4diac-ide generate the c++ code for them and add in the FBs the code for accessing your IO code.
2. Since a few version versions we introduced a set of generic IO FBs (IX, IXB, IW ID, and QX, QB, QW QD). there the main logic is already in the FBs and you only have to write a class called process interface. There are several modules in FORTE serving as example for that.
3. Finally with 1.9.0 we are introducing an additional concept which allows you to also do IO system configuration in 4daic. Here the generic IO FBs are used but they use a symbolic name and in a configuration resource these symbolic names are then mapped to the real IOs. Currently we have only one public example implementation in the forte repo and that is the embrick implementation.
While the last one is definitely the best and most flexible one. In your case you could use it even to configure and setup your can network with can IO modules. It is also the most complicated and as it is new also the one with no real documentation and only one example.
I hope this at least gives you some start.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03998 seconds