17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-04 17:47:14 +01:00

First implementation of graph vehicles

This commit is contained in:
2026-10-14 12:20:49 +02:00
parent 70abf879b3
commit 1ef465264c
121 changed files with 12292 additions and 729 deletions

View File

@@ -0,0 +1,23 @@
// expect: ok
// two instances of a module (with a nested module): ids "<module>/<block>", inputs, outputs, a passed input
{
"format": "maszyna-vehicle-graph", "version": 2,
"nodes": [
{ "id": "btn_on", "type": "cab.switch", "params": { "behaviour": "monostable" } },
{ "id": "btn_off", "type": "cab.switch", "params": { "behaviour": "monostable" } },
{ "id": "k1", "type": "module", "params": { "file": "modules/latch.vhgm" } },
{ "id": "k2", "type": "module", "params": { "file": "modules\\latch.vhgm" } },
{ "id": "c", "type": "logic.const", "params": { "value": 7 } },
{ "id": "sum", "type": "logic.math", "params": { "op": "add" } },
{ "id": "lamp", "type": "fb.lamp" },
{ "id": "lamp2", "type": "fb.lamp" }
],
"connections": [
{ "from": "btn_on.pos", "to": "k1.on" }, { "from": "btn_off.pos", "to": "k1.off" },
{ "from": "k1.q", "to": "lamp.on" },
{ "from": "k1.nq", "to": "k2.on" }, { "from": "k1.q", "to": "k2.off" },
{ "from": "c.q", "to": "k1.note" },
{ "from": "k1.echo", "to": "sum.a" }, { "from": "k2.echo", "to": "sum.b" },
{ "from": "k1.nq2", "to": "lamp2.on" }
]
}