actual uml added
This commit is contained in:
289
FlippR-Driver/contrib/uml/output_umldiagramm.xcore
Normal file
289
FlippR-Driver/contrib/uml/output_umldiagramm.xcore
Normal file
@@ -0,0 +1,289 @@
|
||||
@startuml
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/' 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)
|
||||
+~DisplayController()
|
||||
-is_running : bool
|
||||
-output_gpio_interface : std::shared_ptr<utility::IOutputGPIOInterface>
|
||||
-display_cycle_thread : std::thread
|
||||
-displays : std::vector<std::shared_ptr<items::IDisplay> >
|
||||
-cycle_displays() : void
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::utility {
|
||||
class DisplayGPIOInterface {
|
||||
+DisplayGPIOInterface()
|
||||
+~DisplayGPIOInterface()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::utility {
|
||||
class GPIOInterface {
|
||||
+GPIOInterface()
|
||||
+~GPIOInterface()
|
||||
+{static} read_pin(char address) : bool
|
||||
+{static} GPIO_LIB_INITIALIZED : static std::once_flag
|
||||
+{static} initialize_input_pin(char address) : void
|
||||
+{static} initialize_output_pin(char address) : void
|
||||
+{static} write_pin(char address, char data) : void
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::utility {
|
||||
abstract class IBlockingQueue <template<typename T>> {
|
||||
+~IBlockingQueue()
|
||||
+{abstract} pop() : T
|
||||
+{abstract} push(T const& value) : void
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
abstract class IDisplay {
|
||||
+IDisplay()
|
||||
+~IDisplay()
|
||||
+{abstract} getID() : int
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output {
|
||||
class IDisplayController {
|
||||
+IDisplayController()
|
||||
+~IDisplayController()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::utility {
|
||||
abstract class IInputGPIOInterface {
|
||||
+~IInputGPIOInterface()
|
||||
+{abstract} read_data(char pin) : bool
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::utility {
|
||||
class IOutputGPIOInterface {
|
||||
+activate_output_item(output::items::IOutputItem* item) : void
|
||||
+activate_pin(int i2c_address, int pin) : void
|
||||
+deactivate_output_item(output::items::IOutputItem* item) : void
|
||||
+deactivate_pin(int i2c_address, int pin) : void
|
||||
+set_address(int i2c_address, int address) : void
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
+read_data(char pin) : bool
|
||||
-col_address_A : char
|
||||
-col_address_B : char
|
||||
-col_address_C : char
|
||||
-data_address : char
|
||||
-row_address_A : char
|
||||
-row_address_B : char
|
||||
-row_address_C : char
|
||||
-init_members(std::istream& input_config_stream) : void
|
||||
-init_pins() : void
|
||||
-write_col(char data) : void
|
||||
-write_row(char data) : void
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
+~OutputDriver()
|
||||
-displays : std::map<char, std::shared_ptr<items::IDisplay> >
|
||||
-lamps : std::map<std::string, std::shared_ptr<items::ILamp> >
|
||||
-solenoids : std::map<std::string, std::shared_ptr<items::ISolenoid> >
|
||||
-sounds : std::map<std::string, std::shared_ptr<items::ISound> >
|
||||
+get_display(char number) : std::shared_ptr<items::IDisplay>
|
||||
+get_lamp(std::string name) : std::shared_ptr<items::ILamp>
|
||||
+get_solenoid(std::string name) : std::shared_ptr<items::ISolenoid>
|
||||
+get_sound(std::string name) : std::shared_ptr<items::ISound>
|
||||
+get_displays() : std::vector<std::shared_ptr<items::IDisplay> >
|
||||
+get_lamps() : std::vector<std::shared_ptr<items::ILamp> >
|
||||
+get_solenoids() : std::vector<std::shared_ptr<items::ISolenoid> >
|
||||
+get_sounds() : std::vector<std::shared_ptr<items::ISound> >
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output {
|
||||
class OutputDriverFactory {
|
||||
+{static} getOutputDriver(std::ifstream& output_gpio_config, std::ifstream& output_config) : std::shared_ptr<OutputDriver>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::utility {
|
||||
class OutputGPIOInterface {
|
||||
+~OutputGPIOInterface()
|
||||
-output_item_mutex : std::mutex
|
||||
+activate_output_item(output::items::IOutputItem* item) : void
|
||||
+deactivate_output_item(output::items::IOutputItem* item) : void
|
||||
+write_display(output::items::IDisplay& display) : void
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/' Inheritance relationships '/
|
||||
|
||||
namespace flippR_driver::utility {
|
||||
GPIOInterface <|-- InputGPIOInterface
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::utility {
|
||||
GPIOInterface <|-- OutputGPIOInterface
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output::items {
|
||||
IDisplay <|-- Display
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::output {
|
||||
IDisplayController <|-- DisplayController
|
||||
}
|
||||
|
||||
|
||||
namespace flippR_driver::utility {
|
||||
IInputGPIOInterface <|-- InputGPIOInterface
|
||||
}
|
||||
|
||||
|
||||
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