Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
Add Remote Transceiver Diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
hhenry01 committed Nov 21, 2023
1 parent 9b8c5c9 commit 2f46992
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 26 deletions.
2 changes: 1 addition & 1 deletion projects/can_transceiver/diagrams/common_sequence.puml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@startuml Common Sequence
title Common Sequence
title Local Transceiver Common Sequence

!include %getenv("PLANTUML_TEMPLATE_PATH")

Expand Down
2 changes: 1 addition & 1 deletion projects/can_transceiver/diagrams/deployment_sequence.puml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@startuml Deployment Sequence
title Deployment Sequence
title Local Transceiver Deployment Sequence

!include %getenv("PLANTUML_TEMPLATE_PATH")

Expand Down
2 changes: 1 addition & 1 deletion projects/can_transceiver/diagrams/simulation_sequence.puml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@startuml Simulation Sequence
title Simulation Sequence
title Local Transceiver Simulation Sequence

!include %getenv("PLANTUML_TEMPLATE_PATH")

Expand Down
18 changes: 18 additions & 0 deletions projects/local_transceiver/diagrams/common.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@startuml common

box Modules
participant "Local Transceiver ROS Intf" as intf
participant "Local Transceiver" as local
end box

box Resources
Collections "Sensor Buffer" as buf
Queue "Serial Port" as port
end box

note across
As ROS is used for synchronizing access to resources, the module control
flow is blocking, meaning only one subsequence can happen at at a time.
end note

@enduml
5 changes: 2 additions & 3 deletions projects/local_transceiver/diagrams/inbound_sequence.puml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
@startuml Inbound Sequence
title Inbound Sequence
title Local Transceiver Inbound Sequence

!include %getenv("PLANTUML_TEMPLATE_PATH")
!include participants.puml

!include common.puml

autonumber

Expand Down
4 changes: 2 additions & 2 deletions projects/local_transceiver/diagrams/outbound_sequence.puml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@startuml Outbound Sequence
title Outbound Sequence
title Local Transceiver Outbound Sequence

!include %getenv("PLANTUML_TEMPLATE_PATH")
!include participants.puml
!include common.puml

autonumber

Expand Down
18 changes: 0 additions & 18 deletions projects/local_transceiver/diagrams/participants.puml

This file was deleted.

15 changes: 15 additions & 0 deletions projects/remote_transceiver/diagrams/common.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@startuml common

box Modules
participant "HTTP Handler" as handler
participant "HTTP Server" as server
participant SailbotDB as db
end box

note over handler, server
Part of the same class. The handler is separated from the
server in the diagram to illustrate that the server does
not block on requests, and multiple can be handled simultaneously.
end note

@endmul
35 changes: 35 additions & 0 deletions projects/remote_transceiver/diagrams/receive_sensors_sequence.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@startuml Receive Sensors Sequence
title Remote Transceiver Receive Sensors Sequence

!include %getenv("PLANTUML_TEMPLATE_PATH")
!include common.puml

autonumber

box Resources
Collections "Sensors Buffer" as buf
Database "MongoDB" as mongo
end box

note over buf : Contents of this buffer are \nunparsed, raw binary strings

-> handler ++ : POST Sensors
handler -> server --++: Process POST Request
server -> server : Parse HTTP
server --> buf : Update Sensors Buffer
alt If Incomplete Sensors Payload
handler <- server --++ : Return OK
<- handler -- : Send Response

else Else All Sensor Payloads Received
activate server
handler <-- server ++ : Return OK
note right of server : Execution continues after returning HTTP response
<- handler -- : Send Response
server <-- buf : Read Entire Buffer
server -> server : Parse Protobuf Sensors Object from Binary
server -> db ++ : Commit Sensors to DB
db -> db : Convert Sensors to BSON Format
db --> mongo -- : Write Sensors to MongoDB
deactivate server
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@startuml Transmit Global Path Sequence
title Remote Transceiver Transmit Global Path Sequence

!include %getenv("PLANTUML_TEMPLATE_PATH")
!include common.puml

autonumber

note over db : Unused

-> handler ++ : POST Global Path
handler -> server --++ : Process POST request
server -> server : Parse HTTP Request for Waypoints
server -> server : Convert Waypoints to Protobuf and Serialize
opt If Waypoints are too Large for One Message
server -> server : Split Waypoints Across Multiples Messages
end
loop For Each Waypoint Message
server --> handler ++ : Transmit Waypoints
<- handler -- : POST Waypoints to Iridium
deactivate server
end

@enduml

0 comments on commit 2f46992

Please sign in to comment.