restructured code in separated files

This commit is contained in:
2024-06-18 21:31:13 +02:00
parent 94d0eb286e
commit ed84e06560
12 changed files with 351 additions and 270 deletions

Binary file not shown.

View File

@ -10,7 +10,7 @@ Alice <-- Bob: Another authentication Response
#chronos.diagram({
import "/src/diagram.typ": *
import chronos: *
_seq("Alice", "Bob", comment: "Authentication Request")
_seq("Bob", "Alice", comment: "Authentication Response", dashed: true)
@ -19,19 +19,19 @@ Alice <-- Bob: Another authentication Response
})
#chronos.diagram({
import "/src/diagram.typ": *
import chronos: *
_seq("Bob", "Alice", comment: "bonjour", color: red)
_seq("Alice", "Bob", comment: "ok", color: blue)
})
#chronos.diagram({
import "/src/diagram.typ": *
import chronos: *
_seq("Alice", "Bob", comment: "This is a test")
_seq("Alice", "Callum", comment: "This is another test with a long text")
})
#chronos.diagram({
import "/src/diagram.typ": *
import chronos: *
_seq("Alice", "Bob", comment: "Authentication Request")
_seq("Bob", "Alice", comment: "Authentication Failure")
@ -45,7 +45,7 @@ Alice <-- Bob: Another authentication Response
})
#chronos.diagram({
import "/src/diagram.typ": *
import chronos: *
_sep("Initialization")
_seq("Alice", "Bob", comment: "Authentication Request")
_seq("Bob", "Alice", comment: "Authentication Response", dashed: true)
@ -56,7 +56,7 @@ Alice <-- Bob: Another authentication Response
})
#chronos.diagram({
import "/src/diagram.typ": *
import chronos: *
_seq("Alice", "Bob", comment: "message 1")
_seq("Bob", "Alice", comment: "ok", dashed: true)
_gap()
@ -68,7 +68,7 @@ Alice <-- Bob: Another authentication Response
})
#chronos.diagram({
import "/src/diagram.typ": *
import chronos: *
_seq("Alice", "Alice", comment: "On the\nright")
_seq("Alice", "Alice", flip: true, comment: "On the\nleft")
})

Binary file not shown.

View File

@ -2,7 +2,7 @@
#chronos.diagram({
import "/src/diagram.typ": *
import chronos: *
_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)
@ -12,7 +12,7 @@
})
#chronos.diagram({
import "/src/diagram.typ": *
import chronos: *
_seq("User", "A", comment: "DoWork", enable-dst: true)
_seq("A", "A", comment: "Internal call", enable-dst: true)
_seq("A", "B", comment: [#sym.quote.angle.l createRequest #sym.quote.angle.r], enable-dst: true)
@ -21,7 +21,7 @@
})
#chronos.diagram({
import "/src/diagram.typ": *
import chronos: *
_seq("alice", "bob", comment: "hello", enable-dst: true)
_seq("bob", "bob", comment: "self call", enable-dst: true)
_seq("bill", "bob", comment: "hello from thread 2", enable-dst: true)
@ -30,4 +30,11 @@
_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)
})
#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)
})