mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-25 08:07:57 +01:00
Move examples over to dhall
This commit is contained in:
parent
7b5d8de93f
commit
e22ed819bb
@ -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
20
examples/bffh.dhall
Normal 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"
|
||||
}
|
@ -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"
|
Loading…
Reference in New Issue
Block a user