diff --git a/examples/README.md b/examples/README.md index f3b2795..1afb1a7 100644 --- a/examples/README.md +++ b/examples/README.md @@ -2,11 +2,8 @@ wirklich nur um das API zu testen. ATM implementiert: machine::read -1. `cargo run -- --print-default > /tmp/bffh.toml` um eine default config zu generieren -1. in /tmp/bffh.toml den parameter `machines` auf ./examples/machines.toml umbiegen - * Bei mir z.b. `~/Development/FabInfra/Diflouroborane/examples/machines.toml` 1. Ein mosquitto o.รค MQTT Server starten * Bringt aber leider gerade nicht viel ^^' -1. `cargo run -- -c /tmp/bffh.toml` +1. `cargo run -- -c examples/bffh.dhall` 1. ??? 1. PROFIT! diff --git a/examples/bffh.dhall b/examples/bffh.dhall new file mode 100644 index 0000000..b2ffb40 --- /dev/null +++ b/examples/bffh.dhall @@ -0,0 +1,20 @@ +{ actor_connections = [{ _1 = "Testmachine", _2 = "Actor" }] +, actors = + { Actor = { name = "Shelly", params = {=} } + } +, init_connections = [{ _1 = "Initiator", _2 = "Testmachine" }] +, initiators = + { Initiator = { name = "TCP-Listen", params = {=} } + } +, listens = [{ address = "localhost", port = Some 59661 }] +, machines = + { Testmachine = + { description = Some "A test machine" + , disclose = "lab.test.read" + , manage = "lab.test.admin" + , name = "Testmachine" + , read = "lab.test.read" + , write = "lab.test.write" + } } +, mqtt_url = "tcp://localhost:1883" +} diff --git a/examples/machines.toml b/examples/machines.toml deleted file mode 100644 index 866aef1..0000000 --- a/examples/machines.toml +++ /dev/null @@ -1,14 +0,0 @@ -[e5408099-d3e5-440b-a92b-3aabf7683d6b] -name = "Somemachine" -disclose = "lab.some.disclose" -read = "lab.some.read" -write = "lab.some.write" -manage = "lab.some.admin" - -[eaabebae-34d1-4a3a-912a-967b495d3d6e] -name = "Testmachine" -description = "An optional description" -disclose = "lab.test.read" -read = "lab.test.read" -write = "lab.test.write" -manage = "lab.test.admin"