changed diagram

This commit is contained in:
Johannes Wendel
2018-11-20 22:47:45 +01:00
parent 39c2792520
commit 2842ac20bb
2 changed files with 75 additions and 15 deletions

View File

@@ -88,14 +88,22 @@ namespace flippR_driver::output {
abstract class IDisplay {
+IDisplay()
+~IDisplay()
+{abstract} getID() : int
-fit_string(std::string& score_string) : std::string
+{abstract} write_content(std::array<char, DigitCount> content) : void
+{abstract} write_score(int score) : void
}
}
namespace flippR_driver::output {
abstract class IDisplay {
+IDisplay()
+~IDisplay()
+{abstract} getID() : int
-fit_string(std::string& score_string) : std::string
}
}
namespace flippR_driver::output {
class IDisplayController {
+IDisplayController()
@@ -104,6 +112,12 @@ namespace flippR_driver::output {
}
class IEightDigitDisplay {
+write_content(std::array<char, 8> content) : void
+write_score(int score) : void
}
abstract class IEventHandler {
+~IEventHandler()
+{abstract} handle(flippR_driver::input::Event& event) : void
@@ -161,6 +175,12 @@ namespace flippR_driver::output {
}
class ISevenDigitDisplay {
+write_content(std::array<char, 7> content) : void
+write_score(int score) : void
}
namespace flippR_driver::output {
class ISolenoid {
}
@@ -197,7 +217,7 @@ namespace flippR_driver::utility {
namespace flippR_driver::output {
class Lamp {
+Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int address, std::string name, bool activated)
+Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int i2c_address, int data_pin, std::string name, bool activated)
+~Lamp()
-activated : bool
+is_activated() : bool
@@ -242,9 +262,8 @@ namespace flippR_driver::utility {
namespace flippR_driver::output {
class OutputItem {
+OutputItem(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int address, std::string name)
+OutputItem(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int i2c_address, int data_pin_address, std::string name)
+~OutputItem()
#address : int
#data_pin_address : int
#i2c_address : int
#output_gpio_interface : std::shared_ptr<utility::IOutputGPIOInterface>
@@ -255,12 +274,13 @@ namespace flippR_driver::output {
namespace flippR_driver::output {
class Solenoid {
+Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int address, std::string name, std::chrono::milliseconds deactivation_time)
+Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int i2c_address, int data_pin, std::string name, std::chrono::milliseconds deactivation_time)
+~Solenoid()
-deactivation_time : std::chrono::milliseconds
-wait_thread : std::future<void>
-activate() : void
-deactivate() : void
-deactivate_after_wait() : void
+trigger() : void
}
}
@@ -268,11 +288,8 @@ namespace flippR_driver::output {
namespace flippR_driver::output {
class Sound {
+Sound(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int address, std::string name)
+Sound(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int i2c_address, int data_pin, std::string name)
+~Sound()
-address : int
-output_gpio_interface : std::shared_ptr<utility::IOutputGPIOInterface>
-name : std::string
+play() : void
}
}
@@ -311,6 +328,11 @@ namespace flippR_driver::utility {
}
namespace flippR_driver::output {
ILamp <|-- Lamp
}
namespace flippR_driver::output {
IOutputDriver <|-- OutputDriver
}
@@ -321,6 +343,11 @@ namespace flippR_driver::output {
}
namespace flippR_driver::output {
ISolenoid <|-- Solenoid
}
namespace flippR_driver::output {
ISound <|-- Sound
}
@@ -336,13 +363,18 @@ namespace flippR_driver::output {
}
namespace flippR_driver::output {
OutputItem <|-- Sound
}
/' Aggregation relationships '/
namespace flippR_driver::output {
DisplayController o-- IDisplay
DisplayController "2" o-- IDisplay
}
@@ -355,7 +387,7 @@ namespace flippR_driver::input {
namespace flippR_driver::output {
OutputDriver o-- IDisplay
OutputDriver "2" o-- IDisplay
}
@@ -372,9 +404,6 @@ namespace flippR_driver::utility {
flippR_driver::output.OutputItem o-- flippR_driver::utility.IOutputGPIOInterface
flippR_driver::output.Sound o-- flippR_driver::utility.IOutputGPIOInterface
@enduml