|
| 1 | +@startuml runtime_structural_view |
| 2 | +title "Structural View Runtime" |
| 3 | + |
| 4 | +interface "mw::com::impl::IRuntime" as IRuntime { |
| 5 | + +{abstract} resolve(const InstanceSpecifier&) : std::vector<InstanceIdentifier> |
| 6 | + +{abstract} getBindingRuntime(BindingType binding) : IRuntimeBinding* |
| 7 | +} |
| 8 | + |
| 9 | +enum BindingType { |
| 10 | + LoLa = 0 |
| 11 | + Fake = 1 |
| 12 | +} |
| 13 | + |
| 14 | +class "mw::com::impl::Runtime" as Runtime { |
| 15 | + -runtime_bindings_ : std::unordered_map<BindingType, std::unique_ptr<IRuntimeBinding>> |
| 16 | + +{static} Initialize() : void |
| 17 | + +{static} Initialize(int argc, score::StringLiteral argv) : void |
| 18 | + +{static} Initialize(std::string const&) : void |
| 19 | + +{static} getInstance() : Runtime& |
| 20 | + +Runtime(Configuration&& config) |
| 21 | + +resolve(const InstanceSpecifier&) : std::vector<InstanceIdentifier> |
| 22 | + +getBindingRuntime(BindingType binding) : IRuntimeBinding* |
| 23 | + .. |
| 24 | + <u>Notes:</u> |
| 25 | + Runtime is not copyable. |
| 26 | +} |
| 27 | + |
| 28 | +class "mw::com::impl::RuntimeMock" as RuntimeMock { |
| 29 | + +resolve(const InstanceSpecifier&): std::vector<InstanceIdentifier> |
| 30 | + +GetBindingRuntime(BindingType binding): IRuntimeBinding* |
| 31 | + .. |
| 32 | + Mock for unit-testing/mocking of Runtime func. |
| 33 | +} |
| 34 | + |
| 35 | +interface "mw::com::impl::IRuntimeBinding" as IRuntimeBinding { |
| 36 | + +{abstract} GetBindingType() : BindingType |
| 37 | + +{abstract} GetServiceDiscoveryClient() : IServiceDiscoveryClient& |
| 38 | + +{abstract} GetTracingRuntime() : tracing::ITracingRuntimeBinding* |
| 39 | +} |
| 40 | + |
| 41 | +class "mw::com::impl::RuntimeBindingFactory" as RuntimeBindingFactory << plumbing >> { |
| 42 | + +{static} CreateBindingRuntimes(configuration : Configuration&) : std::unordered_map<score::mw::com::impl::BindingType, std::unique_ptr<score::mw::com::impl::IRuntimeBinding>> |
| 43 | +} |
| 44 | + |
| 45 | +interface "mw::com::impl::lola::IRuntime" as LolaIRuntime { |
| 46 | + +{abstract} HasAsilBSupport() : bool |
| 47 | + +{abstract} GetLolaMessaging() : lola::IMessagePassingService& |
| 48 | + +{abstract} GetShmSizeCalculationMode() : ShmSizeCalculationMode |
| 49 | + +{abstract} GetRollbackSynchronization() : RollbackSynchronization& |
| 50 | + +{abstract} GetPid() : pid_t |
| 51 | + +{abstract} GetUid() : uid_t |
| 52 | +} |
| 53 | + |
| 54 | +class "mw::com::impl::lola:Runtime" as LolaRuntime { |
| 55 | + -lola_message_passing_control_ : lola::MessagePassingControl |
| 56 | + -lola_messaging_ : lola::MessagePassingFacade |
| 57 | + +GetLolaMessaging() : lola::IMessagePassingService& |
| 58 | + +HasAsilBSupport() : bool |
| 59 | + +GetMessagePassingCfg(const QualityType asil_level) : MessagePassingFacade::AsilSpecificCfg |
| 60 | + +GetRollbackSynchronization() : RollbackSynchronization& |
| 61 | +} |
| 62 | + |
| 63 | +class "mw::com::impl::lola:RuntimeMock" as LolaRuntimeMock { |
| 64 | + +GetLolaMessaging() : lola::IMessagePassingService& |
| 65 | + +HasAsilBSupport() : bool |
| 66 | +} |
| 67 | + |
| 68 | +IRuntime <|-- Runtime |
| 69 | +IRuntime <|-- RuntimeMock |
| 70 | +Runtime "1" *--> "0..n" IRuntimeBinding |
| 71 | + |
| 72 | +IRuntimeBinding <|-- LolaIRuntime |
| 73 | +LolaIRuntime <|-- LolaRuntime |
| 74 | +LolaIRuntime <|-- LolaRuntimeMock |
| 75 | + |
| 76 | +RuntimeBindingFactory ..> LolaRuntime : creates |
| 77 | +Runtime ..> RuntimeBindingFactory : uses |
| 78 | + |
| 79 | +@enduml |
0 commit comments