Own Modbus library from C++ to PlcNexEngineer

Hello

I would like to implement my own modbus library from C++ to PlcNexEngineer. Code is in attachment. Question is - how to implement this code into the component and program structure in Eclipse IDE ?

Note: CLI, SDK and plug in is installed.
functions.txtmodbus.txt

functions.txt
modbus.txt

Hello Matre,
I can see the main-program in your code. If you would like to implement it for plcnext target, you can use the threads (e.g. for sending and receiving of modbus tcp telegrams ) and start it in a component. Please see the following example code for threading: CppExamples/Examples/ThreadExample/README.md at master · PLCnext/CppExamples · GitHubOr, If you would like to implement Modbus TCP Function Blocks (FB)/Library for PLCnext Engineer IDE, you can implement it as Shared Nativ Library: Functions and functions blocks (plcnext.help)Or you can implement the FB in C# : Tutorial videos C# programming (plcnext.help)Or you can use the tested and supported IEC61131 Modbus TCP-Library for PLCnEng in PLCnext Store: PLCnext Store | Modbus_TCP
BR Eduard