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

Plantuml Diagrams for CAN, Local, and Remote Transceiver #62

Merged
merged 6 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions projects/can_transceiver/diagrams/common_sequence.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@startuml Common Sequence
title Common Sequence

!startsub PARTICIPANTS
' TODO: Move parameters to a general template
autonumber
!$MAX_MESSAGE_SIZE = 100
skinparam {
BoxPadding 10
MaxMessageSize $MAX_MESSAGE_SIZE
ParticipantPadding 20
SequenceMessageAlign center
wrapWidth $MAX_MESSAGE_SIZE
}

box "Common Sequence"
participant CanTransceiver as can
participant CanTransceiverRosIntf as ros_intf
end box
== Inbound ==
!endsub PARTICIPANTS

-> can : Inbound Sensor(s) [CAN]

!startsub SEQUENCE

activate can
can -> can : Convert from CAN to ROS
can -> can : Filter Sensor(s)
can -> ros_intf --++ : Transmit Sensor(s) [ROS]
ros_intf -> : Publish sensor(s) to Software ROS Network
deactivate ros_intf

== Outbound ==

ros_intf <- ++ : Command(s) from Software ROS Network (ex. Desired Heading)
can <- ros_intf --++ : Transmit Command(s) [ROS]
can -> can : Convert Command(s) from ROS to CAN
!endsub SEQUENCE

<- can : Outbound Command(s) [CAN]
deactivate can

@enduml
13 changes: 13 additions & 0 deletions projects/can_transceiver/diagrams/deployment_sequence.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@startuml Deployment Sequence

title Deployment Sequence

!includesub common_sequence.puml!PARTICIPANTS

-> can : Sensors from ELEC [CAN]

!includesub common_sequence.puml!SEQUENCE

<- can -- : Transmit Command(s) to ELEC [CAN]

@enduml
26 changes: 26 additions & 0 deletions projects/can_transceiver/diagrams/simulation_sequence.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@startuml Simulation Sequence

title Simulation Sequence

box "Simulation Sequence"
participant CanSimIntf as sim_intf
participant CanSimTransceiver as sim_t
end box

!includesub common_sequence.puml!PARTICIPANTS

-> sim_intf ++ : Mock Sensors from Simulator [ROS]
sim_intf -> sim_t --++ : Process Mock Sensors [ROS]
sim_t -> sim_t : Convert ROS sensor object to CAN
sim_t --> can -- : Call new Sensors API [CAN]
deactivate sim_intf
note right sim_t : API call should be async to replicate deployment behavior.

!includesub common_sequence.puml!SEQUENCE

sim_t <-- can --++ : Call Write to CAN API
note left can : API call should be async to replicate deployment behavior.
sim_t -> sim_t : Convert Command(s) from CAN to ROS
sim_intf <- sim_t --++ : Transmit Command(s) [ROS]
activate sim_intf
<- sim_intf -- : Publish Command(s) to Simulator [ROS]