plugins {
id 'io.jumpco.open.kfsm.viz-plugin' version '1.5.2.4'
}
The Gradle plugin provided for parsing configured files containing the DSL in order to construct a model of the FSM for visual representation. This model includes the content of the lambdas used in guards and actions.
Plugin Id: io.jumpco.open.kfsm.viz-plugin
Version: 1.5.2.4
plugins {
id 'io.jumpco.open.kfsm.viz-plugin' version '1.5.2.4'
}
plugins {
id("io.jumpco.open.kfsm.viz-plugin") version "1.5.2.4"
}
kfsmViz {
fsm('PacketReaderFSM') {
input = file('src/main/kotlin/PacketReader.kt') // (1)
isGeneratePlantUml = true // (2)
isGenerateAsciidoc = true // (3)
output = 'packet-reader' // (4)
outputFolder = file('generated') // (5)
plantUmlName = 'packet-reader-statediagram.plantuml' // (6)
asciidocName = 'packet-reader-state-table.adoc' // (7)
}
}
import io.jumpco.open.kfsm.gradle.VizPluginExtension
configure<VizPluginExtension> {
fsm("PacketReaderFSM") {
input = file("src/main/kotlin/PacketReader.kt") // (1)
isGeneratePlantUml = true // (2)
isGenerateAsciidoc = true // (3)
output = "packet-reader" // (4)
outputFolder = file("generated") // (5)
plantUmlName = "packet-reader-statediagram.plantuml" // (6)
asciidocName = "packet-reader-state-table.adoc" // (7)
}
}
input: File
: Required, relative path/name of relevant source file
isGeneratePlantUml: Boolean
: Required default is false
isGenerateAsciidoc: Boolean
: Required default is false
output: String
: Optional filename base. The default is the classname
outputFolder: File
: Optional directory for output file. Default is $buildDir/generated
plantUmlName: String
: Optional filename for plantuml output. Default is $output.plantuml
asciidocName: String
: Optional name of Asciidoc output file. Default is $output.adoc
kfsmViz {
fsm('TurnstileFSM') {
input = file('resources/Turnstile.kt')
output = 'turnstile'
outputFolder = file('generated')
isGeneratePlantUml = true
isGenerateAsciidoc = true
}
fsm('PacketReaderFSM') {
input = file('resources/PacketReader.kt')
output = 'packet-reader'
outputFolder = file('generated')
isGeneratePlantUml = true
isGenerateAsciidoc = true
}
}
Start | Event[Guard] | Target | Action |
---|---|---|---|
LOCKED |
COIN |
UNLOCKED |
|
UNLOCKED |
COIN |
UNLOCKED |
|
UNLOCKED |
PASS |
LOCKED |
|
Start | Event[Guard] | Target | Action |
---|---|---|---|
[*] |
CTRL |
RCVPCKT |
|
RCVPCKT |
CTRL |
RCVDATA |
|
RCVPCKT |
BYTE |
RCVCHK |
|
RCVDATA |
BYTE |
RCVDATA |
|
RCVDATA |
CTRL |
RCVPCKT |
|
RCVDATA |
ESC |
RCVESC |
|
RCVESC |
ESC |
RCVDATA |
|
RCVESC |
CTRL |
RCVDATA |
|
RCVCHK |
BYTE |
RCVCHK |
|
RCVCHK |
ESC |
RCVCHKESC |
|
RCVCHK |
CTRL |
CHKSUM |
|
CHKSUM |
<<automatic>> |
[*] |
|
CHKSUM |
<<automatic>> |
[*] |
|
RCVCHKESC |
ESC |
RCVCHK |
|
RCVCHKESC |
CTRL |
RCVCHK |
|