still the biggest refactor

This commit is contained in:
Jonas Zeunert
2018-12-14 02:44:53 +01:00
parent 67edde9078
commit 8e12b3f3fa
23 changed files with 137 additions and 147 deletions

View File

@@ -9,7 +9,7 @@
#include "output/items/Solenoid.h"
#include "output/items/Lamp.h"
#include "output/items/Sound.h"
#include "OutputPinController.h"
#include "output/DisplayBoardPinController.h"
#include "json/json.hpp"
@@ -25,20 +25,19 @@ namespace OutputDriverFactory
namespace
{
std::map<std::string, std::shared_ptr<items::ISolenoid>> create_solenoids(std::istream &solenoid_config, std::shared_ptr<OutputPinController> output_gpio_interface);
std::shared_ptr<items::Solenoid> create_solenoid(nlohmann::json &solenoid_json, std::shared_ptr<OutputPinController> output_gpio_interface, std::chrono::milliseconds deactivation_time);
std::map<std::string, std::shared_ptr<items::ISolenoid>> create_solenoids(std::istream &solenoid_config, std::shared_ptr<DriverBoardPinController> &pin_controller);
std::shared_ptr<items::Solenoid> create_solenoid(nlohmann::json &solenoid_json, std::shared_ptr<DriverBoardPinController> pin_controller, std::chrono::milliseconds deactivation_time);
std::map<std::string, std::shared_ptr<items::ILamp>> create_lamps(std::istream &lamp_config, std::shared_ptr<OutputPinController> output_gpio_interface);
std::shared_ptr<items::Lamp> create_lamp(nlohmann::json &lamp_json, std::shared_ptr<OutputPinController> output_gpio_interface);
std::map<std::string, std::shared_ptr<items::ILamp>> create_lamps(std::istream &lamp_config, std::shared_ptr<DriverBoardPinController> &pin_controller);
std::shared_ptr<items::Lamp> create_lamp(nlohmann::json &lamp_json, std::shared_ptr<DriverBoardPinController> pin_controller);
std::map<std::string, std::shared_ptr<items::ISound>> create_sounds(std::istream &sound_config, std::shared_ptr<OutputPinController> output_gpio_interface);
std::shared_ptr<items::Sound> create_sound(nlohmann::json &sound_json, std::shared_ptr<OutputPinController> output_gpio_interface, std::chrono::milliseconds deactivation_time);
std::map<std::string, std::shared_ptr<items::ISound>> create_sounds(std::istream &sound_config, std::shared_ptr<SoundBoardPinController> &pin_controller);
std::shared_ptr<items::Sound> create_sound(nlohmann::json &sound_json, std::shared_ptr<SoundBoardPinController> pin_controller, std::chrono::milliseconds deactivation_time);
std::chrono::milliseconds get_deactivation_time(nlohmann::json &json);
std::map<char, std::shared_ptr<items::IDisplay>> create_displays(std::istream &display_config, std::shared_ptr<OutputPinController> output_gpio_interface);
std::map<char, std::shared_ptr<items::IDisplay>> create_displays(std::istream &display_config);
OutputPinController* create_OutputGPIOInterface(std::istream &output_pin_config);
std::map<std::string, uint8_t> parse_pins_driver_board(nlohmann::json &driver_board_config);
std::map<std::string, uint8_t> parse_pins_sound_board(nlohmann::json &sound_board_config);
std::map<std::string, uint8_t> parse_pins_display_board(nlohmann::json &display_board_config);