2024-06-18 18:32:39 +00:00
|
|
|
#import "/src/lib.typ" as chronos
|
|
|
|
|
|
|
|
|
|
|
|
#chronos.diagram({
|
2024-06-18 19:31:13 +00:00
|
|
|
import chronos: *
|
2024-06-18 18:32:39 +00:00
|
|
|
_seq("User", "A", comment: "DoWork", enable-dst: true)
|
|
|
|
_seq("A", "B", comment: [#sym.quote.angle.l createRequest #sym.quote.angle.r], enable-dst: true)
|
|
|
|
_seq("B", "C", comment: "DoWork", enable-dst: true)
|
2024-06-18 21:01:53 +00:00
|
|
|
_seq("C", "B", comment: "WorkDone", destroy-src: true, disable-src: true, dashed: true)
|
2024-06-18 18:32:39 +00:00
|
|
|
_seq("B", "A", comment: "RequestCreated", disable-src: true, dashed: true)
|
|
|
|
_seq("A", "User", comment: "Done", disable-src: true)
|
|
|
|
})
|
|
|
|
|
|
|
|
#chronos.diagram({
|
2024-06-18 19:31:13 +00:00
|
|
|
import chronos: *
|
2024-06-18 21:00:41 +00:00
|
|
|
_seq("User", "A", comment: "DoWork", enable-dst: true, lifeline-style: (fill: rgb("#FFBBBB")))
|
|
|
|
_seq("A", "A", comment: "Internal call", enable-dst: true, lifeline-style: (fill: rgb("#E9967A")))
|
2024-06-18 18:32:39 +00:00
|
|
|
_seq("A", "B", comment: [#sym.quote.angle.l createRequest #sym.quote.angle.r], enable-dst: true)
|
|
|
|
_seq("B", "A", comment: "RequestCreated", disable-src: true, disable-dst: true, dashed: true)
|
|
|
|
_seq("A", "User", comment: "Done", disable-src: true)
|
|
|
|
})
|
|
|
|
|
|
|
|
#chronos.diagram({
|
2024-06-18 19:31:13 +00:00
|
|
|
import chronos: *
|
2024-06-18 18:32:39 +00:00
|
|
|
_seq("alice", "bob", comment: "hello", enable-dst: true)
|
|
|
|
_seq("bob", "bob", comment: "self call", enable-dst: true)
|
2024-06-18 21:00:41 +00:00
|
|
|
_seq("bill", "bob", comment: "hello from thread 2", enable-dst: true, lifeline-style: (fill: rgb("#005500")))
|
|
|
|
_seq("bob", "george", comment: "create", create-dst: true)
|
2024-06-18 18:32:39 +00:00
|
|
|
_seq("bob", "bill", comment: "done in thread 2", disable-src: true, dashed: true)
|
|
|
|
_seq("bob", "bob", comment: "rc", disable-src: true, dashed: true)
|
|
|
|
_seq("bob", "george", comment: "delete", destroy-dst: true)
|
|
|
|
_seq("bob", "alice", comment: "success", disable-src: true, dashed: true)
|
2024-06-18 19:31:13 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
#chronos.diagram({
|
|
|
|
import chronos: *
|
|
|
|
_seq("alice", "bob", comment: "hello1", enable-dst: true)
|
|
|
|
_seq("bob", "charlie", comment: "hello2", enable-dst: true, disable-src: true)
|
|
|
|
_seq("charlie", "alice", comment: "ok", dashed: true, disable-src: true)
|
2024-06-18 21:01:53 +00:00
|
|
|
})
|
|
|
|
|
2024-06-19 15:52:56 +00:00
|
|
|
#chronos.diagram({
|
|
|
|
import chronos: *
|
|
|
|
_seq("?", "Alice", comment: [?->\ *short* to actor1])
|
|
|
|
_seq("[", "Alice", comment: [\[->\ *from start* to actor1])
|
|
|
|
_seq("[", "Bob", comment: [\[->\ *from start* to actor2])
|
|
|
|
_seq("?", "Bob", comment: [?->\ *short* to actor2])
|
|
|
|
_seq("Alice", "]", comment: [->\]\ from actor1 *to end*])
|
|
|
|
_seq("Alice", "?", comment: [->?\ *short* from actor1])
|
|
|
|
_seq("Alice", "Bob", comment: [->\ from actor1 to actor2])
|
2024-07-30 10:38:23 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
#chronos.diagram({
|
|
|
|
import chronos: *
|
|
|
|
_par("alice", display-name: "Alice")
|
|
|
|
_par("bob", display-name: "Bob")
|
|
|
|
_par("craig", display-name: "Craig")
|
|
|
|
|
|
|
|
_seq("bob", "alice")
|
|
|
|
_seq("bob", "craig")
|
|
|
|
_gap()
|
|
|
|
|
|
|
|
_sync({
|
|
|
|
_seq("bob", "alice")
|
|
|
|
_seq("bob", "craig")
|
|
|
|
})
|
|
|
|
_gap()
|
|
|
|
|
|
|
|
_seq("alice", "bob")
|
|
|
|
_seq("craig", "bob")
|
|
|
|
_gap()
|
|
|
|
|
|
|
|
_sync({
|
|
|
|
_seq("alice", "bob")
|
|
|
|
_seq("craig", "bob")
|
|
|
|
})
|
|
|
|
_gap()
|
|
|
|
|
|
|
|
_sync({
|
|
|
|
_seq("alice", "bob", enable-dst: true)
|
|
|
|
_seq("craig", "bob")
|
|
|
|
})
|
|
|
|
_gap()
|
|
|
|
|
|
|
|
_evt("bob", "disable")
|
2024-06-19 15:52:56 +00:00
|
|
|
})
|