@startuml température
title Température
' !theme crt-amber

analog  "Température"  between 25 and 27 as temp
binary  "Tâche Capteur"                  as capt_task
concise "Queue Capteur"                  as capt_queue
binary  "Tâche principal"                as main_task
concise "Queue Chauffage"                as act_queue
binary  "Tâche Chauffage"                as act_task
concise "Chauffage"                      as act

scale 30 as 200 pixels
hide time-axis

@0
temp is 26
capt_task is low
capt_queue is {-}
main_task is low
act is {-}
act_queue is {-}
act_task is low

@80
temp is 25
@170
temp is 27

@0
@+7
capt_task is high
@+5
capt_task is low
capt_queue is "25.4"
capt_task --> capt_queue : tx
@+10
capt_task is high
@+5
capt_task is low
capt_queue is "25.2"
capt_task --> capt_queue : tx
@+10
capt_task is high
@+5
capt_task is low
capt_queue is "25"
capt_task --> capt_queue : tx
@+10
capt_task is high
@+5
capt_task is low
capt_queue is "24.8"
capt_task --> capt_queue : tx
@+10
capt_task is high
@+5
capt_task is low
capt_queue is "24.6"
capt_task --> capt_queue : tx
@+10
capt_task is high
@+5
capt_task is low
capt_queue is "24.6"
capt_task --> capt_queue : tx
@+10
capt_task is high
@+5
capt_task is low
capt_queue is "25"
capt_task --> capt_queue : tx
@+10
capt_task is high
@+5
capt_task is low
capt_queue is "25.5"
capt_task --> capt_queue : tx
@+10
capt_task is high
@+5
capt_task is low
capt_queue is "26"
capt_task --> capt_queue : tx
@+10
capt_task is high
@+5
capt_task is low
capt_queue is "26.5"
capt_task --> capt_queue : tx
@+10
capt_task is high
@+5
capt_task is low
capt_queue is "27"
capt_task --> capt_queue : tx
@+10
capt_task is high
@+5
capt_task is low
capt_queue is "27.5"
capt_task --> capt_queue : tx


@0
@+2
main_task is high
capt_queue is {-}
capt_queue --> main_task : rx
@+5
main_task is low
act_queue is "off" #LightSalmon
main_task --> act_queue : tx
@+10
main_task is high
capt_queue is {-}
capt_queue --> main_task : rx
@+5
main_task is low
act_queue is "off" #LightSalmon
main_task --> act_queue : tx
@+10
main_task is high
capt_queue is {-}
capt_queue --> main_task : rx
@+5
main_task is low
act_queue is "off" #LightSalmon
main_task --> act_queue : tx
@+10
main_task is high
capt_queue is {-}
capt_queue --> main_task : rx
@+5
main_task is low
act_queue is "off" #LightSalmon
main_task --> act_queue : tx
@+10
main_task is high
capt_queue is {-}
capt_queue --> main_task : rx
@+5
main_task is low
act_queue is "on" #LightGreen
main_task --> act_queue : tx
@+10
main_task is high
capt_queue is {-}
capt_queue --> main_task : rx
@+5
main_task is low
act_queue is "on" #LightGreen
main_task --> act_queue : tx
@+10
main_task is high
capt_queue is {-}
capt_queue --> main_task : rx
@+5
main_task is low
act_queue is "on" #LightGreen
main_task --> act_queue : tx
@+10
main_task is high
capt_queue is {-}
capt_queue --> main_task : rx
@+5
main_task is low
act_queue is "on" #LightGreen
main_task --> act_queue : tx
@+10
main_task is high
capt_queue is {-}
capt_queue --> main_task : rx
@+5
main_task is low
act_queue is "on" #LightGreen
main_task --> act_queue : tx
@+10
main_task is high
capt_queue is {-}
capt_queue --> main_task : rx
@+5
main_task is low
act_queue is "on" #LightGreen
main_task --> act_queue : tx
@+10
main_task is high
capt_queue is {-}
capt_queue --> main_task : rx
@+5
main_task is low
act_queue is "off" #LightSalmon
main_task --> act_queue : tx
@+10
main_task is high
capt_queue is {-}
capt_queue --> main_task : rx
@+5
main_task is low
act_queue is "off" #LightSalmon
main_task --> act_queue : tx

@0
act_task is high
act_queue --> act_task : rx
act_queue is {-}
@+5
act_task is low
@+10
act_task is high
act_queue --> act_task : rx
act_queue is {-}
@+5
act_task is low
@+10
act_task is high
act_queue --> act_task : rx
act_queue is {-}
@+5
act_task is low
@+10
act_task is high
act_queue --> act_task : rx
act_queue is {-}
@+5
act_task is low
@+10
act_task is high
act_queue --> act_task : rx
act_queue is {-}
@+5
act_task is low
@+10
act_task is high
act_queue --> act_task : rx
act_queue is {-}
@+5
act_task is low
act is "ON"
act_task --> act : allume
@+10
act_task is high
act_queue --> act_task : rx
act_queue is {-}
@+5
act_task is low
@+10
act_task is high
act_queue --> act_task : rx
act_queue is {-}
@+5
act_task is low
@+10
act_task is high
act_queue --> act_task : rx
act_queue is {-}
@+5
act_task is low
@+10
act_task is high
act_queue --> act_task : rx
act_queue is {-}
@+5
act_task is low
@+10
act_task is high
act_queue --> act_task : rx
act_queue is {-}
@+5
act_task is low
@+10
act_task is high
act_queue --> act_task : rx
act_queue is {-}
@+5
act_task is low
act is {-}
act_task --> act : éteint
@+10
act_task is high
act_queue --> act_task : rx
act_queue is {-}
@+5
act_task is low

@enduml
