actual uml added
This commit is contained in:
@@ -6,6 +6,21 @@
|
||||
|
||||
/' Objects '/
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
class Display <template<int DigitCount>> {
|
||||
+Display(int address, int id)
|
||||
+~Display()
|
||||
-address : int
|
||||
+getID() : int
|
||||
-id : int
|
||||
+content : std::array<char, DigitCount>
|
||||
-fit_string(std::string& score_string) : std::string
|
||||
+write_content(std::array<char, DigitCount> content) : void
|
||||
+write_score(int score) : void
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output {
|
||||
class DisplayController {
|
||||
+DisplayController(std::vector<std::shared_ptr<items::IDisplay> > displays, std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface)
|
||||
@@ -49,6 +64,15 @@ namespace flippR_driver::utility {
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
abstract class IDisplay {
|
||||
+IDisplay()
|
||||
+~IDisplay()
|
||||
+{abstract} getID() : int
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output {
|
||||
class IDisplayController {
|
||||
+IDisplayController()
|
||||
@@ -76,6 +100,15 @@ namespace flippR_driver::utility {
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
abstract class IOutputItem {
|
||||
+~IOutputItem()
|
||||
+{abstract} activate() : void
|
||||
+{abstract} deactivate() : void
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::utility {
|
||||
class InputGPIOInterface {
|
||||
+InputGPIOInterface(std::istream& input_config_stream)
|
||||
@@ -95,6 +128,18 @@ namespace flippR_driver::utility {
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
class Lamp {
|
||||
+Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int address, unsigned int i2c_address, unsigned int data_pin, std::string name)
|
||||
+~Lamp()
|
||||
-activated : bool
|
||||
+is_activated() : bool
|
||||
+activate() : void
|
||||
+deactivate() : void
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output {
|
||||
class OutputDriver {
|
||||
+OutputDriver(std::map<std::string, std::shared_ptr<items::ISolenoid> > solenoids, std::map<std::string, std::shared_ptr<items::ILamp> > lamps, std::map<char, std::shared_ptr<items::IDisplay> > displays, std::map<std::string, std::shared_ptr<items::ISound> > sounds)
|
||||
@@ -133,6 +178,45 @@ namespace flippR_driver::utility {
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
class OutputItem {
|
||||
+OutputItem(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int address, unsigned int i2c_address, unsigned int data_pin_address, std::string name)
|
||||
+~OutputItem()
|
||||
#output_gpio_interface : const std::shared_ptr<utility::IOutputGPIOInterface>
|
||||
+name : const std::string
|
||||
+address : const unsigned int
|
||||
+data_pin_address : const unsigned int
|
||||
+i2c_address : const unsigned int
|
||||
#activate() : void
|
||||
#deactivate() : void
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
class Solenoid {
|
||||
+Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int address, unsigned int i2c_address, unsigned int data_pin, std::string name, std::chrono::milliseconds deactivation_time)
|
||||
+~Solenoid()
|
||||
-deactivation_time : std::chrono::milliseconds
|
||||
-trigger_task : std::future<void>
|
||||
+trigger() : void
|
||||
-triggerTask() : void
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
class Sound {
|
||||
+Sound(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int address, unsigned int i2c_address, unsigned int data_pin, std::string name, std::chrono::milliseconds deactivation_time)
|
||||
+~Sound()
|
||||
-deactivation_time : std::chrono::milliseconds
|
||||
-play_task : std::future<void>
|
||||
+play() : void
|
||||
-playTask() : void
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -148,6 +232,11 @@ namespace flippR_driver::utility {
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
IDisplay <|-- Display
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output {
|
||||
IDisplayController <|-- DisplayController
|
||||
}
|
||||
@@ -158,14 +247,43 @@ namespace flippR_driver::utility {
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
IOutputItem <|-- OutputItem
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
OutputItem <|-- Lamp
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
OutputItem <|-- Solenoid
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
OutputItem <|-- Sound
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/' Aggregation relationships '/
|
||||
|
||||
flippR_driver::output.DisplayController o-- flippR_driver::output::items.IDisplay
|
||||
|
||||
|
||||
flippR_driver::output.DisplayController o-- flippR_driver::utility.IOutputGPIOInterface
|
||||
|
||||
|
||||
flippR_driver::output.OutputDriver o-- flippR_driver::output::items.IDisplay
|
||||
|
||||
|
||||
flippR_driver::output::items.OutputItem o-- flippR_driver::utility.IOutputGPIOInterface
|
||||
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
Reference in New Issue
Block a user