Skip to content

Commit

Permalink
update diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
wilyle committed Jan 23, 2024
1 parent 47498bc commit de709b2
Show file tree
Hide file tree
Showing 12 changed files with 99 additions and 221 deletions.
17 changes: 0 additions & 17 deletions adapters/digital_twin/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/design/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The cartographer is the core component responsible for managing the digital twin

The emitter is the core component responsible for actually emitting data. The emitter supports intervals at a per-signal level to enable signals to have different requirements on how often they are synced with the cloud. Note that once a signal is added to the mapping and picked up by the cartographer, it can take up to `min(`*`I`*`)` before the signal is emitted, where *`I`* is the set of intervals for signals already being tracked.

![Digital Twin Sequence Diagram](../diagrams/digital_twin_to_emitter_sequence.svg)
![Digital Twin Sequence Diagram](../diagrams/data_flow_to_emitter_sequence.svg)

### External Interfaces

Expand Down
24 changes: 24 additions & 0 deletions docs/diagrams/data_adapter_selection_sequence.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@startuml
participant "Freyja Cartographer"
participant "Data Adapter Selector"
participant "Data Adapter"
participant "In-Vehicle Digital Twin Provider"
autonumber

== Selection of a Data Adapter ==

"Freyja Cartographer"->"Data Adapter Selector": create_or_update_adapter(entity)

"Data Adapter Selector"->"Data Adapter Selector": Lookup adapter in selector's local cache

alt #Aqua Matching Data Adapter Doesn't Exist
"Data Adapter Selector"->"Data Adapter": Create a data adapter associated with the entity endpoint
end

"Data Adapter Selector"->"Data Adapter": Register the new entity
"Data Adapter Selector"->"Data Adapter Selector": Map entity to adapter in selector's local cache

"Data Adapter" -> "In-Vehicle Digital Twin Provider": Call get or subscribe for values
"In-Vehicle Digital Twin Provider" -> "Data Adapter": Return values
== Selection of a Data Adapter ==
@enduml
52 changes: 52 additions & 0 deletions docs/diagrams/data_flow_to_emitter_sequence.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
@startuml
participant "Cloud Digital Twin"
box Freyja
participant "Emitter"
participant "Signal Store"
participant "Cartographer"
participant "Digital Twin Adapter"
participant "Data Adapter Selector"
participant "Data Adapter"
end box
participant "Ibeji"
participant "Provider"

autonumber

== Data Flow to Emitter ==

"Cartographer"->"Digital Twin Adapter": Request DTDL for mapped entites
"Digital Twin Adapter"->"Ibeji": Send find_by_id request(s)
"Ibeji"->"Digital Twin Adapter": Respond with entity data
"Digital Twin Adapter"->"Cartographer": Respond with entity data
"Cartographer"->"Data Adapter Selector": Create or update data adapter with entity data
"Data Adapter Selector"->"Data Adapter Selector": Select correct Data Adapter
"Data Adapter Selector"->"Data Adapter": Register entity
alt Entity supports subscribe
"Data Adapter"->"Provider": Subscribe
"Data Adapter"<-"Provider": Subscribe Response
end
"Data Adapter"->"Data Adapter Selector": Register entity response
"Data Adapter Selector"->"Cartographer": Register entity response
"Cartographer"->"Signal Store": Track Signals
alt Entity doesn't support subscribe
"Emitter"->"Data Adapter Selector": Request signal value
"Data Adapter Selector"->"Data Adapter Selector": Select correct Data Adapter
"Data Adapter Selector"->"Data Adapter": Request signal value
"Data Adapter"->"Provider": Request signal value
"Data Adapter"<-"Provider": Signal value response
"Data Adapter Selector"<-"Data Adapter": Signal value response
"Emitter"<-"Data Adapter Selector": Signal value response
end
alt Entity supports subscribe
loop Provider publishes data asynchronously
"Provider"->"Data Adapter": Publish data
"Data Adapter"->"Signal Store": Update store
end
"Emitter"->"Signal Store": Request signal value
"Emitter"<-"Signal Store": Signal value response
end
"Emitter"->"Cloud Digital Twin": Emit signal data

== Data Flow to Emitter ==
@enduml
27 changes: 0 additions & 27 deletions docs/diagrams/digital_twin_adapter_sequence.puml

This file was deleted.

40 changes: 0 additions & 40 deletions docs/diagrams/digital_twin_adapter_sequence.svg

This file was deleted.

23 changes: 0 additions & 23 deletions docs/diagrams/digital_twin_to_emitter_sequence.puml

This file was deleted.

Loading

0 comments on commit de709b2

Please sign in to comment.