custom client in UE4 for PLC

i have a piece of code in c++ and that is for a ADS client and basically what the code does is get the port address, open the port, run the PLC, stop the PLC, and get the value.
to my understanding, this code should be added to my existing UE4 project which is in blueprints, but i have no idea how to implement that.
I know i can add new c++ class to the project, but should it be empty class, blueprint based, or even UserWidget or something else?

so please, if possible, tell me how to do that.

any help is greatly appreciated