@@startuml
autonumber "<b>[00]"
hide footbox
skinparam ParticipantPadding 25
skinparam BoxPadding 10

Title Camcorder CAM interactions

box "Disk layer" #LightBlue
participant geom
end box

box "CAM" #LightGreen
participant periph
participant xpt
end box

box "Camcorder" #Orange
participant camcorder
end box

box "SIM" #Pink
participant driver
participant hardware
end box

== I/O Dispatch ==
activate geom
geom->periph: disk->strategy()
deactivate geom
activate periph

periph->periph : compose protocol\ncommand
activate xpt
periph->xpt : xpt_action()
deactivate periph
xpt->camcorder : cam_pf_xfertap()
activate camcorder
xpt->driver : sim_action()
deactivate camcorder
deactivate xpt
activate driver
driver->o hardware : enqueue to hardware
driver --> geom : return
deactivate driver
note over hardware: hardware\nprocesses\ncommand

== I/O Completion ==
hardware o-> driver: driver_intr()
activate driver
driver->xpt : xpt_done()
deactivate driver
activate xpt

xpt->periph : periph->done()
deactivate xpt
activate periph
periph->geom : biodone()
deactivate periph
activate geom
||45||

@@enduml
