|
|
|
|
Diagramme de temps
|
Timing Diagram
|
|
Un diagramme de temps en UML est un type spécifique de diagramme d'interaction qui visualise les contraintes de temps d' un système. Il se concentre sur l' ordre chronologique des événements, en montrant comment différents objets interagissent les uns avec les autres au fil du temps. Les diagrammes de temps sont particulièrement utiles dans les systèmes en temps réel et les systèmes intégrés pour comprendre le comportement des objets pendant une période donnée.
|
A Timing Diagram in UML is a specific type of interaction diagram that visualizes the timing constraints of a system. It focuses on the chronological order of events, showcasing how different objects interact with each other over time. Timing diagrams are especially useful in real-time systems and embedded systems to understand the behavior of objects throughout a given period.
|
Définitions des participants
|
Declaring element or participant
|
|
Les participants sont déclarés à l'aide des mots-clé consise ou robust , en fonction de la façon dont vous souhaitez les dessiner.
concise : Un signal simplifié conçu pour montrer le déplacement des données (utile pour les messages).
robust : Un signal linéaire complexe conçu pour montrer la transition d'un état à un autre. Ce signal peut avoir de nombreux états.
clock : Un signal qui transitionne de façon répétée entre les états haut et bas à rythme régulier.
binary : Un signal spécifique restreint à seulement deux états (binaire).
Les changements d'état sont notifiés avec la notation @ et le verbe is .
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU is Waiting
WB is Processing
@300
WB is Waiting
@enduml
*[Ref. [QA-14631](https: forum.plantuml.net/14631) and [QA-14647](https:forum.plantuml.net/14647)]*
[Ref. QA-14631, QA-14647 and QA-11288]
WARNING This translation need to be updated. WARNING
|
You declare participant using the following keywords, depending on how you want them to be drawn.
Keyword
|
Description
|
analog
|
An analog signal is continuous, and the values are linearly interpolated between the given setpoints
|
binary
|
A binary signal restricted to only 2 states
|
clock
|
A clocked signal that repeatedly transitions from high to low, with a period , and an optional pulse and offset
|
concise
|
A simplified concise signal designed to show the movement of data (great for messages)
|
robust
|
A robust complex line signal designed to show the transition from one state to another (can have many states)
|
You define state change using the @ notation, and the is verb.
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU is Waiting
WB is Processing
@300
WB is Waiting
@enduml
@startuml
clock "Clock_0" as C0 with period 50
clock "Clock_1" as C1 with period 50 pulse 15 offset 10
binary "Binary" as B
concise "Concise" as C
robust "Robust" as R
analog "Analog" as A
@0
C is Idle
R is Idle
A is 0
@100
B is high
C is Waiting
R is Processing
A is 3
@300
R is Waiting
A is 1
@enduml
[Ref. QA-14631, QA-14647 and QA-11288]
|
Horloge et signaux binaires
|
Binary and Clock
|
|
It's also possible to have binary and clock signal, using the following keywords:
@startuml
clock clk with period 1
binary "Enable" as EN
@0
EN is low
@5
EN is high
@10
EN is low
@enduml
|
It's also possible to have binary and clock signal, using the following keywords:
@startuml
clock clk with period 1
binary "Enable" as EN
@0
EN is low
@5
EN is high
@10
EN is low
@enduml
|
Ajout de messages
|
Adding message
|
|
Vous pouvez rajouter des messages à l'aide de la syntaxe suivante.
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU -> WB : URL
WU is Waiting
WB is Processing
@300
WB is Waiting
@enduml
|
You can add message using the following syntax.
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU -> WB : URL
WU is Waiting
WB is Processing
@300
WB is Waiting
@enduml
|
Référence relative de temps
|
Relative time
|
|
Avec la notation @ , il est possible d'utiliser une notation relative du temps.
@startuml
robust "DNS Resolver" as DNS
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
DNS is Idle
@+100
WU -> WB : URL
WU is Waiting
WB is Processing
@+200
WB is Waiting
WB -> DNS@+50 : Resolve URL
@+100
DNS is Processing
@+300
DNS is Idle
@enduml
|
It is possible to use relative time with @ .
@startuml
robust "DNS Resolver" as DNS
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
DNS is Idle
@+100
WU -> WB : URL
WU is Waiting
WB is Processing
@+200
WB is Waiting
WB -> DNS@+50 : Resolve URL
@+100
DNS is Processing
@+300
DNS is Idle
@enduml
|
Points d'ancrage
|
Anchor Points
|
|
Au lieu d'utiliser le temps absolu ou relatif sur un temps absolu, vous pouvez définir un temps comme point d'ancrage en utilisant le mot clé as et en commençant le nom par un :
@XX as :<anchor point name>
@startuml
clock clk with period 1
binary "enable" as EN
concise "dataBus" as db
@0 as :start
@5 as :en_high
@10 as :en_low
@:en_high-2 as :en_highMinus2
@:start
EN is low
db is "0x0000"
@:en_high
EN is high
@:en_low
EN is low
@:en_highMinus2
db is "0xf23a"
@:en_high+6
db is "0x0000"
@enduml
|
Instead of using absolute or relative time on an absolute time you can define a time as an anchor point by using the as keyword and starting the name with a : .
@XX as :<anchor point name>
@startuml
clock clk with period 1
binary "enable" as EN
concise "dataBus" as db
@0 as :start
@5 as :en_high
@10 as :en_low
@:en_high-2 as :en_highMinus2
@:start
EN is low
db is "0x0000"
@:en_high
EN is high
@:en_low
EN is low
@:en_highMinus2
db is "0xf23a"
@:en_high+6
db is "0x0000"
@enduml
|
Définition participant par participant
|
Participant oriented
|
|
Plutôt que de déclarer le diagramme dans l'ordre chronologique, il est possible de le définir participant par participant.
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@WB
0 is idle
+200 is Proc.
+100 is Waiting
@WU
0 is Waiting
+500 is ok
@enduml
|
Rather than declare the diagram in chronological order, you can define it by participant.
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@WB
0 is idle
+200 is Proc.
+100 is Waiting
@WU
0 is Waiting
+500 is ok
@enduml
|
Choix du zoom
|
Setting scale
|
|
Il est possible de choisir une échelle d'affichage précise.
@startuml
concise "Web User" as WU
scale 100 as 50 pixels
@WU
0 is Waiting
+500 is ok
@enduml
WARNING This translation need to be updated. WARNING
|
You can also set a specific scale.
@startuml
concise "Web User" as WU
scale 100 as 50 pixels
@WU
0 is Waiting
+500 is ok
@enduml
When using absolute Times/Dates, 1 "tick" is equivalent to 1 second.
@startuml
concise "Season" as S
'30 days is scaled to 50 pixels
scale 2592000 as 50 pixels
@2000/11/01
S is "Winter"
@2001/02/01
S is "Spring"
@2001/05/01
S is "Summer"
@2001/08/01
S is "Fall"
@enduml
|
État initial
|
Initial state
|
|
Vous pouvez également définir un état initial.
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
WB is Initializing
WU is Absent
@WB
0 is idle
+200 is Processing
+100 is Waiting
@WU
0 is Waiting
+500 is ok
@enduml
|
You can also define an inital state.
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
WB is Initializing
WU is Absent
@WB
0 is idle
+200 is Processing
+100 is Waiting
@WU
0 is Waiting
+500 is ok
@enduml
|
État complexe
|
Intricated state
|
|
Un signal peut se trouver dans un état indéfini
@startuml
robust "Signal1" as S1
robust "Signal2" as S2
S1 has 0,1,2,hello
S2 has 0,1,2
@0
S1 is 0
S2 is 0
@100
S1 is {0,1} #SlateGrey
S2 is {0,1}
@200
S1 is 1
S2 is 0
@300
S1 is hello
S2 is {0,2}
@enduml
*[Ref. [QA-11936](https: forum.plantuml.net/11936) and [QA-15933](https:forum.plantuml.net/15933)]*
WARNING This translation need to be updated. WARNING
|
A signal could be in some undefined state.
Intricated or undefined robust state
@startuml
robust "Signal1" as S1
robust "Signal2" as S2
S1 has 0,1,2,hello
S2 has 0,1,2
@0
S1 is 0
S2 is 0
@100
S1 is {0,1} #SlateGrey
S2 is {0,1}
@200
S1 is 1
S2 is 0
@300
S1 is hello
S2 is {0,2}
@enduml
Intricated or undefined binary state
@startuml
clock "Clock" as C with period 2
binary "Enable" as EN
@0
EN is low
@1
EN is high
@3
EN is low
@5
EN is {low,high}
@10
EN is low
@enduml
[Ref. QA-11936 and QA-15933]
|
Hidden state
|
Hidden state
|
|
It is also possible to hide some state.
@startuml
concise "Web User" as WU
@0
WU is {-}
@100
WU is A1
@200
WU is {-}
@300
WU is {hidden}
@400
WU is A3
@500
WU is {-}
@enduml
*[Ref. [QA-12222](https://forum.plantuml.net/12222)]*
WARNING This translation need to be updated. WARNING
|
It is also possible to hide some state.
@startuml
concise "Web User" as WU
@0
WU is {-}
@100
WU is A1
@200
WU is {-}
@300
WU is {hidden}
@400
WU is A3
@500
WU is {-}
@enduml
@startuml
scale 1 as 50 pixels
concise state0
concise substate1
robust bit2
bit2 has HIGH,LOW
@state0
0 is 18_start
6 is s_dPause
8 is 10_data
14 is {hidden}
@substate1
0 is sSeq
4 is sPause
6 is {hidden}
8 is dSeq
12 is dPause
14 is {hidden}
@bit2
0 is HIGH
2 is LOW
4 is {hidden}
8 is HIGH
10 is LOW
12 is {hidden}
@enduml
[Ref. QA-12222]
|
Masquer l'axe du temps
|
Hide time axis
|
|
Il est possible de masquer l'axe du temps
@startuml
hide time-axis
concise "Web User" as WU
WU is Absent
@WU
0 is Waiting
+500 is ok
@enduml
|
It is possible to hide time axis.
@startuml
hide time-axis
concise "Web User" as WU
WU is Absent
@WU
0 is Waiting
+500 is ok
@enduml
|
Utilisation de l'heure et de la date
|
Using Time and Date
|
|
Il est possible d'utiliser l'heure ou la date.
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@2019/07/02
WU is Idle
WB is Idle
@2019/07/04
WU is Waiting : some note
WB is Processing : some other note
@2019/07/05
WB is Waiting
@enduml
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@1:15:00
WU is Idle
WB is Idle
@1:16:30
WU is Waiting : some note
WB is Processing : some other note
@1:17:30
WB is Waiting
@enduml
*[Ref. [QA-7019](https://forum.plantuml.net/7019/hh-mm-ss-time-format-in-timing-diagram)]*
|
It is possible to use time or date.
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@2019/07/02
WU is Idle
WB is Idle
@2019/07/04
WU is Waiting : some note
WB is Processing : some other note
@2019/07/05
WB is Waiting
@enduml
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@1:15:00
WU is Idle
WB is Idle
@1:16:30
WU is Waiting : some note
WB is Processing : some other note
@1:17:30
WB is Waiting
@enduml
[Ref. QA-7019]
|
|
Change Date Format
|
|
|
It is also possible to change date format.
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
use date format "YY-MM-dd"
@2019/07/02
WU is Idle
WB is Idle
@2019/07/04
WU is Waiting : some note
WB is Processing : some other note
@2019/07/05
WB is Waiting
@enduml
|
|
Manage time axis labels
|
|
|
You can manage the time-axis labels.
Label on each tick (by default)
@startuml
scale 31536000 as 40 pixels
use date format "yy-MM"
concise "OpenGL Desktop" as OD
@1992/01/01
OD is {hidden}
@1992/06/30
OD is 1.0
@1997/03/04
OD is 1.1
@1998/03/16
OD is 1.2
@2001/08/14
OD is 1.3
@2004/09/07
OD is 3.0
@2008/08/01
OD is 3.0
@2017/07/31
OD is 4.6
@enduml
Manual label (only when the state changes)
@startuml
scale 31536000 as 40 pixels
manual time-axis
use date format "yy-MM"
concise "OpenGL Desktop" as OD
@1992/01/01
OD is {hidden}
@1992/06/30
OD is 1.0
@1997/03/04
OD is 1.1
@1998/03/16
OD is 1.2
@2001/08/14
OD is 1.3
@2004/09/07
OD is 3.0
@2008/08/01
OD is 3.0
@2017/07/31
OD is 4.6
@enduml
[Ref. GH-1020]
|
Ajout de contraintes
|
Adding constraint
|
|
Il est possible d'afficher des contraintes de temps sur les diagrammes.
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
WB is Initializing
WU is Absent
@WB
0 is idle
+200 is Processing
+100 is Waiting
WB@0 <-> @50 : {50 ms lag}
@WU
0 is Waiting
+500 is ok
@200 <-> @+150 : {150 ms}
@enduml
|
It is possible to display time constraints on the diagrams.
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
WB is Initializing
WU is Absent
@WB
0 is idle
+200 is Processing
+100 is Waiting
WB@0 <-> @50 : {50 ms lag}
@WU
0 is Waiting
+500 is ok
@200 <-> @+150 : {150 ms}
@enduml
|
Période surlignée
|
Highlighted period
|
|
Vous pouvez surligner une partie du diagramme
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU -> WB : URL
WU is Waiting #LightCyan;line:Aqua
@200
WB is Proc.
@300
WU -> WB@350 : URL2
WB is Waiting
@+200
WU is ok
@+200
WB is Idle
highlight 200 to 450 #Gold;line:DimGrey : This is my caption
@enduml
*[Ref. [QA-10868](https://forum.plantuml.net/10868/highlighted-periods-in-timing-diagrams)]*
WARNING This translation need to be updated. WARNING
|
You can higlight a part of diagram.
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU -> WB : URL
WU is Waiting #LightCyan;line:Aqua
@200
WB is Proc.
@300
WU -> WB@350 : URL2
WB is Waiting
@+200
WU is ok
@+200
WB is Idle
highlight 200 to 450 #Gold;line:DimGrey : This is my caption
highlight 600 to 700 : This is another\nhighlight
@enduml
[Ref. QA-10868]
|
|
Using notes
|
|
|
You can use the note top of and note bottom of
keywords to define notes related to a single object or participant (available only for concise or binary object).
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU is Waiting
WB is Processing
note top of WU : first note\non several\nlines
note bottom of WU : second note\non several\nlines
@300
WB is Waiting
@enduml
[Ref. QA-6877, GH-1465]
|
Ajout de textes
|
Adding texts
|
|
Vous pouvez ajouter éventuellement un titre, une entête, un pied de page, une légende ou un libellé :
@startuml
Title Un titre
header: Une entête
footer: Un pied de page
legend
Une légende
end legend
caption Un libellé
robust "Navigateur web" as WB
concise "Internaute" as WU
@0
WU is Inactif
WB is Inactif
@100
WU is EnAttente
WB is EnTraitement
@300
WB is EnAttente
@enduml
|
You can optionally add a title, a header, a footer, a legend and a caption:
@startuml
Title This is my title
header: some header
footer: some footer
legend
Some legend
end legend
caption some caption
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU is Waiting
WB is Processing
@300
WB is Waiting
@enduml
|
Exemple complet
|
Complete example
|
|
Merci à Adam Rosien pour cet exemple
@startuml
concise "Client" as Client
concise "Server" as Server
concise "Response freshness" as Cache
Server is idle
Client is idle
@Client
0 is send
Client -> Server@+25 : GET
+25 is await
+75 is recv
+25 is idle
+25 is send
Client -> Server@+25 : GET\nIf-Modified-Since: 150
+25 is await
+50 is recv
+25 is idle
@100 <-> @275 : no need to re-request from server
@Server
25 is recv
+25 is work
+25 is send
Server -> Client@+25 : 200 OK\nExpires: 275
+25 is idle
+75 is recv
+25 is send
Server -> Client@+25 : 304 Not Modified
+25 is idle
@Cache
75 is fresh
+200 is stale
@enduml
|
Thanks to Adam Rosien for this example.
@startuml
concise "Client" as Client
concise "Server" as Server
concise "Response freshness" as Cache
Server is idle
Client is idle
@Client
0 is send
Client -> Server@+25 : GET
+25 is await
+75 is recv
+25 is idle
+25 is send
Client -> Server@+25 : GET\nIf-Modified-Since: 150
+25 is await
+50 is recv
+25 is idle
@100 <-> @275 : no need to re-request from server
@Server
25 is recv
+25 is work
+25 is send
Server -> Client@+25 : 200 OK\nExpires: 275
+25 is idle
+75 is recv
+25 is send
Server -> Client@+25 : 304 Not Modified
+25 is idle
@Cache
75 is fresh
+200 is stale
@enduml
|
Exemple numérique
|
Digital Example
|
|
@startuml
scale 5 as 150 pixels
clock clk with period 1
binary "enable" as en
binary "R/W" as rw
binary "data Valid" as dv
concise "dataBus" as db
concise "address bus" as addr
@6 as :write_beg
@10 as :write_end
@15 as :read_beg
@19 as :read_end
@0
en is low
db is "0x0"
addr is "0x03f"
rw is low
dv is 0
@:write_beg-3
en is high
@:write_beg-2
db is "0xDEADBEEF"
@:write_beg-1
dv is 1
@:write_beg
rw is high
@:write_end
rw is low
dv is low
@:write_end+1
rw is low
db is "0x0"
addr is "0x23"
@12
dv is high
@13
db is "0xFFFF"
@20
en is low
dv is low
@21
db is "0x0"
highlight :write_beg to :write_end #Gold:Write
highlight :read_beg to :read_end #lightBlue:Read
db@:write_beg-1 <-> @:write_end : setup time
db@:write_beg-1 -> addr@:write_end+1 : hold
@enduml
|
@startuml
scale 5 as 150 pixels
clock clk with period 1
binary "enable" as en
binary "R/W" as rw
binary "data Valid" as dv
concise "dataBus" as db
concise "address bus" as addr
@6 as :write_beg
@10 as :write_end
@15 as :read_beg
@19 as :read_end
@0
en is low
db is "0x0"
addr is "0x03f"
rw is low
dv is 0
@:write_beg-3
en is high
@:write_beg-2
db is "0xDEADBEEF"
@:write_beg-1
dv is 1
@:write_beg
rw is high
@:write_end
rw is low
dv is low
@:write_end+1
rw is low
db is "0x0"
addr is "0x23"
@12
dv is high
@13
db is "0xFFFF"
@20
en is low
dv is low
@21
db is "0x0"
highlight :write_beg to :write_end #Gold:Write
highlight :read_beg to :read_end #lightBlue:Read
db@:write_beg-1 <-> @:write_end : setup time
db@:write_beg-1 -> addr@:write_end+1 : hold
@enduml
|
Ajout de couleur
|
Adding color
|
|
Vous pouvez ajouter de la couleur
@startuml
concise "LR" as LR
concise "ST" as ST
LR is AtPlace #palegreen
ST is AtLoad #gray
@LR
0 is Lowering
100 is Lowered #pink
350 is Releasing
@ST
200 is Moving
@enduml
[Réf. QA-5776]
|
You can add color.
@startuml
concise "LR" as LR
concise "ST" as ST
LR is AtPlace #palegreen
ST is AtLoad #gray
@LR
0 is Lowering
100 is Lowered #pink
350 is Releasing
@ST
200 is Moving
@enduml
[Ref. QA-5776]
|
|
Using (global) style
|
|
|
Without style (by default)
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
WB is Initializing
WU is Absent
@WB
0 is idle
+200 is Processing
+100 is Waiting
WB@0 <-> @50 : {50 ms lag}
@WU
0 is Waiting
+500 is ok
@200 <-> @+150 : {150 ms}
@enduml
With style
You can use style to change rendering of elements.
@startuml
<style>
timingDiagram {
document {
BackGroundColor SandyBrown
}
constraintArrow {
LineStyle 2-1
LineThickness 3
LineColor Blue
}
}
</style>
robust "Web Browser" as WB
concise "Web User" as WU
WB is Initializing
WU is Absent
@WB
0 is idle
+200 is Processing
+100 is Waiting
WB@0 <-> @50 : {50 ms lag}
@WU
0 is Waiting
+500 is ok
@200 <-> @+150 : {150 ms}
@enduml
[Ref. QA-14340]
|
|
Applying Colors to specific lines
|
|
|
You can use the <style> tags and sterotyping to give a name to line attributes.
@startuml
<style>
timingDiagram {
.red {
LineColor red
}
.blue {
LineColor blue
LineThickness 5
}
}
</style>
clock clk with period 1
binary "Input Signal 1" as IS1
binary "Input Signal 2" as IS2 <<blue>>
binary "Output Signal 1" as OS1 <<red>>
@0
IS1 is low
IS2 is high
OS1 is low
@2
OS1 is high
@4
OS1 is low
@5
IS1 is high
OS1 is high
@6
IS2 is low
@10
IS1 is low
OS1 is low
@enduml
[Ref. QA-15870]
|
|
Compact mode
|
|
|
You can use compact command to compact the timing layout.
By default
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
robust "Web Browser2" as WB2
@0
WU is Waiting
WB is Idle
WB2 is Idle
@200
WB is Proc.
@300
WB is Waiting
WB2 is Waiting
@500
WU is ok
@700
WB is Idle
@enduml
Global mode with mode compact
@startuml
mode compact
robust "Web Browser" as WB
concise "Web User" as WU
robust "Web Browser2" as WB2
@0
WU is Waiting
WB is Idle
WB2 is Idle
@200
WB is Proc.
@300
WB is Waiting
WB2 is Waiting
@500
WU is ok
@700
WB is Idle
@enduml
Local mode with only compact on element
@startuml
compact robust "Web Browser" as WB
compact concise "Web User" as WU
robust "Web Browser2" as WB2
@0
WU is Waiting
WB is Idle
WB2 is Idle
@200
WB is Proc.
@300
WB is Waiting
WB2 is Waiting
@500
WU is ok
@700
WB is Idle
@enduml
[Ref. QA-11130]
|
|
Scaling analog signal
|
|
|
You can scale analog signal.
Without scaling: 0-max (by default)
@startuml
title Between 0-max (by default)
analog "Analog" as A
@0
A is 350
@100
A is 450
@300
A is 350
@enduml
With scaling: min-max
@startuml
title Between min-max
analog "Analog" between 350 and 450 as A
@0
A is 350
@100
A is 450
@300
A is 350
@enduml
[Ref. QA-17161]
|
|
Customise analog signal
|
|
|
Without any customisation (by default)
@startuml
analog "Vcore" as VDD
analog "VCC" as VCC
@0
VDD is 0
VCC is 3
@2
VDD is 0
@3
VDD is 6
VCC is 6
VDD@1 -> VCC@2 : "test"
@enduml
With customisation (on scale, ticks and height)
@startuml
analog "Vcore" as VDD
analog "VCC" between -4.5 and 6.5 as VCC
VCC ticks num on multiple 3
VCC is 200 pixels height
@0
VDD is 0
VCC is 3
@2
VDD is 0
@3
VDD is 6
VCC is 6
VDD@1 -> VCC@2 : "test"
@enduml
[Ref. QA-11288]
|
|
Order state of robust signal
|
|
|
Without order (by default)
@startuml
robust "Flow rate" as rate
@0
rate is high
@5
rate is none
@6
rate is low
@enduml
With order
@startuml
robust "Flow rate" as rate
rate has high,low,none
@0
rate is high
@5
rate is none
@6
rate is low
@enduml
With order and label
@startuml
robust "Flow rate" as rate
rate has "35 gpm" as high
rate has "15 gpm" as low
rate has "0 gpm" as none
@0
rate is high
@5
rate is none
@6
rate is low
@enduml
[Ref. QA-6651]
|
|
Defining a timing diagram
|
|
|
By Clock (@clk)
@startuml
clock "clk" as clk with period 50
concise "Signal1" as S1
robust "Signal2" as S2
binary "Signal3" as S3
@clk*0
S1 is 0
S2 is 0
@clk*1
S1 is 1
S3 is high
@clk*2
S3 is down
@clk*3
S1 is 1
S2 is 1
S3 is 1
@clk*4
S3 is down
@enduml
By Signal (@S)
@startuml
clock "clk" as clk with period 50
concise "Signal1" as S1
robust "Signal2" as S2
binary "Signal3" as S3
@S1
0 is 0
50 is 1
150 is 1
@S2
0 is 0
150 is 1
@S3
50 is 1
100 is low
150 is high
200 is 0
@enduml
By Time (@time)
@startuml
clock "clk" as clk with period 50
concise "Signal1" as S1
robust "Signal2" as S2
binary "Signal3" as S3
@0
S1 is 0
S2 is 0
@50
S1 is 1
S3 is 1
@100
S3 is low
@150
S1 is 1
S2 is 1
S3 is high
@200
S3 is 0
@enduml
[Ref. QA-9053]
|
|
Annotate signal with comment
|
|
|
@startuml
binary "Binary Serial Data" as D
robust "Robust" as R
concise "Concise" as C
@-3
D is low: idle
R is lo: idle
C is 1: idle
@-1
D is high: start
R is hi: start
C is 0: start
@0
D is low: 1 lsb
R is lo: 1 lsb
C is 1: lsb
@1
D is high: 0
R is hi: 0
C is 0
@6
D is low: 1
R is lo: 1
C is 1
@7
D is high: 0 msb
R is hi: 0 msb
C is 0: msb
@8
D is low: stop
R is lo: stop
C is 1: stop
@0 <-> @8 : Serial data bits for ASCII "A" (Little Endian)
@enduml
[Ref. QA-15762, and QH-888]
|
|
|