-
Notifications
You must be signed in to change notification settings - Fork 66
mw/com: migrate_umlet_to_plantuml__runtime #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b813e80
cc2abf1
c94c636
03dad04
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| @startuml runtime_sequence_view | ||
| title "Sequence View Runtime" | ||
| hide footbox | ||
|
|
||
| participant "<u>:impl::lola::<some class></u>" as lolaClass | ||
| participant "<u>static:impl::Runtime</u>" as staticRuntime | ||
| participant "singleton_instance:impl::Runtime" as runtimeInstance | ||
| participant "<u>:impl::RuntimeBindingFactory</u>\n<<plumbing>>" as bindingFactory | ||
| participant "<u>static:impl::lola::Runtime</u>" as staticLolaRuntime | ||
| participant "<u>:impl::lola::Runtime</u>" as lolaRuntime | ||
|
|
||
| activate staticRuntime | ||
| staticRuntime -> runtimeInstance : create(Configuration&) | ||
| activate runtimeInstance | ||
|
|
||
| runtimeInstance -> bindingFactory : CreateBindingRuntimes(Configuration&) | ||
| activate bindingFactory | ||
|
|
||
| bindingFactory -> bindingFactory : check via config, which binding runtimes to create | ||
|
|
||
| bindingFactory -> staticLolaRuntime : InitializeStaticDependencies() | ||
| activate staticLolaRuntime | ||
| staticLolaRuntime --> bindingFactory : return : void | ||
| deactivate staticLolaRuntime | ||
|
|
||
| bindingFactory -> lolaRuntime : create(Configuration&) | ||
| bindingFactory --> runtimeInstance : return : std::pair<>("loLa", std::unique_ptr<lola::Runtime>) | ||
| deactivate bindingFactory | ||
|
|
||
| runtimeInstance --> staticRuntime : return : impl::Runtime instance | ||
| deactivate runtimeInstance | ||
| deactivate staticRuntime | ||
|
|
||
| activate lolaClass | ||
| lolaClass -> staticRuntime : GetBindingRuntime(BindingType::LoLa) | ||
| activate staticRuntime | ||
| staticRuntime --> lolaClass : return : impl::IRuntimeBinding* | ||
| deactivate staticRuntime | ||
|
|
||
| lolaClass -> lolaClass : dynamic_cast<impl::lola::Runtime*>(impl::IRuntimeBinding*) | ||
|
|
||
| lolaClass -> lolaRuntime : GetLoLaMessaging() | ||
| activate lolaRuntime | ||
| lolaRuntime --> lolaClass : return : impl::lola::IMessagePassingService& | ||
| deactivate lolaRuntime | ||
| deactivate lolaClass | ||
|
|
||
| @enduml |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In PlantUML: In Umlet: Issue: The PlantUML version is missing a colon in the namespace — it incorrectly uses std:unordered_map instead of std::unordered_map.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dear @sahithi-nukala thank you for your review and providing suggestions. Due to amount of diagrams and size of them I would like you to provide your changes like this |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| @startuml runtime_structural_view | ||
| title "Structural View Runtime" | ||
|
|
||
| interface "mw::com::impl::IRuntime" as IRuntime { | ||
| +{abstract} resolve(const InstanceSpecifier&) : std::vector<InstanceIdentifier> | ||
| +{abstract} getBindingRuntime(BindingType binding) : IRuntimeBinding* | ||
| } | ||
|
|
||
| enum BindingType { | ||
| LoLa = 0 | ||
| Fake = 1 | ||
| } | ||
|
|
||
| class "mw::com::impl::Runtime" as Runtime { | ||
| -runtime_bindings_ : std::unordered_map<BindingType, std::unique_ptr<IRuntimeBinding>> | ||
| +{static} Initialize() : void | ||
| +{static} Initialize(int argc, score::StringLiteral argv) : void | ||
| +{static} Initialize(std::string const&) : void | ||
| +{static} getInstance() : Runtime& | ||
| +Runtime(Configuration&& config) | ||
| +resolve(const InstanceSpecifier&) : std::vector<InstanceIdentifier> | ||
| +getBindingRuntime(BindingType binding) : IRuntimeBinding* | ||
| .. | ||
| <u>Notes:</u> | ||
| Runtime is not copyable. | ||
| } | ||
|
|
||
| class "mw::com::impl::RuntimeMock" as RuntimeMock { | ||
| +resolve(const InstanceSpecifier&): std::vector<InstanceIdentifier> | ||
| +GetBindingRuntime(BindingType binding): IRuntimeBinding* | ||
| .. | ||
| Mock for unit-testing/mocking of Runtime func. | ||
| } | ||
|
|
||
| interface "mw::com::impl::IRuntimeBinding" as IRuntimeBinding { | ||
| +{abstract} GetBindingType() : BindingType | ||
| +{abstract} GetServiceDiscoveryClient() : IServiceDiscoveryClient& | ||
| +{abstract} GetTracingRuntime() : tracing::ITracingRuntimeBinding* | ||
| } | ||
|
|
||
| class "mw::com::impl::RuntimeBindingFactory" as RuntimeBindingFactory << plumbing >> { | ||
| +{static} CreateBindingRuntimes(configuration : Configuration&) : std::unordered_map<score::mw::com::impl::BindingType, std::unique_ptr<score::mw::com::impl::IRuntimeBinding>> | ||
| } | ||
|
|
||
| interface "mw::com::impl::lola::IRuntime" as LolaIRuntime { | ||
| +{abstract} HasAsilBSupport() : bool | ||
| +{abstract} GetLolaMessaging() : lola::IMessagePassingService& | ||
| +{abstract} GetShmSizeCalculationMode() : ShmSizeCalculationMode | ||
| +{abstract} GetRollbackSynchronization() : RollbackSynchronization& | ||
| +{abstract} GetPid() : pid_t | ||
| +{abstract} GetUid() : uid_t | ||
| } | ||
|
|
||
| class "mw::com::impl::lola:Runtime" as LolaRuntime { | ||
| -lola_message_passing_control_ : lola::MessagePassingControl | ||
| -lola_messaging_ : lola::MessagePassingFacade | ||
| +GetLolaMessaging() : lola::IMessagePassingService& | ||
| +HasAsilBSupport() : bool | ||
| +GetMessagePassingCfg(const QualityType asil_level) : MessagePassingFacade::AsilSpecificCfg | ||
| +GetRollbackSynchronization() : RollbackSynchronization& | ||
| } | ||
|
|
||
| class "mw::com::impl::lola:RuntimeMock" as LolaRuntimeMock { | ||
| +GetLolaMessaging() : lola::IMessagePassingService& | ||
| +HasAsilBSupport() : bool | ||
| } | ||
|
|
||
| IRuntime <|-- Runtime | ||
| IRuntime <|-- RuntimeMock | ||
| Runtime "1" *--> "0..n" IRuntimeBinding | ||
|
|
||
| IRuntimeBinding <|-- LolaIRuntime | ||
| LolaIRuntime <|-- LolaRuntime | ||
| LolaIRuntime <|-- LolaRuntimeMock | ||
|
|
||
| RuntimeBindingFactory ..> LolaRuntime : creates | ||
| Runtime ..> RuntimeBindingFactory : uses | ||
|
|
||
| @enduml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return type should use the correct namespace separator. Please update impl::lola:IMessagePassingService& to impl::lola::IMessagePassingService&
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dear @sahithi-nukala thank you for your review and providing suggestions. Due to amount of diagrams and size of them I would like you to provide your changes like this
#50 (review)
thanks in advance