Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(modem): Add factory method for simple creation of custom DCEs
This allows calling directly: auto dce = dce_factory::Factory::create_unique_dce_from<SIM7600>(&dce_config, uart_dte, esp_netif); instead of: auto dce = create_SIM7600_dce(&dce_config, uart_dte, esp_netif); Which is very useful when adding a custom module, so we won't need to update factory layers and add the new device to enums, etc. To add a new module, you just: 1) Define the module class NewModule: public GenericModule { }; 2) Implement the specific commands: command_result do_work_new_module(CommandableIf *t, params) {} 3) Connect 1) and 2) command_result NewModule::do_work_new_module(params...) { return dce_commands::do_work_new_module(dte.get(), params...); }
- Loading branch information