aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/doc/puml
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/doc/puml')
-rw-r--r--src/main/doc/puml/IntelligentDataCollection.puml87
-rw-r--r--src/main/doc/puml/mqtt_client_Location_Services.puml106
-rw-r--r--src/main/doc/puml/mqtt_client_message_life_cycle.puml2
3 files changed, 187 insertions, 8 deletions
diff --git a/src/main/doc/puml/IntelligentDataCollection.puml b/src/main/doc/puml/IntelligentDataCollection.puml
index ac2c2d3..3a7b988 100644
--- a/src/main/doc/puml/IntelligentDataCollection.puml
+++ b/src/main/doc/puml/IntelligentDataCollection.puml
@@ -1,11 +1,84 @@
-@startuml
-'https://plantuml.com/sequence-diagram
-autonumber
+@startuml "Intelligent Data Collection"
+participant "Vehicle Telematics Module" as VTM
+participant "Broker" as iot
+database "Telemetry Data" as TDB
+participant "Vehicle Status" as vehstat
+database "Vehicle Model and Mapping" as VMDB
+participant "Intelligent Data Service" as IDS
+participant "Analytics Services" as AS
+participant "Consuming Services" as CS
+actor "Developer/Engineer" as DE
+participant "Consuming Application"
+
+
+DE -> IDS: Model Vehicle Data
+IDS -> VMDB: Store Vehicle Models
+DE -> IDS: Map Model to Vehicle Data Schemas (i.e. DBC)
+IDS -> VMDB: Store Vehicle Model and Mapping
+=== Load Vehicle Model Mapping ==
+IDS -> iot: Publish message PublishVehicleModelMapping
+alt Vehicle Connected
+iot -> VTM: Receive PublishVehicleModelMapping
+note right of VTM: The vehicle uses the mapping to abstract and transform vehicle network data to the Model.
+else else Vehicle Not Connected
+vehstat -> IDS: isVehicleSubscribedResponse (Not Subscribed)
+
+create boundary "SMS/Cellular Services" as sms
+IDS -> sms: Send SMS Wake up Message
+VTM -> iot: Connect
+iot -> iot: Authorization check
+iot -> VTM: ConnectAck
+iot -> vehstat: <VTM_id> Connected
+vehstat -> IDS: <VTM_id> Connected
+IDS -> iot: Subscribe to <response_topic_id>
+iot -> IDS: SUBACK
+IDS -> iot: Publish PublishVehicleModelMapping
+end
+iot -> VTM: Receive PublishVehicleModelMapping
+iot -> IDS: PUBACK
+
+
+== Send Vehicle Data Collection Scheme ==
+DE -> IDS: Design Data Collection Scheme
+note right of IDS: These services permit identifying just the data needed\n for a specific use case and the collection intervals\n either by event or time based.
+alt Vehicle Connected
+iot -> VTM: Receive PublishDataCollectionDescriptor
+note right of VTM: The vehicle uses the mapping to abstract and transform vehicle network data to the Model.
+else else Vehicle Not Connected
+vehstat -> IDS: isVehicleSubscribedResponse (Not Subscribed)
+
+create boundary "SMS/Cellular Services" as sms
+IDS -> sms: Send SMS Wake up Message
+VTM -> iot: Connect
+iot -> iot: Authorization check
+iot -> VTM: ConnectAck
+iot -> vehstat: <VTM_id> Connected
+vehstat -> IDS: <VTM_id> Connected
+IDS -> iot: Subscribe to <response_topic_id>
+iot -> IDS: SUBACK
+IDS -> iot: Publish PublishDataCollectionDescriptor
+end
+iot -> VTM: Receive PublishDataCollectionDescriptor
+iot -> IDS: PUBACK
+
+== Publish Data From Vehicle ==
+
+loop Publish as Per Collection Scheme
+VTM <-: Event or Interval
+VTM -> iot: Connect
+VTM -> iot: PublishData
+iot -> iot: Authorization check
+iot -> VTM: ConnectAck
+iot -> vehstat: <VTM_id> Connected
+vehstat -> IDS: <VTM_id> Connected
+VTM -> iot: PublishData
+iot -> IDS: Receive PublishData
+IDS -> TD: Store Data
+AS -> TD: Retrieve and Transform Data
+AS -> CS: Consume Data for Business Purposes
+end
+
-Alice -> Bob: Authentication Request
-Bob --> Alice: Authentication Response
-Alice -> Bob: Another authentication Request
-Alice <-- Bob: another authentication Response
@enduml \ No newline at end of file
diff --git a/src/main/doc/puml/mqtt_client_Location_Services.puml b/src/main/doc/puml/mqtt_client_Location_Services.puml
new file mode 100644
index 0000000..48f2e64
--- /dev/null
+++ b/src/main/doc/puml/mqtt_client_Location_Services.puml
@@ -0,0 +1,106 @@
+@startuml "mqtt Location Services Orchestration"
+
+
+participant "Vehicle Application" as application
+participant "Vehicle Edge MQTT Client" as client
+participant "MQTT Broker" as broker
+participant "Vehicle Location Service" as vehsloc
+participant "Location Enrichment Service" as cvc
+boundary "Outgoing Event Service" as pub
+database "Vehicle State" as vstat
+note left of application: This flow assumes \n the previous security \nlifecycle has been\n completed and TLS TCP \n connection established
+
+
+== Vehicle Event Publishing ===
+client -> broker: Connect
+broker -> broker: Authorization check
+broker -> client: ConnectAck
+broker -> vehsloc: <client_id> Connected
+application -> broker: Publish <topic_id>
+broker -> application: PUBACK
+broker -> vehsloc: <client_id> Published CurrentLocationMessage
+vehsloc -> cvc: <i>EnrichLocationData<i>
+cvc -> vehsloc: <i>Response>
+note right of cvc: Use to add more details such as address or points of interest
+vehsloc -> pub: Publish event to consuming applications via API
+vehsloc -> vstat: Store current location state
+
+== Request and Response ==
+pub -> vstat: Current Location
+create actor "Consuming Application User" as user
+pub -> user: Current location
+create participant "APIs" as api
+user -> api: Request Location Update
+api -> vehsloc: RequestCurrentVehicleLocation
+
+pub -> vehsloc: Message/Request for Vehicle
+vehsloc -> vehsloc: Create Message
+vehsloc -> vehstat: isVehicleSubscribed to <topic_id>
+alt Vehicle Connected and Subscribed
+vehstat -> vehsloc: isVehicleSubscribedResponse (Subscribed)
+note right of vehstat: The response should indicate both connection and subscription status for appropriate action to be taken
+vehsloc -> broker: Subscribe to <response_topic_id>
+broker -> vehsloc: SUBACK
+vehsloc -> broker: Publish to <topic_id>
+broker -> vehsloc: PUBACK
+
+
+
+else else "Client Not Connected/Subscribed"
+vehstat -> vehsloc: isVehicleSubscribedResponse (Not Subscribed)
+
+create boundary "SMS/Cellular Services" as sms
+vehsloc -> sms: Send SMS Wake up Message
+client -> broker: Connect
+broker -> broker: Authorization check
+broker -> client: ConnectAck
+broker -> vehstat: <client_id> Connected
+vehstat -> vehsloc: <client_id> Connected
+vehsloc -> broker: Subscribe to <response_topic_id>
+broker -> vehsloc: SUBACK
+vehsloc -> broker: Publish to <topic_id>
+broker -> vehsloc: PUBACK
+
+end
+
+broker <-> application: message received
+application -> broker: ACK (QoS dependent)
+application -> application: deserialize and take action
+application -> application: create response message
+application -> broker: Pubish Response to <response_topic_id>
+broker -> vehsloc: Response Message
+vehsloc -> pub: Response Message
+vehsloc -> broker: Subscribe to <response_topic_id>
+broker -> vehsloc: SUBACK
+vehsloc -> broker: Publish to <topic_id>
+broker -> vehsloc: PUBACK
+broker <-> application: message received
+application -> broker: ACK (QoS dependent)
+application -> application: deserialize and take action
+application -> application: create response message
+application -> broker: Pubish Response to <response_topic_id>
+broker -> vehsloc: Response Message
+vehsloc -> pub: Response Message
+vehsloc -> vehstat: Update Location
+pub -> user: New Location Data
+
+alt "Vehicle Connected"
+vehsloc -> broker: Publish RequestCurrentVehicleLocation
+else else "Vehicle not Connected"
+vehsloc -> client: (SMS) Wake up sent
+client -> broker: Connect
+broker -> broker: Authorization check
+broker -> client: ConnectAck
+end
+
+
+
+
+
+
+
+
+
+
+
+@enduml \ No newline at end of file
diff --git a/src/main/doc/puml/mqtt_client_message_life_cycle.puml b/src/main/doc/puml/mqtt_client_message_life_cycle.puml
index 247b34c..23232a4 100644
--- a/src/main/doc/puml/mqtt_client_message_life_cycle.puml
+++ b/src/main/doc/puml/mqtt_client_message_life_cycle.puml
@@ -1,4 +1,4 @@
-@startuml "Lifecycle"
+@startuml "General MQTT Message Lifecycle"
participant "Vehicle Application" as application