Skip to content

Transport module single file update

f1rehaz4rd requested to merge transport_module_single_file_update into master

Created by: Im-Adriano

Updated the framework to make modules and transports self-contained. To add a module/transport you only need to edit the header the module/transport is in and add a line or two to get it to be included by the framework. This is done with CMake, a file is generated by CMake including all the modules for a particular platform forcing them to be instantiated into the module factory. The same is done with transports into the transport factory. To then create an object you call the MakeUnique function from the respective factory passing it the string of the module/transport you would like to make. See AddModule and InitComms in logic_controller.cpp to see what I mean. Modules/Transports must have either windows_ or linux_ prepending them and end in .hpp to be picked up by the CMake. See windows_ping.hpp for example.

Also added a lock to the debugging header so print statements come in order. Might need to change, in the case a thread is locked up thus locks printing. But this is only for dev not prod.

Merge request reports