Move examples over to dhall

This commit is contained in:
Gregor Reitzenstein 2020-12-15 13:04:21 +01:00
parent 7b5d8de93f
commit e22ed819bb
3 changed files with 21 additions and 18 deletions

View File

@ -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!

20
examples/bffh.dhall Normal file
View File

@ -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"
}

View File

@ -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"