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

Commit

Permalink
Update diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
hhenry01 committed Dec 9, 2023
1 parent 7f3d47c commit 3c80177
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# PlantUML export directory
/diagrams/out/
/diagrams/out/*.png
!/diagrams/out/external_interfaces.png
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Formatting reminder:
| `wind_sensors` | WindSensors | CanTrxRosIntf | Local Transceiver |
| `mock_wind_sensors` | WindSensors | Boat Simulator | CanSimIntf |

![External Interface Diagram](diagrams/out/external_interfaces.png)

### Project-wide Internal Interfaces

| Interface | Used In |
Expand Down
Binary file added diagrams/out/external_interfaces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 80 additions & 24 deletions diagrams/src/external_interfaces.puml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ Title External Interfaces

!include %getenv("PLANTUML_TEMPLATE_PATH")

' Define stereotypes to categorize states
skinparam State {
BackgroundColor {
<<Legend>> White
<<Topic>> $SAILBOT_BLUE
<<Pub>> Green
<<Sub>> Red
<<Legend>> White
<<Topic>> SlateBlue
<<Pub>> Green
<<Sub>> Red
<<SimTopic>> MidnightBlue
<<Node>> $SAILBOT_DARK_BLUE
<<SimNode>> Purple
}
Font {
Color<<Legend>> Black
Expand All @@ -18,61 +22,105 @@ skinparam State {

State Legend<<Legend>> {
State "Publisher" <<Pub>>
State Topic <<Topic>> : Type
State "Subscriber" <<Sub>>
State Topic <<Topic>> : Type
State "Sim Topic" <<SimTopic>> : Type
State Node {

}
State "Sim Node" as sim_node <<SimNode>> {

}
}

' Define topics and sim topics
State ais_ships<<Topic>> : AISShips
State mock_ais_ships<<SimTopic>> : AISShips
State batteries<<Topic>> : Batteries
State boat_sim_input<<SimTopic>> : CanSimToBoatSim
state desired_heading<<Topic>> : DesiredHeading
State data_sensors<<Topic>> : GenericSensors
State global_path<<Topic>> : Path
State gps<<Topic>> : GPS
State mock_gps<<SimTopic>> : GPS
State local_path_data<<Topic>> : LPathData
State mock_gps<<Topic>> : GPS
State global_path<<Topic>> : Path
State "global_path" as mock_global_path<<SimTopic>> : Path
note right of mock_global_path
Note: the global_path topic
used during simulation is
the same topic used
during deployment
end note
State sail_cmd<<Topic>> : SailCmd
State filtered_wind_sensor<<Topic>> : WindSensor
State mock_wind_sensors<<Topic>> : WindSensors
State mock_wind_sensors<<SimTopic>> : WindSensors
State wind_sensors<<Topic>> : WindSensors

State "Local Pathfinding" as l_path {
' Define nodes and sim nodes
State "Local Pathfinding" as l_path <<Node>> {
State "Publish" as l_path_pub <<Pub>>
State "Subscribe" as l_path_sub <<Sub>>
}
State "Local Transceiver" as l_trans {
State "Local Transceiver" as l_trans <<Node>> {
State "Publish" as l_trans_pub <<Pub>>
State "Subscribe" as l_trans_sub <<Sub>>
}
State "Controller" as ctrl {
' State "Publish" as ctrl_pub <<Pub>>
State "Controller" as ctrl <<Node>> {
State "Publish" as ctrl_pub <<Pub>>
State "Subscribe" as ctrl_sub <<Sub>>
}
State "Boat Simulator" as sim {
State "Boat Simulator" as sim <<SimNode>> {
State "Publish" as sim_pub <<Pub>>
State "Subscribe" as sim_sub <<Sub>>
}

State "Can Transceiver" as can {
State "Publish" as can_pub <<Pub>>
State "Subscribe" as can_sub <<Sub>>
State "Can Transceiver" as can<<Legend>> {
State "CanTrxRosIntf" as can_trx <<Node>> {
State "Publish" as can_trx_pub <<Pub>>
State "Subscribe" as can_trx_sub <<Sub>>
}

State "CanSimIntf" as can_sim <<SimNode>> {
State "Publish" as can_sim_pub <<Pub>>
State "Subscribe" as can_sim_sub <<Sub>>
}
}
note top of can
Note: Can Transceiver is a module that
encompasses and connects CanTrxRosIntf
and CanSimIntf
end note

State "Mock Ais" as ais <<SimNode>> {
state "Publish" as ais_pub <<Pub>>
}

State "Mock Global Path" as g_path <<SimNode>> {
State "Publish" as g_path_pub <<Pub>>
}

' Publisher --> Topic

can_pub --> ais_ships
can_pub --> batteries
can_pub --> data_sensors
can_pub --> gps
can_pub --> filtered_wind_sensor
can_pub --> wind_sensors
ais_pub --> mock_ais_ships

can_trx_pub --> ais_ships
can_trx_pub --> batteries
can_trx_pub --> data_sensors
can_trx_pub --> gps
can_trx_pub --> filtered_wind_sensor
can_trx_pub --> wind_sensors

can_sim_pub --> boat_sim_input

ctrl_pub -up-> sail_cmd

l_path_pub --> desired_heading
l_path_pub --> local_path_data

l_trans_pub --> global_path

g_path_pub --> mock_global_path

sim_pub -left-> mock_gps
sim_pub -left-> mock_wind_sensors

Expand All @@ -83,22 +131,30 @@ ais_ships --> l_trans_sub

batteries --> l_trans_sub

boat_sim_input --> sim_sub

desired_heading --> ctrl_sub
desired_heading --> sim_sub

data_sensors --> l_trans_sub

global_path --> l_path_sub

mock_global_path -up-> l_path_sub

gps --> l_trans_sub
gps --> l_path_sub

local_path_data -up-> l_trans_sub

mock_gps -up-> can_sub
mock_ais_ships --> can_sim_sub

mock_gps -up-> can_sim_sub

filtered_wind_sensor --> l_path_sub

mock_wind_sensors -up-> can_sub
mock_wind_sensors -up-> can_sim_sub

sail_cmd -up-> can_trx_sub

wind_sensors --> l_trans_sub

0 comments on commit 3c80177

Please sign in to comment.