Did big refactoring and further adapted OutputDriverFactory as well as uptuput dricer to new board layouts.

This commit is contained in:
Johannes Wendel
2019-07-16 21:20:03 +02:00
parent db5563cff2
commit aa1d6409ea
34 changed files with 332 additions and 449 deletions

View File

@@ -23,8 +23,7 @@ namespace output
{
namespace OutputDriverFactory
{
std::shared_ptr<OutputDriver> get_OutputDriver(std::istream& output_pin_config,
std::istream& solenoid_config,
std::shared_ptr<OutputDriver> get_OutputDriver(std::istream& solenoid_config,
std::istream& lamp_config,
std::istream& sound_config,
std::istream& display_config);
@@ -42,6 +41,11 @@ std::map<std::string, std::shared_ptr<items::Sound>> create_sounds(std::istream
std::shared_ptr<items::detail::Sound> create_sound(nlohmann::json &sound_json, nlohmann::json &port_extenders, std::shared_ptr<SoundBoardPinController> &pin_controller, std::chrono::milliseconds &deactivation_time);
uint8_t get_sound_fire_address(std::istream &sound_config);
std::map<std::string, uint8_t> parse_pins_display_board(std::istream & display_config);
std::vector<std::shared_ptr<items::OutputDisplay>> create_displays(std::istream &display_config);
std::shared_ptr<items::OutputDisplay> create_display(nlohmann::json &display_json);
std::map<uint8_t, std::shared_ptr<items::Display>> map_displays(const std::vector<std::shared_ptr<items::OutputDisplay>> &displays);
void initialize_port_extenders(nlohmann::json &port_extenders, PinController * pin_controller, const std::string & file_name);
uint8_t get_pin_base(nlohmann::json & object, nlohmann::json & port_extenders, const std::string & config_file_name);